summaryrefslogtreecommitdiff
path: root/src/entry.cpp
diff options
context:
space:
mode:
authorLouie S <louie@example.com>2024-07-23 20:37:48 -0400
committerLouie S <louie@example.com>2024-07-23 20:37:48 -0400
commitc34930425fadfc4083067b9306159cd8e8ecf6c6 (patch)
treed9c09709f1b9cf7e9bcf098d48c7036044098a7d /src/entry.cpp
parentf820f439910ef0243e6b9aded293190341b058ac (diff)
Rearrange source file locations
Diffstat (limited to 'src/entry.cpp')
-rw-r--r--src/entry.cpp36
1 files changed, 0 insertions, 36 deletions
diff --git a/src/entry.cpp b/src/entry.cpp
deleted file mode 100644
index c95bbb0..0000000
--- a/src/entry.cpp
+++ /dev/null
@@ -1,36 +0,0 @@
-#include <QList>
-
-#include "entry.h"
-
-Entry::Entry(int id, int parent_id, QString desc, QDateTime due, QString due_alt, QUrl link, QString color, QString highlight, bool done, bool hidden) :
- id(id),
- parent_id(parent_id),
- desc(desc),
- due(due),
- due_alt(due_alt),
- link(link),
- color(color),
- highlight(highlight),
- done(done),
- hidden(hidden)
-{
-}
-
-QList<Entry> Entry::entries;
-
-bool Entry::compare(Entry a, Entry b) {
- // 1st level: sort not done before done
- if(a.done != b.done)
- return a.done < b.done;
- // next level: sort on due date
- if(a.due != b.due)
- return a.due < b.due;
- // next level: sort on alt due date
- if(a.due_alt != b.due_alt)
- return a.due_alt < b.due_alt;
- // next level: sort on description
- if(a.desc != b.desc)
- return a.desc < b.desc;
- // otherwise, sort on id
- return a.id < b.id;
-}