]> git.lyx.org Git - lyx.git/blobdiff - src/frontends/qt4/GuiBranch.h
Fix the tab ordering of GuiDocument components.
[lyx.git] / src / frontends / qt4 / GuiBranch.h
index 836da8217e03024131858e6cda45accc874c8603..62f2ecaa2a9b121d3fdee7bebc1b2c9ea29cfe9e 100644 (file)
@@ -4,58 +4,40 @@
  * 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 QBRANCH_H
-#define QBRANCH_H
+#ifndef GUIBRANCH_H
+#define GUIBRANCH_H
 
-#include "GuiDialogView.h"
+#include "InsetParamsWidget.h"
 #include "ui_BranchUi.h"
 
-#include <QCloseEvent>
-#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_;
-};
-
-class ControlBranch;
 
-/** This class provides a QT implementation of the Branch Dialog.
- */
-class GuiBranch : public QController<ControlBranch, GuiView<GuiBranchDialog> >
-{
 public:
-       friend class GuiBranchDialog;
+       GuiBranch(QWidget * parent = 0);
 
-       /// Constructor
-       GuiBranch(Dialog &);
 private:
-       ///  Apply changes
-       virtual void apply();
-       /// Build the dialog
-       virtual void build_dialog();
-       /// Update dialog before showing it
-       virtual void update_contents();
+       /// \name DialogView inherited methods
+       //@{
+       InsetCode insetCode() const { return BRANCH_CODE; }
+       FuncCode creationCode() const { return LFUN_BRANCH_INSERT; }
+       void paramsToDialog(Inset const *);
+       docstring dialogToParams() const;
+       //@}
 };
 
 } // namespace frontend
 } // namespace lyx
 
-#endif // QBRANCH_H
+#endif // GUIBRANCH_H