4 * This file is part of LyX, the document processor.
5 * Licence details can be found in the file COPYING.
7 * \author Lars Gullik Bjønnes
9 * \author Jean-Marc Lasgouttes
10 * \author Angus Leeming
11 * \author Abdelrazak Younes
13 * Full author contact details are available in file CREDITS.
16 #ifndef LYX_LAYOUT_BOX_H
17 #define LYX_LAYOUT_BOX_H
19 #include "support/strfwd.h"
28 class LayoutItemDelegate;
30 class LayoutBox : public QComboBox
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);
46 void showPopup() override;
49 bool eventFilter(QObject * o, QEvent * e) override;
51 QString const & filter() const;
55 void selected(int index);
57 void setIconSize(QSize size);
60 friend class LayoutItemDelegate;
63 int lastCurrentIndex_;
66 } // namespace frontend
69 #endif // LYX_LAYOUT_BOX_H