#include <rcombobox.h>
Definition at line 45 of file rcombobox.cpp.
◆ RComboBox()
| KDcrawIface::RComboBox::RComboBox |
( |
QWidget *const | parent = 0 | ) |
|
Definition at line 64 of file rcombobox.cpp.
66{
67 QHBoxLayout* const hlay = new QHBoxLayout(this);
68 d->combo =
new QComboBox(
this);
69 d->resetButton =
new QToolButton(
this);
70 d->resetButton->setAutoRaise(
true);
71 d->resetButton->setFocusPolicy(Qt::NoFocus);
73 d->resetButton->setToolTip(i18nc(
"@info:tooltip",
"Reset to default value"));
74
75 hlay->addWidget(
d->combo);
76 hlay->addWidget(
d->resetButton);
77 hlay->setStretchFactor(
d->combo, 10);
78 hlay->setContentsMargins(0, 0, 0, 0);
79 hlay->setSpacing(QApplication::style()->pixelMetric(QStyle::PM_LayoutHorizontalSpacing));
80
81
82
83 connect(
d->resetButton, &QToolButton::clicked,
85
86 connect(
d->combo,
static_cast<void (QComboBox::*)(
int)
>(&QComboBox::activated),
88
89 connect(
d->combo,
static_cast<void (QComboBox::*)(
int)
>(&QComboBox::currentIndexChanged),
91}
connect(this, SIGNAL(optionsChanged()), this, SLOT(saveOptions()))
void slotItemActivated(int)
void slotCurrentIndexChanged(int)
QIcon loadIcon(const QString &name)
References connect(), d, KisIconUtils::loadIcon(), slotCurrentIndexChanged(), slotItemActivated(), and slotReset().
◆ ~RComboBox()
| KDcrawIface::RComboBox::~RComboBox |
( |
| ) |
|
|
override |
◆ activated
| void KDcrawIface::RComboBox::activated |
( |
int | | ) |
|
|
signal |
◆ addItem()
| void KDcrawIface::RComboBox::addItem |
( |
const QString & | t, |
|
|
int | index = -1 ) |
Definition at line 103 of file rcombobox.cpp.
104{
105 d->combo->addItem(t, index);
106}
References d.
◆ combo()
| QComboBox * KDcrawIface::RComboBox::combo |
( |
| ) |
const |
◆ currentIndex()
| int KDcrawIface::RComboBox::currentIndex |
( |
| ) |
const |
Definition at line 113 of file rcombobox.cpp.
114{
115 return d->combo->currentIndex();
116}
References d.
◆ currentIndexChanged
| void KDcrawIface::RComboBox::currentIndexChanged |
( |
int | | ) |
|
|
signal |
◆ defaultIndex()
| int KDcrawIface::RComboBox::defaultIndex |
( |
| ) |
const |
◆ insertItem()
| void KDcrawIface::RComboBox::insertItem |
( |
int | index, |
|
|
const QString & | t ) |
Definition at line 108 of file rcombobox.cpp.
109{
110 d->combo->insertItem(index, t);
111}
References d.
◆ Private()
| KDcrawIface::RComboBox::Private |
( |
| ) |
|
|
inline |
Definition at line 50 of file rcombobox.cpp.
51 {
55 }
QToolButton * resetButton
◆ reset
| void KDcrawIface::RComboBox::reset |
( |
| ) |
|
|
signal |
◆ setCurrentIndex()
| void KDcrawIface::RComboBox::setCurrentIndex |
( |
int | d | ) |
|
Definition at line 118 of file rcombobox.cpp.
119{
120 d->combo->setCurrentIndex(
v);
121}
References d, and v.
◆ setDefaultIndex()
| void KDcrawIface::RComboBox::setDefaultIndex |
( |
int | d | ) |
|
◆ slotCurrentIndexChanged
| void KDcrawIface::RComboBox::slotCurrentIndexChanged |
( |
int | v | ) |
|
|
privateslot |
◆ slotItemActivated
| void KDcrawIface::RComboBox::slotItemActivated |
( |
int | v | ) |
|
|
privateslot |
◆ slotReset
| void KDcrawIface::RComboBox::slotReset |
( |
| ) |
|
|
slot |
◆ combo
| QComboBox * KDcrawIface::RComboBox::combo |
| Private* const KDcrawIface::RComboBox::d |
|
private |
◆ defaultIndex
| int KDcrawIface::RComboBox::defaultIndex |
◆ resetButton
| QToolButton* KDcrawIface::RComboBox::resetButton |
The documentation for this class was generated from the following files: