3 * This file is part of LyX, the document processor.
4 * Licence details can be found in the file COPYING.
8 * Full author contact details are available in file CREDITS.
15 #include "ControlFloat.h"
16 #include "FloatPlacement.h"
18 #include "insets/InsetFloat.h"
20 #include <QCloseEvent>
21 #include <QPushButton>
27 GuiFloatDialog::GuiFloatDialog(LyXView & lv)
28 : GuiDialog(lv, "float")
30 setController(new ControlFloat(*this));
31 setViewTitle(_("Float Settings"));
34 connect(restorePB, SIGNAL(clicked()), this, SLOT(slotRestore()));
35 connect(okPB, SIGNAL(clicked()), this, SLOT(slotOK()));
36 connect(applyPB, SIGNAL(clicked()), this, SLOT(slotApply()));
37 connect(closePB, SIGNAL(clicked()), this, SLOT(slotClose()));
39 // enable span columns checkbox
41 // enable sideways checkbox
42 floatFP->useSideways();
44 connect(floatFP, SIGNAL(changed()), this, SLOT(change_adaptor()));
46 bc().setPolicy(ButtonPolicy::NoRepeatedApplyReadOnlyPolicy);
48 bc().setCancel(closePB);
49 bc().setApply(applyPB);
51 bc().setRestore(restorePB);
53 bc().addReadOnly(floatFP);
57 ControlFloat & GuiFloatDialog::controller()
59 return static_cast<ControlFloat &>(GuiDialog::controller());
63 void GuiFloatDialog::change_adaptor()
69 void GuiFloatDialog::closeEvent(QCloseEvent * e)
76 void GuiFloatDialog::updateContents()
78 floatFP->set(controller().params());
82 void GuiFloatDialog::applyView()
84 InsetFloatParams & params = controller().params();
85 params.placement = floatFP->get(params.wide, params.sideways);
88 } // namespace frontend
91 #include "GuiFloat_moc.cpp"