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 <QPushButton>
27 GuiFloat::GuiFloat(GuiView
& lv
)
28 : GuiDialog(lv
, "float", qt_("Float Settings"))
32 connect(restorePB
, SIGNAL(clicked()), this, SLOT(slotRestore()));
33 connect(okPB
, SIGNAL(clicked()), this, SLOT(slotOK()));
34 connect(applyPB
, SIGNAL(clicked()), this, SLOT(slotApply()));
35 connect(closePB
, SIGNAL(clicked()), this, SLOT(slotClose()));
37 // enable span columns checkbox
39 // enable sideways checkbox
40 floatFP
->useSideways();
42 connect(floatFP
, SIGNAL(changed()), this, SLOT(change_adaptor()));
44 bc().setPolicy(ButtonPolicy::NoRepeatedApplyReadOnlyPolicy
);
46 bc().setCancel(closePB
);
47 bc().setApply(applyPB
);
49 bc().setRestore(restorePB
);
51 bc().addReadOnly(floatFP
);
55 void GuiFloat::change_adaptor()
61 void GuiFloat::updateContents()
63 floatFP
->set(params_
);
67 void GuiFloat::applyView()
69 params_
.placement
= floatFP
->get(params_
.wide
, params_
.sideways
);
73 bool GuiFloat::initialiseParams(string
const & data
)
75 InsetFloat::string2params(data
, params_
);
80 void GuiFloat::clearParams()
82 params_
= InsetFloatParams();
86 void GuiFloat::dispatchParams()
88 dispatch(FuncRequest(getLfun(), InsetFloat::params2string(params_
)));
92 Dialog
* createGuiFloat(GuiView
& lv
) { return new GuiFloat(lv
); }
95 } // namespace frontend
98 #include "moc_GuiFloat.cpp"