digiKam Developer Documentation
Professional Photo Management with the Power of Open Source
Loading...
Searching...
No Matches
Digikam::ModelCompleter Class Reference
+ Inheritance diagram for Digikam::ModelCompleter:

Signals

void signalActivated ()
 
void signalHighlighted (int albumId)
 

Public Member Functions

 ModelCompleter (QObject *const parent=nullptr)
 
void addItem (const QString &item)
 
QAbstractItemModel * itemModel () const
 
QStringList items () const
 
void setItemModel (QAbstractItemModel *const model, int uniqueIdRole, int displayRole=Qt::DisplayRole)
 If the given model is != null, the model is used to populate the completion for this text field.
 
void setList (const QStringList &list)
 

Member Function Documentation

◆ setItemModel()

void Digikam::ModelCompleter::setItemModel ( QAbstractItemModel *const  model,
int  uniqueIdRole,
int  displayRole = Qt::DisplayRole 
)
Parameters
modelto fill from or null for manual mode
uniqueIdRolea role for which the model will return a unique integer for each entry
displayRolethe role to retrieve the text for completion, default is Qt::DisplayRole.