]> git.lyx.org Git - features.git/blob - src/frontends/qt4/FloatPlacement.h
* Migrate InsetFloat to InsetDialog
[features.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(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         void checkAllowed();
43
44         std::string const get(bool & wide, bool & sideways) const;
45         std::string const get() const;
46
47 public Q_SLOTS:
48         void tbhpClicked();
49         void changedSlot();
50         void on_spanCB_clicked();
51         void on_heredefinitelyCB_clicked();
52         void on_sidewaysCB_clicked();
53
54 Q_SIGNALS:
55         void changed();
56
57 private:
58         /// one of figure or table?
59         bool standardfloat_;
60
61 };
62
63 } // namespace lyx
64
65 #endif // FLOATPLACEMENT_H