|
QWidget * | createEditor (QWidget *parent, const QStyleOptionViewItem &option, const QModelIndex &index) const override |
|
QList< QWidget * > | createItemWidgets (const QModelIndex &index) const override |
|
bool | editorEvent (QEvent *event, QAbstractItemModel *model, const QStyleOptionViewItem &option, const QModelIndex &index) override |
|
QPersistentModelIndex | focusedIndex () const |
|
QAbstractItemView * | itemView () const |
|
void | paint (QPainter *painter, const QStyleOptionViewItem &option, const QModelIndex &index) const override |
|
void | setEditorData (QWidget *editor, const QModelIndex &index) const override |
|
void | setModelData (QWidget *editor, QAbstractItemModel *model, const QModelIndex &index) const override |
|
| SetupCollectionDelegate (QAbstractItemView *const view, QObject *const parent=nullptr) |
|
QSize | sizeHint (const QStyleOptionViewItem &option, const QModelIndex &index) const override |
|
void | updateEditorGeometry (QWidget *editor, const QStyleOptionViewItem &option, const QModelIndex &index) const override |
|
void | updateItemWidgets (const QList< QWidget * > &widgets, const QStyleOptionViewItem &option, const QPersistentModelIndex &index) const override |
|
| ~SetupCollectionDelegate () override |
|
◆ SetupCollectionDelegate()
Digikam::SetupCollectionDelegate::SetupCollectionDelegate |
( |
QAbstractItemView *const |
view, |
|
|
QObject *const |
parent = nullptr |
|
) |
| |
|
explicit |
◆ ~SetupCollectionDelegate()
Digikam::SetupCollectionDelegate::~SetupCollectionDelegate |
( |
| ) |
|
|
override |
◆ blockedEventTypes()
QList< QEvent::Type > Digikam::DWItemDelegate::blockedEventTypes |
( |
QWidget *const |
widget | ) |
const |
|
protectedinherited |
Retrieves the list of blocked event types for the given widget.
- Parameters
-
widget | the specified widget. |
- Returns
- the list of blocked event types, can be empty if no events are blocked.
◆ categoryButtonPressed
void Digikam::SetupCollectionDelegate::categoryButtonPressed |
( |
int |
mappedId | ) |
const |
|
signal |
◆ createEditor()
QWidget * Digikam::SetupCollectionDelegate::createEditor |
( |
QWidget * |
parent, |
|
|
const QStyleOptionViewItem & |
option, |
|
|
const QModelIndex & |
index |
|
) |
| const |
|
override |
◆ createItemWidgets()
QList< QWidget * > Digikam::SetupCollectionDelegate::createItemWidgets |
( |
const QModelIndex & |
index | ) |
const |
|
overridevirtual |
Creates the list of widgets needed for an item.
- Note
- No initialization of the widgets is supposed to happen here. The widgets will be initialized based on needs for a given item.
-
If you want to connect some widget signals to any slot, you should do it here.
- index the index to create widgets for.
- Note
- If you want to know the index for which you are creating widgets, it is available as a QModelIndex Q_PROPERTY called "goya:creatingWidgetsForIndex". Ensure to add Q_DECLARE_METATYPE(QModelIndex) before your method definition to tell QVariant about QModelIndex.
- Returns
- the list of newly created widgets which will be used to interact with an item.
- See also
- updateItemWidgets()
Implements Digikam::DWItemDelegate.
References categoryButtonPressed(), deletePressed(), and updatePressed().
◆ deletePressed
void Digikam::SetupCollectionDelegate::deletePressed |
( |
int |
mappedId | ) |
const |
|
signal |
◆ editorEvent()
bool Digikam::SetupCollectionDelegate::editorEvent |
( |
QEvent * |
event, |
|
|
QAbstractItemModel * |
model, |
|
|
const QStyleOptionViewItem & |
option, |
|
|
const QModelIndex & |
index |
|
) |
| |
|
override |
◆ focusedIndex()
QPersistentModelIndex Digikam::DWItemDelegate::focusedIndex |
( |
| ) |
const |
|
inherited |
◆ itemView()
QAbstractItemView * Digikam::DWItemDelegate::itemView |
( |
| ) |
const |
|
inherited |
◆ paint()
void Digikam::SetupCollectionDelegate::paint |
( |
QPainter * |
painter, |
|
|
const QStyleOptionViewItem & |
option, |
|
|
const QModelIndex & |
index |
|
) |
| const |
|
override |
◆ setBlockedEventTypes()
void Digikam::DWItemDelegate::setBlockedEventTypes |
( |
QWidget *const |
widget, |
|
|
const QList< QEvent::Type > & |
types |
|
) |
| const |
|
protectedinherited |
Sets the list of event types
that a widget
will block.
Blocked events are not passed to the view. This way you can prevent an item from being selected when a button is clicked for instance.
- Parameters
-
widget | the widget which must block events |
types | the list of event types the widget must block |
◆ setEditorData()
void Digikam::SetupCollectionDelegate::setEditorData |
( |
QWidget * |
editor, |
|
|
const QModelIndex & |
index |
|
) |
| const |
|
override |
◆ setModelData()
void Digikam::SetupCollectionDelegate::setModelData |
( |
QWidget * |
editor, |
|
|
QAbstractItemModel * |
model, |
|
|
const QModelIndex & |
index |
|
) |
| const |
|
override |
◆ sizeHint()
QSize Digikam::SetupCollectionDelegate::sizeHint |
( |
const QStyleOptionViewItem & |
option, |
|
|
const QModelIndex & |
index |
|
) |
| const |
|
override |
References Digikam::SetupCollectionModel::CategoryButtonDisplayRole, Digikam::SetupCollectionModel::categoryIndexes(), Digikam::SetupCollectionModel::DeleteDecorationRole, Digikam::SetupCollectionModel::IsCategoryRole, Digikam::SetupCollectionModel::IsDeleteRole, Digikam::SetupCollectionModel::IsUpdateRole, m_categoryMaxStyledWidth, m_sampleDeleteButton, m_samplePushButton, m_sampleUpdateButton, m_styledDelegate, and Digikam::SetupCollectionModel::UpdateDecorationRole.
◆ updateEditorGeometry()
void Digikam::SetupCollectionDelegate::updateEditorGeometry |
( |
QWidget * |
editor, |
|
|
const QStyleOptionViewItem & |
option, |
|
|
const QModelIndex & |
index |
|
) |
| const |
|
override |
◆ updateItemWidgets()
void Digikam::SetupCollectionDelegate::updateItemWidgets |
( |
const QList< QWidget * > & |
widgets, |
|
|
const QStyleOptionViewItem & |
option, |
|
|
const QPersistentModelIndex & |
index |
|
) |
| const |
|
overridevirtual |
Updates a list of widgets for its use inside of the delegate (painting or event handling).
- Note
- All the positioning and sizing should be done in item coordinates.
- Warning
- Do not make widget connections in here, since this method will be called very regularly.
- Parameters
-
widgets | the widgets to update |
option | the current set of style options for the view. |
index | the model index of the item currently manipulated. |
Implements Digikam::DWItemDelegate.
References Digikam::SetupCollectionModel::CategoryButtonDisplayRole, Digikam::SetupCollectionModel::CategoryButtonMapId, Digikam::SetupCollectionModel::DeleteDecorationRole, Digikam::SetupCollectionModel::DeleteMapId, Digikam::SetupCollectionModel::IsCategoryRole, Digikam::SetupCollectionModel::IsDeleteRole, Digikam::SetupCollectionModel::IsUpdateRole, Digikam::DWItemDelegate::itemView(), m_categoryMaxStyledWidth, Digikam::SetupCollectionModel::UpdateDecorationRole, and Digikam::SetupCollectionModel::UpdateMapId.
◆ updatePressed
void Digikam::SetupCollectionDelegate::updatePressed |
( |
int |
mappedId | ) |
const |
|
signal |
◆ m_categoryMaxStyledWidth
int Digikam::SetupCollectionDelegate::m_categoryMaxStyledWidth |
|
protected |
◆ m_sampleDeleteButton
QToolButton* Digikam::SetupCollectionDelegate::m_sampleDeleteButton |
|
protected |
◆ m_samplePushButton
QPushButton* Digikam::SetupCollectionDelegate::m_samplePushButton |
|
protected |
◆ m_sampleUpdateButton
QToolButton* Digikam::SetupCollectionDelegate::m_sampleUpdateButton |
|
protected |
◆ m_styledDelegate
QStyledItemDelegate* Digikam::SetupCollectionDelegate::m_styledDelegate |
|
protected |
The documentation for this class was generated from the following files: