]> git.lyx.org Git - lyx.git/blobdiff - src/frontends/qt4/Dialog.h
Show Biblatex files in the TeXInfo dialog
[lyx.git] / src / frontends / qt4 / Dialog.h
index 10d1af5a8ff6cc7affa235336cfac3bbe3b97deb..68587154e4adbd8c9095523fb8d8a757c823bcfc 100644 (file)
@@ -18,7 +18,6 @@
 
 #include "support/strfwd.h"
 
-#include <QList>
 #include <QString>
 
 class QWidget;
@@ -159,10 +158,15 @@ public:
        /// Enable the Controller to dispatch its data back to the LyX kernel.
        virtual void dispatchParams() = 0;
 
+       /** \return true if the dialog should be updated when the
+        *  buffer has changed.
+        */
+       virtual bool isBufferDependent() const = 0;
+
        /** \return true if the dialog should be shown only when
         *  a buffer is open.
         */
-       virtual bool isBufferDependent() const = 0;
+       virtual bool needBufferOpen() const = 0;
 
        /** \return true if the dialog can apply data also
         *  for ReadOnly buffers.
@@ -246,8 +250,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;
        //@}
 
@@ -256,6 +264,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
@@ -265,7 +275,7 @@ private:
        ///
        QString title_;
        ///
-       GuiView * lyxview_;
+       GuiView & lyxview_;
 
        /// intentionally unimplemented, therefore uncopiable
        Dialog(Dialog const &);