2016-10-03 00:47:02 -04:00
|
|
|
#ifndef UI_H
|
|
|
|
#define UI_H
|
|
|
|
|
|
|
|
#include <QWidget>
|
2016-10-16 17:04:21 -04:00
|
|
|
#include <QMainWindow>
|
2016-10-03 00:47:02 -04:00
|
|
|
#include <QVBoxLayout>
|
|
|
|
#include <QHBoxLayout>
|
|
|
|
#include <QSlider>
|
|
|
|
#include <QLabel>
|
|
|
|
#include <QDir>
|
|
|
|
#include <QFile>
|
2016-10-10 13:29:41 -04:00
|
|
|
#include <QMediaPlayer>
|
|
|
|
#include <QFileDialog>
|
|
|
|
#include <QStringList>
|
|
|
|
#include <QMessageBox>
|
|
|
|
#include <QFont>
|
|
|
|
#include <QApplication>
|
|
|
|
#include <QTimer>
|
2016-10-16 17:04:21 -04:00
|
|
|
#include <QToolButton>
|
|
|
|
#include <QMenu>
|
|
|
|
#include <QSystemTrayIcon>
|
|
|
|
#include <QIcon>
|
2016-10-10 13:29:41 -04:00
|
|
|
|
|
|
|
#include "icon.h"
|
|
|
|
#include "../io/aud_file.h"
|
2016-10-16 17:04:21 -04:00
|
|
|
#include "../io/conf.h"
|
2016-10-03 00:47:02 -04:00
|
|
|
|
|
|
|
class Ui : public QWidget
|
|
|
|
{
|
|
|
|
Q_OBJECT
|
|
|
|
|
|
|
|
private:
|
|
|
|
|
2016-10-16 17:04:21 -04:00
|
|
|
QLabel *fileName;
|
|
|
|
QSlider *slider;
|
|
|
|
QMediaPlayer *player;
|
|
|
|
AudFile *ioDev;
|
|
|
|
QToolButton *settings;
|
|
|
|
QSystemTrayIcon *trayIcon;
|
|
|
|
Conf *conf;
|
|
|
|
QMenu *menu;
|
|
|
|
Icon *pausePlay;
|
|
|
|
Icon *open;
|
|
|
|
bool pressed;
|
2016-10-10 13:29:41 -04:00
|
|
|
|
|
|
|
private slots:
|
|
|
|
|
|
|
|
void error(QMediaPlayer::Error error);
|
|
|
|
void sliderPressed();
|
|
|
|
void sliderReleased();
|
|
|
|
void posChanged(qint64 pos);
|
2016-10-16 17:04:21 -04:00
|
|
|
void durChanged(qint64 len);
|
2016-10-10 13:29:41 -04:00
|
|
|
void openDialog();
|
|
|
|
void nextFile();
|
|
|
|
void play(const QString &path);
|
2016-10-03 00:47:02 -04:00
|
|
|
|
|
|
|
public:
|
|
|
|
|
|
|
|
Ui(const QStringList &args, QWidget *parent = 0);
|
|
|
|
};
|
|
|
|
|
|
|
|
#endif // UI_H
|