JustAudio/gui/ui.h
Maurice O'Neal 679fc61feb I've updated the icons to a new hallow outline transparent look. added
stop, next file, previous file buttons along with the added feasures the
buttons represent. i've also added png versions of all of the icons just
in case the svg versions are not practical to use. i also fully built
out a tray icon functionality so the application can now minimize to
system tray. also updated the app logo to a new flat icon type sinewave
look. then finally, i've added the restore button to the tray icon so it
will restore the window back in front from the tray.
2016-10-23 21:26:58 -04:00

77 lines
1.6 KiB
C++

#ifndef UI_H
#define UI_H
#include <QWidget>
#include <QMainWindow>
#include <QVBoxLayout>
#include <QHBoxLayout>
#include <QSlider>
#include <QLabel>
#include <QDir>
#include <QFile>
#include <QMediaPlayer>
#include <QFileDialog>
#include <QStringList>
#include <QMessageBox>
#include <QFont>
#include <QApplication>
#include <QTimer>
#include <QToolButton>
#include <QMenu>
#include <QSystemTrayIcon>
#include <QIcon>
#include <QEvent>
#include <QAction>
#include <QCloseEvent>
#include <QCoreApplication>
#include "icon.h"
#include "../io/aud_file.h"
#include "../io/conf.h"
class Ui : public QWidget
{
Q_OBJECT
private:
QLabel *fileName;
QSlider *slider;
QMediaPlayer *player;
AudFile *ioDev;
QToolButton *settings;
QSystemTrayIcon *trayIcon;
Conf *conf;
QMenu *menu;
QMenu *trayMenu;
Icon *pausePlay;
Icon *open;
Icon *next;
Icon *prev;
Icon *stop;
bool pressed;
void fileDir(char direction);
void changeEvent(QEvent *event);
void closeEvent(QCloseEvent *event);
private slots:
void error(QMediaPlayer::Error error);
void sliderPressed();
void sliderReleased();
void posChanged(qint64 pos);
void openDialog();
void nextFile();
void prevFile();
void stopPlayer();
void play(const QString &path);
void trayActivated(QSystemTrayIcon::ActivationReason reason);
public:
Ui(const QStringList &args, QWidget *parent = 0);
};
#endif // UI_H