#include <QToolBar>
#include <QComboBox>
+class QStandardItemModel;
+
namespace lyx {
class Inset;
-class TextClass;
+class DocumentClass;
class ToolbarItem;
namespace frontend {
+class FilterItemDelegate;
class GuiCommandBuffer;
+class GuiFilterProxyModel;
class GuiView;
class Action;
/// Populate the layout combobox.
void updateContents(bool reset);
/// Add Item to Layout box according to sorting settings from preferences
- void addItemSort(QString const & item, bool sorted);
+ void addItemSort(docstring const & item, bool sorted);
+
+ ///
+ void showPopup();
+
+ ///
+ bool eventFilter(QObject * o, QEvent * e);
+ ///
+ QString const & filter() { return filter_; }
private Q_SLOTS:
- void selected(const QString & str);
+ ///
+ void selected(int index);
private:
+ ///
+ void resetFilter();
+ ///
+ void setFilter(QString const & s);
+
+ ///
GuiView & owner_;
- TextClass const * text_class_;
+ ///
+ DocumentClass const * text_class_;
+ ///
Inset const * inset_;
+
+ /// the layout model: 1st column translated, 2nd column raw layout name
+ QStandardItemModel * model_;
+ /// the proxy model filtering \c model_
+ GuiFilterProxyModel * filterModel_;
+ /// the (model-) index of the last successful selection
+ int lastSel_;
+ /// the character filter
+ QString filter_;
+ ///
+ FilterItemDelegate * filterItemDelegate_;
};