diff options
author | Nils Schwabe | 2014-03-03 15:14:20 +0100 |
---|---|---|
committer | Nils Schwabe | 2014-03-03 15:14:20 +0100 |
commit | 030d91e628a2ecd5634376c9c4d903a1fa0fb423 (patch) | |
tree | 227029e3b48deb1d4d01ce497d9ec3b8d47f7a61 /src/xsession.h | |
parent | Initial commit (diff) | |
download | vmchooser2-030d91e628a2ecd5634376c9c4d903a1fa0fb423.tar.gz vmchooser2-030d91e628a2ecd5634376c9c4d903a1fa0fb423.tar.xz vmchooser2-030d91e628a2ecd5634376c9c4d903a1fa0fb423.zip |
added files from vmchooser1
Diffstat (limited to 'src/xsession.h')
-rw-r--r-- | src/xsession.h | 49 |
1 files changed, 49 insertions, 0 deletions
diff --git a/src/xsession.h b/src/xsession.h new file mode 100644 index 0000000..1d36d64 --- /dev/null +++ b/src/xsession.h @@ -0,0 +1,49 @@ +#ifndef VMCHOOSER_XSESSION_H_ +#define VMCHOOSER_XSESSION_H_ + +#include <QString> +#include <QList> +#include <QDomDocument> +#include <QDir> +#include <QProcess> +#include "session.h" + +class XSession : public Session { + public: + void init(const QString& name, const QString& exec, + const QString& comment, const QString& icon); + bool init(const QString& filename); + + bool isActive() const; + bool isLocked() const; + bool isValid() const; + int priority() const; + + QString shortDescription() const { + return this->name_; + } + + QString description() const { + return this->comment_; + } + + QString icon() const; + + bool run() const; + + int type() const; + + bool operator<(const Session& other) const; + + static QList<Session*> readSessions(const QString& path); + + private: + QString name_; + QString exec_; + QString comment_; + QString icon_; + + QProcess *_process; +}; + +#endif /*VMCHOOSER_XSESSION_H_*/ |