diff --git a/CMakeLists.txt b/CMakeLists.txt index cca4778..f8ef89a 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -13,11 +13,11 @@ find_package(QT NAMES Qt6 Qt5 REQUIRED COMPONENTS Widgets) find_package(Qt${QT_VERSION_MAJOR} REQUIRED COMPONENTS Widgets) set(PROJECT_SOURCES - main.cpp - mainwindow.cpp - mainwindow.h - mainwindow.ui - res.qrc + src/main.cpp + src/mainWindow/mainWindow.cpp + src/mainWindow/mainWindow.h + src/mainWindow/mainWindow.ui + res/res.qrc ) if(${QT_VERSION_MAJOR} GREATER_EQUAL 6) diff --git a/main.cpp b/main.cpp deleted file mode 100644 index 643015e..0000000 --- a/main.cpp +++ /dev/null @@ -1,10 +0,0 @@ -#include "mainwindow.h" - -#include - -int main(int argc, char* argv[]) { - QApplication a(argc, argv); - MainWindow w; - w.show(); - return a.exec(); -} diff --git a/mainwindow.cpp b/mainwindow.cpp deleted file mode 100644 index 884912a..0000000 --- a/mainwindow.cpp +++ /dev/null @@ -1,11 +0,0 @@ -#include "mainwindow.h" -#include "./ui_mainwindow.h" - -MainWindow::MainWindow(QWidget* parent) : - QMainWindow(parent), ui(new Ui::MainWindow) { - ui->setupUi(this); -} - -MainWindow::~MainWindow() { - delete ui; -} diff --git a/img/README.md b/res/img/README.md similarity index 100% rename from img/README.md rename to res/img/README.md diff --git a/img/city.png b/res/img/city.png similarity index 100% rename from img/city.png rename to res/img/city.png diff --git a/img/crown.png b/res/img/crown.png similarity index 100% rename from img/crown.png rename to res/img/crown.png diff --git a/img/currentOn.png b/res/img/currentOn.png similarity index 100% rename from img/currentOn.png rename to res/img/currentOn.png diff --git a/img/donate_alipay.png b/res/img/donate_alipay.png similarity index 100% rename from img/donate_alipay.png rename to res/img/donate_alipay.png diff --git a/img/donate_wechat.png b/res/img/donate_wechat.png similarity index 100% rename from img/donate_wechat.png rename to res/img/donate_wechat.png diff --git a/img/erase.png b/res/img/erase.png similarity index 100% rename from img/erase.png rename to res/img/erase.png diff --git a/img/favicon.png b/res/img/favicon.png similarity index 100% rename from img/favicon.png rename to res/img/favicon.png diff --git a/img/github.png b/res/img/github.png similarity index 100% rename from img/github.png rename to res/img/github.png diff --git a/img/light.png b/res/img/light.png similarity index 100% rename from img/light.png rename to res/img/light.png diff --git a/img/mountain.png b/res/img/mountain.png similarity index 100% rename from img/mountain.png rename to res/img/mountain.png diff --git a/img/obstacle.png b/res/img/obstacle.png similarity index 100% rename from img/obstacle.png rename to res/img/obstacle.png diff --git a/img/options.png b/res/img/options.png similarity index 100% rename from img/options.png rename to res/img/options.png diff --git a/img/swamp.png b/res/img/swamp.png similarity index 100% rename from img/swamp.png rename to res/img/swamp.png diff --git a/res.qrc b/res/res.qrc similarity index 100% rename from res.qrc rename to res/res.qrc diff --git a/src/main.cpp b/src/main.cpp new file mode 100644 index 0000000..af3a55a --- /dev/null +++ b/src/main.cpp @@ -0,0 +1,10 @@ +#include "mainWindow/mainWindow.h" + +#include + +int main(int argc, char* argv[]) { + QApplication a(argc, argv); + MainWindow w; + w.show(); + return a.exec(); +} diff --git a/src/mainWindow/mainWindow.cpp b/src/mainWindow/mainWindow.cpp new file mode 100644 index 0000000..6de3c5c --- /dev/null +++ b/src/mainWindow/mainWindow.cpp @@ -0,0 +1,11 @@ +#include "mainWindow.h" +#include "./ui_mainWindow.h" + +MainWindow::MainWindow(QWidget* parent) : + QMainWindow(parent), ui(new Ui::MainWindow) { + ui->setupUi(this); +} + +MainWindow::~MainWindow() { + delete ui; +} diff --git a/mainwindow.h b/src/mainWindow/mainWindow.h similarity index 100% rename from mainwindow.h rename to src/mainWindow/mainWindow.h diff --git a/mainwindow.ui b/src/mainWindow/mainWindow.ui similarity index 97% rename from mainwindow.ui rename to src/mainWindow/mainWindow.ui index bc27a43..7c534b2 100644 --- a/mainwindow.ui +++ b/src/mainWindow/mainWindow.ui @@ -19,7 +19,7 @@ LocalGen 6.0.0 - + :/images/img/favicon.png:/images/img/favicon.png @@ -58,7 +58,7 @@ - :/images/img/favicon.png + :/images/img/favicon.png Qt::AlignmentFlag::AlignCenter @@ -293,7 +293,8 @@ - + +