best so far
This commit is contained in:
parent
8865e6c7b7
commit
1787f701e9
@ -28,7 +28,6 @@ find_package(Qt6 REQUIRED COMPONENTS Widgets)
|
||||
set(CMAKE_AUTOMOC ON)
|
||||
set(CMAKE_AUTORCC ON)
|
||||
set(CMAKE_AUTOUIC ON)
|
||||
# qt_standard_project_setup()
|
||||
|
||||
file(GLOB_RECURSE SERVER_SOURCES "${CMAKE_SOURCE_DIR}/src/graph/server/*.cpp")
|
||||
file(GLOB_RECURSE SERVER_UI "${CMAKE_SOURCE_DIR}/src/graph/server/*.ui")
|
||||
@ -46,6 +45,6 @@ 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)
|
@ -9,16 +9,17 @@ namespace Ui {
|
||||
class MainWindow;
|
||||
}
|
||||
|
||||
namespace Graph::GUI {
|
||||
class MainWindow : public QMainWindow {
|
||||
Q_OBJECT
|
||||
public:
|
||||
explicit MainWindow(QWidget *parent = nullptr);
|
||||
~MainWindow();
|
||||
|
||||
private:
|
||||
QMenuBar *menuBar;
|
||||
QToolBar *toolbar;
|
||||
QStatusBar *statusBar;
|
||||
private slots:
|
||||
void on_actionExit_triggered();
|
||||
|
||||
private:
|
||||
Ui::MainWindow *ui;
|
||||
};
|
||||
};
|
||||
} // namespace Graph::GUI
|
||||
|
@ -1,10 +1,15 @@
|
||||
#include <graph/server/gui/mainwindow.h>
|
||||
#include <ui_mainwindow.h>
|
||||
|
||||
MainWindow::MainWindow(QWidget *parent) : QMainWindow(parent), ui(new Ui::MainWindow) {
|
||||
ui->setupUi(this);
|
||||
namespace Graph::GUI {
|
||||
MainWindow::MainWindow(QWidget *parent)
|
||||
: QMainWindow(parent), ui(new Ui::MainWindow) {
|
||||
ui->setupUi(this);
|
||||
}
|
||||
|
||||
MainWindow::~MainWindow() {
|
||||
delete ui;
|
||||
}
|
||||
MainWindow::~MainWindow() { delete ui; }
|
||||
|
||||
void MainWindow::on_actionExit_triggered() {
|
||||
this->close();
|
||||
}
|
||||
} // namespace Graph::GUI
|
||||
|
@ -13,10 +13,23 @@
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>640</width>
|
||||
<width>480</width>
|
||||
<height>480</height>
|
||||
</rect>
|
||||
</property>
|
||||
<widget class="QMenuBar" name="menuBar"/>
|
||||
<widget class="QMenuBar" name="menuBar">
|
||||
<widget class="QMenu" name="menuFile">
|
||||
<property name="title">
|
||||
<string>&File</string>
|
||||
</property>
|
||||
<addaction name="actionExit"/>
|
||||
</widget>
|
||||
<addaction name="menuFile"/>
|
||||
</widget>
|
||||
<action name="actionExit">
|
||||
<property name="text">
|
||||
<string>E&xit</string>
|
||||
</property>
|
||||
</action>
|
||||
<widget class="QToolBar" name="toolBar"/>
|
||||
<widget class="QWidget" name="centralWidget"/>
|
||||
<widget class="QStatusBar" name="statusBar"/>
|
||||
|
@ -9,7 +9,7 @@ int main(int argc, char** argv) {
|
||||
plugin.init((update_callback_t)1);
|
||||
|
||||
QApplication app(argc, argv);
|
||||
MainWindow window;
|
||||
Graph::GUI::MainWindow window;
|
||||
window.show();
|
||||
|
||||
return app.exec();
|
||||
|
Loading…
Reference in New Issue
Block a user