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

kate

  • kate
  • app
katemainwindow.h
1 /* This file is part of the KDE project
2  Copyright (C) 2001 Christoph Cullmann <cullmann@kde.org>
3  Copyright (C) 2001 Joseph Wenninger <jowenn@kde.org>
4  Copyright (C) 2001 Anders Lund <anders.lund@lund.tdcadsl.dk>
5 
6  This library is free software; you can redistribute it and/or
7  modify it under the terms of the GNU Library General Public
8  License version 2 as published by the Free Software Foundation.
9 
10  This library is distributed in the hope that it will be useful,
11  but WITHOUT ANY WARRANTY; without even the implied warranty of
12  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13  Library General Public License for more details.
14 
15  You should have received a copy of the GNU Library General Public License
16  along with this library; see the file COPYING.LIB. If not, write to
17  the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
18  Boston, MA 02110-1301, USA.
19 */
20 
21 #ifndef __KATE_MAINWINDOW_H__
22 #define __KATE_MAINWINDOW_H__
23 
24 #include "katemain.h"
25 #include "katemdi.h"
26 
27 #include <kate/view.h>
28 #include <kate/document.h>
29 
30 #include <tdeparts/part.h>
31 
32 #include <tdeaction.h>
33 
34 class KateTabWidget;
35 class GrepTool;
36 
37 namespace Kate {
38  class MainWindow;
39  class ToolViewManager;
40 }
41 
42 class KFileItem;
43 class TDERecentFilesAction;
44 class DCOPObject;
45 
46 class KateExternalToolsMenuAction;
47 
48 class KateMainWindow : public KateMDI::MainWindow, virtual public KParts::PartBase
49 {
50  TQ_OBJECT
51 
52  friend class KateConfigDialog;
53  friend class KateViewManager;
54 
55  public:
61  KateMainWindow (TDEConfig *sconfig, const TQString &sgroup);
62 
66  ~KateMainWindow();
67 
71  Kate::MainWindow *mainWindow () { return m_mainWindow; }
72  Kate::ToolViewManager *toolViewManager () { return m_toolViewManager; }
73 
74  KateViewManager *viewManager () { return m_viewManager; }
75 
76  DCOPObject *dcopObject () { return m_dcop; }
77 
83  KURL activeDocumentUrl();
84 
85  uint mainWindowNumber () const { return myID; }
86 
94  bool showModOnDiskPrompt();
95 
100  KateTabWidget *tabWidget ();
101 
102  void readProperties(TDEConfig *config);
103  void saveProperties(TDEConfig *config);
104 
105  bool queryCloseAllDocuments();
106  bool queryClose_internal();
107 
108  void openURL (const TQString &name=0L);
109 
110  public slots:
114  void slotSelectionChanged();
115 
122  void activateSession(int sessionId);
123 
124  private:
125  void setupMainWindow();
126  void setupActions();
127  bool queryClose();
128 
132  void readOptions();
133 
137  void saveOptions();
138 
139  void dragEnterEvent( TQDragEnterEvent * );
140  void dropEvent( TQDropEvent * );
141 
142  private slots:
147  void newWindow ();
148 
149  void slotConfigure();
150 
151  void slotOpenWithMenuAction(int idx);
152 
153  void slotGrepToolItemSelected ( const TQString &filename, int linenumber );
154  void slotMail();
155 
156  void slotFileQuit();
157  void slotEditToolbars();
158  void slotNewToolbarConfig();
159  void slotWindowActivated ();
160  void slotUpdateOpenWith();
161  void documentMenuAboutToShow();
162  void slotDropEvent(TQDropEvent *);
163  void editKeys();
164  void mSlotFixOpenWithMenu();
165 
166  void fileSelected(const KFileItem *file);
167 
168  void tipOfTheDay();
169 
170  /* to update the caption */
171  void slotDocumentCreated(Kate::Document *doc);
172  void slotNameChanged(Kate::Document *doc);
173  void updateCaption(Kate::Document *doc);
174 
175  void pluginHelp();
176  void slotFullScreen(bool);
177 
178  void updateGrepDir (bool visible);
179  void slotDocumentCloseAll();
180 
181  protected:
182  bool event( TQEvent * );
183  bool eventFilter(TQObject *obj, TQEvent *ev);
184 
185  private:
186  static uint uniqueID;
187  uint myID;
188 
189  Kate::MainWindow *m_mainWindow;
190  Kate::ToolViewManager *m_toolViewManager;
191 
192  bool showSessionName;
193  bool syncKonsole;
194  bool useInstance;
195  bool modNotification;
196 
197  DCOPObject *m_dcop;
198 
199  // console
200  KateConsole *console;
201 
202  // management items
203  KateViewManager *m_viewManager;
204 
205  TDERecentFilesAction *fileOpenRecent;
206 
207  KateFileList *filelist;
208  KateFileSelector *fileselector;
209  KateSessionPanel *m_sessionpanel;
210 
211  TDEActionMenu* documentOpenWith;
212 
213  TQPopupMenu *documentMenu;
214 
215  TDEToggleAction* settingsShowFilelist;
216  TDEToggleAction* settingsShowFileselector;
217 
218  KateExternalToolsMenuAction *externalTools;
219  GrepTool * greptool;
220  bool m_modignore;
221 
222  KateTabWidget *m_tabWidget;
223 };
224 
225 class KateSessionListActionMenu : public TDEActionMenu
226 {
227  TQ_OBJECT
228 
229  public:
230  KateSessionListActionMenu(KateMainWindow *mw, const TQString &text, TQObject *parent = NULL, const char *name = NULL);
231  ~KateSessionListActionMenu() {}
232 
233  public slots:
234  void slotAboutToShow();
235 
236  protected:
237  KateMainWindow *m_mainWindow;
238 };
239 
240 #endif
KateConsole
KateConsole This class is used for the internal terminal emulator It uses internally the konsole part...
Definition: kateconsole.h:46
KateExternalToolsMenuAction
The external tools action This action creates a menu, in which each item will launch a process with t...
Definition: kateexternaltools.h:55
Kate::ToolViewManager
Interface to the toolviewmanager.
Definition: toolviewmanager.h:33
Kate
Namespace collecting as much of the internal Kate classes as we can manage.
Definition: kateapp.h:32

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.9.1
This website is maintained by Timothy Pearson.