kate
toolviewmanager.cpp
Go to the documentation of this file.00001 /* This file is part of the KDE project 00002 Copyright (C) 2002 Joseph Wenninger <jowenn@kde.org> 00003 00004 This library is free software; you can redistribute it and/or 00005 modify it under the terms of the GNU Library General Public 00006 License version 2 as published by the Free Software Foundation. 00007 00008 This library is distributed in the hope that it will be useful, 00009 but WITHOUT ANY WARRANTY; without even the implied warranty of 00010 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 00011 Library General Public License for more details. 00012 00013 You should have received a copy of the GNU Library General Public License 00014 along with this library; see the file COPYING.LIB. If not, write to 00015 the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, 00016 Boston, MA 02110-1301, USA. 00017 */ 00018 00019 #include "toolviewmanager.h" 00020 #include "toolviewmanager.moc" 00021 00022 #include "plugin.h" 00023 #include "documentmanager.h" 00024 #include "pluginmanager.h" 00025 00026 #include "../app/katemainwindow.h" 00027 00028 namespace Kate 00029 { 00030 00031 class PrivateToolViewManager 00032 { 00033 public: 00034 PrivateToolViewManager () 00035 { 00036 } 00037 00038 ~PrivateToolViewManager () 00039 { 00040 } 00041 00042 KateMainWindow *toolViewMan; 00043 }; 00044 00045 ToolViewManager::ToolViewManager (void *toolViewManager) : QObject ((KateMainWindow*) toolViewManager) 00046 { 00047 d = new PrivateToolViewManager (); 00048 d->toolViewMan = (KateMainWindow*) toolViewManager; 00049 } 00050 00051 ToolViewManager::~ToolViewManager () 00052 { 00053 delete d; 00054 } 00055 00056 QWidget *ToolViewManager::createToolView (const QString &identifier, ToolViewManager::Position pos, const QPixmap &icon, const QString &text) 00057 { 00058 return d->toolViewMan->createToolView (identifier, (KMultiTabBar::KMultiTabBarPosition)pos, icon, text); 00059 } 00060 00061 bool ToolViewManager::moveToolView (QWidget *widget, ToolViewManager::Position pos) 00062 { 00063 if (!widget || !widget->qt_cast("KateMDI::ToolView")) 00064 return false; 00065 00066 return d->toolViewMan->moveToolView (static_cast<KateMDI::ToolView*>(widget), (KMultiTabBar::KMultiTabBarPosition)pos); 00067 } 00068 00069 bool ToolViewManager::showToolView(QWidget *widget) 00070 { 00071 if (!widget || !widget->qt_cast("KateMDI::ToolView")) 00072 return false; 00073 00074 return d->toolViewMan->showToolView (static_cast<KateMDI::ToolView*>(widget)); 00075 } 00076 00077 bool ToolViewManager::hideToolView(QWidget *widget) 00078 { 00079 if (!widget || !widget->qt_cast("KateMDI::ToolView")) 00080 return false; 00081 00082 return d->toolViewMan->hideToolView (static_cast<KateMDI::ToolView*>(widget)); 00083 } 00084 00085 }