]> git.lyx.org Git - lyx.git/blob - src/frontends/qt4/FloatPlacement.h
FloatPlacement: code cleanup and bug fixing (pretty much nothing worked)
[lyx.git] / src / frontends / qt4 / FloatPlacement.h
1 // -*- C++ -*-
2 /**
3  * \file FloatPlacement.h
4  * This file is part of LyX, the document processor.
5  * Licence details can be found in the file COPYING.
6  *
7  * \author Edwin Leuven
8  * \author John Levon
9  *
10  * Full author contact details are available in file CREDITS.
11  */
12
13 #ifndef FLOATPLACEMENT_H
14 #define FLOATPLACEMENT_H
15
16 #include "ui_FloatPlacementUi.h"
17
18 #include <QWidget>
19
20 #include "support/docstring.h"
21
22 namespace lyx {
23
24 class Inset;
25 class InsetFloatParams;
26
27 class FloatPlacement : public QWidget, public Ui::FloatPlacementUi {
28         Q_OBJECT
29 public:
30         FloatPlacement(bool show_options = false, QWidget * parent = 0);
31
32         ///
33         void paramsToDialog(Inset const *);
34         ///
35         docstring dialogToParams() const;
36         ///
37         void useWide();
38         ///
39         void useSideways();
40         ///
41         void set(std::string const & placement);
42         ///
43         std::string const get() const;
44
45 private Q_SLOTS:
46         void on_defaultsCB_stateChanged(int state);
47         void changedSlot();
48
49 Q_SIGNALS:
50         void changed();
51
52 private:
53         ///
54         void checkAllowed();
55         ///
56         std::string const get(bool & wide, bool & sideways) const;
57
58         /// one of figure or table?
59         bool standardfloat_;
60         ///
61         std::string float_type_;
62 };
63
64 } // namespace lyx
65
66 #endif // FLOATPLACEMENT_H