X-Git-Url: https://git.lyx.org/gitweb/?a=blobdiff_plain;f=src%2Ffrontends%2Fqt4%2FGuiDialog.h;h=1e95fc5e371ae79e21cc2d70ac7e4119ccad1309;hb=a80599aa4d8d6740472f1fd67aeacfdadfaa114b;hp=608e5962e962a716fb09ae520acd74af59add7c8;hpb=8c27d557b9f2b4ca815d510afde30b94e918b7ac;p=lyx.git diff --git a/src/frontends/qt4/GuiDialog.h b/src/frontends/qt4/GuiDialog.h index 608e5962e9..1e95fc5e37 100644 --- a/src/frontends/qt4/GuiDialog.h +++ b/src/frontends/qt4/GuiDialog.h @@ -15,12 +15,8 @@ #include "Dialog.h" #include "ButtonController.h" -#include "insets/InsetCommandParams.h" - #include -class QCloseEvent; -class QShowEvent; namespace lyx { namespace frontend { @@ -28,7 +24,7 @@ namespace frontend { /// Base class for historical LyX dialogs. /** * \warning New dialogs should use the leaner classes \c DialogView or - * \c DockView depending on the intent. Eventally, old dialog should be + * \c DockView depending on the intent. Eventually, old dialogs should be * converted to \c DialogView too. */ class GuiDialog : public QDialog, public Dialog @@ -39,7 +35,8 @@ public: /// \param lv is the access point for the dialog to the LyX kernel. /// \param name is the identifier given to the dialog by its parent /// container. - explicit GuiDialog(GuiView & lv, std::string const & name); + /// \param title is the window title used for decoration. + GuiDialog(GuiView & lv, QString const & name, QString const & title); virtual QWidget * asQWidget() { return this; } virtual QWidget const * asQWidget() const { return this; } @@ -55,13 +52,14 @@ public Q_SLOTS: void slotOK(); // Apply button clicked void slotApply(); + // AutoApply checkbox clicked + void slotAutoApply(); // Close button clicked or closed from WindowManager void slotClose(); - -public: /// - void setViewTitle(docstring const & title); + void closeEvent(QCloseEvent * e); +public: /** Check whether we may apply our data. * * The buttons are disabled if not and (re-)enabled if yes. @@ -96,6 +94,9 @@ public: * to close or not (no point refreshing the display for example). */ bool isClosing() const { return is_closing_; } + + /// + bool needBufferOpen() const { return isBufferDependent(); } /// Update the display of the dialog whilst it is still visible. virtual void updateView(); @@ -109,31 +110,6 @@ private: }; -class GuiCommand : public GuiDialog -{ -public: - /// We need to know with what sort of inset we're associated. - // FIXME This should probably be an InsetCode - GuiCommand(GuiView &, std::string const & name); - /// - bool initialiseParams(std::string const & data); - /// clean-up on hide. - void clearParams() { params_.clear(); } - /// clean-up on hide. - void dispatchParams(); - /// - bool isBufferDependent() const { return true; } - -protected: - /// - InsetCommandParams params_; - //FIXME It should be possible to eliminate lfun_name_ - //now and recover that information from params().insetType(). - //But let's not do that quite yet. - /// Flags what action is taken by Kernel::dispatch() - std::string const lfun_name_; -}; - } // namespace frontend } // namespace lyx