summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMontel Laurent <[email protected]>2017-05-18 08:16:20 +0200
committerMontel Laurent <[email protected]>2017-05-18 08:16:20 +0200
commitd17fdc04d45f891e5066ecbfcd6ffe2b073e4540 (patch)
tree172fdc316801ab7e3b66eefaf3d612792e6e4a78
parent8b6391aa461f36acedd69f56ce3cc52c425bf1f5 (diff)
Start to create full value support aka "*"
-rw-r--r--src/ksieveui/autocreatescripts/sieveconditions/widgets/selectdatewidget.cpp17
1 files changed, 9 insertions, 8 deletions
diff --git a/src/ksieveui/autocreatescripts/sieveconditions/widgets/selectdatewidget.cpp b/src/ksieveui/autocreatescripts/sieveconditions/widgets/selectdatewidget.cpp
index 5d2f2ad..1ff05b1 100644
--- a/src/ksieveui/autocreatescripts/sieveconditions/widgets/selectdatewidget.cpp
+++ b/src/ksieveui/autocreatescripts/sieveconditions/widgets/selectdatewidget.cpp
@@ -77,6 +77,7 @@ void SelectDateWidget::initialize()
connect(mDateLineEdit, &QLineEdit::textChanged, this, &SelectDateWidget::valueChanged);
mDateValue = new QSpinBox;
+ mDateValue->setSpecialValueText(QStringLiteral("*"));
mStackWidget->addWidget(mDateValue);
connect(mDateValue, static_cast<void (QSpinBox::*)(int)>(&QSpinBox::valueChanged), this, &SelectDateWidget::valueChanged);
@@ -99,36 +100,36 @@ void SelectDateWidget::slotDateTypeActivated(int index)
switch (type) {
case Year:
mStackWidget->setCurrentWidget(mDateValue);
- mDateValue->setMinimum(0);
+ mDateValue->setMinimum(-1);
mDateValue->setMaximum(9999);
break;
case Month:
mStackWidget->setCurrentWidget(mDateValue);
- mDateValue->setMinimum(1);
+ mDateValue->setMinimum(0);
mDateValue->setMaximum(12);
break;
case Day:
mStackWidget->setCurrentWidget(mDateValue);
- mDateValue->setMinimum(1);
+ mDateValue->setMinimum(0);
mDateValue->setMaximum(31);
break;
case Hour:
mStackWidget->setCurrentWidget(mDateValue);
- mDateValue->setMinimum(0);
+ mDateValue->setMinimum(-1);
mDateValue->setMaximum(23);
break;
case Minute:
- mDateValue->setMinimum(0);
+ mDateValue->setMinimum(-1);
mDateValue->setMaximum(59);
mStackWidget->setCurrentWidget(mDateValue);
break;
case Second:
- mDateValue->setMinimum(0);
- mDateValue->setMaximum(60);
+ mDateValue->setMinimum(-1);
+ mDateValue->setMaximum(59);
mStackWidget->setCurrentWidget(mDateValue);
break;
case Weekday:
- mDateValue->setMinimum(0);
+ mDateValue->setMinimum(-1);
mDateValue->setMaximum(6);
mStackWidget->setCurrentWidget(mDateValue);
break;