#ifndef CONF_H #define CONF_H #include #include #include #include #include #include #include #include #include #include #include #include "idm.h" class MenuItem : public QWidgetAction { Q_OBJECT private: QString str; QWidget *wid; QWidget *createWidget(QWidget *parent); public: MenuItem(const QString &label, QWidget *widget, QObject *parent = 0); }; class Conf : public QObject { Q_OBJECT private: enum DataType { LAST_PATH = 1, NEXT_FILE, VOLUME }; QString lastPath; bool nextFileState; int volumeValue; void sync(); QString confPath(); public slots: void setLastPath(const QString &path); void setNextFile(bool state); void setVolume(int value); public: QString getLastPath(); bool nextFile(); void populateOptionsMenu(QMenu *menu, QWidget *parent); int getVolume(); Conf(QObject *parent = 0); signals: void volume(int); }; #endif // CONF_H