kmdi Library API Documentation

kmdidockcontainer.h

00001 /* This file is part of the KDE project 00002 Copyright (C) 2002 Christoph Cullmann <cullmann@kde.org> 00003 Copyright (C) 2002,2003 Joseph Wenninger <jowenn@kde.org> 00004 00005 This library is free software; you can redistribute it and/or 00006 modify it under the terms of the GNU Library General Public 00007 License version 2 as published by the Free Software Foundation. 00008 00009 This library is distributed in the hope that it will be useful, 00010 but WITHOUT ANY WARRANTY; without even the implied warranty of 00011 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 00012 Library General Public License for more details. 00013 00014 You should have received a copy of the GNU Library General Public License 00015 along with this library; see the file COPYING.LIB. If not, write to 00016 the Free Software Foundation, Inc., 59 Temple Place - Suite 330, 00017 Boston, MA 02111-1307, USA. 00018 */ 00019 00020 #ifndef _KMDI_DOCK_CONTAINER_ 00021 #define _KMDI_DOCK_CONTAINER_ 00022 00023 #include <qwidget.h> 00024 #include <qstringlist.h> 00025 #include <kdockwidget.h> 00026 #include <qmap.h> 00027 #include <qdom.h> 00028 00029 # include <kdockwidget_p.h> 00030 00031 #include <qpushbutton.h> 00032 00033 class QWidgetStack; 00034 class KMultiTabBar; 00035 class KDockButton_Private; 00036 00037 class KMDI_EXPORT KMdiDockContainer: public QWidget, public KDockContainer 00038 { 00039 Q_OBJECT 00040 00041 public: 00042 KMdiDockContainer( QWidget *parent, QWidget *win, int position, int flags ); 00043 virtual ~KMdiDockContainer(); 00044 00046 KDockWidget *parentDockWidget(); 00047 00052 virtual void insertWidget ( KDockWidget *w, QPixmap, const QString &, int & ); 00053 00061 virtual void showWidget ( KDockWidget *w ); 00062 00067 virtual void setToolTip ( KDockWidget *, QString & ); 00068 00072 virtual void setPixmap( KDockWidget* widget, const QPixmap& pixmap ); 00073 00077 virtual void undockWidget( KDockWidget* dwdg ); 00078 00083 virtual void removeWidget( KDockWidget* ); 00084 00088 void hideIfNeeded(); 00089 00097 virtual void save( KConfig *, const QString& group_or_prefix ); 00098 00106 virtual void load( KConfig *, const QString& group_or_prefix ); 00107 00111 virtual void save( QDomElement& ); 00112 00116 virtual void load( QDomElement& ); 00117 00121 void setStyle( int ); 00122 00123 protected: 00124 bool eventFilter( QObject*, QEvent* ); 00125 00126 public slots: 00127 void init(); 00128 void collapseOverlapped(); 00129 void toggle(); 00130 void nextToolView(); 00131 void prevToolView(); 00132 protected slots: 00133 void tabClicked( int ); 00134 void delayedRaise(); 00135 void changeOverlapMode(); 00136 private: 00137 QWidget *m_mainWin; 00138 QWidgetStack *m_ws; 00139 KMultiTabBar *m_tb; 00140 int mTabCnt; 00141 int oldtab; 00142 int m_previousTab; 00143 int m_position; 00144 int m_separatorPos; 00145 QMap<KDockWidget*, int> m_map; 00146 QMap<int, KDockWidget*> m_revMap; 00147 QMap<KDockWidget*, KDockButton_Private*> m_overlapButtons; 00148 QStringList itemNames; 00149 QMap<QString, QString> tabCaptions; 00150 QMap<QString, QString> tabTooltips; 00151 int m_inserted; 00152 int m_delayedRaise; 00153 bool m_horizontal; 00154 bool m_block; 00155 bool m_tabSwitching; 00156 QObject *m_dragPanel; 00157 KDockManager *m_dockManager; 00158 QMouseEvent *m_startEvent; 00159 enum MovingState {NotMoving = 0, WaitingForMoveStart, Moving} m_movingState; 00160 signals: 00161 void activated( KMdiDockContainer* ); 00162 void deactivated( KMdiDockContainer* ); 00163 }; 00164 00165 #endif 00166 00167 // kate: space-indent off; tab-width 4; replace-tabs off; indent-mode csands;
KDE Logo
This file is part of the documentation for kmdi Library Version 3.4.0.
Documentation copyright © 1996-2004 the KDE developers.
Generated on Thu Apr 14 00:37:13 2005 by doxygen 1.3.7 written by Dimitri van Heesch, © 1997-2003