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

kate

  • kate
  • app
kwritemain.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 __KWRITE_MAIN_H__
22 #define __KWRITE_MAIN_H__
23 
24 #include <tdetexteditor/view.h>
25 #include <tdetexteditor/document.h>
26 
27 #include <tdeparts/mainwindow.h>
28 
29 #include <kdialogbase.h>
30 
31 namespace KTextEditor { class EditorChooser; }
32 
33 class TDEAction;
34 class TDEToggleAction;
35 class TDESelectAction;
36 class TDERecentFilesAction;
37 
38 class KWrite : public KParts::MainWindow
39 {
40  TQ_OBJECT
41 
42 
43  public:
44  KWrite(KTextEditor::Document * = 0L);
45  ~KWrite();
46 
47  void loadURL(const KURL &url);
48 
49  KTextEditor::View *view() const { return m_view; }
50 
51  static bool noWindows () { return winList.isEmpty(); }
52 
53  private:
54  void setupActions();
55  void setupStatusBar();
56 
57  bool queryClose();
58 
59  void dragEnterEvent( TQDragEnterEvent * );
60  void dropEvent( TQDropEvent * );
61 
62  public slots:
63  void slotNew();
64  void slotFlush ();
65  void slotOpen();
66  void slotOpen( const KURL& url);
67  void newView();
68  void toggleStatusBar();
69  void editKeys();
70  void editToolbars();
71  void changeEditor();
72 
73  private slots:
74  void slotNewToolbarConfig();
75 
76  public slots:
77  void printNow();
78  void printDlg();
79 
80  void newStatus(const TQString &msg);
81  void newCaption();
82 
83  void slotDropEvent(TQDropEvent *);
84 
85  void slotEnableActions( bool enable );
86 
90  void slotFileNameChanged();
91 
92  //config file functions
93  public:
94  void readConfig (TDEConfig *);
95  void writeConfig (TDEConfig *);
96 
97  void readConfig ();
98  void writeConfig ();
99 
100  //session management
101  public:
102  void restore(TDEConfig *,int);
103  static void restore();
104 
105  private:
106  void readProperties(TDEConfig *);
107  void saveProperties(TDEConfig *);
108  void saveGlobalProperties(TDEConfig *);
109 
110  private:
111  KTextEditor::View * m_view;
112 
113  TDERecentFilesAction * m_recentFiles;
114  TDEToggleAction * m_paShowPath;
115  TDEToggleAction * m_paShowStatusBar;
116 
117  TQString encoding;
118 
119  static TQPtrList<KTextEditor::Document> docList;
120  static TQPtrList<KWrite> winList;
121 };
122 
123 class KWriteEditorChooser: public KDialogBase
124 {
125  TQ_OBJECT
126 
127 
128  public:
129  KWriteEditorChooser(TQWidget *parent);
130  virtual ~KWriteEditorChooser();
131 
132  private:
133  KTextEditor::EditorChooser *m_chooser;
134 
135  protected slots:
136  void slotOk();
137 };
138 
139 #endif

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.