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"
28 * A combo box with categorization
30 class CategorizedCombo : public QComboBox
34 CategorizedCombo(QWidget * parent);
37 /// select an item in the combobox. Returns false if item does not exist
38 bool set(QString const & cc);
39 /// Reset the combobox.
43 /// Add Item to combo according to sorting settings from preferences
44 void addItemSort(QString const & item, QString const & guiname,
45 QString const & category, QString const & tooltip,
46 bool sorted, bool sortedByCat, bool sortCats,
49 QString getData(int row) const;
51 void setTooltipTemplate(QString const & tooltip,
52 QString const & unavail = QString());
58 bool eventFilter(QObject * o, QEvent * e);
60 QString const & filter() const;
64 void setIconSize(QSize size);
67 friend class CCItemDelegate;
75 #endif // LYX_CATEGORIZEDCOMBO_H