digiKam
Loading...
Searching...
No Matches
Digikam::ColorLabelWidget Class Reference

#include <colorlabelwidget.h>

+ Inheritance diagram for Digikam::ColorLabelWidget:

Signals

void signalColorLabelChanged (int)
 

Public Member Functions

QList< ColorLabelcolorLabels () const
 
 ColorLabelWidget (QWidget *const parent=nullptr)
 
QSize minimumSizeHint () const override
 
void setButtonsExclusive (bool b)
 
void setColorLabels (const QList< ColorLabel > &list)
 
void setContentsMargins (const QMargins &margins)
 
void setContentsMargins (int left, int top, int right, int bottom)
 
void setDescriptionBoxVisible (bool b)
 
void setSpacing (int space)
 
void setStretchFactor (QWidget *const widget, int stretch)
 
QSize sizeHint () const override
 
 ~ColorLabelWidget () override
 

Static Public Member Functions

static QIcon buildIcon (ColorLabel label, int size=12)
 
static QColor labelColor (ColorLabel label)
 
static QString labelColorName (ColorLabel label)
 

Protected Member Functions

void childEvent (QChildEvent *e) override
 
bool eventFilter (QObject *obj, QEvent *ev) override
 

Constructor & Destructor Documentation

◆ ColorLabelWidget()

◆ ~ColorLabelWidget()

Digikam::ColorLabelWidget::~ColorLabelWidget ( )
override

Member Function Documentation

◆ buildIcon()

QIcon Digikam::ColorLabelWidget::buildIcon ( ColorLabel  label,
int  size = 12 
)
static

References labelColor(), and Digikam::NoColorLabel.

Referenced by ColorLabelWidget().

◆ childEvent()

void Digikam::DHBox::childEvent ( QChildEvent *  e)
overrideprotectedinherited

◆ colorLabels()

QList< ColorLabel > Digikam::ColorLabelWidget::colorLabels ( ) const

Return the list of Color Label buttons turned on or an empty list of none.

Referenced by Digikam::ColorLabelFilter::getCheckedColorLabelTags(), and Digikam::SearchFieldLabels::updateState().

◆ eventFilter()

bool Digikam::ColorLabelWidget::eventFilter ( QObject *  obj,
QEvent *  ev 
)
overrideprotected

◆ labelColor()

◆ labelColorName()

◆ minimumSizeHint()

QSize Digikam::DHBox::minimumSizeHint ( ) const
overrideinherited

◆ setButtonsExclusive()

void Digikam::ColorLabelWidget::setButtonsExclusive ( bool  b)

Set all Color Label buttons exclusive or not. Default is true as only one can be selected. Non-exclusive mode is dedicated for Advanced Search tool.

Referenced by Digikam::ColorLabelFilter::ColorLabelFilter(), and ColorLabelWidget().

◆ setColorLabels()

void Digikam::ColorLabelWidget::setColorLabels ( const QList< ColorLabel > &  list)

Turn on Color Label buttons using list. Pass an empty list to clear all selection.

Referenced by ColorLabelWidget(), Digikam::SearchFieldLabels::read(), and Digikam::ColorLabelFilter::reset().

◆ setContentsMargins() [1/2]

◆ setContentsMargins() [2/2]

void Digikam::DHBox::setContentsMargins ( int  left,
int  top,
int  right,
int  bottom 
)
inherited

◆ setDescriptionBoxVisible()

void Digikam::ColorLabelWidget::setDescriptionBoxVisible ( bool  b)

Show or not on the bottom view the description of label with shortcuts.

References labelColorName().

Referenced by Digikam::ColorLabelFilter::ColorLabelFilter(), and ColorLabelWidget().

◆ setSpacing()

◆ setStretchFactor()

◆ signalColorLabelChanged

void Digikam::ColorLabelWidget::signalColorLabelChanged ( int  )
signal

◆ sizeHint()

QSize Digikam::DHBox::sizeHint ( ) const
overrideinherited

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