commit 36c850fe4db042447ae8fbcd7ef6afa7bf09fc7c Author: Jesse Qu Date: Mon Mar 31 14:14:12 2025 +0800 first inital diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..48835df --- /dev/null +++ b/.gitignore @@ -0,0 +1,2 @@ +/build/ +*.user diff --git a/CMakeLists.txt b/CMakeLists.txt new file mode 100644 index 0000000..5a041c9 --- /dev/null +++ b/CMakeLists.txt @@ -0,0 +1,4 @@ +cmake_minimum_required(VERSION 3.19) +project(EventConfiguratorProject) + +add_subdirectory(apps) # EventConfigurator diff --git a/apps/CMakeLists.txt b/apps/CMakeLists.txt new file mode 100644 index 0000000..99ac68c --- /dev/null +++ b/apps/CMakeLists.txt @@ -0,0 +1,35 @@ +cmake_minimum_required(VERSION 3.19) +project(EventConfigurator LANGUAGES CXX) + +find_package(Qt6 6.5 REQUIRED COMPONENTS Core Widgets) + +qt_standard_project_setup() + +qt_add_executable(EventConfigurator + WIN32 MACOSX_BUNDLE + main.cpp + mainwindow.cpp + mainwindow.h + mainwindow.ui +) + +target_link_libraries(EventConfigurator + PRIVATE + Qt::Core + Qt::Widgets +) + +include(GNUInstallDirs) + +install(TARGETS EventConfigurator + BUNDLE DESTINATION . + RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} + LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} +) + +qt_generate_deploy_app_script( + TARGET EventConfigurator + OUTPUT_SCRIPT deploy_script + NO_UNSUPPORTED_PLATFORM_ERROR +) +install(SCRIPT ${deploy_script}) diff --git a/apps/main.cpp b/apps/main.cpp new file mode 100644 index 0000000..fd3e533 --- /dev/null +++ b/apps/main.cpp @@ -0,0 +1,11 @@ +#include "mainwindow.h" + +#include + +int main(int argc, char *argv[]) +{ + QApplication a(argc, argv); + MainWindow w; + w.show(); + return a.exec(); +} diff --git a/apps/mainwindow.cpp b/apps/mainwindow.cpp new file mode 100644 index 0000000..2740a6e --- /dev/null +++ b/apps/mainwindow.cpp @@ -0,0 +1,14 @@ +#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/apps/mainwindow.h b/apps/mainwindow.h new file mode 100644 index 0000000..f7a3da3 --- /dev/null +++ b/apps/mainwindow.h @@ -0,0 +1,23 @@ +#ifndef MAINWINDOW_H +#define MAINWINDOW_H + +#include + +QT_BEGIN_NAMESPACE +namespace Ui { +class MainWindow; +} +QT_END_NAMESPACE + +class MainWindow : public QMainWindow +{ + Q_OBJECT + +public: + MainWindow(QWidget *parent = nullptr); + ~MainWindow(); + +private: + Ui::MainWindow *ui; +}; +#endif // MAINWINDOW_H diff --git a/apps/mainwindow.ui b/apps/mainwindow.ui new file mode 100644 index 0000000..fb70ddf --- /dev/null +++ b/apps/mainwindow.ui @@ -0,0 +1,31 @@ + + + MainWindow + + + + 0 + 0 + 800 + 600 + + + + MainWindow + + + + + + 0 + 0 + 800 + 24 + + + + + + + +