]> git.lyx.org Git - lyx.git/blob - src/frontends/qt4/GuiBranch.h
merge ButtonController and its view (Qt2BC in this case)
[lyx.git] / src / frontends / qt4 / GuiBranch.h
1 // -*- C++ -*-
2 /**
3  * \file GuiBranch.h
4  * This file is part of LyX, the document processor.
5  * Licence details can be found in the file COPYING.
6  *
7  * \author Jürgen Spitzmüller
8  *
9  * Full author contact details are available in file CREDITS.
10  */
11
12 #ifndef GUIBRANCH_H
13 #define GUIBRANCH_H
14
15 #include "GuiDialogView.h"
16 #include "ControlBranch.h"
17 #include "ui_BranchUi.h"
18
19 #include <QDialog>
20
21 namespace lyx {
22 namespace frontend {
23
24 class GuiBranch;
25
26 class GuiBranchDialog : public QDialog, public Ui::BranchUi {
27         Q_OBJECT
28 public:
29         GuiBranchDialog(GuiBranch * form);
30 protected Q_SLOTS:
31         virtual void change_adaptor();
32 protected:
33         virtual void closeEvent(QCloseEvent * e);
34 private:
35         GuiBranch * form_;
36 };
37
38
39 /** This class provides a QT implementation of the Branch Dialog.
40  */
41 class GuiBranch : public GuiView<GuiBranchDialog> 
42 {
43 public:
44         /// Constructor
45         GuiBranch(GuiDialog &);
46         /// parent controller
47         ControlBranch & controller()
48         { return static_cast<ControlBranch &>(this->getController()); }
49         /// parent controller
50         ControlBranch const & controller() const
51         { return static_cast<ControlBranch const &>(this->getController()); }
52 private:
53         friend class GuiBranchDialog;
54
55         ///  Apply changes
56         virtual void apply();
57         /// Build the dialog
58         virtual void build_dialog();
59         /// Update dialog before showing it
60         virtual void update_contents();
61 };
62
63 } // namespace frontend
64 } // namespace lyx
65
66 #endif // GUIBRANCH_H