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_AUTOMOC ON)
|
||||||
set(CMAKE_AUTORCC ON)
|
set(CMAKE_AUTORCC ON)
|
||||||
set(CMAKE_AUTOUIC 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_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")
|
||||||
|
@ -9,16 +9,17 @@ namespace Ui {
|
|||||||
class MainWindow;
|
class MainWindow;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
namespace Graph::GUI {
|
||||||
class MainWindow : public QMainWindow {
|
class MainWindow : public QMainWindow {
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
public:
|
public:
|
||||||
explicit MainWindow(QWidget *parent = nullptr);
|
explicit MainWindow(QWidget *parent = nullptr);
|
||||||
~MainWindow();
|
~MainWindow();
|
||||||
|
|
||||||
private:
|
private slots:
|
||||||
QMenuBar *menuBar;
|
void on_actionExit_triggered();
|
||||||
QToolBar *toolbar;
|
|
||||||
QStatusBar *statusBar;
|
|
||||||
|
|
||||||
|
private:
|
||||||
Ui::MainWindow *ui;
|
Ui::MainWindow *ui;
|
||||||
};
|
};
|
||||||
|
} // namespace Graph::GUI
|
||||||
|
@ -1,10 +1,15 @@
|
|||||||
#include <graph/server/gui/mainwindow.h>
|
#include <graph/server/gui/mainwindow.h>
|
||||||
#include <ui_mainwindow.h>
|
#include <ui_mainwindow.h>
|
||||||
|
|
||||||
MainWindow::MainWindow(QWidget *parent) : QMainWindow(parent), ui(new Ui::MainWindow) {
|
namespace Graph::GUI {
|
||||||
|
MainWindow::MainWindow(QWidget *parent)
|
||||||
|
: QMainWindow(parent), ui(new Ui::MainWindow) {
|
||||||
ui->setupUi(this);
|
ui->setupUi(this);
|
||||||
}
|
}
|
||||||
|
|
||||||
MainWindow::~MainWindow() {
|
MainWindow::~MainWindow() { delete ui; }
|
||||||
delete ui;
|
|
||||||
|
void MainWindow::on_actionExit_triggered() {
|
||||||
|
this->close();
|
||||||
}
|
}
|
||||||
|
} // namespace Graph::GUI
|
||||||
|
@ -13,10 +13,23 @@
|
|||||||
<x>0</x>
|
<x>0</x>
|
||||||
<y>0</y>
|
<y>0</y>
|
||||||
<width>640</width>
|
<width>640</width>
|
||||||
<width>480</width>
|
<height>480</height>
|
||||||
</rect>
|
</rect>
|
||||||
</property>
|
</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="QToolBar" name="toolBar"/>
|
||||||
<widget class="QWidget" name="centralWidget"/>
|
<widget class="QWidget" name="centralWidget"/>
|
||||||
<widget class="QStatusBar" name="statusBar"/>
|
<widget class="QStatusBar" name="statusBar"/>
|
||||||
|
@ -9,7 +9,7 @@ int main(int argc, char** argv) {
|
|||||||
plugin.init((update_callback_t)1);
|
plugin.init((update_callback_t)1);
|
||||||
|
|
||||||
QApplication app(argc, argv);
|
QApplication app(argc, argv);
|
||||||
MainWindow window;
|
Graph::GUI::MainWindow window;
|
||||||
window.show();
|
window.show();
|
||||||
|
|
||||||
return app.exec();
|
return app.exec();
|
||||||
|
Loading…
Reference in New Issue
Block a user