]> git.lyx.org Git - lyx.git/blobdiff - src/frontends/qt4/Dialog.h
Do not compute caret geometry when we are not ready to do so.
[lyx.git] / src / frontends / qt4 / Dialog.h
index a9769ff4abe30cb686a7d88e102575492368791c..5f958e79d0d835a552354de0cf7a704437b913c6 100644 (file)
@@ -20,6 +20,7 @@
 
 #include <QString>
 
+class QSettings;
 class QWidget;
 
 namespace lyx {
@@ -47,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.
@@ -72,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.
        /**
@@ -250,7 +251,7 @@ 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
@@ -264,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
@@ -273,7 +276,7 @@ private:
        ///
        QString title_;
        ///
-       GuiView * lyxview_;
+       GuiView & lyxview_;
 
        /// intentionally unimplemented, therefore uncopiable
        Dialog(Dialog const &);