]> git.lyx.org Git - lyx.git/blob - src/frontends/qt4/FloatPlacement.h
* TocWidget.{cpp,h}:
[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 FloatList;
25 class Inset;
26 class InsetFloatParams;
27
28 class FloatPlacement : public QWidget, public Ui::FloatPlacementUi {
29         Q_OBJECT
30 public:
31         FloatPlacement(bool show_options = false, QWidget * parent = 0);
32
33         ///
34         void paramsToDialog(Inset const *);
35         ///
36         docstring dialogToParams() const;
37         ///
38         void useWide();
39         ///
40         void useSideways();
41         ///
42         void set(std::string const & placement);
43         ///
44         std::string const get() const;
45
46 private Q_SLOTS:
47         void on_defaultsCB_stateChanged(int state);
48         void changedSlot();
49
50 Q_SIGNALS:
51         void changed();
52
53 private:
54         ///
55         void checkAllowed();
56         ///
57         std::string const get(bool & wide, bool & sideways) const;
58         ///
59         void initFloatTypeCO(FloatList const & floats);
60
61         /// one of figure or table?
62         bool standardfloat_;
63         ///
64         FloatList const * float_list_;
65 };
66
67 } // namespace lyx
68
69 #endif // FLOATPLACEMENT_H