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.
44 /// Reset the combobox filter.
48 /// Add Item to combo according to sorting settings from preferences
49 void addItemSort(QString const & item, QString const & guiname,
50 QString const & category, QString const & tooltip,
51 bool sorted, bool sortedByCat, bool sortCats,
54 QString getData(int row) const;
56 void setTooltipTemplate(QString const & tooltip,
57 QString const & unavail = QString());
63 bool eventFilter(QObject * o, QEvent * e);
65 QString const & filter() const;
69 void setIconSize(QSize size);
72 friend class CCItemDelegate;
80 } // namespace frontend
83 #endif // LYX_CATEGORIZEDCOMBO_H