summaryrefslogtreecommitdiff
path: root/qmpmainwindow.hpp
diff options
context:
space:
mode:
authorGravatar Chris Xiong <chirs241097@gmail.com> 2015-12-27 23:25:05 +0800
committerGravatar Chris Xiong <chirs241097@gmail.com> 2015-12-27 23:25:05 +0800
commita17d580f623dfc3a6eb33c540203798d6200a5fc (patch)
tree765e611d8416754f6924fd89c8448d86acc4abc7 /qmpmainwindow.hpp
parent246949269f370fac5ddb581ee0598480d529a48a (diff)
downloadQMidiPlayer-a17d580f623dfc3a6eb33c540203798d6200a5fc.tar.xz
Ultimate truth. (WTF)
Diffstat (limited to 'qmpmainwindow.hpp')
-rw-r--r--qmpmainwindow.hpp58
1 files changed, 58 insertions, 0 deletions
diff --git a/qmpmainwindow.hpp b/qmpmainwindow.hpp
new file mode 100644
index 0000000..cfb740d
--- /dev/null
+++ b/qmpmainwindow.hpp
@@ -0,0 +1,58 @@
+#ifndef QMPMAINWINDOW_H
+#define QMPMAINWINDOW_H
+
+#include <QMainWindow>
+#include <QTimer>
+#include <QCloseEvent>
+#include <thread>
+#include <chrono>
+#include "qmpmidiplay.hpp"
+#include "qmpplistwindow.hpp"
+
+namespace Ui {
+ class qmpMainWindow;
+}
+
+class qmpMainWindow : public QMainWindow
+{
+ Q_OBJECT
+
+ public:
+ explicit qmpMainWindow(QWidget *parent = 0);
+ void closeEvent(QCloseEvent *event);
+ ~qmpMainWindow();
+
+ private slots:
+ void on_pbPlayPause_clicked();
+ void updateWidgets();
+
+ void on_hsTimer_sliderPressed();
+
+ void on_hsTimer_sliderReleased();
+
+ void on_vsMasterVol_valueChanged();
+
+ void on_pbStop_clicked();
+
+ void on_pbPList_clicked();
+ void on_pbPrev_clicked();
+
+ void on_pbNext_clicked();
+
+ public slots:
+ void dialogClosed();
+ void selectionChanged();
+
+ private:
+ Ui::qmpMainWindow *ui;
+ QTimer *timer;
+ bool playing,stopped,dragging;
+ std::thread *playerTh=NULL;
+ std::chrono::steady_clock::time_point st;
+ double offset;
+ CMidiPlayer *player;
+ qmpplistwindow *plistw;
+
+};
+
+#endif // QMPMAINWINDOW_HPP