generic: adjust to KIntNumInput and KDoubleNumInput changes

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
This commit is contained in:
Ivailo Monev 2024-05-21 08:53:56 +03:00
parent b6624d8083
commit 3cba95c89a
52 changed files with 297 additions and 210 deletions

View file

@ -86,12 +86,12 @@ PreviewsSettingsPage::PreviewsSettingsPage(QWidget* parent) :
QLabel* localFileSizeLabel = new QLabel(i18nc("@label", "Skip previews for local files above:"), this);
QLabel* remoteFileSizeLabel = new QLabel(i18nc("@label", "Skip previews for remote files above:"), this);
m_localFileSizeBox = new KIntSpinBox(this);
m_localFileSizeBox = new KIntNumInput(this);
m_localFileSizeBox->setSingleStep(1);
m_localFileSizeBox->setSuffix(QLatin1String(" MB"));
m_localFileSizeBox->setRange(0, 9999999); /* MB */
m_remoteFileSizeBox = new KIntSpinBox(this);
m_remoteFileSizeBox = new KIntNumInput(this);
m_remoteFileSizeBox->setSingleStep(1);
m_remoteFileSizeBox->setSuffix(QLatin1String(" MB"));
m_remoteFileSizeBox->setRange(0, 9999999); /* MB */
@ -104,7 +104,7 @@ PreviewsSettingsPage::PreviewsSettingsPage(QWidget* parent) :
QLabel* iconAlphaLabel = new QLabel(i18nc("@label", "Icon alpha:"), this);
m_iconAlphaBox = new KIntSpinBox(this);
m_iconAlphaBox = new KIntNumInput(this);
m_iconAlphaBox->setSingleStep(1);
m_iconAlphaBox->setRange(0, 255);

View file

