]> git.lyx.org Git - lyx.git/blobdiff - src/frontends/qt4/Dialog.h
On Linux show in crash message box the backtrace
[lyx.git] / src / frontends / qt4 / Dialog.h
index 1fd0500636d8709d174340d58a3bc3166d006401..a9769ff4abe30cb686a7d88e102575492368791c 100644 (file)
 
 #include "support/strfwd.h"
 
-#include <QList>
 #include <QString>
 
 class QWidget;
-class QLineEdit;
 
 namespace lyx {
 
@@ -46,28 +44,6 @@ enum KernelDocType
        DOCBOOK
 };
 
-/// CheckedLineEdit
-// FIXME: Get rid of CheckedLineEdit in ButtonController and rename this one
-// to it.
-class CheckedLineEdit2
-{
-public:
-       CheckedLineEdit2(QLineEdit * input, QWidget * label = 0)
-       : input_(input), label_(label)
-       {}
-       ///     
-       bool check() const;
-
-private:
-       // non-owned
-       QLineEdit * input_;
-       QWidget * label_;
-};
-
-
-typedef QList<CheckedLineEdit2> CheckedLineEdits;
-
-
 /** \c Dialog collects the different parts of a Model-Controller-View
  *  split of a generic dialog together.
  */
@@ -182,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.
@@ -258,7 +239,7 @@ public:
        //@{
        bool isBufferAvailable() const;
        bool isBufferReadonly() const;
-       QString bufferFilepath() const;
+       QString bufferFilePath() const;
        //@}
 
        /// The type of the current buffer.
@@ -270,7 +251,11 @@ public:
         */
        //@{
        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;
        //@}
 
@@ -279,11 +264,6 @@ protected:
        void setTitle(QString const & title) { title_ = title; }
        ///
        virtual void apply();
-       /// Add a widget to the list of all widgets whose validity should
-       /// be checked explicitly when the buttons are refreshed.
-       void addCheckedWidget(QLineEdit * input, QWidget * label = 0);
-       /// \return true if all CheckedWidgets are in a valid state.
-       bool checkWidgets() const;
 
 private:
        /** The Dialog's name is the means by which a dialog identifies
@@ -298,9 +278,6 @@ private:
        /// intentionally unimplemented, therefore uncopiable
        Dialog(Dialog const &);
        void operator=(Dialog const &);
-
-       ///
-       CheckedLineEdits checked_line_edits_;
 };