digiKam Developer Documentation: Digikam::SearchTextBar Class Reference

| digiKam Developer Documentation Professional Photo Management with the Power of Open Source

Loading...
Searching...
No Matches
Public Types | Public Slots | Signals | Public Member Functions | Protected Member Functions | List of all members
Digikam::SearchTextBar Class Reference

a text input for searching entries with visual feedback. More...

Inheritance diagram for Digikam::SearchTextBar:

## Public Types
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
void | slotSearchResult (bool match)

## Signals
void | completerActivated ()
void | completerHighlighted (int albumId)
void | signalSearchTextSettings (const SearchTextSettings &settings)

## Public Member Functions
| 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.

## Protected Member Functions
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.

## Detailed Description

Can be used on QAbstractItemModels.

## Member Enumeration Documentation

## ◆ HighlightState

enum Digikam::SearchTextBar::HighlightState

Enumerator
NEUTRAL | No highlighting at all. Background is colored in a neutral way according to the theme.
HAS_RESULT | The background color of the text input indicates that a result was found.
NO_RESULT | The background color indicates that no result was found.

## Member Function Documentation

## ◆ doLoadState()

void Digikam::SearchTextBar::doLoadState | ( |  | ) |
| overrideprotectedvirtual

Use getConfigGroup() and entryName() for the implementation.

Implements Digikam::StateSavingObject.

## ◆ doSaveState()

void Digikam::SearchTextBar::doSaveState | ( |  | ) |
| overrideprotectedvirtual

Use getConfigGroup() and entryName() for the implementation.

Implements Digikam::StateSavingObject.

## ◆ getCurrentHighlightState()

SearchTextBar::HighlightState Digikam::SearchTextBar::getCurrentHighlightState | ( |  | ) | const

Returns
  current highlight state

## ◆ setCaseSensitive()

void Digikam::SearchTextBar::setCaseSensitive | ( | bool | b | ) |

Parameters

  b | if `true` the user can decide the toggle between case sensitivity, on `false` every search is case- insensitive

## ◆ setHighlightOnResult()

void Digikam::SearchTextBar::setHighlightOnResult | ( | bool | highlight | ) |

Default behavior has highlighting enabled.

Parameters

  highlight | `true` activates green and red highlighting, with `false` the normal widget background color will be displayed always