X-Git-Url: https://git.lyx.org/gitweb/?a=blobdiff_plain;f=src%2Ffrontends%2Fqt4%2FDialog.h;h=5f958e79d0d835a552354de0cf7a704437b913c6;hb=b7f6b979d0f889f08e735f35378bb20ba3788b4b;hp=68d76d3c0e96432d4d786ca41491ea6be6c80b32;hpb=f65f5be6d74782fcb4045af38e03922714c4deff;p=lyx.git diff --git a/src/frontends/qt4/Dialog.h b/src/frontends/qt4/Dialog.h index 68d76d3c0e..5f958e79d0 100644 --- a/src/frontends/qt4/Dialog.h +++ b/src/frontends/qt4/Dialog.h @@ -18,9 +18,9 @@ #include "support/strfwd.h" -#include #include +class QSettings; class QWidget; namespace lyx { @@ -48,7 +48,7 @@ enum KernelDocType /** \c Dialog collects the different parts of a Model-Controller-View * split of a generic dialog together. */ -class Dialog +class Dialog { public: /// \param lv is the access point for the dialog to the LyX kernel. @@ -73,7 +73,7 @@ public: * This default implementation saves the geometry state. * Reimplement to save more settings. **/ - virtual void saveSession() const; + virtual void saveSession(QSettings & settings) const; /// Restore session settings. /** @@ -251,8 +251,12 @@ public: * We should aim to reduce/remove these from the interface. */ //@{ - GuiView const & lyxview() const { return *lyxview_; } + GuiView const & lyxview() const { return lyxview_; } + /// Current buffer Buffer const & buffer() const; + /// Main document buffer + Buffer const & documentBuffer() const; + /// Current BufferView BufferView const * bufferview() const; //@} @@ -261,6 +265,8 @@ protected: void setTitle(QString const & title) { title_ = title; } /// virtual void apply(); + /// To be called when the buffer view has changed + virtual void onBufferViewChanged() = 0; private: /** The Dialog's name is the means by which a dialog identifies @@ -270,7 +276,7 @@ private: /// QString title_; /// - GuiView * lyxview_; + GuiView & lyxview_; /// intentionally unimplemented, therefore uncopiable Dialog(Dialog const &);