27 #ifndef QTCOMBOCHECKBOX_QO_H_
28 #define QTCOMBOCHECKBOX_QO_H_
31 #include <QItemDelegate>
46 void paint(QPainter* painter,
const QStyleOptionViewItem& option,
47 const QModelIndex &index)
const;
50 QWidget*
createEditor(QWidget* parent,
const QStyleOptionViewItem& option,
51 const QModelIndex& index)
const;
54 void setEditorData(QWidget* editor,
const QModelIndex& index)
const;
57 void setModelData(QWidget* editor, QAbstractItemModel* model,
58 const QModelIndex& index)
const;
QWidget * createEditor(QWidget *parent, const QStyleOptionViewItem &option, const QModelIndex &index) const
Overrides QItemDelegate::createEditor().
void setModelData(QWidget *editor, QAbstractItemModel *model, const QModelIndex &index) const
Overrides QItemDelegate::setModelData().
void setEditorData(QWidget *editor, const QModelIndex &index) const
Overrides QItemDelegate::setEditorData().
QString itsDisplayText_
Display text.
QtComboCheckBoxDelegate(QObject *parent=NULL)
Constructor which takes optional parent.
bool indexIsToggled(int index) const
Gets/Sets whether the checkbox at the given index is toggled.
void paint(QPainter *painter, const QStyleOptionViewItem &option, const QModelIndex &index) const
Overrides QItemDelegate::paint().
void setDisplayText(const QString &text)
~QtComboCheckBox()
Destructor.
bool eventFilter(QObject *object, QEvent *event)
Overrides QObject::eventFilter().
void paintEvent(QPaintEvent *event)
Overrides QWidget::paintEvent().
QString getDisplayText() const
Gets/Sets the display text.
Subclass of QComboBox that uses the item delegate above.
~QtComboCheckBoxDelegate()
Destructor.
void stateChanged()
This signal is emitted when the user has finished changing the checkboxes.
void toggleIndex(int index, bool toggled)
QtComboCheckBox(QWidget *parent=NULL)
Constructor which takes optional parent.
Subclass of QItemDelegate for use with QtComboCheckBox.