koshell
koshell_shell.h00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022 #ifndef __koshell_window_h__
00023 #define __koshell_window_h__
00024
00025 #include <KoMainWindow.h>
00026 #include <KoQueryTrader.h>
00027 #include <ktabwidget.h>
00028 #include <qptrlist.h>
00029 #include <qmap.h>
00030 #include <qtoolbutton.h>
00031 #include <qvaluelist.h>
00032
00033 #include "iconsidepane.h"
00034
00035 class QVBox;
00036 class QIconView;
00037 class QIconViewItem;
00038 class QSplitter;
00039 class KoDocumentEntry;
00040 class KoView;
00041 class KoShellGUIClient;
00042
00044
00045 class KoShellWindow : public KoMainWindow
00046 {
00047 Q_OBJECT
00048
00049 public:
00050
00051 KoShellWindow();
00052 virtual ~KoShellWindow();
00053
00054 virtual void setRootDocument( KoDocument *doc );
00059 virtual void updateCaption();
00060
00061 virtual QString configFile() const;
00062
00063 KAction *mnuSaveAll;
00064 KAction* partSpecificHelpAction;
00065
00066 protected slots:
00067
00068 virtual void slotFileNew();
00069 virtual void slotFileClose();
00070 virtual void slotFileOpen();
00071 void saveAll();
00072
00073 void showPartSpecificHelp();
00074
00075 void slotSidebar_Part(int);
00076 void slotSidebar_Document(int);
00077 void tab_contextMenu(QWidget * ,const QPoint &);
00078
00082 void slotShowSidebar();
00088 void slotSidebarItemClicked( QIconViewItem *item );
00089 void slotKSLoadCompleted();
00090 void slotKSLoadCanceled (const QString &);
00091 void slotNewDocumentName();
00098 void slotUpdatePart( QWidget* widget );
00099
00100 private:
00101
00102 struct Page
00103 {
00104 KoDocument *m_pDoc;
00105 KoView *m_pView;
00106 int m_id;
00107 };
00108
00109 virtual bool queryClose();
00110 virtual bool openDocumentInternal( const KURL & url, KoDocument * newdoc = 0L );
00111 virtual void slotConfigureKeys();
00112 void closeDocument();
00113 void saveSettings();
00114 void switchToPage( QValueList<Page>::Iterator it );
00115
00116
00117 QValueList<Page> m_lstPages;
00118 QValueList<Page>::Iterator m_activePage;
00119
00120 IconSidePane *m_pSidebar;
00121 QLabel *m_pComponentsLabel;
00122 QSplitter *m_pLayout;
00123 KTabWidget *m_pFrame;
00124 QToolButton *m_tabCloseButton;
00125
00126
00127 QMap<int,KoDocumentEntry> m_mapComponents;
00128
00129
00130 KoDocumentEntry m_documentEntry;
00131
00132 KoShellGUIClient *m_client;
00133 void createShellGUI( bool create = true );
00134
00135 int m_grpFile;
00136 int m_grpDocuments;
00137 };
00138
00140
00141 class KoShellGUIClient : public KXMLGUIClient
00142 {
00143 public:
00144 KoShellGUIClient( KoShellWindow *window );
00145 };
00146
00147 #endif // __koshell_window_h__
00148
|