MessageList::Utils::ComboBoxUtils

MessageList::Utils::ComboBoxUtils Namespace Reference

Functions

void fillIntegerOptionCombo (QComboBox *combo, const QVector< QPair< QString, int >> &optionDescriptors)
 
int getIntegerOptionComboValue (QComboBox *combo, int defaultValue)
 
void setIntegerOptionComboValue (QComboBox *combo, int value)
 

Detailed Description

Namespace containing some helper functions for QComboBox widgets.

Function Documentation

void MessageList::Utils::ComboBoxUtils::fillIntegerOptionCombo ( QComboBox combo,
const QVector< QPair< QString, int >> &  optionDescriptors 
)

Fills the specified QComboBox with the options available in optionDescriptors.

Each option descriptor contains a description string and a distinct integer (possibly enum) identifier value.

Definition at line 17 of file comboboxutils.cpp.

int MessageList::Utils::ComboBoxUtils::getIntegerOptionComboValue ( QComboBox combo,
int  defaultValue 
)

Returns the identifier of the currently selected option in the specified combo.

If the combo has no current selection or something goes wrong then the defaultValue is returned instead.

Definition at line 62 of file comboboxutils.cpp.

void MessageList::Utils::ComboBoxUtils::setIntegerOptionComboValue ( QComboBox combo,
int  value 
)

Sets the currently selected option in the specified combo.

Definition at line 49 of file comboboxutils.cpp.

This file is part of the KDE documentation.
Documentation copyright © 1996-2021 The KDE developers.
Generated on Mon Sep 27 2021 23:17:09 by doxygen 1.8.11 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.