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