]> git.lyx.org Git - lyx.git/blob - src/frontends/qt4/LayoutBox.h
Use <cstdint> instead of <boost/cstdint.hpp>
[lyx.git] / src / frontends / qt4 / LayoutBox.h
1 // -*- C++ -*-
2 /**
3  * \file LayoutBox.h
4  * This file is part of LyX, the document processor.
5  * Licence details can be found in the file COPYING.
6  *
7  * \author Lars Gullik Bjønnes
8  * \author John Levon
9  * \author Jean-Marc Lasgouttes
10  * \author Angus Leeming
11  * \author Abdelrazak Younes
12  *
13  * Full author contact details are available in file CREDITS.
14  */
15
16 #ifndef LYX_LAYOUT_BOX_H
17 #define LYX_LAYOUT_BOX_H
18
19 #include "support/strfwd.h"
20
21 #include <QComboBox>
22
23 namespace lyx {
24
25 class DocumentClass;
26 class Inset;
27
28 namespace frontend {
29
30 class GuiView;
31 class LayoutItemDelegate;
32
33 class LayoutBox : public QComboBox
34 {
35         Q_OBJECT
36 public:
37         LayoutBox(GuiView &);
38         ~LayoutBox();
39
40         /// select the right layout in the combobox.
41         void set(docstring const & layout);
42         /// Populate the layout combobox.
43         void updateContents(bool reset);
44         /// Add Item to Layout box according to sorting settings from preferences
45         void addItemSort(docstring const & item, docstring const & category,
46                 bool sorted, bool sortedByCat, bool unknown);
47
48         ///
49         void showPopup();
50
51         ///
52         bool eventFilter(QObject * o, QEvent * e);
53         ///
54         QString const & filter() const;
55
56 private Q_SLOTS:
57         ///
58         void selected(int index);
59         ///
60         void setIconSize(QSize size);
61
62 private:
63         friend class LayoutItemDelegate;
64         class Private;
65         Private * const d;
66 };
67
68 } // namespace frontend
69 } // namespace lyx
70
71 #endif // LYX_LAYOUT_BOX_H