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

Public Member Functions

void addProfileSqueezed (const IccProfile &profile, const QString &description=QString())
 
void addProfilesSqueezed (const QList< IccProfile > &profiles)
 
void addSqueezedItem (const QString &newItem, const QVariant &userData=QVariant())
 
bool contains (const QString &text) const
 
IccProfile currentProfile () const
 
int findOriginalText (const QString &text, Qt::CaseSensitivity cs=Qt::CaseSensitive) const
 
 IccProfilesComboBox (QWidget *const parent=nullptr)
 
void insertSqueezedItem (const QString &newItem, int index, const QVariant &userData=QVariant())
 
void insertSqueezedList (const QStringList &newItems, int index)
 
QString item (int index) const
 
QString itemHighlighted () const
 
void replaceProfilesSqueezed (const QList< IccProfile > &profiles)
 
void setCurrent (const QString &itemText)
 
void setCurrentProfile (const IccProfile &profile)
 
void setNoProfileIfEmpty (const QString &message)
 
QSize sizeHint () const override
 
 ~IccProfilesComboBox () override
 

Constructor & Destructor Documentation

◆ IccProfilesComboBox()

Digikam::IccProfilesComboBox::IccProfilesComboBox ( QWidget *const  parent = nullptr)
explicit

NOTE: Use the signal currentIndexChanged(int) for change notification

◆ ~IccProfilesComboBox()

Digikam::IccProfilesComboBox::~IccProfilesComboBox ( )
override

Member Function Documentation

◆ addProfileSqueezed()

void Digikam::IccProfilesComboBox::addProfileSqueezed ( const IccProfile profile,
const QString &  description = QString() 
)

Add the given profile with the given description, or, if null, a standard description. Does not test for duplicity, does not sort into existing profiles.

References Digikam::SqueezedComboBox::addSqueezedItem().

◆ addProfilesSqueezed()

void Digikam::IccProfilesComboBox::addProfilesSqueezed ( const QList< IccProfile > &  profiles)

Checks the given profiles for validity, creates a suitable description (ICC profile description, file path), removes duplicates by file path, sorts them and adds them in sorted order.

References Digikam::SqueezedComboBox::addSqueezedItem().

Referenced by replaceProfilesSqueezed().

◆ addSqueezedItem()

void Digikam::SqueezedComboBox::addSqueezedItem ( const QString &  newItem,
const QVariant &  userData = QVariant() 
)
inherited

Append an item.

Parameters
newItemthe original (long version) of the item which needs to be added to the combobox
userDatacustom meta-data assigned to new item.

References Digikam::SqueezedComboBox::insertSqueezedItem().

Referenced by addProfileSqueezed(), addProfilesSqueezed(), setNoProfileIfEmpty(), and Digikam::SearchFieldAlbum::setupValueWidgets().

◆ contains()

bool Digikam::SqueezedComboBox::contains ( const QString &  text) const
inherited

Returns true if the combobox contains the original (not-squeezed) version of text.

Parameters
textthe original (not-squeezed) text to check for

◆ currentProfile()

IccProfile Digikam::IccProfilesComboBox::currentProfile ( ) const

Retrieves the current profile, or a null profile if none is selected.

Referenced by replaceProfilesSqueezed().

◆ findOriginalText()

int Digikam::SqueezedComboBox::findOriginalText ( const QString &  text,
Qt::CaseSensitivity  cs = Qt::CaseSensitive 
) const
inherited

Returns the index of the combobox if found the original (not-squeezed) version of text.

Parameters
textthe original (not-squeezed) text to find for
cscase sensitive or case insensitive search

◆ insertSqueezedItem()

void Digikam::SqueezedComboBox::insertSqueezedItem ( const QString &  newItem,
int  index,
const QVariant &  userData = QVariant() 
)
inherited

This inserts a item to the list. See QComboBox::insertItem() for details. Please do not use QComboBox::insertItem() to this widget, as that will fail.

Parameters
newItemthe original (long version) of the item which needs to be added to the combobox
indexthe position in the widget.
userDatacustom meta-data assigned to new item.

Referenced by Digikam::SqueezedComboBox::addSqueezedItem(), and Digikam::SqueezedComboBox::insertSqueezedList().

◆ insertSqueezedList()

void Digikam::SqueezedComboBox::insertSqueezedList ( const QStringList &  newItems,
int  index 
)
inherited

This inserts items to the list. See QComboBox::insertItems() for details. Please do not use QComboBox:: insertItems() to this widget, as that will fail.

Parameters
newItemsthe originals (long version) of the items which needs to be added to the combobox
indexthe position in the widget.

References Digikam::SqueezedComboBox::insertSqueezedItem().

◆ item()

QString Digikam::SqueezedComboBox::item ( int  index) const
inherited

This method returns the full text (not squeezed) for the index.

Parameters
indexthe position in the widget.
Returns
full text of the item

◆ itemHighlighted()

QString Digikam::SqueezedComboBox::itemHighlighted ( ) const
inherited

This method returns the full text (not squeezed) of the currently highlighted item.

Returns
full text of the highlighted item

◆ replaceProfilesSqueezed()

void Digikam::IccProfilesComboBox::replaceProfilesSqueezed ( const QList< IccProfile > &  profiles)

Clears, does the same as addProfilesSqueezed, and restores the current entry if possible.

References addProfilesSqueezed(), currentProfile(), and setCurrentProfile().

◆ setCurrent()

void Digikam::SqueezedComboBox::setCurrent ( const QString &  itemText)
inherited

Set the current item to the one matching the given text.

Parameters
itemTextthe original (long version) of the item text

◆ setCurrentProfile()

void Digikam::IccProfilesComboBox::setCurrentProfile ( const IccProfile profile)

Sets the current profile. If profile is not in the list, sets no current item (-1)

References Digikam::IccProfile::isNull().

Referenced by replaceProfilesSqueezed().

◆ setNoProfileIfEmpty()

void Digikam::IccProfilesComboBox::setNoProfileIfEmpty ( const QString &  message)

Sets a message the is displayed in the combo box and disables the combo box, if the combo box is currently empty

References Digikam::SqueezedComboBox::addSqueezedItem().

◆ sizeHint()

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

Sets the sizeHint() of this widget.


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