-
Notifications
You must be signed in to change notification settings - Fork 0
/
mainwindow.h
68 lines (56 loc) · 1.41 KB
/
mainwindow.h
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
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
#ifndef MAINWINDOW_H
#define MAINWINDOW_H
#include <QMainWindow>
#include <QMediaPlayer>
#include <QMediaPlaylist>
#include <QLabel>
#include <QTableWidget>
#include <QSlider>
#include <QBoxLayout>
#include <QHeaderView>
#include <QKeyEvent>
#include <QMenuBar>
#include <QFileDialog>
#include <QTime>
#include <QFont>
#include <QFileInfo>
#include "mediabuttons.h"
#include "tag.h"
#include "fileref.h"
class MainWindow : public QMainWindow
{
Q_OBJECT
public:
MainWindow(QWidget *parent = 0);
~MainWindow();
public slots:
void sliderMoved(quint64 pos);
void updateSongLabel();
void loadPlaylist();
void savePlaylist();
void addSong();
void removeSong();
void clearSong();
private:
QString formatIntoTime(quint64);
void parseMetadata(QString s);
void seek(int seconds);
void keyPressEvent(QKeyEvent *event);
QMediaPlayer *mediaPlayer = nullptr;
QMediaPlaylist *mediaPlaylist = nullptr;
MediaButtons *mediaButtons = nullptr;
QLabel *currentSongName = nullptr;
QLabel *currentSongDuration = nullptr;
QSlider *seekSlider = nullptr;
QMenu *file = nullptr;
QMenu *edit = nullptr;
QTableWidget *playlistTable = nullptr;
QAction *open = nullptr;
QAction *save = nullptr;
QAction *add = nullptr;
QAction *remove = nullptr;
QAction *clear = nullptr;
QWidget *combinedLayout = nullptr;
bool repeat;
};
#endif // MAINWINDOW_H