Changeset View
Changeset View
Standalone View
Standalone View
kdevplatform/sublime/view.h
Show All 15 Lines | |||||
16 | * Free Software Foundation, Inc., * | 16 | * Free Software Foundation, Inc., * | ||
17 | * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * | 17 | * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * | ||
18 | ***************************************************************************/ | 18 | ***************************************************************************/ | ||
19 | #ifndef KDEVPLATFORM_SUBLIMEVIEW_H | 19 | #ifndef KDEVPLATFORM_SUBLIMEVIEW_H | ||
20 | #define KDEVPLATFORM_SUBLIMEVIEW_H | 20 | #define KDEVPLATFORM_SUBLIMEVIEW_H | ||
21 | 21 | | |||
22 | #include <QObject> | 22 | #include <QObject> | ||
23 | #include <QMetaType> | 23 | #include <QMetaType> | ||
24 | 24 | | |||
mwolff: qlist include shouldn't be required? | |||||
25 | #include "sublimeexport.h" | 25 | #include "sublimeexport.h" | ||
26 | 26 | | |||
27 | class KConfigGroup; | ||||
28 | | ||||
27 | class QAction; | 29 | class QAction; | ||
28 | 30 | | |||
29 | namespace Sublime { | 31 | namespace Sublime { | ||
30 | 32 | | |||
31 | class Document; | 33 | class Document; | ||
32 | 34 | | |||
33 | /** | 35 | /** | ||
34 | @short View - the wrapper to the widget that knows about its document | 36 | @short View - the wrapper to the widget that knows about its document | ||
Show All 28 Lines | 50 | public: | |||
63 | /**@return widget for this view (creates it if it's not yet created).*/ | 65 | /**@return widget for this view (creates it if it's not yet created).*/ | ||
64 | QWidget *widget(QWidget *parent = nullptr); | 66 | QWidget *widget(QWidget *parent = nullptr); | ||
65 | /**@return true if this view has an initialized widget.*/ | 67 | /**@return true if this view has an initialized widget.*/ | ||
66 | bool hasWidget() const; | 68 | bool hasWidget() const; | ||
67 | 69 | | |||
68 | /// Retrieve information to be placed in the status bar. | 70 | /// Retrieve information to be placed in the status bar. | ||
69 | virtual QString viewStatus() const; | 71 | virtual QString viewStatus() const; | ||
70 | 72 | | |||
71 | /// Retrieve view state for saving into configuration. | 73 | /** | ||
72 | virtual QString viewState() const; | 74 | * Read session settings from the given \p config. | ||
73 | /// Restore view state from configuration | 75 | * | ||
74 | virtual void setState(const QString& state); | 76 | * The default implementation is a no-op | ||
77 | * | ||||
78 | * @see KTextEditor::View::readSessionConfig() | ||||
79 | */ | ||||
80 | virtual void readSessionConfig(KConfigGroup &config); | ||||
81 | /** | ||||
82 | * Write session settings to the \p config. | ||||
83 | * | ||||
84 | * The default implementation is a no-op | ||||
85 | * | ||||
86 | * @see KTextEditor::View::writeSessionConfig() | ||||
87 | */ | ||||
88 | virtual void writeSessionConfig(KConfigGroup &config); | ||||
75 | 89 | | |||
76 | void notifyPositionChanged(int newPositionInArea); | 90 | void notifyPositionChanged(int newPositionInArea); | ||
77 | 91 | | |||
78 | Q_SIGNALS: | 92 | Q_SIGNALS: | ||
79 | void raise(Sublime::View*); | 93 | void raise(Sublime::View*); | ||
80 | /// Notify that the status for this document has changed | 94 | /// Notify that the status for this document has changed | ||
81 | void statusChanged(Sublime::View*); | 95 | void statusChanged(Sublime::View*); | ||
82 | void positionChanged(Sublime::View*, int); | 96 | void positionChanged(Sublime::View*, int); | ||
Show All 27 Lines |
qlist include shouldn't be required?