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 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 
00045     KDockWidget *parentDockWidget();
00046 
00047     virtual void insertWidget (KDockWidget *w, QPixmap, const QString &, int &);
00048     virtual void showWidget (KDockWidget *w);
00049     virtual void setToolTip (KDockWidget *, QString &);
00050     virtual void setPixmap(KDockWidget*,const QPixmap&);
00051     virtual void undockWidget(KDockWidget*);
00052     virtual void removeWidget(KDockWidget*);
00053 
00054     void hideIfNeeded();
00055 
00056     virtual void save(KConfig *,const QString& group_or_prefix);
00057     virtual void load(KConfig *,const QString& group_or_prefix);
00058 
00059     virtual void save(QDomElement&);
00060     virtual void load(QDomElement&);
00061 
00062 
00063   public slots:
00064     void init();
00065     void collapseOverlapped();
00066     void toggle();
00067     void nextToolView();
00068     void prevToolView();
00069   protected slots:
00070     void tabClicked(int);
00071     void delayedRaise();
00072     void changeOverlapMode();
00073   private:
00074     QWidget *m_mainWin;
00075     QWidgetStack *m_ws;
00076     KMultiTabBar *m_tb;
00077     int mTabCnt;
00078     int oldtab;
00079     int m_previousTab;
00080     int m_position;
00081     QMap<KDockWidget*,int> m_map;
00082     QMap<int,KDockWidget*> m_revMap;
00083     QMap<KDockWidget*,KDockButton_Private*> m_overlapButtons;
00084     QStringList itemNames;
00085     QMap<QString,QString> tabCaptions;
00086     QMap<QString,QString> tabTooltips;
00087     int m_inserted;
00088     int m_delayedRaise;
00089     bool m_vertical;
00090     bool m_block;
00091     bool m_tabSwitching;
00092 
00093   signals:
00094     void activated(KMdiDockContainer*);
00095     void deactivated(KMdiDockContainer*);
00096 };
00097 
00098 #endif
00099 
00100 // kate: space-indent on; indent-width 2; replace-tabs on;
KDE Logo
This file is part of the documentation for kmdi Library Version 3.2.0.
Documentation copyright © 1996-2004 the KDE developers.
Generated on Wed Feb 4 12:36:51 2004 by doxygen 1.2.18 written by Dimitri van Heesch, © 1997-2003