kate Library API Documentation

kateapp.h

00001 /* This file is part of the KDE project
00002    Copyright (C) 2001 Christoph Cullmann <cullmann@kde.org>
00003    Copyright (C) 2002 Joseph Wenninger <jowenn@kde.org>
00004 
00005    This library is free software; you can redistribute it and/or
00006    modify it under the terms of the GNU Library General Public
00007    License version 2 as published by the Free Software Foundation.
00008 
00009    This library is distributed in the hope that it will be useful,
00010    but WITHOUT ANY WARRANTY; without even the implied warranty of
00011    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00012    Library General Public License for more details.
00013 
00014    You should have received a copy of the GNU Library General Public License
00015    along with this library; see the file COPYING.LIB.  If not, write to
00016    the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
00017    Boston, MA 02111-1307, USA.
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
KDE Logo
This file is part of the documentation for kate Library Version 3.4.1.
Documentation copyright © 1996-2004 the KDE developers.
Generated on Tue Jun 13 19:27:53 2006 by doxygen 1.4.3 written by Dimitri van Heesch, © 1997-2003