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

Loading...
Searching...
No Matches
Public Types | Signals | Public Member Functions | Protected Member Functions | List of all members
Digikam::LabelsTreeView Class Reference
Inheritance diagram for Digikam::LabelsTreeView:

## Public Types
enum | Labels { Ratings = 0 , Picks , Colors }
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...

## Signals
void | signalColorNameChanged (int, const QString &name)
void | signalSetCurrentAlbum ()

## Public Member Functions
| LabelsTreeView (QWidget *const parent=nullptr, bool setCheckable=false)
QPixmap | colorRectPixmap (const QColor &color) const
| Creates a 30*30 rectangular pixmap with specific color.
QPixmap | goldenStarPixmap (bool fillin=true) const
bool | isCheckable () const
bool | isLoadingState () const
void | restoreSelectionFromHistory (QHash< Labels, QList< int > > neededLabels)
| Restores the selection state from the AlbumHistory class.
QHash< Labels, QList< int > > | selectedLabels ()
| Provide the current selection from the tree-view hierarchy.
void | setCurrentAlbum ()
| Emits a signal to the search handler to set the Current album from currently selected labels.
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
| Loading and saving state function inherited from StateSavingObject.
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.

## Member Function Documentation

## ◆ colorRectPixmap()

QPixmap Digikam::LabelsTreeView::colorRectPixmap | ( | const QColor & | color | ) | const

Parameters

  color | wanted to be set

Returns
  pixmap has a rectangle filled with the color

## ◆ doLoadState()

void Digikam::LabelsTreeView::doLoadState | ( |  | ) |
| override protected virtual

Implements Digikam::StateSavingObject.

## ◆ doSaveState()

void Digikam::LabelsTreeView::doSaveState | ( |  | ) |
| override protected virtual

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

Implements Digikam::StateSavingObject.

## ◆ goldenStarPixmap()

QPixmap Digikam::LabelsTreeView::goldenStarPixmap | ( | bool | fillin = `true` | ) | const

Returns
  a Pixmap of a 30*30 pixels golden star used for rating and widget icon

## ◆ isCheckable()

bool Digikam::LabelsTreeView::isCheckable | ( |  | ) | const

Returns
  true if the tree widget is checkable and false if not

## ◆ isLoadingState()

bool Digikam::LabelsTreeView::isLoadingState | ( |  | ) | const

Returns
  true if Loading state function is running

## ◆ restoreSelectionFromHistory()

void Digikam::LabelsTreeView::restoreSelectionFromHistory | ( | QHash< Labels, QList< int > > | neededLabels | ) |

Parameters

  neededLabels | is a QHash to restore the selection from it, the hash is formatted just like the hash generated from

See also
  selectedLabels()

## ◆ selectedLabels()

QHash< LabelsTreeView::Labels, QList< int > > Digikam::LabelsTreeView::selectedLabels | ( |  | ) |

Returns
  a QHash with three keys: "Ratings", "Picks", and "Colors", every key dedicated to an int list which holds the rows selected