21 #ifndef __ctkCheckableComboBox_h
22 #define __ctkCheckableComboBox_h
28 #include "ctkWidgetsExport.h"
31 class ctkCheckableComboBoxPrivate;
56 Q_INVOKABLE
void setCheckState(
const QModelIndex& index, Qt::CheckState check);
58 Q_INVOKABLE Qt::CheckState
checkState(
const QModelIndex& index)
const;
71 void onDataChanged(
const QModelIndex& topLeft,
const QModelIndex& bottomRight);
78 QScopedPointer<ctkCheckableComboBoxPrivate>
d_ptr;
Q_INVOKABLE QModelIndexList checkedIndexes() const
Returns an up-to-date list of all the checked indexes.
Q_INVOKABLE void setCheckState(const QModelIndex &index, Qt::CheckState check)
Utility function to conveniently check the state of an index.
virtual ~ctkCheckableComboBox()
Q_INVOKABLE bool noneChecked() const
Returns true if none of the indexes is checked, false otherwise.
Q_INVOKABLE bool allChecked() const
Returns true if all the indexes are checked, false otherwise.
ctkCheckableComboBox(QWidget *parent=0)
void checkedIndexesChanged()
Q_INVOKABLE QAbstractItemModel * checkableModel() const
Use setCheckableModel instead of setModel()
void onDataChanged(const QModelIndex &topLeft, const QModelIndex &bottomRight)
QScopedPointer< ctkCheckableComboBoxPrivate > d_ptr
virtual void paintEvent(QPaintEvent *)
Reimplemented for internal reasons.
Q_INVOKABLE void setCheckableModel(QAbstractItemModel *model)
Q_INVOKABLE ctkCheckableModelHelper * checkableModelHelper() const
bool eventFilter(QObject *o, QEvent *e)
Reimplemented for internal reasons.
Q_INVOKABLE Qt::CheckState checkState(const QModelIndex &index) const
Utility function to return the check state of a model index.