@ -25,7 +25,7 @@
#include <QListView>
#include <QModelIndex>
class KIntSpinBox;
class KIntNumInput;
/**
* @brief Allows the configuration of file previews.
@ -62,9 +62,9 @@ private:
bool m_initialized;
QListView *m_listView;
QStringList m_enabledPreviewPlugins;
KIntSpinBox* m_localFileSizeBox;
KIntSpinBox* m_remoteFileSizeBox;
KIntSpinBox* m_iconAlphaBox;
KIntNumInput* m_localFileSizeBox;
KIntNumInput* m_remoteFileSizeBox;
KIntNumInput* m_iconAlphaBox;
};
#endif

View file

@ -112,7 +112,10 @@ RenameDialog::RenameDialog(QWidget *parent, const KFileItemList& items) :
}
QLabel* infoLabel = new QLabel(i18nc("@info", "# will be replaced by ascending numbers starting with:"), page);
m_spinBox = new KIntSpinBox(0, 10000, 1, 1, page, 10);
m_spinBox = new KIntNumInput(page);
m_spinBox->setSingleStep(1);
m_spinBox->setRange(0, 10000);
m_spinBox->setValue(1);
QHBoxLayout* horizontalLayout = new QHBoxLayout(page);
horizontalLayout->setMargin(0);

View file

@ -22,13 +22,12 @@
#include "dolphinprivate_export.h"
#include <QString>
#include <KDialog>
#include <KFileItem>
class KLineEdit;
class KIntSpinBox;
#include <QString>
class KIntNumInput;
/**
* @brief Dialog for renaming a variable number of files.
@ -65,7 +64,7 @@ private:
KLineEdit* m_lineEdit;
KFileItemList m_items;
bool m_allExtensionsDifferent;
KIntSpinBox* m_spinBox;
KIntNumInput* m_spinBox;
};
#endif

View file

@ -128,38 +128,39 @@
<property name="checked" >
<bool>false</bool>
</property>
<layout class="QVBoxLayout" >
<item>
<layout class="QGridLayout" >
<item row="0" column="0" colspan="2">
<widget class="QCheckBox" name="filteringContextMatchOnly" >
<property name="text" >
<string>Suitable context matches only</string>
</property>
</widget>
</item>
<item>
<item row="1" column="0" colspan="2">
<widget class="QCheckBox" name="filteringHideAttributes" >
<property name="text" >
<string>Hide completions with the following attributes:</string>
</property>
</widget>
</item>
<item>
<item row="2" column="0" colspan="2">
<widget class="QListWidget" name="filteringAttributesList" />
</item>
<item>
<widget class="KIntNumInput" name="filteringMaximumInheritanceDepth" >
<property name="label" >
<item row="3" column="0" colspan="1">>
<widget class="QLabel" name="filteringAttributesListLabel" >
<property name="text" >
<string>Maximum inheritance depth:</string>
</property>
</widget>
</item>
<item row="3" column="1" colspan="1">>
<widget class="KIntNumInput" name="filteringMaximumInheritanceDepth" >
<property name="minimum" >
<number>0</number>
</property>
<property name="maximum" >
<number>20</number>
</property>
<property name="referencePoint" >
<number>0</number>
</property>
<property name="specialValueText" >
<string>Infinity</string>
</property>

View file

@ -92,7 +92,7 @@
</widget>
</item>
<item row="1" column="2">
<widget class="KIntSpinBox" name="spBoxMiniMapWidth">
<widget class="KIntNumInput" name="spBoxMiniMapWidth">
<property name="minimum">
<number>40</number>
</property>
@ -234,8 +234,8 @@
</widget>
<customwidgets>
<customwidget>
<class>KIntSpinBox</class>
<extends>QSpinBox</extends>
<class>KIntNumInput</class>
<extends>QWidget</extends>
<header>knuminput.h</header>
</customwidget>
</customwidgets>

View file

@ -52,7 +52,7 @@
</widget>
</item>
<item>
<widget class="KIntSpinBox" name="minimalWordLength"/>
<widget class="KIntNumInput" name="minimalWordLength"/>
</item>
<item>
<spacer name="horizontalSpacer">
@ -121,8 +121,8 @@
</widget>
<customwidgets>
<customwidget>
<class>KIntSpinBox</class>
<extends>QSpinBox</extends>
<class>KIntNumInput</class>
<extends>QWidget</extends>
<header>knuminput.h</header>
</customwidget>
</customwidgets>

View file

@ -48,7 +48,7 @@
</widget>
</item>
<item>
<widget class="KIntSpinBox" name="sbWordWrap">
<widget class="KIntNumInput" name="sbWordWrap">
<property name="whatsThis">
<string>If the Word Wrap option is selected this entry determines the length (in characters) at which the editor will automatically start a new line.</string>
</property>
@ -114,8 +114,8 @@
</widget>
<customwidgets>
<customwidget>
<class>KIntSpinBox</class>
<extends>QSpinBox</extends>
<class>KIntNumInput</class>
<extends>QWidget</extends>
<header>knuminput.h</header>
</customwidget>
</customwidgets>

View file

@ -74,7 +74,7 @@
</widget>
</item>
<item row="1" column="3">
<widget class="KIntSpinBox" name="sbIndentWidth">
<widget class="KIntNumInput" name="sbIndentWidth">
<property name="whatsThis">
<string>The indentation width is the number of spaces which is used to indent a line. If the option &lt;b&gt;Insert spaces instead of tabulators&lt;/b&gt; in the section &lt;b&gt;Editing&lt;/b&gt; is disabled, a &lt;b&gt;Tab&lt;/b&gt; character is inserted if the indentation is divisible by the tab width.</string>
</property>
@ -123,7 +123,7 @@
</widget>
</item>
<item row="0" column="3">
<widget class="KIntSpinBox" name="sbTabWidth">
<widget class="KIntNumInput" name="sbTabWidth">
<property name="minimum">
<number>1</number>
</property>
@ -273,8 +273,8 @@ p, li { white-space: pre-wrap; }
</widget>
<customwidgets>
<customwidget>
<class>KIntSpinBox</class>
<extends>QSpinBox</extends>
<class>KIntNumInput</class>
<extends>QWidget</extends>
<header>knuminput.h</header>
</customwidget>
<customwidget>

View file

@ -989,7 +989,7 @@ KateGotoBar::KateGotoBar(KTextEditor::View *view, QWidget *parent)
QHBoxLayout *topLayout = new QHBoxLayout( centralWidget() );
topLayout->setMargin(0);
gotoRange = new KIntSpinBox(centralWidget());
gotoRange = new KIntNumInput(centralWidget());
QLabel *label = new QLabel(i18n("&Go to line:"), centralWidget() );
label->setBuddy(gotoRange);
@ -1019,7 +1019,6 @@ void KateGotoBar::updateData()
gotoRange->adjustSize(); // ### does not respect the range :-(
}
gotoRange->setFocus(Qt::OtherFocusReason);
gotoRange->selectAll();
}
void KateGotoBar::keyPressEvent(QKeyEvent* event)

View file

@ -68,7 +68,6 @@ namespace KIO
class KComboBox;
class KTemporaryFile;
class KIntNumInput;
class KIntSpinBox;
class KPluginSelector;
class KPluginInfo;
@ -127,7 +126,7 @@ class KateGotoBar : public KateViewBarWidget
private:
KTextEditor::View *const m_view;
KIntSpinBox *gotoRange;
KIntNumInput *gotoRange;
};
class KateDictionaryBar : public KateViewBarWidget
@ -311,7 +310,7 @@ class KateSaveConfigTab : public KateConfigPage
QCheckBox *cbLocalFiles, *cbRemoteFiles;
QCheckBox *replaceTabs, *removeSpaces, *allowEolDetection;
KIntNumInput *dirSearchDepth;
class KIntSpinBox *blockCount;
class KIntNumInput *blockCount;
class QLabel *blockCountLabel;
private:

View file

@ -48,7 +48,7 @@
</widget>
</item>
<item>
<widget class="KIntSpinBox" name="sbAutoCenterCursor">
<widget class="KIntNumInput" name="sbAutoCenterCursor">
<property name="whatsThis">
<string>Sets the number of lines to maintain visible above and below the cursor when possible.</string>
</property>
@ -152,8 +152,8 @@
</widget>
<customwidgets>
<customwidget>
<class>KIntSpinBox</class>
<extends>QSpinBox</extends>
<class>KIntNumInput</class>
<extends>QWidget</extends>
<header>knuminput.h</header>
</customwidget>
</customwidgets>

View file

@ -28,7 +28,7 @@
</widget>
</item>
<item>
<widget class="KIntSpinBox" name="sbConfigFileSearchDepth">
<widget class="KIntNumInput" name="sbConfigFileSearchDepth">
<property name="whatsThis">
<string>The editor will search the given number of folder levels upwards for a .kateconfig file and load the settings line from it.</string>
</property>
@ -170,8 +170,8 @@
</widget>
<customwidgets>
<customwidget>
<class>KIntSpinBox</class>
<extends>QSpinBox</extends>
<class>KIntNumInput</class>
<extends>QWidget</extends>
<header>knuminput.h</header>
</customwidget>
<customwidget>

View file

@ -51,7 +51,7 @@
</widget>
</item>
<item row="1" column="1">
<widget class="KIntSpinBox" name="sbDynamicWordWrapDepth">
<widget class="KIntNumInput" name="sbDynamicWordWrapDepth">
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Fixed">
<horstretch>0</horstretch>
@ -186,8 +186,8 @@ beginning of a file.</string>
</widget>
<customwidgets>
<customwidget>
<class>KIntSpinBox</class>
<extends>QSpinBox</extends>
<class>KIntNumInput</class>
<extends>QWidget</extends>
<header>knuminput.h</header>
</customwidget>
<customwidget>

View file

@ -202,7 +202,7 @@
</widget>
</item>
<item row="7" column="1">
<widget class="KIntSpinBox" name="sbPriority">
<widget class="KIntNumInput" name="sbPriority">
<property name="whatsThis">
<string>Sets priority for this file type. If more than one file type selects the same file, the one with the highest priority will be used.</string>
</property>
@ -228,8 +228,8 @@
</widget>
<customwidgets>
<customwidget>
<class>KIntSpinBox</class>
<extends>QSpinBox</extends>
<class>KIntNumInput</class>
<extends>QWidget</extends>
<header>knuminput.h</header>
</customwidget>
<customwidget>

View file

@ -1142,7 +1142,7 @@ KatePrintLayout::KatePrintLayout( QWidget *parent)
QLabel *lBoxWidth = new QLabel( i18n("W&idth:"), gbBoxProps );
grid->addWidget(lBoxWidth, 0, 0);
sbBoxWidth = new KIntSpinBox( gbBoxProps );
sbBoxWidth = new KIntNumInput( gbBoxProps );
sbBoxWidth->setRange( 1, 100 );
sbBoxWidth->setSingleStep( 1 );
grid->addWidget(sbBoxWidth, 0, 1);
@ -1150,7 +1150,7 @@ KatePrintLayout::KatePrintLayout( QWidget *parent)
QLabel *lBoxMargin = new QLabel( i18n("&Margin:"), gbBoxProps );
grid->addWidget(lBoxMargin, 1, 0);
sbBoxMargin = new KIntSpinBox( gbBoxProps );
sbBoxMargin = new KIntNumInput( gbBoxProps );
sbBoxMargin->setRange( 0, 100 );
sbBoxMargin->setSingleStep( 1 );
grid->addWidget(sbBoxMargin, 1, 1);

View file

@ -33,7 +33,7 @@
class KateDocument;
class KColorButton;
class KLineEdit;
class KIntSpinBox;
class KIntNumInput;
class KComboBox;
class KHBox;
@ -153,7 +153,7 @@ class KatePrintLayout : public QWidget
KComboBox *cmbSchema;
QCheckBox *cbEnableBox, *cbDrawBackground;
QGroupBox *gbBoxProps;
KIntSpinBox *sbBoxWidth, *sbBoxMargin;
KIntNumInput *sbBoxWidth, *sbBoxMargin;
KColorButton* kcbtnBoxColor;
};
//END Layout

View file

@ -266,11 +266,13 @@ KAccessConfig::KAccessConfig(QWidget *parent, const QVariantList& args)
vvbox->addLayout(hbox);
hbox->addSpacing(24);
durationLabel = new QLabel(i18n("Duration:"), grp);
hbox->addWidget(durationLabel);
durationSlider = new KDoubleNumInput(grp);
durationSlider->setRange(100, 2000, 100);
durationSlider->setExponentRatio(2);
durationSlider->setRange(100, 2000);
durationSlider->setSingleStep(100);
durationSlider->setDecimals(0);
durationSlider->setLabel(i18n("Duration:"));
durationSlider->setSuffix(i18n(" msec"));
hbox->addWidget(durationSlider);
durationSlider->setWhatsThis( i18n("Here you can customize the duration of the \"visible bell\" effect being shown.") );
@ -381,13 +383,18 @@ KAccessConfig::KAccessConfig(QWidget *parent, const QVariantList& args)
hbox = new QHBoxLayout();
vvbox->addLayout(hbox);
hbox->addSpacing(24);
slowKeysLabel = new QLabel(i18n("Acceptance dela&y:"), grp);
slowKeysLabel->setAlignment(Qt::AlignVCenter|Qt::AlignLeft);
hbox->addWidget(slowKeysLabel);
slowKeysDelay = new KDoubleNumInput(grp);
slowKeysDelay->setRange(50, 10000, 100);
slowKeysDelay->setExponentRatio(2);
slowKeysDelay->setRange(50, 10000);
slowKeysDelay->setSingleStep(100);
slowKeysDelay->setDecimals(0);
slowKeysDelay->setSuffix(i18n(" msec"));
slowKeysDelay->setLabel(i18n("Acceptance dela&y:"), Qt::AlignVCenter|Qt::AlignLeft);
hbox->addWidget(slowKeysDelay);
slowKeysLabel->setBuddy(slowKeysDelay);
hbox = new QHBoxLayout();
vvbox->addLayout(hbox);
@ -421,13 +428,18 @@ KAccessConfig::KAccessConfig(QWidget *parent, const QVariantList& args)
hbox = new QHBoxLayout();
vvbox->addLayout(hbox);
hbox->addSpacing(24);
bounceKeysLabel = new QLabel(i18n("D&ebounce time:"), grp);
bounceKeysLabel->setAlignment(Qt::AlignVCenter|Qt::AlignLeft);
hbox->addWidget(bounceKeysLabel);
bounceKeysDelay = new KDoubleNumInput(grp);
bounceKeysDelay->setRange(100, 5000, 100);
bounceKeysDelay->setExponentRatio(2);
bounceKeysDelay->setRange(100, 5000);
bounceKeysDelay->setSingleStep(100);
bounceKeysDelay->setDecimals(0);
bounceKeysDelay->setSuffix(i18n(" msec"));
bounceKeysDelay->setLabel(i18n("D&ebounce time:"), Qt::AlignVCenter|Qt::AlignLeft);;
hbox->addWidget(bounceKeysDelay);
bounceKeysLabel->setBuddy(bounceKeysDelay);
hbox = new QHBoxLayout();
vvbox->addLayout(hbox);
@ -484,11 +496,16 @@ KAccessConfig::KAccessConfig(QWidget *parent, const QVariantList& args)
hbox = new QHBoxLayout();
vvbox->addLayout(hbox);
hbox->addSpacing(24);
timeoutLabel = new QLabel(grp);
timeoutLabel->setAlignment(Qt::AlignVCenter|Qt::AlignLeft);
timeoutLabel->setText(i18n("Timeout:"));
hbox->addWidget(timeoutLabel);
timeoutDelay = new KIntNumInput(grp);
timeoutDelay->setSuffix(i18n(" min"));
timeoutDelay->setRange(1, 30, 4);
timeoutDelay->setLabel(i18n("Timeout:"), Qt::AlignVCenter|Qt::AlignLeft);;
timeoutDelay->setRange(1, 30);
timeoutDelay->setSingleStep(4);
hbox->addWidget(timeoutDelay);
timeoutLabel->setBuddy(timeoutDelay);
grp = new QGroupBox(i18n("Notification"), features);
layout = new QHBoxLayout;
@ -745,6 +762,7 @@ void KAccessConfig::checkAccess()
invertScreen->setEnabled(visible);
flashScreen->setEnabled(visible);
colorButton->setEnabled(visible);
durationLabel->setEnabled(visible);
durationSlider->setEnabled(visible);
bool sticky = stickyKeys->isChecked();
@ -753,15 +771,18 @@ void KAccessConfig::checkAccess()
stickyKeysBeep->setEnabled(sticky);
bool slow = slowKeys->isChecked();
slowKeysLabel->setEnabled(slow);
slowKeysDelay->setEnabled(slow);
slowKeysPressBeep->setEnabled(slow);
slowKeysAcceptBeep->setEnabled(slow);
slowKeysRejectBeep->setEnabled(slow);
bool bounce = bounceKeys->isChecked();
bounceKeysLabel->setEnabled(bounce);
bounceKeysDelay->setEnabled(bounce);
bounceKeysRejectBeep->setEnabled(bounce);
bool useTimeout = timeout->isChecked();
timeoutLabel->setEnabled(useTimeout);
timeoutDelay->setEnabled(useTimeout);
}

View file

@ -12,14 +12,13 @@
#include <kcmodule.h>
#include <knuminput.h>
#include <QCheckBox>
#include <QLabel>
#include <QLineEdit>
#include <QPushButton>
#include <QRadioButton>
class KColorButton;
#include <QSlider>
class KAccessConfig : public KCModule
{
@ -52,6 +51,7 @@ private:
QLineEdit *soundEdit;
QPushButton *soundButton;
KColorButton *colorButton;
QLabel *durationLabel;
KDoubleNumInput *durationSlider;
QCheckBox *stickyKeys, *stickyKeysLock, *stickyKeysAutoOff;
@ -59,12 +59,14 @@ private:
QPushButton *kNotifyModifiersButton;
QCheckBox *slowKeys, *bounceKeys;
QLabel *slowKeysLabel, *bounceKeysLabel;
KDoubleNumInput *slowKeysDelay, *bounceKeysDelay;
QCheckBox *slowKeysPressBeep, *slowKeysAcceptBeep;
QCheckBox *slowKeysRejectBeep, *bounceKeysRejectBeep;
QCheckBox *gestures, *gestureConfirmation;
QCheckBox *timeout;
QLabel *timeoutLabel;
KIntNumInput *timeoutDelay;
QCheckBox *accessxBeep, *kNotifyAccessX;
QPushButton *kNotifyAccessXButton;

View file

@ -170,12 +170,20 @@ FontAASettings::FontAASettings(QWidget *parent)
excludeRange=new QCheckBox(i18n("E&xclude range:"), mw);
QHBoxLayout *rangeLayout = new QHBoxLayout();
excludeFrom=new KDoubleNumInput(0, 72, 8.0, mw, 1, 1);
excludeFrom=new KDoubleNumInput(mw);
excludeFrom->setRange(0, 72);
excludeFrom->setValue(8.0);
excludeFrom->setSingleStep(1);
excludeFrom->setDecimals(1);
excludeFrom->setSuffix(i18n(" pt"));
rangeLayout->addWidget(excludeFrom);
excludeToLabel=new QLabel(i18n(" to "), mw);
rangeLayout->addWidget(excludeToLabel);
excludeTo=new KDoubleNumInput(0, 72, 15.0, mw, 1, 1);
excludeTo=new KDoubleNumInput(mw);
excludeTo->setRange(0, 72);
excludeTo->setValue(15.0);
excludeTo->setSingleStep(1);
excludeTo->setDecimals(1);
excludeTo->setSuffix(i18n(" pt"));
rangeLayout->addWidget(excludeTo);
layout->addRow(excludeRange, rangeLayout);

View file

@ -180,6 +180,19 @@
</property>
</spacer>
</item>
<item>
<widget class="QLabel" name="slAutoSelectLabel">
<property name="text">
<string comment="label. delay (on milliseconds) to automatically select icons">Delay</string>
</property>
<property name="sizePolicy">
<sizepolicy hsizetype="Minimum" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
</widget>
</item>
<item>
<widget class="KIntNumInput" name="slAutoSelect">
<property name="enabled">
@ -191,9 +204,6 @@
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="label">
<string comment="label. delay (on milliseconds) to automatically select icons">Delay</string>
</property>
<property name="minimum">
<number>0</number>
</property>

View file

@ -181,7 +181,11 @@ MouseConfig::MouseConfig(QWidget *parent, const QVariantList &args)
QFormLayout *lay = new QFormLayout(advancedTab);
accel = new KDoubleNumInput(0.1, 20, 2, advancedTab, 0.1, 1);
accel = new KDoubleNumInput(advancedTab);
accel->setRange(0.1, 20);
accel->setValue(2);
accel->setSingleStep(0.1);
accel->setDecimals(1);
accel->setSuffix(i18n(" x"));
lay->addRow(i18n("Pointer acceleration:"), accel);
connect(accel, SIGNAL(valueChanged(double)), this, SLOT(changed()));
@ -198,9 +202,11 @@ MouseConfig::MouseConfig(QWidget *parent, const QVariantList &args)
" flying across the screen, making it hard to control.</p>");
accel->setWhatsThis( wtstr );
thresh = new KIntNumInput(20, advancedTab);
thresh->setRange(0,20,1);
thresh = new KIntNumInput(advancedTab);
thresh->setRange(0,20);
thresh->setSingleStep(1);
thresh->setSteps(1,1);
thresh->setValue(20);
lay->addRow(i18n("Pointer threshold:"), thresh);
connect(thresh, SIGNAL(valueChanged(int)), this, SLOT(changed()));
connect(thresh, SIGNAL(valueChanged(int)), this, SLOT(slotThreshChanged(int)));
@ -219,10 +225,12 @@ MouseConfig::MouseConfig(QWidget *parent, const QVariantList &args)
// It would be nice if the user had a test field.
// Selecting such values in milliseconds is not intuitive
doubleClickInterval = new KIntNumInput(2000, advancedTab);
doubleClickInterval->setRange(0, 2000, 100);
doubleClickInterval = new KIntNumInput(advancedTab);
doubleClickInterval->setRange(0, 2000);
doubleClickInterval->setSingleStep(100);
doubleClickInterval->setSuffix(i18n(" msec"));
doubleClickInterval->setSteps(100, 100);
doubleClickInterval->setValue(2000);
lay->addRow(i18n("Double click interval:"), doubleClickInterval);
connect(doubleClickInterval, SIGNAL(valueChanged(int)), this, SLOT(changed()));
@ -234,10 +242,12 @@ MouseConfig::MouseConfig(QWidget *parent, const QVariantList &args)
" separate clicks.");
doubleClickInterval->setWhatsThis( wtstr );
dragStartTime = new KIntNumInput(2000, advancedTab);
dragStartTime->setRange(0, 2000, 100);
dragStartTime = new KIntNumInput(advancedTab);
dragStartTime->setRange(0, 2000);
dragStartTime->setSingleStep(100);
dragStartTime->setSuffix(i18n(" msec"));
dragStartTime->setSteps(100, 100);
dragStartTime->setValue(2000);
lay->addRow(i18n("Drag start time:"), dragStartTime);
connect(dragStartTime, SIGNAL(valueChanged(int)), this, SLOT(changed()));
@ -246,9 +256,11 @@ MouseConfig::MouseConfig(QWidget *parent, const QVariantList &args)
" drag start time, a drag operation will be initiated.");
dragStartTime->setWhatsThis( wtstr );
dragStartDist = new KIntNumInput(20, advancedTab);
dragStartDist->setRange(1, 20, 1);
dragStartDist = new KIntNumInput(advancedTab);
dragStartDist->setRange(1, 20);
dragStartDist->setSingleStep(1);
dragStartDist->setSteps(1, 1);
dragStartDist->setValue(20);
lay->addRow(i18n("Drag start distance:"), dragStartDist);
connect(dragStartDist, SIGNAL(valueChanged(int)), this, SLOT(changed()));
connect(dragStartDist, SIGNAL(valueChanged(int)), this, SLOT(slotDragStartDistChanged(int)));
@ -259,9 +271,11 @@ MouseConfig::MouseConfig(QWidget *parent, const QVariantList &args)
" operation will be initiated.");
dragStartDist->setWhatsThis( wtstr );
wheelScrollLines = new KIntNumInput(3, advancedTab);
wheelScrollLines->setRange(1, 12, 1);
wheelScrollLines = new KIntNumInput(advancedTab);
wheelScrollLines->setRange(1, 12);
wheelScrollLines->setSingleStep(1);
wheelScrollLines->setSteps(1,1);
wheelScrollLines->setValue(3);
lay->addRow(i18n("Mouse wheel scrolls by:"), wheelScrollLines);
connect(wheelScrollLines, SIGNAL(valueChanged(int)), this, SLOT(changed()));
connect(wheelScrollLines, SIGNAL(valueChanged(int)), SLOT(slotWheelScrollLinesChanged(int)));
@ -281,27 +295,32 @@ MouseConfig::MouseConfig(QWidget *parent, const QVariantList &args)
form->addRow(mouseKeys);
mk_delay = new KIntNumInput(mouse);
mk_delay->setRange(1, 1000, 50);
mk_delay->setRange(1, 1000);
mk_delay->setSingleStep(50);
mk_delay->setSuffix(i18n(" msec"));
form->addRow(i18n("&Acceleration delay:"), mk_delay);
mk_interval = new KIntNumInput(0, mouse);
mk_interval->setRange(1, 1000, 10);
mk_interval = new KIntNumInput(mouse);
mk_interval->setRange(1, 1000);
mk_interval->setSingleStep(10);
mk_interval->setSuffix(i18n(" msec"));
form->addRow(i18n("R&epeat interval:"), mk_interval);
mk_time_to_max = new KIntNumInput(0, mouse);
mk_time_to_max->setRange(100, 10000, 200);
mk_time_to_max = new KIntNumInput(mouse);
mk_time_to_max->setRange(100, 10000);
mk_time_to_max->setSingleStep(200);
mk_time_to_max->setSuffix(i18n(" msec"));
form->addRow(i18n("Acceleration &time:"), mk_time_to_max);
mk_max_speed = new KIntNumInput(0, mouse);
mk_max_speed->setRange(1, 2000, 20);
mk_max_speed = new KIntNumInput(mouse);
mk_max_speed->setRange(1, 2000);
mk_max_speed->setSingleStep(20);
mk_max_speed->setSuffix(i18n(" pixel/sec"));
form->addRow(i18n("Ma&ximum speed:"), mk_max_speed);
mk_curve = new KIntNumInput(0, mouse);
mk_curve->setRange(-1000, 1000, 100);
mk_curve = new KIntNumInput(mouse);
mk_curve->setRange(-1000, 1000);
mk_curve->setSingleStep(100);
form->addRow(i18n("Acceleration &profile:"), mk_curve);
connect(mouseKeys, SIGNAL(clicked()), this, SLOT(checkAccess()));

View file

@ -77,7 +77,7 @@ It looks less nice but it may help if you have a very big folder you want to spr
</widget>
</item>
<item>
<widget class="KIntSpinBox" name="sbColumns">
<widget class="KIntNumInput" name="sbColumns">
<property name="whatsThis">
<string/>
</property>
@ -184,11 +184,6 @@ It looks less nice but it may help if you have a very big folder you want to spr
</layout>
</widget>
<customwidgets>
<customwidget>
<class>KIntSpinBox</class>
<extends>QSpinBox</extends>
<header>knuminput.h</header>
</customwidget>
<customwidget>
<class>KIntNumInput</class>
<extends>QWidget</extends>

View file

@ -41,12 +41,12 @@ KIOPreferences::KIOPreferences(QWidget *parent, const QVariantList &)
mainLayout->addWidget( gb_Timeout );
QFormLayout* timeoutLayout = new QFormLayout(gb_Timeout);
sb_serverConnect = new KIntNumInput( 0, this );
sb_serverConnect = new KIntNumInput( this );
sb_serverConnect->setSuffix( ki18np( " second", " seconds" ) );
connect(sb_serverConnect, SIGNAL(valueChanged(int)), SLOT(configChanged()));
timeoutLayout->addRow(i18n("Server co&nnect:"), sb_serverConnect);
sb_serverResponse = new KIntNumInput( 0, this );
sb_serverResponse = new KIntNumInput( this );
sb_serverResponse->setSuffix( ki18np( " second", " seconds" ) );
connect(sb_serverResponse, SIGNAL(valueChanged(int)), SLOT(configChanged()));
timeoutLayout->addRow(i18n("&Server response:"), sb_serverResponse);
@ -76,7 +76,7 @@ KIOPreferences::KIOPreferences(QWidget *parent, const QVariantList &)
mainLayout->addWidget( gb_Misc );
QFormLayout* miscLayout = new QFormLayout(gb_Misc);
sb_minimumKeepSize = new KIntNumInput( 0, this );
sb_minimumKeepSize = new KIntNumInput( this );
sb_minimumKeepSize->setSuffix( ki18np( " bytes", " bytes" ) );
connect(sb_minimumKeepSize, SIGNAL(valueChanged(int)), SLOT(configChanged()));
miscLayout->addRow(i18n( "Minimum keep size:" ), sb_minimumKeepSize);

View file

@ -103,7 +103,7 @@
<item>
<layout class="QHBoxLayout">
<item>
<widget class="KIntSpinBox" name="SpinBox1">
<widget class="KIntNumInput" name="SpinBox1">
<property name="maximum">
<number>999999</number>
</property>
@ -161,8 +161,8 @@
</widget>
<customwidgets>
<customwidget>
<class>KIntSpinBox</class>
<extends>QSpinBox</extends>
<class>KIntNumInput</class>
<extends>QWidget</extends>
<header>knuminput.h</header>
</customwidget>
</customwidgets>

View file

@ -182,7 +182,7 @@ KfindTabWidget::KfindTabWidget(QWidget *parent)
fromDate->setObjectName( QLatin1String( "fromDate" ) );
toDate = new KDateCombo(pages[1] );
toDate->setObjectName( QLatin1String( "toDate" ) );
timeBox = new KIntSpinBox( pages[1] );
timeBox = new KIntNumInput( pages[1] );
timeBox->setRange( 1, 60 );
timeBox->setSingleStep( 1 );
timeBox->setObjectName( QLatin1String( "timeBox" ) );
@ -191,7 +191,7 @@ KfindTabWidget::KfindTabWidget(QWidget *parent)
sizeBox->setObjectName( QLatin1String( "sizeBox" ) );
QLabel * sizeL =new QLabel(i18n("File &size is:"), pages[1]);
sizeL->setBuddy( sizeBox );
sizeEdit=new KIntSpinBox(pages[1] );
sizeEdit=new KIntNumInput(pages[1] );
sizeEdit->setRange( 0, INT_MAX );
sizeEdit->setSingleStep( 1 );
sizeEdit->setObjectName( QLatin1String( "sizeEdit" ) );

View file

@ -19,26 +19,25 @@
#ifndef KFTABDLG_H
#define KFTABDLG_H
#include <QValidator> // for KDigitValidator
#include <QButtonGroup>
#include <QPushButton>
#include <QRadioButton>
#include <QCheckBox>
#include <QString>
#include <QDate>
#include <QRegExp>
#include <QLabel>
#include <QValidator>
#include <kurl.h>
#include <ktabwidget.h>
#include <kmimetype.h>
class KUrlComboBox;
#include <QButtonGroup>
#include <QPushButton>
#include <QRadioButton>
#include <QCheckBox>
class KLineEdit;
#include <QString>
#include <QDate>
#include <QRegExp>
class KDialog;
class KComboBox;
class KIntSpinBox;
#include <QLabel>
class KIntNumInput;
class KfDirDialog;
class KDateCombo;
@ -118,12 +117,12 @@ private:
QRadioButton *rb[2];
KDateCombo * fromDate;
KDateCombo * toDate;
KIntSpinBox *timeBox;
KIntNumInput *timeBox;
//3rd page
KComboBox *sizeBox;
KComboBox *sizeUnitBox;
KIntSpinBox *sizeEdit;
KIntNumInput *sizeEdit;
QCheckBox *caseContextCb;
QCheckBox *binaryContextCb;
QCheckBox *regexpContentCb;

View file

@ -28,7 +28,7 @@
#include <QLabel>
#include <QLayout>
#include <QListWidget>
#include <QtGui/qlistwidget.h>
#include <QListWidget>
#include <kconfig.h>
#include <kconfiggroup.h>
@ -38,8 +38,7 @@
#include <klocale.h>
#include <kpluginfactory.h>
#include <kpluginloader.h>
#include <KIntSpinBox>
#include <KDebug>
#include <kdebug.h>
K_PLUGIN_FACTORY( KCMTrashConfigFactory, registerPlugin<TrashConfigModule>( "trash" ); )
K_EXPORT_PLUGIN( KCMTrashConfigFactory( "kcmtrash" ) )
@ -250,11 +249,11 @@ void TrashConfigModule::setupGui()
"<p>Check this box to allow <b>automatic deletion</b> of files that are older than the value specified. "
"Leave this disabled to <b>not</b> automatically delete any items after a certain timespan</p>" ) );
daysLayout->addWidget( mUseTimeLimit );
mDays = new KIntSpinBox( this );
mDays = new KIntNumInput( this );
mDays->setRange( 1, 365 );
mDays->setSingleStep( 1 );
mDays->setSuffix( i18np(" day", " days", mDays->value()) );
mDays->setSuffix( ki18np(" day", " days") );
mDays->setWhatsThis( i18nc( "@info:whatsthis",
"<p>Set the number of days that files can remain in the trash. "
"Any files older than this will be automatically deleted.</p>" ) );

View file

@ -21,6 +21,7 @@
#define KCMTRASH_H
#include <kcmodule.h>
#include <knuminput.h>
#include <QCheckBox>
#include <QComboBox>
@ -28,7 +29,7 @@
#include <QFrame>
#include <QLabel>
#include <QListWidgetItem>
class KIntSpinBox;
class TrashImpl;
/**
@ -57,7 +58,7 @@ class TrashConfigModule : public KCModule
void setupGui();
QCheckBox *mUseTimeLimit;
KIntSpinBox *mDays;
KIntNumInput *mDays;
QCheckBox *mUseSizeLimit;
QWidget *mSizeWidget;
QDoubleSpinBox *mPercent;

View file

@ -277,7 +277,7 @@
</widget>
</item>
<item row="6" column="1">
<widget class="KIntSpinBox" name="_port">
<widget class="KIntNumInput" name="_port">
<property name="sizePolicy">
<sizepolicy hsizetype="Minimum" vsizetype="Fixed">
<horstretch>1</horstretch>
@ -374,8 +374,8 @@
</widget>
<customwidgets>
<customwidget>
<class>KIntSpinBox</class>
<extends>QSpinBox</extends>
<class>KIntNumInput</class>
<extends>QWidget</extends>
<header>knuminput.h</header>
</customwidget>
<customwidget>

View file

@ -216,7 +216,7 @@
</widget>
</item>
<item row="0" column="1">
<widget class="KIntSpinBox" name="terminalColumnsEntry">
<widget class="KIntNumInput" name="terminalColumnsEntry">
<property name="minimum">
<number>1</number>
</property>
@ -233,7 +233,7 @@
</widget>
</item>
<item row="0" column="3">
<widget class="KIntSpinBox" name="terminalRowsEntry">
<widget class="KIntNumInput" name="terminalRowsEntry">
<property name="minimum">
<number>1</number>
</property>
@ -381,7 +381,7 @@
</widget>
</item>
<item row="0" column="1">
<widget class="KIntSpinBox" name="silenceSecondsSpinner">
<widget class="KIntNumInput" name="silenceSecondsSpinner">
<property name="toolTip">
<string>The threshold for continuous silence to be detected by Konsole</string>
</property>
@ -1114,7 +1114,7 @@
</widget>
</item>
<item>
<widget class="KIntSpinBox" name="lineSpacingSpinner">
<widget class="KIntNumInput" name="lineSpacingSpinner">
<property name="toolTip">
<string>The number of pixels between two lines</string>
</property>
@ -1363,8 +1363,8 @@
<header>klineedit.h</header>
</customwidget>
<customwidget>
<class>KIntSpinBox</class>
<extends>QSpinBox</extends>
<class>KIntNumInput</class>
<extends>QWidget</extends>
<header>knuminput.h</header>
</customwidget>
<customwidget>

View file

@ -55,7 +55,7 @@
</widget>
</item>
<item>
<widget class="KIntSpinBox" name="historyLineSpinner">
<widget class="KIntNumInput" name="historyLineSpinner">
<property name="toolTip">
<string>Number of lines of output to remember</string>
</property>
@ -112,8 +112,8 @@
</widget>
<customwidgets>
<customwidget>
<class>KIntSpinBox</class>
<extends>QSpinBox</extends>
<class>KIntNumInput</class>
<extends>QWidget</extends>
<header>knuminput.h</header>
</customwidget>
<customwidget>

View file

@ -361,7 +361,7 @@
</widget>
</item>
<item>
<widget class="KIntSpinBox" name="_scrollBarWidth">
<widget class="KIntNumInput" name="_scrollBarWidth">
<property name="alignment">
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
</property>
@ -533,8 +533,8 @@
<header>kcombobox.h</header>
</customwidget>
<customwidget>
<class>KIntSpinBox</class>
<extends>QSpinBox</extends>
<class>KIntNumInput</class>
<extends>QWidget</extends>
<header>knuminput.h</header>
</customwidget>
<customwidget>

View file

@ -89,10 +89,10 @@ namespace Oxygen
simulator().selectComboBoxItem( ui.kcombobox, 2 );
simulator().selectComboBoxItem( ui.kcombobox, 0 );
simulator().clearText( ui.kintspinbox );
simulator().writeText( ui.kintspinbox, "10" );
simulator().clearText( ui.kintspinbox );
simulator().writeText( ui.kintspinbox, "0" );
simulator().clearText( ui.kintnuminput );
simulator().writeText( ui.kintnuminput, "10" );
simulator().clearText( ui.kintnuminput );
simulator().writeText( ui.kintnuminput, "0" );
}
@ -127,7 +127,6 @@ namespace Oxygen
ui.klineedit->setFrame( !value );
ui.klineedit_2->setFrame( !value );
ui.kcombobox->setFrame( !value );
ui.kintspinbox->setFrame( !value );
}
//________________________________________________________________

View file

@ -117,12 +117,12 @@
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
</property>
<property name="buddy">
<cstring>kintspinbox</cstring>
<cstring>kintnuminput</cstring>
</property>
</widget>
</item>
<item row="3" column="1">
<widget class="KIntSpinBox" name="kintspinbox"/>
<widget class="KIntNumInput" name="kintnuminput"/>
</item>
<item row="5" column="0" colspan="3">
<widget class="QFrame" name="frame">
@ -162,8 +162,8 @@
</widget>
<customwidgets>
<customwidget>
<class>KIntSpinBox</class>
<extends>QSpinBox</extends>
<class>KIntNumInput</class>
<extends>QWidget</extends>
<header>knuminput.h</header>
</customwidget>
<customwidget>
@ -186,7 +186,7 @@
<tabstop>klineedit</tabstop>
<tabstop>klineedit_2</tabstop>
<tabstop>kcombobox</tabstop>
<tabstop>kintspinbox</tabstop>
<tabstop>kintnuminput</tabstop>
<tabstop>flatCheckBox</tabstop>
<tabstop>textedit</tabstop>
<tabstop>wrapCheckBox</tabstop>

View file

@ -95,7 +95,7 @@ HostConnector::HostConnector( QWidget *parent, const char *name )
label = new QLabel( i18n( "Port:" ));
groupLayout->addWidget( label, 1, 0 );
mPort = new KIntSpinBox();
mPort = new KIntNumInput();
mPort->setRange( 1, 65535 );
mPort->setEnabled( false );
mPort->setValue( 3112 );

View file

@ -23,13 +23,12 @@
#define KSG_HOSTCONNECTOR_H
#include <QLabel>
#include <QRadioButton>
#include <kdialog.h>
class KComboBox;
#include <QRadioButton>
class KIntSpinBox;
class KIntNumInput;
class HostConnector : public KDialog
{
@ -70,7 +69,7 @@ class HostConnector : public KDialog
QRadioButton *mUseDaemon;
QRadioButton *mUseCustom;
KIntSpinBox *mPort;
KIntNumInput *mPort;
};
#endif

View file

@ -182,7 +182,8 @@ DancingBarsSettings::DancingBarsSettings( QWidget* parent, const char* name )
label = new QLabel( i18n( "Font size:" ), page );
pageLayout->addWidget( label, 3, 0 );
mFontSize = new KIntNumInput( 9, page );
mFontSize = new KIntNumInput( page );
mFontSize->setValue( 9 );
mFontSize->setWhatsThis( i18n( "This determines the size of the font used to print a label underneath the bars. Bars are automatically suppressed if text becomes too large, so it is advisable to use a small font size here." ) );
pageLayout->addWidget( mFontSize, 3, 1 );
label->setBuddy( mFontSize );

View file

@ -126,9 +126,10 @@ FancyPlotterSettings::FancyPlotterSettings( QWidget* parent, bool locked )
groupBox = new QGroupBox( i18n( "Horizontal scale" ), page );
QFormLayout *formLayout = new QFormLayout(groupBox);
mHorizontalScale = new KIntNumInput( 1, groupBox );
mHorizontalScale = new KIntNumInput( groupBox );
mHorizontalScale->setMinimum( 1 );
mHorizontalScale->setMaximum( 50 );
mHorizontalScale->setValue( 1 );
formLayout->addRow( i18n("Pixels per time period:"), mHorizontalScale );
@ -155,7 +156,7 @@ FancyPlotterSettings::FancyPlotterSettings( QWidget* parent, bool locked )
label = new QLabel( i18n( "Distance:" ), groupBox );
boxLayout->addWidget( label, 0, 2 );
mVerticalLinesDistance = new KIntNumInput( 0, groupBox );
mVerticalLinesDistance = new KIntNumInput( groupBox );
mVerticalLinesDistance->setMinimum( 10 );
mVerticalLinesDistance->setMaximum( 120 );
mVerticalLinesDistance->setWhatsThis( i18n( "Enter the distance between two vertical lines here." ) );
@ -184,9 +185,10 @@ FancyPlotterSettings::FancyPlotterSettings( QWidget* parent, bool locked )
label = new QLabel( i18n( "Font size:" ), groupBox );
boxLayout->addWidget( label, 1, 0 );
mFontSize = new KIntNumInput( 8, groupBox );
mFontSize = new KIntNumInput( groupBox );
mFontSize->setMinimum( 1 );
mFontSize->setMaximum( 1000 );
mFontSize->setValue( 8 );
boxLayout->addWidget( mFontSize, 1, 1 );
label->setBuddy( mFontSize );

View file

@ -70,18 +70,20 @@ WorkSheetSettings::WorkSheetSettings( QWidget* parent, bool locked )
label = new QLabel( i18n( "Rows:" ), group );
groupLayout->addWidget( label, ++row_num, 0 );
mRows = new KIntNumInput( 3, group );
mRows = new KIntNumInput( group );
mRows->setMaximum( 42 );
mRows->setMinimum( 1 );
mRows->setValue( 3 );
groupLayout->addWidget( mRows, row_num, 1 );
label->setBuddy( mRows );
label = new QLabel( i18n( "Columns:" ), group );
groupLayout->addWidget( label, ++row_num, 0 );
mColumns = new KIntNumInput( 1, group );
mColumns = new KIntNumInput( group );
mColumns->setMaximum( 42 );
mColumns->setMinimum( 1 );
mColumns->setValue( 1 );
groupLayout->addWidget( mColumns, 1, 1 );
label->setBuddy( mColumns );
mRows->setWhatsThis( i18n( "Enter the number of rows the sheet should have." ) );
@ -90,7 +92,11 @@ WorkSheetSettings::WorkSheetSettings( QWidget* parent, bool locked )
label = new QLabel( i18n( "Update interval:" ), group );
groupLayout->addWidget( label, ++row_num, 0 );
mInterval = new KDoubleNumInput( 0.00/*minimum*/, 1000.0/*maximum*/, 1/*default*/, group/*parent*/, 0.5/*stepsize*/, 2/*precision*/ );
mInterval = new KDoubleNumInput( group );
mInterval->setRange( 0.00, 1000.0);
mInterval->setSingleStep( 0.5 );
mInterval->setValue( 1.0 );
mInterval->setDecimals( 2 );
mInterval->setSuffix( i18n( " sec" ) );
groupLayout->addWidget( mInterval, row_num, 1 );
label->setBuddy( mInterval );

