00001
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 <tdeapplication.h>
00026
00027 #include <tqvaluelist.h>
00028
00029 class KateSessionManager;
00030 class KateAppDCOPIface;
00031
00032 namespace Kate {
00033 class Application;
00034 }
00035
00036 class TDECmdLineArgs;
00037
00042 class KDE_EXPORT KateApp : public TDEApplication
00043 {
00044 Q_OBJECT
00045
00049 public:
00054 KateApp (TDECmdLineArgs *args);
00055
00059 ~KateApp ();
00060
00065 static KateApp *self ();
00066
00071 Kate::Application *application ();
00072
00078 static TQString 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
00115 bool query_session_close();
00116
00121 void reparse_config();
00122
00123 signals:
00127 void optionsChanged();
00128
00132 public:
00137 KatePluginManager *pluginManager();
00138
00143 KateDocManager *documentManager ();
00144
00149 KateSessionManager *sessionManager();
00150
00154 public:
00161 KateMainWindow *newMainWindow (TDEConfig *sconfig = 0, const TQString &sgroup = "");
00162
00167 void removeMainWindow (KateMainWindow *mainWindow);
00168
00174 KateMainWindow *activeMainWindow ();
00175
00180 uint mainWindows () const;
00181
00187 KateMainWindow *mainWindow (uint n);
00188
00192 public:
00201 bool openURL (const KURL &url, const TQString &encoding, bool isTempFile );
00202
00209 bool setCursor (int line, int column);
00210
00217 bool openInput (const TQString &text);
00218
00219 private:
00223 TDECmdLineArgs *m_args;
00224
00228 Kate::Application *m_application;
00229
00233 KateDocManager *m_docManager;
00234
00238 KatePluginManager *m_pluginManager;
00239
00243 KateSessionManager *m_sessionManager;
00244
00248 TQValueList<KateMainWindow*> m_mainWindows;
00249
00253 KateAppDCOPIface *m_obj;
00254
00258 bool m_shouldExit;
00259 };
00260
00261 #endif