This commit is contained in:
BENEDEK 2024-05-14 11:14:22 +02:00
parent 933cf3487a
commit 8865e6c7b7
4 changed files with 28 additions and 14 deletions

View File

@ -20,7 +20,7 @@ if(DEBUG)
endif() endif()
# build plugins # build plugins
include_directories("${CMAKE_SOURCE_DIR}/inc") include_directories("${CMAKE_SOURCE_DIR}/inc" "${CMAKE_SOURCE_DIR}/build")
add_subdirectory("${CMAKE_SOURCE_DIR}/src/graph/plugins") add_subdirectory("${CMAKE_SOURCE_DIR}/src/graph/plugins")
# build gui server # build gui server
@ -34,5 +34,18 @@ file(GLOB_RECURSE SERVER_SOURCES "${CMAKE_SOURCE_DIR}/src/graph/server/*.cpp")
file(GLOB_RECURSE SERVER_UI "${CMAKE_SOURCE_DIR}/src/graph/server/*.ui") file(GLOB_RECURSE SERVER_UI "${CMAKE_SOURCE_DIR}/src/graph/server/*.ui")
file(GLOB_RECURSE SERVER_RES "${CMAKE_SOURCE_DIR}/src/graph/server/*.qrc") file(GLOB_RECURSE SERVER_RES "${CMAKE_SOURCE_DIR}/src/graph/server/*.qrc")
file(GLOB_RECURSE SERVER_HEADERS "${CMAKE_SOURCE_DIR}/inc/graph/server/*.h") file(GLOB_RECURSE SERVER_HEADERS "${CMAKE_SOURCE_DIR}/inc/graph/server/*.h")
add_executable(server ${SERVER_SOURCES} ${SERVER_RES} ${SERVER_UI} ${SERVER_HEADERS})
cmake_print_variables(SERVER_SOURCES)
cmake_print_variables(SERVER_UI)
cmake_print_variables(SERVER_RES)
cmake_print_variables(SERVER_HEADERS)
qt_wrap_cpp(SERVER_GEN_SRC ${SERVER_SRC})
qt_wrap_ui(SERVER_GEN_UI ${SERVER_UI})
add_executable(server
${SERVER_SOURCES} ${SERVER_RES} ${SERVER_UI} ${SERVER_HEADERS}
${SERVER_GEN_SRC} ${SERVER_GEN_UI}
)
target_link_libraries(server PRIVATE dl Qt6::Widgets) target_link_libraries(server PRIVATE dl Qt6::Widgets)

View File

@ -2,8 +2,8 @@
#include <QMainWindow> #include <QMainWindow>
#include <QMenuBar> #include <QMenuBar>
#include <QToolBar>
#include <QStatusBar> #include <QStatusBar>
#include <QToolBar>
namespace Ui { namespace Ui {
class MainWindow; class MainWindow;
@ -14,6 +14,7 @@ class MainWindow : public QMainWindow {
public: public:
explicit MainWindow(QWidget *parent = nullptr); explicit MainWindow(QWidget *parent = nullptr);
~MainWindow(); ~MainWindow();
private: private:
QMenuBar *menuBar; QMenuBar *menuBar;
QToolBar *toolbar; QToolBar *toolbar;

View File

@ -1,10 +1,10 @@
#include <graph/server/gui/mainwindow.h> #include <graph/server/gui/mainwindow.h>
#include <ui_mainwindow.h>
MainWindow::MainWindow(QWidget *parent) : QMainWindow(parent) { MainWindow::MainWindow(QWidget *parent) : QMainWindow(parent), ui(new Ui::MainWindow) {
this->menuBar = new QMenuBar(); ui->setupUi(this);
setMenuBar(this->menuBar);
this->statusBar = new QStatusBar();
setStatusBar(this->statusBar);
} }
MainWindow::~MainWindow() {} MainWindow::~MainWindow() {
delete ui;
}

View File

@ -21,8 +21,8 @@
<widget class="QWidget" name="centralWidget"/> <widget class="QWidget" name="centralWidget"/>
<widget class="QStatusBar" name="statusBar"/> <widget class="QStatusBar" name="statusBar"/>
</widget> </widget>
<resource> <resources>
<include location="mainwindow.qrc"/> <include location="mainwindow.qrc"/>
</resource> </resources>
<connections/> <connections/>
</ui> </ui>