11#include <klocalizedstring.h>
54 qint32 index = QComboBox::currentIndex();
56 if (index >
m_idList.count() - 1 || index < 0)
return KoID();
66 QComboBox::setCurrentIndex(index);
67 }
else if (
id !=
KoID()) {
70 QComboBox::setCurrentIndex(
m_idList.indexOf(
id));
76 for (qint32 index = 0; index <
m_idList.count(); ++index) {
78 QComboBox::setCurrentIndex(index);
86 if (index >
m_idList.count() - 1 || index < 0)
return;
93 if (index >
m_idList.count() - 1 || index < 0)
return;
120 for (qint32 i = 0; i <
m_idList.count(); ++i) {
123 addItem(QString(
"%1 (%2)").arg(
id.name(),
m_autoHint));
connect(this, SIGNAL(optionsChanged()), this, SLOT(saveOptions()))
KisCmbIDList(QWidget *parent=0, const char *name=0)
void slotIDActivated(int index)
void setAutoHint(const QString &hint)
void slotIDHighlighted(int index)
void setIDList(const QList< KoID > &list, bool sorted=true)
setIDList clears the combobox and sorts the given list by user-visible name and then adds the items t...
void activated(const KoID &)
void allowAuto(bool setAuto=true)
allowAuto sets whether the combobox should keep an extra "AUTO" option, where the use allows the prog...
static const KoID AutoOptionID
void highlighted(const KoID &)
void setCurrent(const KoID id)
static bool compareNames(const KoID &id1, const KoID &id2)