3 * \file FloatPlacement.h
4 * This file is part of LyX, the document processor.
5 * Licence details can be found in the file COPYING.
10 * Full author contact details are available in file CREDITS.
13 #ifndef FLOATPLACEMENT_H
14 #define FLOATPLACEMENT_H
16 #include "InsetParamsWidget.h"
17 #include "ui_FloatPlacementUi.h"
19 #include "support/docstring.h"
25 class InsetFloatParams;
29 class FloatPlacement : public InsetParamsWidget, public Ui::FloatPlacementUi {
32 FloatPlacement(bool show_options = false, QWidget * parent = 0);
34 /// \name DialogView inherited methods
36 InsetCode insetCode() const override { return FLOAT_CODE; }
37 FuncCode creationCode() const override { return LFUN_FLOAT_INSERT; }
38 QString dialogTitle() const override { return qt_("Float Settings"); }
39 void paramsToDialog(Inset const *) override;
40 docstring dialogToParams() const override;
41 bool checkWidgets(bool readonly) const override;
48 void setPlacement(std::string const & placement);
50 void setAlignment(std::string const & alignment);
52 std::string const getPlacement() const;
54 std::string const getAlignment() const;
57 void on_placementCO_currentIndexChanged(int);
62 void checkAllowed() const;
64 void initFloatTypeCO(FloatList const & floats);
66 void initFloatPlacementCO(bool const);
68 bool possiblePlacement(char p) const;
70 /// one of figure or table?
73 std::string allowed_placement_;
77 bool allows_sideways_;
79 FloatList const * float_list_;
82 } // namespace frontend
85 #endif // FLOATPLACEMENT_H