summaryrefslogtreecommitdiffstats
path: root/beetplayer.h
blob: 6b75e299c1428a414e3851184dfe09743432458a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
#ifndef BEETPLAYER_H
#define BEETPLAYER_H

#include <QMediaPlayer>
#include <QMainWindow>

class QLabel;
class PlayerWidget;

class BeetPlayer : public QMainWindow {
    Q_OBJECT
    public:
        enum Tabs { Player = 0, Indexer = 1 };
        explicit BeetPlayer(QWidget *parent = nullptr, Qt::WindowFlags f = nullptr);

    public slots:
        void configure();
        void setPlayMode(const QString &playMode);
        void setNumFiles(int numFiles);
        void setPlayListLength(quint64 seconds);
        void setMessage(const QString &msg);

    protected:
        virtual void closeEvent(QCloseEvent *event);
        virtual void keyPressEvent(QKeyEvent *e);

    private:
        void openDatabase();
        void readSettings();
        void createGlobalActions();
        void createStatusbar();
        PlayerWidget *mPlayerWidget;
        QLabel *mActionL;
        QLabel *mFilesL;
        QLabel *mPlaylistDurL;
        QLabel *mGeneralL;
};

#endif // BEETPLAYER_H