digiKam
Digikam::ModelCompleter Class Reference
+ Inheritance diagram for Digikam::ModelCompleter:

Signals

void signalActivated ()
 
void signalHighlighted (int albumId)
 

Public Member Functions

void addItem (const QString &item)
 
QAbstractItemModel * itemModel () const
 
QStringList items () const
 
 ModelCompleter (QObject *const parent=nullptr)
 
void setItemModel (QAbstractItemModel *const model, int uniqueIdRole, int displayRole=Qt::DisplayRole)
 
void setList (const QStringList &list)
 
 ~ModelCompleter () override
 

Constructor & Destructor Documentation

◆ ModelCompleter()

Digikam::ModelCompleter::ModelCompleter ( QObject *const  parent = nullptr)
explicit

References signalActivated().

◆ ~ModelCompleter()

Digikam::ModelCompleter::~ModelCompleter ( )
override

Member Function Documentation

◆ addItem()

void Digikam::ModelCompleter::addItem ( const QString &  item)

References setList().

◆ itemModel()

QAbstractItemModel * Digikam::ModelCompleter::itemModel ( ) const

◆ items()

QStringList Digikam::ModelCompleter::items ( ) const

◆ setItemModel()

void Digikam::ModelCompleter::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.

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.

Referenced by Digikam::SearchTextBarDb::setModel().

◆ setList()

void Digikam::ModelCompleter::setList ( const QStringList &  list)

Referenced by addItem().

◆ signalActivated

void Digikam::ModelCompleter::signalActivated ( )
signal

◆ signalHighlighted

void Digikam::ModelCompleter::signalHighlighted ( int  albumId)
signal

The documentation for this class was generated from the following files: