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 "FloatPlacement.h"
16 #include "FuncRequest.h"
18 #include "insets/InsetFloat.h"
20 #include <QCloseEvent>
21 #include <QPushButton>
28 GuiFloat::GuiFloat(GuiView & lv)
29 : GuiDialog(lv, "float", qt_("Float Settings"))
33 connect(restorePB, SIGNAL(clicked()), this, SLOT(slotRestore()));
34 connect(okPB, SIGNAL(clicked()), this, SLOT(slotOK()));
35 connect(applyPB, SIGNAL(clicked()), this, SLOT(slotApply()));
36 connect(closePB, SIGNAL(clicked()), this, SLOT(slotClose()));
38 // enable span columns checkbox
40 // enable sideways checkbox
41 floatFP->useSideways();
43 connect(floatFP, SIGNAL(changed()), this, SLOT(change_adaptor()));
45 bc().setPolicy(ButtonPolicy::NoRepeatedApplyReadOnlyPolicy);
47 bc().setCancel(closePB);
48 bc().setApply(applyPB);
50 bc().setRestore(restorePB);
52 bc().addReadOnly(floatFP);
56 void GuiFloat::change_adaptor()
62 void GuiFloat::closeEvent(QCloseEvent * e)
69 void GuiFloat::updateContents()
71 floatFP->set(params_);
75 void GuiFloat::applyView()
77 params_.placement = floatFP->get(params_.wide, params_.sideways);
81 bool GuiFloat::initialiseParams(string const & data)
83 InsetFloatMailer::string2params(data, params_);
88 void GuiFloat::clearParams()
90 params_ = InsetFloatParams();
94 void GuiFloat::dispatchParams()
96 dispatch(FuncRequest(getLfun(), InsetFloatMailer::params2string(params_)));
100 Dialog * createGuiFloat(GuiView & lv) { return new GuiFloat(lv); }
103 } // namespace frontend
106 #include "GuiFloat_moc.cpp"