mirror of
https://github.com/WarmUpTill/SceneSwitcher.git
synced 2026-09-07 00:56:00 -05:00
Visually clean up date condition
- add "and" separator if "between" check is chosen - split dateTimeEdit into a dateEdit and a timeEdit to make editing easier - move ignore* checkboxes in front of respective edit widgets to make their intention more clear and add tooltips to further clarify their use
This commit is contained in:
@@ -26,8 +26,8 @@ public:
|
||||
return std::make_shared<MacroConditionDate>(m);
|
||||
}
|
||||
|
||||
QDateTime _dateTime;
|
||||
QDateTime _dateTime2;
|
||||
QDateTime _dateTime = QDateTime::currentDateTime();
|
||||
QDateTime _dateTime2 = QDateTime::currentDateTime();
|
||||
bool _ignoreDate = false;
|
||||
bool _ignoreTime = false;
|
||||
bool _repeat = false;
|
||||
@@ -57,8 +57,10 @@ public:
|
||||
|
||||
private slots:
|
||||
void ConditionChanged(int cond);
|
||||
void DateTimeChanged(const QDateTime &datetime);
|
||||
void DateTime2Changed(const QDateTime &datetime);
|
||||
void DateChanged(const QDate &date);
|
||||
void TimeChanged(const QTime &time);
|
||||
void Date2Changed(const QDate &date);
|
||||
void Time2Changed(const QTime &time);
|
||||
void IgnoreDateChanged(int state);
|
||||
void IgnoreTimeChanged(int state);
|
||||
void RepeatChanged(int state);
|
||||
@@ -69,8 +71,11 @@ signals:
|
||||
|
||||
protected:
|
||||
QComboBox *_condition;
|
||||
QDateTimeEdit *_dateTime;
|
||||
QDateTimeEdit *_dateTime2;
|
||||
QDateEdit *_date;
|
||||
QTimeEdit *_time;
|
||||
QLabel *_separator;
|
||||
QDateEdit *_date2;
|
||||
QTimeEdit *_time2;
|
||||
QCheckBox *_ignoreDate;
|
||||
QCheckBox *_ignoreTime;
|
||||
QCheckBox *_repeat;
|
||||
@@ -78,6 +83,7 @@ protected:
|
||||
std::shared_ptr<MacroConditionDate> _entryData;
|
||||
|
||||
private:
|
||||
void SetWidgetStatus();
|
||||
void ShowSecondDateSelection(bool visible);
|
||||
bool _loading = true;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user