15#include <klocalizedstring.h>
49 , initvalue(ninitvalue)
52 , lockerName(lockerName)
58 const QString& caption,
61 , m_filterid(filterid)
64 this->setWindowTitle(caption);
66 QGridLayout *widgetLayout =
new QGridLayout(
this);
67 widgetLayout->setColumnStretch(1, 1);
68 widgetLayout->setContentsMargins(0,0,0,0);
69 widgetLayout->setHorizontalSpacing(0);
71 for (
uint i = 0; i < iwparam.size(); ++i) {
74 widget->
setRange(iwparam[i].min, iwparam[i].max);
75 widget->
setValue(iwparam[i].initvalue);
80 QLabel* lbl =
new QLabel(iwparam[i].label +
':',
this);
81 widgetLayout->addWidget(lbl, i , 0);
83 widgetLayout->addWidget(widget, i , 1);
89 if (!iwparam[i].lockerName.isEmpty()) {
91 aspectButton->setObjectName(iwparam[i].lockerName);
92 widgetLayout->addWidget(aspectButton, i-1, 2, 2, 1);
101 widgetLayout->setRowStretch(iwparam.size(),1);
103 QSpacerItem * sp =
new QSpacerItem(1, 1);
104 widgetLayout->addItem(sp, iwparam.size(), 0);
120 for (
int i = 0; i <
nbValues(); ++i) {
124 if (!config->getBool(aspectButton->objectName(),
true)) {
139 if (config->getBool(aspectButton->objectName(),
true)) {
153 for (
int i = 0; i <
nbValues(); ++i) {
156 config->setProperty(w->objectName(), w->value());
161 config->setProperty(aspectButton->objectName(), aspectButton->
keepAspectRatio());
float value(const T *src, size_t ch)
PythonPluginManager * instance
connect(this, SIGNAL(optionsChanged()), this, SLOT(saveOptions()))
void connectSpinBoxes(SpinBoxType *spinOne, SpinBoxType *spinTwo, KoAspectButton *aspectButton)
the main resource source in Krita
static KisResourcesInterfaceSP instance()
This class is a spinbox in which you can click and drag to set the value. A slider like bar is displa...
void setValue(int newValue)
void setRange(int newMinimum, int newMaximum, bool computeNewFastSliderStep=true)
Set the minimum and the maximum values of the range, computing a new "fast slider step" based on the ...