]> git.lyx.org Git - features.git/blob - src/frontends/qt4/GuiFloat.cpp
* Migrate InsetFloat to InsetDialog
[features.git] / src / frontends / qt4 / GuiFloat.cpp
1 /**
2  * \file GuiFloat.cpp
3  * This file is part of LyX, the document processor.
4  * Licence details can be found in the file COPYING.
5  *
6  * \author Edwin Leuven
7  *
8  * Full author contact details are available in file CREDITS.
9  */
10
11 #include <config.h>
12
13 #include "GuiFloat.h"
14
15 #include "FloatPlacement.h"
16
17 #include "FuncRequest.h"
18
19 #include <QPushButton>
20
21 using namespace std;
22
23 namespace lyx {
24 namespace frontend {
25
26 GuiFloat::GuiFloat(GuiView & lv)
27         : InsetDialog(lv, FLOAT_CODE, LFUN_FLOAT_INSERT, "float", "Float Settings")
28 {
29         setupUi(this);
30         
31         // enable span columns checkbox
32         floatFP->useWide();
33         // enable sideways checkbox
34         floatFP->useSideways();
35
36         connect(floatFP, SIGNAL(changed()), this, SLOT(applyView()));
37 }
38
39
40 void GuiFloat::enableView(bool enable)
41 {
42         floatFP->setEnabled(enable);
43 }
44
45
46 void GuiFloat::paramsToDialog(Inset const * inset)
47 {
48         floatFP->paramsToDialog(inset);
49 }
50
51
52 docstring GuiFloat::dialogToParams() const
53 {
54         return floatFP->dialogToParams();
55 }
56
57 Dialog * createGuiFloat(GuiView & lv) { return new GuiFloat(lv); }
58
59 } // namespace frontend
60 } // namespace lyx
61
62 #include "moc_GuiFloat.cpp"