View file

@ -72,7 +72,7 @@
</widget>
</item>
<item row="0" column="2">
<widget class="KIntSpinBox" name="kcfg_Strength">
<widget class="KIntNumInput" name="kcfg_Strength">
<property name="minimum">
<number>1</number>
</property>
@ -101,8 +101,8 @@
</widget>
<customwidgets>
<customwidget>
<class>KIntSpinBox</class>
<extends>QSpinBox</extends>
<class>KIntNumInput</class>
<extends>QWidget</extends>
<header>knuminput.h</header>
</customwidget>
</customwidgets>

View file

@ -31,7 +31,7 @@
</widget>
</item>
<item row="0" column="1">
<widget class="KIntSpinBox" name="kcfg_Width">
<widget class="KIntNumInput" name="kcfg_Width">
<property name="sizePolicy">
<sizepolicy hsizetype="Expanding" vsizetype="Fixed">
<horstretch>0</horstretch>
@ -63,7 +63,7 @@
</widget>
</item>
<item row="1" column="1">
<widget class="KIntSpinBox" name="kcfg_Height">
<widget class="KIntNumInput" name="kcfg_Height">
<property name="sizePolicy">
<sizepolicy hsizetype="Expanding" vsizetype="Fixed">
<horstretch>0</horstretch>
@ -91,8 +91,8 @@
</widget>
<customwidgets>
<customwidget>
<class>KIntSpinBox</class>
<extends>QSpinBox</extends>
<class>KIntNumInput</class>
<extends>QWidget</extends>
<header>knuminput.h</header>
</customwidget>
<customwidget>

View file

@ -31,7 +31,7 @@
</widget>
</item>
<item row="0" column="1">
<widget class="KIntSpinBox" name="kcfg_LineWidth">
<widget class="KIntNumInput" name="kcfg_LineWidth">
<property name="sizePolicy">
<sizepolicy hsizetype="Expanding" vsizetype="Fixed">
<horstretch>0</horstretch>
@ -100,8 +100,8 @@
<header>kcolorcombo.h</header>
</customwidget>
<customwidget>
<class>KIntSpinBox</class>
<extends>QSpinBox</extends>
<class>KIntNumInput</class>
<extends>QWidget</extends>
<header>knuminput.h</header>
</customwidget>
<customwidget>

View file

@ -44,7 +44,7 @@
</widget>
</item>
<item row="1" column="1">
<widget class="KIntSpinBox" name="kcfg_Spacing">
<widget class="KIntNumInput" name="kcfg_Spacing">
<property name="sizePolicy">
<sizepolicy hsizetype="Expanding" vsizetype="Fixed">
<horstretch>0</horstretch>
@ -76,7 +76,7 @@
</widget>
</item>
<item row="2" column="1">
<widget class="KIntSpinBox" name="kcfg_Opacity">
<widget class="KIntNumInput" name="kcfg_Opacity">
<property name="sizePolicy">
<sizepolicy hsizetype="Expanding" vsizetype="Fixed">
<horstretch>0</horstretch>
@ -123,8 +123,8 @@
</widget>
<customwidgets>
<customwidget>
<class>KIntSpinBox</class>
<extends>QSpinBox</extends>
<class>KIntNumInput</class>
<extends>QWidget</extends>
<header>knuminput.h</header>
</customwidget>
<customwidget>

