![]() |
digiKam Developer Documentation
Professional Photo Management with the Power of Open Source
|
A text input for searching entries with visual feedback. More...
Inheritance diagram for Digikam::SearchTextBarDb:Public Member Functions | |
| SearchTextBarDb (QWidget *const parent, const QString &name, const QString &msg=QString()) | |
| void | setFilterModel (AlbumFilterModel *const filterModel) |
| Sets the filter model this text bar shall use to invoke filtering on and reading the result for highlighting from. | |
| void | setModel (AbstractAlbumModel *const model) |
| Sets the album model this text bar shall use to invoke filtering on and reading the result for highlighting from. | |
| void | setModel (QAbstractItemModel *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. | |
Public Member Functions inherited from Digikam::SearchTextBar | |
| SearchTextBar (QWidget *const parent, const QString &name, const QString &msg=QString()) | |
| ModelCompleter * | completerModel () const |
| HighlightState | getCurrentHighlightState () const |
| Tells the current highlighting state of the text input indicated via the background color. | |
| bool | hasCaseSensitive () const |
| bool | hasTextQueryCompletion () const |
| SearchTextSettings | searchTextSettings () const |
| void | setCaseSensitive (bool b) |
| Indicate whether this search text bar can be toggled to between case- sensitive and -insensitive or if always case-insensitive shall be used. | |
| void | setHighlightOnResult (bool highlight) |
| Tells whether highlighting for found search results shall be used or not (green and red). | |
| void | setSearchTextSettings (const SearchTextSettings &settings) |
| void | setTextQueryCompletion (bool b) |
Public Member Functions inherited from Digikam::StateSavingObject | |
| StateSavingObject (QObject *const host) | |
| Constructor. | |
| virtual | ~StateSavingObject () |
| Destructor. | |
| StateSavingDepth | getStateSavingDepth () const |
| Returns the depth used for state saving or loading. | |
| void | loadState () |
| Invokes loading the class' state. | |
| void | saveState () |
| Invokes saving the class' state. | |
| virtual void | setConfigGroup (const KConfigGroup &group) |
| Sets a dedicated config group that will be used to store and reload the state from. | |
| virtual void | setEntryPrefix (const QString &prefix) |
| Define a prefix that will be used for every entry in the config group. | |
| void | setStateSavingDepth (const StateSavingDepth depth) |
| Sets the depth used for state saving or loading. | |
Additional Inherited Members | |
Public Types inherited from Digikam::SearchTextBar | |
| enum | HighlightState { NEUTRAL , HAS_RESULT , NO_RESULT } |
| Possible highlighting states a SearchTextBar can have. More... | |
Public Types inherited from Digikam::StateSavingObject | |
| enum | StateSavingDepth { INSTANCE , DIRECT_CHILDREN , RECURSIVE } |
| This enum defines the "depth" of the StateSavingObject::loadState() and StateSavingObject::saveState() methods. More... | |
Public Slots inherited from Digikam::SearchTextBar | |
| void | slotSearchResult (bool match) |
Signals inherited from Digikam::SearchTextBar | |
| void | completerActivated () |
| void | completerHighlighted (int albumId) |
| void | signalSearchTextSettings (const SearchTextSettings &settings) |
Protected Member Functions inherited from Digikam::SearchTextBar | |
| void | doLoadState () override |
| Implement this hook method for state loading. | |
| void | doSaveState () override |
| Implement this hook method for state saving. | |
Protected Member Functions inherited from Digikam::StateSavingObject | |
| QString | entryName (const QString &base) const |
| Always use this method to create config group entry names. | |
| KConfigGroup | getConfigGroup () const |
| Returns the config group that must be used for state saving and loading. | |
Can be used on Database Models.
| void Digikam::SearchTextBarDb::setFilterModel | ( | AlbumFilterModel *const | filterModel | ) |
| filterModel | filter model to use for filtering. null means there is no model to use and external connections need to be created with signalSearchTextSettings and slotSearchResult |
| void Digikam::SearchTextBarDb::setModel | ( | AbstractAlbumModel *const | model | ) |
| model | album model to use for filtering. null means there is no model to use and external connections need to be created with signalSearchTextSettings and slotSearchResult |
| void Digikam::SearchTextBarDb::setModel | ( | QAbstractItemModel * | model, |
| int | uniqueIdRole, | ||
| int | displayRole = Qt::DisplayRole |
||
| ) |
| model | to fill from or null for manual mode |
| uniqueIdRole | a role for which the model will return a unique integer for each entry |
| displayRole | the role to retrieve the text for completion, default is Qt::DisplayRole. |