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., 51 Franklin Street, Fifth Floor, 00017 Boston, MA 02110-1301, USA. 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
Trinity API Reference