View file

@ -47,7 +47,7 @@
</widget>
</item>
<item row="0" column="1">
<widget class="KIntSpinBox" name="numberSpinBox">
<widget class="KIntNumInput" name="numberSpinBox">
<property name="whatsThis">
<string>Here you can set how many virtual desktops you want on your KDE desktop.</string>
</property>
@ -76,7 +76,7 @@
</widget>
</item>
<item row="1" column="1">
<widget class="KIntSpinBox" name="rowsSpinBox">
<widget class="KIntNumInput" name="rowsSpinBox">
<property name="enabled">
<bool>true</bool>
</property>
@ -209,7 +209,7 @@
</widget>
</item>
<item row="0" column="1">
<widget class="KIntSpinBox" name="popupHideSpinBox">
<widget class="KIntNumInput" name="popupHideSpinBox">
<property name="suffix">
<string> msec</string>
</property>
@ -271,8 +271,8 @@
</widget>
<customwidgets>
<customwidget>
<class>KIntSpinBox</class>
<extends>QSpinBox</extends>
<class>KIntNumInput</class>
<extends>QWidget</extends>
<header>knuminput.h</header>
</customwidget>
<customwidget>

View file

@ -199,7 +199,7 @@
</widget>
</item>
<item row="2" column="1">
<widget class="KIntSpinBox" name="activationDelaySpin">
<widget class="KIntNumInput" name="activationDelaySpin">
<property name="suffix">
<string> ms</string>
</property>
@ -231,7 +231,7 @@
</widget>
</item>
<item row="3" column="1">
<widget class="KIntSpinBox" name="triggerCooldownSpin">
<widget class="KIntNumInput" name="triggerCooldownSpin">
<property name="enabled">
<bool>true</bool>
</property>
@ -287,8 +287,8 @@
<header>kcombobox.h</header>
</customwidget>
<customwidget>
<class>KIntSpinBox</class>
<extends>QSpinBox</extends>
<class>KIntNumInput</class>
<extends>QWidget</extends>
<header>knuminput.h</header>
</customwidget>
<customwidget>

