3 * \file CategorizedCombo.h
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 Jürgen Spitzmüller
12 * \author Abdelrazak Younes
14 * Full author contact details are available in file CREDITS.
17 #ifndef LYX_CATEGORIZEDCOMBO_H
18 #define LYX_CATEGORIZEDCOMBO_H
20 #include "support/strfwd.h"
31 * A combo box with categorization
33 class CategorizedCombo : public QComboBox
37 CategorizedCombo(QWidget * parent);
40 /// select an item in the combobox. Returns false if item does not exist
41 bool set(QString const & cc);
42 /// Reset the combobox.
46 /// Add Item to combo according to sorting settings from preferences
47 void addItemSort(QString const & item, QString const & guiname,
48 QString const & category, QString const & tooltip,
49 bool sorted, bool sortedByCat, bool sortCats,
52 QString getData(int row) const;
54 void setTooltipTemplate(QString const & tooltip,
55 QString const & unavail = QString());
61 bool eventFilter(QObject * o, QEvent * e);
63 QString const & filter() const;
67 void setIconSize(QSize size);
70 friend class CCItemDelegate;
78 } // namespace frontend
81 #endif // LYX_CATEGORIZEDCOMBO_H