JustAudio/io/conf.h

76 lines
1.1 KiB
C
Raw Normal View History

#ifndef CONF_H
#define CONF_H
#include <QObject>
#include <QWidgetAction>
#include <QMenu>
#include <QSlider>
#include <QWidget>
#include <QHBoxLayout>
#include <QLabel>
#include <QCheckBox>
#include <QFile>
#include <QDir>
#include <QApplication>
#include "idm.h"
#include "../gui/icon.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