• Skip to content
  • Skip to link menu
Trinity API Reference
  • Trinity API Reference
  • kate
 

kate

katemainwindow.h

00001 /* This file is part of the KDE project
00002    Copyright (C) 2001 Christoph Cullmann <cullmann@kde.org>
00003    Copyright (C) 2001 Joseph Wenninger <jowenn@kde.org>
00004    Copyright (C) 2001 Anders Lund <anders.lund@lund.tdcadsl.dk>
00005 
00006    This library is free software; you can redistribute it and/or
00007    modify it under the terms of the GNU Library General Public
00008    License version 2 as published by the Free Software Foundation.
00009 
00010    This library is distributed in the hope that it will be useful,
00011    but WITHOUT ANY WARRANTY; without even the implied warranty of
00012    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00013    Library General Public License for more details.
00014 
00015    You should have received a copy of the GNU Library General Public License
00016    along with this library; see the file COPYING.LIB.  If not, write to
00017    the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
00018    Boston, MA 02110-1301, USA.
00019 */
00020 
00021 #ifndef __KATE_MAINWINDOW_H__
00022 #define __KATE_MAINWINDOW_H__
00023 
00024 #include "katemain.h"
00025 #include "katemdi.h"
00026 
00027 #include <kate/view.h>
00028 #include <kate/document.h>
00029 
00030 #include <tdeparts/part.h>
00031 
00032 #include <tdeaction.h>
00033 
00034 class KateTabWidget;
00035 class GrepTool;
00036 
00037 namespace Kate {
00038   class MainWindow;
00039   class ToolViewManager;
00040 }
00041 
00042 class KFileItem;
00043 class TDERecentFilesAction;
00044 class DCOPObject;
00045 
00046 class KateExternalToolsMenuAction;
00047 
00048 class KateMainWindow : public KateMDI::MainWindow, virtual public KParts::PartBase
00049 {
00050   Q_OBJECT
00051 
00052   friend class KateConfigDialog;
00053   friend class KateViewManager;
00054 
00055   public:
00061     KateMainWindow (TDEConfig *sconfig, const TQString &sgroup);
00062 
00066     ~KateMainWindow();
00067 
00071   public:
00072     Kate::MainWindow *mainWindow () { return m_mainWindow; }
00073     Kate::ToolViewManager *toolViewManager () { return m_toolViewManager; }
00074 
00075     KateViewManager *viewManager () { return m_viewManager; }
00076 
00077     DCOPObject *dcopObject () { return m_dcop; }
00078 
00082   public:
00085     KURL activeDocumentUrl();
00086 
00087     uint mainWindowNumber () const { return myID; }
00088 
00096     bool showModOnDiskPrompt();
00097 
00102     KateTabWidget *tabWidget ();
00103 
00104   public:
00105     void readProperties(TDEConfig *config);
00106     void saveProperties(TDEConfig *config);
00107     void saveGlobalProperties( TDEConfig* sessionConfig );
00108 
00109   public:
00110     bool queryClose_internal();
00111 
00112   private:
00113     void setupMainWindow();
00114     void setupActions();
00115     bool queryClose();
00116 
00120     void readOptions();
00121 
00125     void saveOptions();
00126 
00127     void dragEnterEvent( TQDragEnterEvent * );
00128     void dropEvent( TQDropEvent * );
00129 
00134   private slots:
00135     void newWindow ();
00136 
00137     void slotConfigure();
00138 
00139     void slotOpenWithMenuAction(int idx);
00140 
00141     void slotGrepToolItemSelected ( const TQString &filename, int linenumber );
00142     void slotMail();
00143 
00144     void slotFileQuit();
00145     void slotEditToolbars();
00146     void slotNewToolbarConfig();
00147     void slotWindowActivated ();
00148     void slotUpdateOpenWith();
00149     void documentMenuAboutToShow();
00150     void slotDropEvent(TQDropEvent *);
00151     void editKeys();
00152     void mSlotFixOpenWithMenu();
00153 
00154     void fileSelected(const KFileItem *file);
00155 
00156     void tipOfTheDay();
00157 
00158     /* to update the caption */
00159     void slotDocumentCreated(Kate::Document *doc);
00160     void slotNameChanged(Kate::Document *doc);
00161     void updateCaption(Kate::Document *doc);
00162 
00163     void pluginHelp();
00164     void slotFullScreen(bool);
00165 
00166   public:
00167     void openURL (const TQString &name=0L);
00168 
00169   private slots:
00170     void updateGrepDir (bool visible);
00171 
00172   protected:
00173     bool event( TQEvent * );
00174 
00175   private slots:
00176     void slotDocumentCloseAll();
00177 
00178   private:
00179     static uint uniqueID;
00180     uint myID;
00181 
00182     Kate::MainWindow *m_mainWindow;
00183     Kate::ToolViewManager *m_toolViewManager;
00184 
00185     bool syncKonsole;
00186     bool useInstance;
00187     bool modNotification;
00188 
00189     DCOPObject *m_dcop;
00190 
00191     // console
00192     KateConsole *console;
00193 
00194     // management items
00195     KateViewManager *m_viewManager;
00196 
00197     TDERecentFilesAction *fileOpenRecent;
00198 
00199     KateFileList *filelist;
00200     KateFileSelector *fileselector;
00201 
00202     TDEActionMenu* documentOpenWith;
00203 
00204     TQPopupMenu *documentMenu;
00205 
00206     TDEToggleAction* settingsShowFilelist;
00207     TDEToggleAction* settingsShowFileselector;
00208 
00209     KateExternalToolsMenuAction *externalTools;
00210     GrepTool * greptool;
00211     bool m_modignore, m_grrr;
00212 
00213     KateTabWidget *m_tabWidget;
00214 };
00215 
00216 #endif
00217 
00218 // kate: space-indent on; indent-width 2; replace-tabs on;

kate

Skip menu "kate"
  • Main Page
  • Namespace List
  • Class Hierarchy
  • Alphabetical List
  • Class List
  • File List
  • Namespace Members
  • Class Members

kate

Skip menu "kate"
  • kate
  • libkonq
  • twin
  •   lib
Generated for kate by doxygen 1.6.3
This website is maintained by Timothy Pearson.