summaryrefslogtreecommitdiffstats
path: root/src/xsession.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/xsession.h')
-rw-r--r--src/xsession.h45
1 files changed, 45 insertions, 0 deletions
diff --git a/src/xsession.h b/src/xsession.h
new file mode 100644
index 0000000..f5b5049
--- /dev/null
+++ b/src/xsession.h
@@ -0,0 +1,45 @@
+#ifndef VMCHOOSER_XSESSION_H_
+#define VMCHOOSER_XSESSION_H_
+
+#include <QString>
+#include <QList>
+#include <QDomDocument>
+#include <QDir>
+#include "session.h"
+
+// TODO: check includes (in all files)
+// TODO: sort (operator<)
+
+class XSession : public Session {
+public:
+ bool init(const QString& name, const QString& exec,
+ const QString& comment, const QString& icon);
+
+ bool isActive() const;
+ bool isLocked() const;
+ int priority() const;
+
+ QString shortDescription() const {
+ return this->name_;
+ }
+
+ QString description() const {
+ return this->comment_;
+ }
+
+ QString icon() const;
+
+ bool run();
+
+ bool operator<(const Session& other) const;
+
+ static QList<Session*> readSessions(const QString& path);
+
+private:
+ QString name_;
+ QString exec_;
+ QString comment_;
+ QString icon_;
+};
+
+#endif /*VMCHOOSER_XSESSION_H_*/