kwritemain.h
00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021 #ifndef __KWRITE_MAIN_H__
00022 #define __KWRITE_MAIN_H__
00023
00024 #include <ktexteditor/view.h>
00025 #include <ktexteditor/document.h>
00026
00027 #include <kparts/mainwindow.h>
00028
00029 #include <kdialogbase.h>
00030
00031 namespace KTextEditor { class EditorChooser; }
00032
00033 class KAction;
00034 class KToggleAction;
00035 class KSelectAction;
00036 class KRecentFilesAction;
00037
00038 class KWrite : public KParts::MainWindow
00039 {
00040 Q_OBJECT
00041
00042 public:
00043 KWrite(KTextEditor::Document * = 0L);
00044 ~KWrite();
00045
00046 void loadURL(const KURL &url);
00047
00048 KTextEditor::View *view() const { return m_view; }
00049
00050 private:
00051 void setupActions();
00052 void setupStatusBar();
00053
00054 bool queryClose();
00055
00056 void dragEnterEvent( QDragEnterEvent * );
00057 void dropEvent( QDropEvent * );
00058
00059 public slots:
00060 void slotNew();
00061 void slotFlush ();
00062 void slotOpen();
00063 void slotOpen( const KURL& url);
00064 void newView();
00065 void toggleStatusBar();
00066 void editKeys();
00067 void editToolbars();
00068 void changeEditor();
00069
00070 public slots:
00071 void printNow();
00072 void printDlg();
00073
00074 void newStatus(const QString &msg);
00075 void newCaption();
00076
00077 void slotDropEvent(QDropEvent *);
00078
00079 void slotEnableActions( bool enable );
00080
00081
00082 public:
00083 void readConfig (KConfig *);
00084 void writeConfig (KConfig *);
00085
00086 void readConfig ();
00087 void writeConfig ();
00088
00089
00090 public:
00091 void restore(KConfig *,int);
00092 static void restore();
00093
00094 private:
00095 void readProperties(KConfig *);
00096 void saveProperties(KConfig *);
00097 void saveGlobalProperties(KConfig *);
00098
00099 private:
00100 KTextEditor::View * m_view;
00101
00102 KRecentFilesAction * m_recentFiles;
00103 KToggleAction * m_paShowPath;
00104 KToggleAction * m_paShowStatusBar;
00105
00106 QString encoding;
00107
00108 static QPtrList<KTextEditor::Document> docList;
00109 static QPtrList<KWrite> winList;
00110 };
00111
00112 class KWriteEditorChooser: public KDialogBase
00113 {
00114 Q_OBJECT
00115
00116 public:
00117 KWriteEditorChooser(QWidget *parent);
00118 virtual ~KWriteEditorChooser();
00119
00120 private:
00121 KTextEditor::EditorChooser *m_chooser;
00122
00123 protected slots:
00124 void slotOk();
00125 };
00126
00127 #endif
This file is part of the documentation for kate Library Version 3.2.1.
Documentation copyright © 1996-2004 the KDE developers.
Generated on Fri Mar 5 04:41:11 2004 by
doxygen 1.3.6-20040222 written by
Dimitri van Heesch, © 1997-2003