|
Krita Source Code Documentation
|
#include <kis_cmb_idlist.h>
Inheritance diagram for KisCmbIDList:Signals | |
| void | activated (const KoID &) |
| void | highlighted (const KoID &) |
Public Member Functions | |
| void | allowAuto (bool setAuto=true) |
| allowAuto sets whether the combobox should keep an extra "AUTO" option, where the use allows the program to decide an appropriate option based on context. | |
| KoID | currentItem () const |
| KisCmbIDList (QWidget *parent=0, const char *name=0) | |
| void | setAutoHint (const QString &hint) |
| void | setCurrent (const KoID id) |
| void | setCurrent (const QString &id) |
| 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 to the combobox | |
| ~KisCmbIDList () override | |
Static Public Attributes | |
| static const KoID | AutoOptionID = KoID("AUTO", ki18nc("Automatic", "Auto")) |
Private Slots | |
| void | slotIDActivated (int index) |
| void | slotIDHighlighted (int index) |
Private Member Functions | |
| void | buildItems () |
Private Attributes | |
| QString | m_autoHint |
| bool | m_autoOption = false |
| QList< KoID > | m_idList |
| bool | m_sorted = true |
A combobox that is associated with a list of KoID's. The descriptive (i18n'ed) text is displayed, but the various signals return a KoID.
Definition at line 23 of file kis_cmb_idlist.h.
| KisCmbIDList::KisCmbIDList | ( | QWidget * | parent = 0, |
| const char * | name = 0 ) |
Definition at line 15 of file kis_cmb_idlist.cc.
References activated(), connect(), highlighted(), slotIDActivated(), and slotIDHighlighted().
|
override |
Definition at line 24 of file kis_cmb_idlist.cc.
| void KisCmbIDList::allowAuto | ( | bool | setAuto = true | ) |
allowAuto sets whether the combobox should keep an extra "AUTO" option, where the use allows the program to decide an appropriate option based on context.
Definition at line 38 of file kis_cmb_idlist.cc.
References buildItems(), and m_autoOption.
|
private |
Definition at line 98 of file kis_cmb_idlist.cc.
References AutoOptionID, KoID::compareNames(), currentItem(), m_autoHint, m_autoOption, m_idList, m_sorted, and setCurrent().
| KoID KisCmbIDList::currentItem | ( | ) | const |
| void KisCmbIDList::setAutoHint | ( | const QString & | hint | ) |
Definition at line 45 of file kis_cmb_idlist.cc.
References buildItems(), and m_autoHint.
Definition at line 61 of file kis_cmb_idlist.cc.
References buildItems(), and m_idList.
| void KisCmbIDList::setCurrent | ( | const QString & | id | ) |
Definition at line 74 of file kis_cmb_idlist.cc.
References m_idList.
setIDList clears the combobox and sorts the given list by user-visible name and then adds the items to the combobox
| list | the (unsorted) list of KoID's |
| sorted | if true, the id's will be sorted by name |
Definition at line 30 of file kis_cmb_idlist.cc.
References buildItems(), m_idList, and m_sorted.
|
privateslot |
|
privateslot |
Definition at line 31 of file kis_cmb_idlist.h.
|
private |
Definition at line 70 of file kis_cmb_idlist.h.
|
private |
Definition at line 69 of file kis_cmb_idlist.h.
Definition at line 67 of file kis_cmb_idlist.h.
|
private |
Definition at line 68 of file kis_cmb_idlist.h.