document.h
Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019 #ifndef _KNEDIT_DOCUMENT_INCLUDE_
00020 #define _KNEDIT_DOCUMENT_INCLUDE_
00021
00022 #include <qptrlist.h>
00023 #include <kaction.h>
00024
00025 #include <ktexteditor/document.h>
00026 #include <ktexteditor/view.h>
00027 #include <ktexteditor/editinterface.h>
00028 #include <ktexteditor/undointerface.h>
00029 #include <ktexteditor/cursorinterface.h>
00030 #include <ktexteditor/selectioninterface.h>
00031 #include <ktexteditor/blockselectioninterface.h>
00032 #include <ktexteditor/searchinterface.h>
00033 #include <ktexteditor/highlightinginterface.h>
00034 #include <ktexteditor/configinterface.h>
00035 #include <ktexteditor/markinterface.h>
00036 #include <ktexteditor/wordwrapinterface.h>
00037 #include <ktexteditor/printinterface.h>
00038
00039 class QProcess;
00040 class QTimer;
00041 class KWinModule;
00042
00043 namespace KNEdit
00044 {
00045
00046 class View;
00047
00050 class Document : public KTextEditor::Document, KTextEditor::HighlightingInterface
00051 {
00052 Q_OBJECT
00053
00054 public:
00055 Document(bool bReadOnly=false, bool bSingleView=false, QWidget *parentWidget = 0, const char *widgetName = 0, QObject *parent = 0, const char *name = 0);
00056 virtual ~Document();
00057
00058
00059 KTextEditor::View *createView( QWidget *parent, const char *name );
00060 QPtrList<KTextEditor::View> views() const { return _views; }
00061
00062
00063 bool openFile();
00064 bool saveFile();
00065
00066 QString filename() const { return m_file; }
00067 QString serverName() const { return m_serverName; }
00068 bool isReady() const { return m_isReady; }
00069 void invokeNC( const QString& command, bool appendFilename = true );
00070 void addView(KTextEditor::View *view);
00071 void removeView(KTextEditor::View *view);
00072
00073
00074 uint hlMode ();
00075 bool setHlMode (uint mode);
00076 uint hlModeCount ();
00077 QString hlModeName (uint mode);
00078 QString hlModeSectionName (uint mode);
00079
00080 public slots:
00081 void processExited();
00082 void launchFinished(WId);
00083
00084 signals:
00085 void hlChanged();
00086
00087 private slots:
00088 void checkForNEditServer();
00089
00090 private:
00091 void processCommands();
00092 void serverReady( WId wid );
00093
00094 private:
00095 QValueList<WId> m_widCache;
00096 QPtrList<KTextEditor::View> _views;
00097 KTextEditor::View *activeView;
00098 QProcess *proc;
00099 bool m_singleView, m_readOnly;
00100 bool m_isReady;
00101 QString m_serverName;
00102 KWinModule *m_kwm;
00103 WId m_wid;
00104 QStringList m_commands;
00105 QTimer *m_timer;
00106 };
00107
00108 };
00109
00110 #endif
00111
This file is part of the documentation for KDevelop Version 3.1.2.