kmdi Library API Documentation

kmdiguiclient.h

00001 /* This file is part of the KDE libraries
00002    Copyright (C) 2003 Joseph Wenninger
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., 59 Temple Place - Suite 330,
00016    Boston, MA 02111-1307, USA.
00017 */
00018 
00019 #ifndef KMDIGUICLIENT_H
00020 #define KMDIGUICLIENT_H
00021 
00022 #include <qobject.h>
00023 #include <qguardedptr.h>
00024 #include <kxmlguiclient.h>
00025 #include <kaction.h>
00026 #include "kmdidefines.h"
00027 
00028 class KMainWindow;
00029 class KToolBar;
00030 class KMdiToolViewAccessor;
00031 class KMdiMainFrm;
00032 class KDockWidget;
00033 
00034 namespace KMDIPrivate {
00035 
00036 class KMDIGUIClient : public QObject,
00037                        public KXMLGUIClient
00038 {
00039     Q_OBJECT
00040 public:
00041     KMDIGUIClient( KMdiMainFrm *mdiMainFrm, bool showMDIModeAction, const char *name = 0 );
00042     virtual ~KMDIGUIClient();
00043 
00044     void addToolView(KMdiToolViewAccessor*);
00045 private slots:
00046     void clientAdded( KXMLGUIClient *client );
00047     void setupActions();
00048     void changeViewMode(int id);
00049     void actionDeleted(QObject*);
00050     void mdiModeHasBeenChangedTo(KMdi::MdiMode);
00051 signals:
00052     void toggleTop();
00053     void toggleLeft();
00054     void toggleRight();
00055     void toggleBottom();
00056 
00057 private:
00058     class KMDIGUIClientPrivate;
00059     KMDIGUIClientPrivate *d;
00060     KMdi::MdiMode m_mdiMode;
00061 
00062     QGuardedPtr<KMdiMainFrm> m_mdiMainFrm;
00063     QPtrList<KAction> m_toolViewActions;
00064     QPtrList<KAction> m_documentViewActions;
00065 
00066     KActionMenu *m_docMenu;
00067     KActionMenu *m_toolMenu;
00068     KSelectAction *m_mdiModeAction;
00069 
00070     KActionMenu *m_gotoToolDockMenu;
00071 };
00072 
00073 
00074 class ToggleToolViewAction:public KToggleAction
00075 {
00076 Q_OBJECT
00077 public:
00078         ToggleToolViewAction( const QString& text, const KShortcut& cut = KShortcut(),KDockWidget *dw=0,KMdiMainFrm *mdiMainFrm=0,
00079         QObject* parent = 0, const char* name = 0 );
00080 
00081         virtual ~ToggleToolViewAction();
00082 
00083 private:
00084         KDockWidget *m_dw;
00085         KMdiMainFrm *m_mdiMainFrm;
00086 protected slots:
00087         void slotToggled(bool);
00088         void anDWChanged();
00089         void slotWidgetDestroyed();
00090 };
00091 
00092 
00093 }
00094 
00095 #endif
KDE Logo
This file is part of the documentation for kmdi Library Version 3.2.2.
Documentation copyright © 1996-2004 the KDE developers.
Generated on Wed Apr 21 18:44:48 2004 by doxygen 1.3.6-20040222 written by Dimitri van Heesch, © 1997-2003