summaryrefslogtreecommitdiff
path: root/src/rule.cpp
diff options
context:
space:
mode:
authorLouie S <louie@example.com>2024-03-09 16:53:38 -0500
committerLouie S <louie@example.com>2024-03-09 16:53:38 -0500
commitafcae23cbf63b31a7ce111ffcd76c027b332bdf9 (patch)
treee86001041d05e13cb778ada13c5a3addccf93a8d /src/rule.cpp
parent312ea44966ca5ee65185fc837d15143e7dd59761 (diff)
Break entry/group/rule into sub-classes
Diffstat (limited to 'src/rule.cpp')
-rw-r--r--src/rule.cpp32
1 files changed, 0 insertions, 32 deletions
diff --git a/src/rule.cpp b/src/rule.cpp
index 7cfcff2..d90a0db 100644
--- a/src/rule.cpp
+++ b/src/rule.cpp
@@ -1,8 +1,3 @@
-#include <QComboBox>
-#include <QDate>
-#include <QDateTimeEdit>
-#include <QLineEdit>
-
#include "rule.h"
Rule::Rule(int id, int entry_id, When when, QDateTime date, QString color, QString highlight) :
@@ -13,31 +8,4 @@ Rule::Rule(int id, int entry_id, When when, QDateTime date, QString color, QStri
color(color),
highlight(highlight)
{
- QComboBox *when_widget = new QComboBox;
- QDateTimeEdit *date_widget = new QDateTimeEdit(QDate::currentDate());
- QLineEdit *color_widget = new QLineEdit; // TODO consider making this a color selector widget
- QLineEdit *highlight_widget = new QLineEdit; // TODO consider making this a color selector widget
-
- QStringList when_options;
- when_options.append("Before");
- when_options.append("After");
- when_widget->addItems(when_options);
- when_widget->setCurrentIndex(this->when);
- this->addWidget(when_widget);
-
- date_widget->setDisplayFormat("MM/dd/yyyy");
- date_widget->setDateTime(this->date);
- this->addWidget(date_widget);
-
- this->addStretch();
-
- color_widget->setPlaceholderText("Color");
- if(!this->color.isEmpty())
- color_widget->setText(this->color);
- this->addWidget(color_widget);
-
- highlight_widget->setPlaceholderText("Highlight");
- if(!this->highlight.isEmpty())
- highlight_widget->setText(this->highlight);
- this->addWidget(highlight_widget);
}