diff --git a/.github/workflows/windows-msys2.yml b/.github/workflows/windows-msys2.yml
index 40c69da..f865140 100644
--- a/.github/workflows/windows-msys2.yml
+++ b/.github/workflows/windows-msys2.yml
@@ -16,7 +16,7 @@ jobs:
msystem: MINGW64
update: true
pacboy: >-
- toolchain:p ninja:p cmake:p extra-cmake-modules:p
+ toolchain:p ninja:p cmake:p extra-cmake-modules:p icoutils:p
qt5-static:p bison: flex:
- name: Build
run: |
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 4780b87..fba74bc 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -33,11 +33,11 @@ add_compile_definitions(PATH_VALSIZE=${PATH_VALSIZE})
add_executable(thplayer
main.cpp
- loopedpcmstreamer.cpp
- mainwindow.cpp
- outputselectiondialog.cpp
- songlist.cpp
- thdatwrapper.cpp
+ loopedpcmstreamer.cpp loopedpcmstreamer.hpp
+ mainwindow.cpp mainwindow.hpp
+ outputselectiondialog.cpp outputselectiondialog.hpp
+ songlist.cpp songlist.hpp
+ thdatwrapper.cpp thdatwrapper.hpp
mainwindow.ui
outputselectiondialog.ui
diff --git a/mainwindow.cpp b/mainwindow.cpp
index cb16860..02ff8cf 100644
--- a/mainwindow.cpp
+++ b/mainwindow.cpp
@@ -238,11 +238,6 @@ void MainWindow::seek()
st->seek_sample(ui->progressslider->value() / 100. * (cursong.length / 4.)); //TODO: don't hardcode the 4 here
}
-void MainWindow::on_playButton_clicked()
-{
- LoadFile(QFileDialog::getExistingDirectory(this, "Select game directory"));
-}
-
QAudioFormat MainWindow::getAudioFormat(unsigned rate)
{
QAudioFormat audioFormat;
@@ -368,3 +363,24 @@ void MainWindow::on_pauseButton_clicked(bool checked)
if (checked) audioOutput->suspend();
else audioOutput->resume();
}
+
+void MainWindow::on_action_Open_triggered()
+{
+ LoadFile(QFileDialog::getExistingDirectory(this, "Select game directory"));
+}
+
+
+void MainWindow::on_actionAbout_Qt_triggered()
+{
+ qApp->aboutQt();
+}
+
+
+void MainWindow::on_action_About_triggered()
+{
+ QMessageBox::about(this, "About TouHou Player",
+ QString("TouHou Player") + "\n"
+ "TouHou BGM player for all platform." + "\n\n" +
+ "https:://github.com/BearKidsTeam/thplayer");
+}
+
diff --git a/mainwindow.hpp b/mainwindow.hpp
index bba8777..c393118 100644
--- a/mainwindow.hpp
+++ b/mainwindow.hpp
@@ -74,12 +74,14 @@ private slots:
void dropEvent(QDropEvent *event);
void updateWidgets();
void seek();
- void on_playButton_clicked();
void on_playlistTable_doubleClicked(const QModelIndex &index);
void on_loopButton_clicked();
void on_prevButton_clicked();
void on_nextButton_clicked();
void on_pauseButton_clicked(bool checked);
+ void on_action_Open_triggered();
+ void on_actionAbout_Qt_triggered();
+ void on_action_About_triggered();
};
#endif // MAINWINDOW_H
diff --git a/mainwindow.ui b/mainwindow.ui
index 392a076..cc33d7e 100644
--- a/mainwindow.ui
+++ b/mainwindow.ui
@@ -22,13 +22,6 @@
- -
-
-
- Load
-
-
-
-
@@ -36,13 +29,6 @@
- -
-
-
- Next
-
-
-
-
@@ -112,26 +98,6 @@
- -
-
-
- Qt::Horizontal
-
-
-
- 40
- 20
-
-
-
-
- -
-
-
- Prev
-
-
-
-
@@ -146,7 +112,7 @@
- -
+
-
false
@@ -159,6 +125,33 @@
+ -
+
+
+ Prev
+
+
+
+ -
+
+
+ Next
+
+
+
+ -
+
+
+ Qt::Horizontal
+
+
+
+ 40
+ 20
+
+
+
+
+
+
+ &Open
+
+
+
+
+ About &Qt
+
+
+
+
+ &About...
+
+