]> git.lyx.org Git - lyx.git/blob - src/frontends/qt/LayoutBox.h
Improve some debug messages
[lyx.git] / src / frontends / qt / 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 namespace frontend {
26
27 class GuiView;
28 class LayoutItemDelegate;
29
30 class LayoutBox : public QComboBox
31 {
32         Q_OBJECT
33 public:
34         LayoutBox(GuiView &);
35         ~LayoutBox();
36
37         /// select the right layout in the combobox.
38         void set(docstring const & layout);
39         /// Populate the layout combobox.
40         void updateContents(bool reset);
41         /// Add Item to Layout box according to sorting settings from preferences
42         void addItemSort(docstring const & item, docstring const & category,
43                 bool sorted, bool sortedByCat, bool unknown);
44
45         ///
46         void showPopup() override;
47
48         ///
49         bool eventFilter(QObject * o, QEvent * e) override;
50         ///
51         QString const & filter() const;
52
53 private Q_SLOTS:
54         ///
55         void selected(int index);
56         ///
57         void setIconSize(QSize size);
58
59 private:
60         friend class LayoutItemDelegate;
61         class Private;
62         Private * const d;
63 };
64
65 } // namespace frontend
66 } // namespace lyx
67
68 #endif // LYX_LAYOUT_BOX_H