kateapp.h00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020 #ifndef __KATE_APP_H__
00021 #define __KATE_APP_H__
00022
00023 #include "katemain.h"
00024
00025 #include <kapplication.h>
00026
00027 #include <qvaluelist.h>
00028
00029 class KateSessionManager;
00030 class KateAppDCOPIface;
00031
00032 namespace Kate {
00033 class Application;
00034 }
00035
00036 class KCmdLineArgs;
00037
00042 class KDE_EXPORT KateApp : public KApplication
00043 {
00044 Q_OBJECT
00045
00049 public:
00054 KateApp (KCmdLineArgs *args);
00055
00059 ~KateApp ();
00060
00065 static KateApp *self ();
00066
00071 Kate::Application *application ();
00072
00078 static QString kateVersion (bool fullVersion = true);
00079
00083 private:
00087 void restoreKate ();
00088
00093 bool startupKate ();
00094
00098 public:
00103 void shutdownKate (KateMainWindow *win);
00104
00109 bool shouldExit () { return m_shouldExit; }
00110
00114 public:
00119 KatePluginManager *pluginManager();
00120
00125 KateDocManager *documentManager ();
00126
00131 KateSessionManager *sessionManager ();
00132
00136 public:
00143 KateMainWindow *newMainWindow (KConfig *sconfig = 0, const QString &sgroup = "");
00144
00149 void removeMainWindow (KateMainWindow *mainWindow);
00150
00156 KateMainWindow *activeMainWindow ();
00157
00162 uint mainWindows () const;
00163
00169 KateMainWindow *mainWindow (uint n);
00170
00174 public:
00183 bool openURL (const KURL &url, const QString &encoding, bool isTempFile );
00184
00191 bool setCursor (int line, int column);
00192
00199 bool openInput (const QString &text);
00200
00201 private:
00205 KCmdLineArgs *m_args;
00206
00210 Kate::Application *m_application;
00211
00215 KateDocManager *m_docManager;
00216
00220 KatePluginManager *m_pluginManager;
00221
00225 KateSessionManager *m_sessionManager;
00226
00230 QValueList<KateMainWindow*> m_mainWindows;
00231
00235 KateAppDCOPIface *m_obj;
00236
00240 bool m_shouldExit;
00241 };
00242
00243 #endif
|