View file

@ -90,14 +90,14 @@
</widget>
</item>
<item row="0" column="1">
<widget class="KIntSpinBox" name="shadowSize">
<widget class="KIntNumInput" name="shadowSize">
<property name="suffix">
<string>px</string>
</property>
</widget>
</item>
<item row="1" column="1">
<widget class="KIntSpinBox" name="verticalOffset">
<widget class="KIntNumInput" name="verticalOffset">
<property name="suffix">
<string>px</string>
</property>
@ -112,8 +112,8 @@
<header>kcolorbutton.h</header>
</customwidget>
<customwidget>
<class>KIntSpinBox</class>
<extends>QSpinBox</extends>
<class>KIntNumInput</class>
<extends>QWidget</extends>
<header>knuminput.h</header>
</customwidget>
</customwidgets>

View file

@ -353,7 +353,7 @@ When this option is checked, icons will automatically snap to the nearest grid c
</widget>
</item>
<item row="14" column="2">
<widget class="KIntSpinBox" name="numLinesEdit">
<widget class="KIntNumInput" name="numLinesEdit">
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Fixed">
<horstretch>0</horstretch>
@ -464,8 +464,8 @@ When this option is checked, icons will automatically snap to the nearest grid c
<header>kcombobox.h</header>
</customwidget>
<customwidget>
<class>KIntSpinBox</class>
<extends>QSpinBox</extends>
<class>KIntNumInput</class>
<extends>QWidget</extends>
<header>knuminput.h</header>
</customwidget>
</customwidgets>

