summaryrefslogblamecommitdiffstats
path: root/src/xsession.h
blob: aac80fd76d72d8465eefbeaddb2791a44cdd8f96 (plain) (tree)






























                                                           
                     












                                                             
#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() const;

    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_*/