* This file is part of LyX, the document processor.
* Licence details can be found in the file COPYING.
*
- * \author Jürgen Spitzmüller
+ * \author Angus Leeming
+ * \author Martin Vermeer
+ * \author Jürgen Spitzmüller
*
* Full author contact details are available in file CREDITS.
*/
#ifndef GUIBRANCH_H
#define GUIBRANCH_H
-#include "GuiDialogView.h"
-#include "ControlBranch.h"
+#include "InsetParamsWidget.h"
#include "ui_BranchUi.h"
-#include <QDialog>
-
namespace lyx {
namespace frontend {
-class GuiBranch;
-
-class GuiBranchDialog : public QDialog, public Ui::BranchUi {
+class GuiBranch : public InsetParamsWidget, public Ui::BranchUi
+{
Q_OBJECT
-public:
- GuiBranchDialog(GuiBranch * form);
-protected Q_SLOTS:
- virtual void change_adaptor();
-protected:
- virtual void closeEvent(QCloseEvent * e);
-private:
- GuiBranch * form_;
-};
-
-/** This class provides a QT implementation of the Branch Dialog.
- */
-class GuiBranch : public GuiView<GuiBranchDialog>
-{
public:
- /// Constructor
- GuiBranch(Dialog &);
- /// parent controller
- ControlBranch & controller()
- { return static_cast<ControlBranch &>(this->getController()); }
- /// parent controller
- ControlBranch const & controller() const
- { return static_cast<ControlBranch const &>(this->getController()); }
-private:
- friend class GuiBranchDialog;
+ GuiBranch(QWidget * parent = 0);
- /// Apply changes
- virtual void apply();
- /// Build the dialog
- virtual void build_dialog();
- /// Update dialog before showing it
- virtual void update_contents();
+private:
+ /// \name DialogView inherited methods
+ //@{
+ InsetCode insetCode() const { return BRANCH_CODE; }
+ FuncCode creationCode() const { return LFUN_BRANCH_INSERT; }
+ QString dialogTitle() const { return qt_("Branch Settings"); }
+ void paramsToDialog(Inset const *);
+ docstring dialogToParams() const;
+ bool checkWidgets(bool readonly) const;
+ //@}
};
} // namespace frontend