]> git.lyx.org Git - lyx.git/blobdiff - src/frontends/qt4/Dialog.h
Disable literal cb if there is nothing to latexify.
[lyx.git] / src / frontends / qt4 / Dialog.h
index 34232d29a2b77d0d6615745d0417e7dcbd8a5db3..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.
@@ -235,7 +239,7 @@ public:
        //@{
        bool isBufferAvailable() const;
        bool isBufferReadonly() const;
-       QString bufferFilepath() const;
+       QString bufferFilePath() const;
        //@}
 
        /// The type of the current buffer.
@@ -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 &);