View file

@ -20,7 +20,7 @@
#include <QTimer>
#include <QApplication>
#include <QVBoxLayout>
#include <QGridLayout>
#include <QGraphicsGridLayout>
#include <Plasma/TabBar>
#include <Plasma/Frame>
@ -964,8 +964,10 @@ MixerApplet::MixerApplet(QObject *parent, const QVariantList &args)
m_visualizerscale(s_visualizerscale),
m_visualizericon(s_visualizericon),
m_visualizerbox(nullptr),
m_visualizerscalelabel(nullptr),
m_visualizerscalebox(nullptr),
m_visualizerbutton(nullptr)
m_visualizerbutton(nullptr),
m_spacer(nullptr)
{
KGlobal::locale()->insertCatalog("plasma_applet_mixer");
setAspectRatioMode(Plasma::AspectRatioMode::IgnoreAspectRatio);
@ -991,17 +993,21 @@ void MixerApplet::init()
void MixerApplet::createConfigurationInterface(KConfigDialog *parent)
{
QWidget* widget = new QWidget();
QVBoxLayout* widgetlayout = new QVBoxLayout(widget);
QGridLayout* widgetlayout = new QGridLayout(widget);
m_visualizerbox = new QCheckBox(widget);
m_visualizerbox->setChecked(m_showvisualizer);
m_visualizerbox->setText(i18n("Show visualizer"));
widgetlayout->addWidget(m_visualizerbox);
widgetlayout->addWidget(m_visualizerbox, 0, 0, 1, 2);
m_visualizerscalelabel = new QLabel(widget);
m_visualizerscalelabel->setText(i18n("Smooth-factor"));
widgetlayout->addWidget(m_visualizerscalelabel, 1, 0, 1, 1, Qt::AlignRight | Qt::AlignVCenter);
m_visualizerscalebox = new KIntNumInput(widget);
m_visualizerscalebox->setSizePolicy(QSizePolicy::MinimumExpanding, QSizePolicy::Minimum);
m_visualizerscalebox->setRange(1, 5);
m_visualizerscalebox->setValue(m_visualizerscale);
m_visualizerscalebox->setLabel(i18n("Smooth-factor"));
widgetlayout->addWidget(m_visualizerscalebox);
widgetlayout->addWidget(m_visualizerscalebox, 1, 1, 1, 1);
const QColor defaultvisualizercolor = kDefaultVisualizerColor();
QColor visualizercolor = m_visualizercolor;
@ -1011,14 +1017,16 @@ void MixerApplet::createConfigurationInterface(KConfigDialog *parent)
m_visualizerbutton = new KColorButton(widget);
m_visualizerbutton->setDefaultColor(defaultvisualizercolor);
m_visualizerbutton->setColor(visualizercolor);
widgetlayout->addWidget(m_visualizerbutton);
widgetlayout->addWidget(m_visualizerbutton, 2, 0, 1, 2);
m_visualizericonbox = new QCheckBox(widget);
m_visualizericonbox->setChecked(m_visualizericon);
m_visualizericonbox->setText(i18n("Show icon"));
widgetlayout->addWidget(m_visualizericonbox);
widgetlayout->addWidget(m_visualizericonbox, 3, 0, 1, 2);
m_spacer = new QSpacerItem(1, 1, QSizePolicy::Expanding, QSizePolicy::Expanding);
widgetlayout->addItem(m_spacer, 4, 0, 1, 2);
widgetlayout->addStretch();
widget->setLayout(widgetlayout);
parent->addPage(widget, i18n("Visualizer"), "player-volume");

View file

@ -21,6 +21,8 @@
#include <QGraphicsSceneWheelEvent>
#include <QCheckBox>
#include <QLabel>
#include <QSpacerItem>
#include <KIntNumInput>
#include <KConfigDialog>
#include <KColorButton>
@ -56,9 +58,11 @@ private:
QColor m_visualizercolor;
bool m_visualizericon;
QCheckBox* m_visualizerbox;
QLabel* m_visualizerscalelabel;
KIntNumInput* m_visualizerscalebox;
KColorButton* m_visualizerbutton;
QCheckBox* m_visualizericonbox;
QSpacerItem* m_spacer;
};
#endif // MIXER_H

View file

@ -744,8 +744,10 @@ WeatherApplet::WeatherApplet(QObject *parent, const QVariantList &args)
m_tempunitbox(nullptr),
m_locationbox(nullptr),
m_latitude(KTimeZone::UNKNOWN),
m_latitudelabel(nullptr),
m_latitudeinput(nullptr),
m_longitude(KTimeZone::UNKNOWN),
m_longitudelabel(nullptr),
m_longitudeinput(nullptr),
m_spacer(nullptr)
{
@ -816,16 +818,20 @@ void WeatherApplet::createConfigurationInterface(KConfigDialog *parent)
m_locationbox->addItem(sortedzonesiter.key(), sortedzonesiter.value());
}
widgetlayout->addWidget(m_locationbox, 1, 1, 1, 1);
m_latitudelabel = new QLabel(widget);
m_latitudelabel->setText(i18n("Latitude:"));
widgetlayout->addWidget(m_latitudelabel, 2, 0, 1, 1, Qt::AlignRight | Qt::AlignVCenter);
m_latitudeinput = new KDoubleNumInput(widget);
m_latitudeinput->setSliderEnabled(true);
m_latitudeinput->setLabel(i18n("Latitude:"));
m_latitudeinput->setValue(m_latitude);
widgetlayout->addWidget(m_latitudeinput, 2, 0, 1, 2);
widgetlayout->addWidget(m_latitudeinput, 2, 1, 1, 1);
m_longitudelabel = new QLabel(widget);
m_longitudelabel->setText(i18n("Longitude:"));
widgetlayout->addWidget(m_longitudelabel, 3, 0, 1, 1, Qt::AlignRight | Qt::AlignVCenter);
m_longitudeinput = new KDoubleNumInput(widget);
m_longitudeinput->setSliderEnabled(true);
m_longitudeinput->setLabel(i18n("Longitude:"));
m_longitudeinput->setValue(m_longitude);
widgetlayout->addWidget(m_longitudeinput, 3, 0, 1, 2);
widgetlayout->addWidget(m_longitudeinput, 3, 1, 1, 1);
m_spacer = new QSpacerItem(1, 1, QSizePolicy::Expanding, QSizePolicy::Expanding);
widgetlayout->addItem(m_spacer, 4, 0, 1, 2);
widget->setLayout(widgetlayout);
@ -863,16 +869,20 @@ void WeatherApplet::slotCheckLocation()
{
const int locationindex = m_locationbox->currentIndex();
if (locationindex == 1) {
m_latitudelabel->setVisible(true);
m_latitudeinput->setVisible(true);
m_latitudeinput->setRange(-90.0, 90.0);
m_latitudeinput->setValue((!m_location.isEmpty() || m_latitude == KTimeZone::UNKNOWN) ? 0.0 : m_latitude);
m_longitudelabel->setVisible(true);
m_longitudeinput->setVisible(true);
m_longitudeinput->setRange(-180.0, 180.0);
m_longitudeinput->setValue((!m_location.isEmpty() || m_longitude == KTimeZone::UNKNOWN) ? 0.0 : m_longitude);
} else {
m_latitudelabel->setVisible(false);
m_latitudeinput->setVisible(false);
m_latitudeinput->setRange(KTimeZone::UNKNOWN, KTimeZone::UNKNOWN);
m_latitudeinput->setValue(KTimeZone::UNKNOWN);
m_longitudelabel->setVisible(false);
m_longitudeinput->setVisible(false);
m_longitudeinput->setRange(KTimeZone::UNKNOWN, KTimeZone::UNKNOWN);
m_longitudeinput->setValue(KTimeZone::UNKNOWN);

View file

@ -21,6 +21,7 @@
#include <QComboBox>
#include <QSpacerItem>
#include <QLabel>
#include <KDoubleNumInput>
#include <KConfigDialog>
#include <KUnitConversion>
@ -53,8 +54,10 @@ private:
QString m_location;
QComboBox* m_locationbox;
float m_latitude;
QLabel* m_latitudelabel;
KDoubleNumInput* m_latitudeinput;
float m_longitude;
QLabel* m_longitudelabel;
KDoubleNumInput* m_longitudeinput;
QSpacerItem* m_spacer;
};