• Skip to content
  • Skip to link menu
KDE 3.5 API Reference
  • KDE API Reference
  • API Reference
  • Sitemap
  • Contact Us
 

kate

kwritemain.h

Go to the documentation of this file.
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 __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     static bool noWindows () { return winList.isEmpty(); }
00051 
00052   private:
00053     void setupActions();
00054     void setupStatusBar();
00055 
00056     bool queryClose();
00057 
00058     void dragEnterEvent( QDragEnterEvent * );
00059     void dropEvent( QDropEvent * );
00060 
00061   public slots:
00062     void slotNew();
00063     void slotFlush ();
00064     void slotOpen();
00065     void slotOpen( const KURL& url);
00066     void newView();
00067     void toggleStatusBar();
00068     void editKeys();
00069     void editToolbars();
00070     void changeEditor();
00071 
00072   private slots:
00073     void slotNewToolbarConfig();
00074 
00075   public slots:
00076     void printNow();
00077     void printDlg();
00078 
00079     void newStatus(const QString &msg);
00080     void newCaption();
00081 
00082     void slotDropEvent(QDropEvent *);
00083 
00084     void slotEnableActions( bool enable );
00085 
00089     void slotFileNameChanged();
00090 
00091   //config file functions
00092   public:
00093     void readConfig (KConfig *);
00094     void writeConfig (KConfig *);
00095 
00096     void readConfig ();
00097     void writeConfig ();
00098 
00099   //session management
00100   public:
00101     void restore(KConfig *,int);
00102     static void restore();
00103 
00104   private:
00105     void readProperties(KConfig *);
00106     void saveProperties(KConfig *);
00107     void saveGlobalProperties(KConfig *);
00108 
00109   private:
00110     KTextEditor::View * m_view;
00111 
00112     KRecentFilesAction * m_recentFiles;
00113     KToggleAction * m_paShowPath;
00114     KToggleAction * m_paShowStatusBar;
00115 
00116     QString encoding;
00117 
00118     static QPtrList<KTextEditor::Document> docList;
00119     static QPtrList<KWrite> winList;
00120 };
00121 
00122 class KWriteEditorChooser: public KDialogBase
00123 {
00124   Q_OBJECT
00125 
00126   public:
00127     KWriteEditorChooser(QWidget *parent);
00128     virtual ~KWriteEditorChooser();
00129 
00130   private:
00131     KTextEditor::EditorChooser *m_chooser;
00132 
00133   protected slots:
00134     void slotOk();
00135 };
00136 
00137 #endif
00138 // kate: space-indent on; indent-width 2; replace-tabs on; mixed-indent off;

kate

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

API Reference

Skip menu "API Reference"
  • kate
Generated for API Reference by doxygen 1.5.9
This website is maintained by Adriaan de Groot and Allen Winter.
KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal