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 00046 private slots: 00047 void clientAdded( KXMLGUIClient *client ); 00048 void setupActions(); 00049 void changeViewMode(int id); 00050 void actionDeleted(QObject*); 00051 void mdiModeHasBeenChangedTo(KMdi::MdiMode); 00052 signals: 00053 void toggleTop(); 00054 void toggleLeft(); 00055 void toggleRight(); 00056 void toggleBottom(); 00057 00058 private: 00059 class KMDIGUIClientPrivate; 00060 KMDIGUIClientPrivate *d; 00061 KMdi::MdiMode m_mdiMode; 00062 00063 QGuardedPtr<KMdiMainFrm> m_mdiMainFrm; 00064 QPtrList<KAction> m_toolViewActions; 00065 QPtrList<KAction> m_documentViewActions; 00066 00067 KActionMenu *m_docMenu; 00068 KActionMenu *m_toolMenu; 00069 KSelectAction *m_mdiModeAction; 00070 00071 KActionMenu *m_gotoToolDockMenu; 00072 }; 00073 00074 00075 class ToggleToolViewAction:public KToggleAction 00076 { 00077 Q_OBJECT 00078 public: 00079 ToggleToolViewAction( const QString& text, const KShortcut& cut = KShortcut(),KDockWidget *dw=0,KMdiMainFrm *mdiMainFrm=0, 00080 QObject* parent = 0, const char* name = 0 ); 00081 00082 virtual ~ToggleToolViewAction(); 00083 00084 private: 00085 KDockWidget *m_dw; 00086 KMdiMainFrm *m_mdiMainFrm; 00087 protected slots: 00088 void slotToggled(bool); 00089 void anDWChanged(); 00090 void slotWidgetDestroyed(); 00091 }; 00092 00093 00094 } 00095 00096 #endif
KDE Logo
This file is part of the documentation for kmdi Library Version 3.3.0.
Documentation copyright © 1996-2004 the KDE developers.
Generated on Wed Sep 29 09:42:03 2004 by doxygen 1.3.8 written by Dimitri van Heesch, © 1997-2003