• 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 queryClose_internal();
106 
107  void openURL (const TQString &name=0L);
108 
109  public slots:
113  void slotSelectionChanged();
114 
121  void activateSession(int sessionId);
122 
123  private:
124  void setupMainWindow();
125  void setupActions();
126  bool queryClose();
127 
131  void readOptions();
132 
136  void saveOptions();
137 
138  void dragEnterEvent( TQDragEnterEvent * );
139  void dropEvent( TQDropEvent * );
140 
141  private slots:
146  void newWindow ();
147 
148  void slotConfigure();
149 
150  void slotOpenWithMenuAction(int idx);
151 
152  void slotGrepToolItemSelected ( const TQString &filename, int linenumber );
153  void slotMail();
154 
155  void slotFileQuit();
156  void slotEditToolbars();
157  void slotNewToolbarConfig();
158  void slotWindowActivated ();
159  void slotUpdateOpenWith();
160  void documentMenuAboutToShow();
161  void slotDropEvent(TQDropEvent *);
162  void editKeys();
163  void mSlotFixOpenWithMenu();
164 
165  void fileSelected(const KFileItem *file);
166 
167  void tipOfTheDay();
168 
169  /* to update the caption */
170  void slotDocumentCreated(Kate::Document *doc);
171  void slotNameChanged(Kate::Document *doc);
172  void updateCaption(Kate::Document *doc);
173 
174  void pluginHelp();
175  void slotFullScreen(bool);
176 
177  void updateGrepDir (bool visible);
178  void slotDocumentCloseAll();
179 
180  protected:
181  bool event( TQEvent * );
182 
183  private:
184  static uint uniqueID;
185  uint myID;
186 
187  Kate::MainWindow *m_mainWindow;
188  Kate::ToolViewManager *m_toolViewManager;
189 
190  bool showSessionName;
191  bool syncKonsole;
192  bool useInstance;
193  bool modNotification;
194 
195  DCOPObject *m_dcop;
196 
197  // console
198  KateConsole *console;
199 
200  // management items
201  KateViewManager *m_viewManager;
202 
203  TDERecentFilesAction *fileOpenRecent;
204 
205  KateFileList *filelist;
206  KateFileSelector *fileselector;
207  KateSessionPanel *m_sessionpanel;
208 
209  TDEActionMenu* documentOpenWith;
210 
211  TQPopupMenu *documentMenu;
212 
213  TDEToggleAction* settingsShowFilelist;
214  TDEToggleAction* settingsShowFileselector;
215 
216  KateExternalToolsMenuAction *externalTools;
217  GrepTool * greptool;
218  bool m_modignore, m_grrr;
219 
220  KateTabWidget *m_tabWidget;
221 };
222 
223 class KateSessionListActionMenu : public TDEActionMenu
224 {
225  TQ_OBJECT
226 
227  public:
228  KateSessionListActionMenu(KateMainWindow *mw, const TQString &text, TQObject *parent = NULL, const char *name = NULL);
229  ~KateSessionListActionMenu() {}
230 
231  public slots:
232  void slotAboutToShow();
233 
234  protected:
235  KateMainWindow *m_mainWindow;
236 };
237 
238 #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.