From 6117049617df720fb744a90773a3580b3450b005 Mon Sep 17 00:00:00 2001 From: Jan Darmochwal Date: Sat, 2 Oct 2010 18:50:09 +0200 Subject: Qt port is almost complete (at least it compiles) Major change: * struct DataEntry has become class Session with sub-classes XSession and VSession * functions from addInfo.cpp, addPrinters.cpp, addScanners.cpp, readLinSess.cpp, readXmlDir.cpp, runImage.cpp have been moved to XSession and VSession Several minor changes: * new files globals.h and globals.cpp for global variables (replaces constants.h and paths.h) * replaced (all) libxml2, (much) std:: and (most) boost:: stuff by Qt stuff Things left to do: * remove tons of debug printfs * show error messages on errors * tidy up anyoption stuff in main() * highlight session run previously * readGroupXml stuff * tree view (with "X Sessions" and "Virtual Sessions" sections) instead of list view for session selection --- src/xsession.h | 45 +++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 45 insertions(+) create mode 100644 src/xsession.h (limited to 'src/xsession.h') 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 +#include +#include +#include +#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 readSessions(const QString& path); + +private: + QString name_; + QString exec_; + QString comment_; + QString icon_; +}; + +#endif /*VMCHOOSER_XSESSION_H_*/ -- cgit v1.2.3-55-g7522