kateapp.h
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 #include "../interfaces/application.h"
00025 #include "../interfaces/mainwindow.h"
00026 #include "../interfaces/documentmanager.h"
00027 #include "../interfaces/viewmanager.h"
00028 #include "../interfaces/plugin.h"
00029 #include <qptrlist.h>
00030
00031 #include "katemainwindow.h"
00032 #include "katedocmanager.h"
00033 #include "kateprojectmanager.h"
00034 #include "katepluginmanager.h"
00035
00036 #include <kuniqueapplication.h>
00037
00038 class KDE_EXPORT KateApp : public KUniqueApplication
00039 {
00040 Q_OBJECT
00041
00042 public:
00043 KateApp (bool forcedNewProcess, bool oldState);
00044 ~KateApp ();
00045
00046 inline static KateApp *self () { return (KateApp *) kapp; }
00047
00048 Kate::Application *application () { return m_application; };
00049
00050 public:
00051 int newInstance();
00052
00053 KatePluginManager *katePluginManager() { return m_pluginManager; };
00054 KateDocManager *kateDocumentManager () { return m_docManager; };
00055 KateProjectManager *kateProjectManager () { return m_projectManager; };
00056
00057 class KateMainWindow *newMainWindow ();
00058 class KateMainWindow *newMainWindow (bool visible);
00059
00060 void removeMainWindow (KateMainWindow *mainWindow);
00061
00062 Kate::DocumentManager *documentManager () { return m_docManager->documentManager(); };
00063 Kate::ProjectManager *projectManager () { return m_projectManager->projectManager(); };
00064 Kate::PluginManager *pluginManager () { return m_pluginManager->pluginManager(); };
00065 Kate::InitPluginManager *initPluginManager () { return m_initPluginManager; };
00066 Kate::MainWindow *activeMainWindow ();
00067 KateMainWindow *activeKateMainWindow ();
00068
00069 uint mainWindows () { return m_mainWindows.count(); };
00070 Kate::MainWindow *mainWindow (uint n) { if (m_mainWindows.at(n)) return m_mainWindows.at(n)->mainWindow(); else return 0; }
00071
00072 KateMainWindow *kateMainWindow (uint n) { return m_mainWindows.at(n); }
00073
00074 void openURL (const QString &name=0L);
00075
00076 virtual void performInit(const QString &, const KURL &);
00077 virtual Kate::InitPlugin *initPlugin() const;
00078 virtual KURL initScript() const;
00079
00080 static KConfig *kateSessionConfig () { return m_sessionConfig; }
00081
00082 signals:
00083 void onEventLoopEnter();
00084
00085 private:
00086 Kate::Application *m_application;
00087 Kate::InitPluginManager *m_initPluginManager;
00088 KateDocManager *m_docManager;
00089 KateProjectManager *m_projectManager;
00090 KatePluginManager *m_pluginManager;
00091 QPtrList<class KateMainWindow> m_mainWindows;
00092 bool m_firstStart;
00093 Kate::InitPlugin *m_initPlugin;
00094 int m_doNotInitialize;
00095 KURL m_initURL;
00096 QString m_initLib;
00097 QString m_oldInitLib;
00098 class KateAppDCOPIface *m_obj;
00099 static KConfig *m_sessionConfig;
00100 bool m_sessionConfigDelete;
00101
00102 protected slots:
00103 void performInit();
00104 void callOnEventLoopEnter();
00105 };
00106
00107 #endif
This file is part of the documentation for kate Library Version 3.4.3.