summaryrefslogtreecommitdiffstats
path: root/src/deadlinetype.h
diff options
context:
space:
mode:
authorSimon Rettberg2018-10-31 17:24:45 +0100
committerSimon Rettberg2018-10-31 17:24:45 +0100
commit8b1facbbcdecb205dcbe5864af782b584f757f2a (patch)
tree00bd07de0530541a1a742d29b4711469912cecfe /src/deadlinetype.h
parentIgnore logout/shutdown timeouts too far in the past (diff)
downloadbwlp-screensaver-8b1facbbcdecb205dcbe5864af782b584f757f2a.tar.gz
bwlp-screensaver-8b1facbbcdecb205dcbe5864af782b584f757f2a.tar.xz
bwlp-screensaver-8b1facbbcdecb205dcbe5864af782b584f757f2a.zip
Read messages from external files
Diffstat (limited to 'src/deadlinetype.h')
-rw-r--r--src/deadlinetype.h23
1 files changed, 23 insertions, 0 deletions
diff --git a/src/deadlinetype.h b/src/deadlinetype.h
new file mode 100644
index 0000000..ccf805d
--- /dev/null
+++ b/src/deadlinetype.h
@@ -0,0 +1,23 @@
+#ifndef DEADLINETYPE_H
+#define DEADLINETYPE_H
+
+#include <QString>
+
+class DeadlineType
+{
+
+public:
+ static const DeadlineType *Unknown;
+ static const DeadlineType *Shutdown;
+ static const DeadlineType *IdleKill;
+ static const DeadlineType *NoTimeout;
+ const QString& headerLine(bool isLocked) const { return _headerLine[isLocked ? 1 : 0]; }
+ const QString& bodyText(bool isLocked) const { return _bodyText[isLocked ? 1 : 0]; }
+
+private:
+ DeadlineType(const QString &name);
+ QString _headerLine[2];
+ QString _bodyText[2];
+};
+
+#endif // DEADLINETYPE_H