kate
katemainwindow.h
Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021 #ifndef __KATE_MAINWINDOW_H__
00022 #define __KATE_MAINWINDOW_H__
00023
00024 #include "katemain.h"
00025 #include "katemdi.h"
00026
00027 #include <kate/view.h>
00028 #include <kate/document.h>
00029
00030 #include <kparts/part.h>
00031
00032 #include <kaction.h>
00033
00034 class KateTabWidget;
00035 class GrepTool;
00036
00037 namespace Kate {
00038 class MainWindow;
00039 class ToolViewManager;
00040 }
00041
00042 class KFileItem;
00043 class KRecentFilesAction;
00044 class DCOPObject;
00045
00046 class KateExternalToolsMenuAction;
00047
00048 class KateMainWindow : public KateMDI::MainWindow, virtual public KParts::PartBase
00049 {
00050 Q_OBJECT
00051
00052 friend class KateConfigDialog;
00053 friend class KateViewManager;
00054
00055 public:
00061 KateMainWindow (KConfig *sconfig, const QString &sgroup);
00062
00066 ~KateMainWindow();
00067
00071 public:
00072 Kate::MainWindow *mainWindow () { return m_mainWindow; }
00073 Kate::ToolViewManager *toolViewManager () { return m_toolViewManager; }
00074
00075 KateViewManager *viewManager () { return m_viewManager; }
00076
00077 DCOPObject *dcopObject () { return m_dcop; }
00078
00082 public:
00085 KURL activeDocumentUrl();
00086
00087 uint mainWindowNumber () const { return myID; }
00088
00096 bool showModOnDiskPrompt();
00097
00102 KateTabWidget *tabWidget ();
00103
00104 public:
00105 void readProperties(KConfig *config);
00106 void saveProperties(KConfig *config);
00107 void saveGlobalProperties( KConfig* sessionConfig );
00108
00109 public:
00110 bool queryClose_internal();
00111
00112 private:
00113 void setupMainWindow();
00114 void setupActions();
00115 bool queryClose();
00116
00120 void readOptions();
00121
00125 void saveOptions();
00126
00127 void dragEnterEvent( QDragEnterEvent * );
00128 void dropEvent( QDropEvent * );
00129
00134 private slots:
00135 void newWindow ();
00136
00137 void slotConfigure();
00138
00139 void slotOpenWithMenuAction(int idx);
00140
00141 void slotGrepToolItemSelected ( const QString &filename, int linenumber );
00142 void slotMail();
00143
00144 void slotFileQuit();
00145 void slotEditToolbars();
00146 void slotNewToolbarConfig();
00147 void slotWindowActivated ();
00148 void slotUpdateOpenWith();
00149 void documentMenuAboutToShow();
00150 void slotDropEvent(QDropEvent *);
00151 void editKeys();
00152 void mSlotFixOpenWithMenu();
00153
00154 void fileSelected(const KFileItem *file);
00155
00156 void tipOfTheDay();
00157
00158
00159 void slotDocumentCreated (Kate::Document *doc);
00160 void updateCaption (Kate::Document *doc);
00161
00162 void pluginHelp ();
00163 void slotFullScreen(bool);
00164
00165 public:
00166 void openURL (const QString &name=0L);
00167
00168 private slots:
00169 void updateGrepDir (bool visible);
00170
00171 protected:
00172 bool event( QEvent * );
00173
00174 private slots:
00175 void slotDocumentCloseAll();
00176
00177 private:
00178 static uint uniqueID;
00179 uint myID;
00180
00181 Kate::MainWindow *m_mainWindow;
00182 Kate::ToolViewManager *m_toolViewManager;
00183
00184 bool syncKonsole;
00185 bool modNotification;
00186
00187 DCOPObject *m_dcop;
00188
00189
00190 KateConsole *console;
00191
00192
00193 KateViewManager *m_viewManager;
00194
00195 KRecentFilesAction *fileOpenRecent;
00196
00197 KateFileList *filelist;
00198 KateFileSelector *fileselector;
00199
00200 KActionMenu* documentOpenWith;
00201
00202 QPopupMenu *documentMenu;
00203
00204 KToggleAction* settingsShowFilelist;
00205 KToggleAction* settingsShowFileselector;
00206
00207 KateExternalToolsMenuAction *externalTools;
00208 GrepTool * greptool;
00209 bool m_modignore, m_grrr;
00210
00211 KateTabWidget *m_tabWidget;
00212 };
00213
00214 #endif
00215
00216