15 #ifndef BORNAGAIN_GUI_COREGUI_VIEWS_PROPERTYEDITOR_MULTICOMBOPROPERTYEDITOR_H
16 #define BORNAGAIN_GUI_COREGUI_VIEWS_PROPERTYEDITOR_MULTICOMBOPROPERTYEDITOR_H
19 #include <QStyledItemDelegate>
22 class QStandardItemModel;
24 class QStyleOptionViewItem;
63 void paint(QPainter* painter,
const QStyleOptionViewItem& option,
64 const QModelIndex& index)
const;
Defines CustomEditors classes.
Base class for all custom variants editors.
Provides custom editor for ComboProperty with multi-select option.
MultiComboPropertyEditor(QWidget *parent=nullptr)
void onModelDataChanged(const QModelIndex &, const QModelIndex &, const QVector< int > &)
Propagate check state from the model to ComboProperty.
bool isClickToExpand(QObject *obj, QEvent *event) const
void updateBoxLabel()
Update text on QComboBox with the label provided by combo property.
void onClickedList(const QModelIndex &index)
Processes press event in QComboBox's underlying list view.
bool isClickToSelect(QObject *obj, QEvent *event) const
QSize minimumSizeHint() const
QStandardItemModel * m_model
bool eventFilter(QObject *obj, QEvent *event)
Handles mouse clicks on QComboBox elements.
class WheelEventEater * m_wheel_event_filter
void initEditor()
Inits editor widgets from m_data.
void setConnected(bool isConnected)
Provides custom style delegate for QComboBox to allow checkboxes.
void paint(QPainter *painter, const QStyleOptionViewItem &option, const QModelIndex &index) const
QCheckListStyledItemDelegate(QObject *parent=nullptr)
Event filter to install on combo boxes and spin boxes to not to react on wheel events during scrollin...