]> git.lyx.org Git - lyx.git/blob - src/frontends/qt4/LayoutBox.h
Whitespace.
[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
39         /// select the right layout in the combobox.
40         void set(docstring const & layout);
41         /// Populate the layout combobox.
42         void updateContents(bool reset);
43         /// Add Item to Layout box according to sorting settings from preferences
44         void addItemSort(docstring const & item, docstring const & category,
45                 bool sorted, bool sortedByCat, bool unknown);
46
47         ///
48         void showPopup();
49         
50         ///
51         bool eventFilter(QObject * o, QEvent * e);
52         ///
53         QString const & filter() const;
54
55 private Q_SLOTS:
56         ///
57         void selected(int index);
58         ///
59         void setIconSize(QSize size);
60
61 private:
62         friend class LayoutItemDelegate;
63         struct Private;
64         Private * const d;
65 };
66
67 } // namespace frontend
68 } // namespace lyx
69
70 #endif // LYX_LAYOUT_BOX_H