diff --git a/.vscode/c_cpp_properties.json b/.vscode/c_cpp_properties.json index 779ce6d..238b7e5 100644 --- a/.vscode/c_cpp_properties.json +++ b/.vscode/c_cpp_properties.json @@ -4,7 +4,8 @@ "name": "Linux", "includePath": [ "${workspaceFolder}/**", - "/usr/include/qt" + "/usr/include/qt", + "/usr/include/qt/QtWidgets" ], "defines": [], "compilerPath": "/usr/bin/clang", diff --git a/src/core/CMakeLists.txt b/src/core/CMakeLists.txt index 78113b5..2c7f713 100644 --- a/src/core/CMakeLists.txt +++ b/src/core/CMakeLists.txt @@ -3,11 +3,6 @@ find_package(Boost 1.62 COMPONENTS date_time REQUIRED) find_package(SQLite3 REQUIRED) -#set(CORE_HEADERS -# entity.h -# database.h -#) - set(CORE_SOURCES database.cpp entity.cpp @@ -19,4 +14,5 @@ set(CORE_SOURCES add_library(core STATIC ${CORE_SOURCES}) target_link_libraries(core Boost::boost Boost::date_time) -target_link_libraries(core sqlite3) \ No newline at end of file +target_link_libraries(core sqlite3) +target_include_directories(core PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}) \ No newline at end of file diff --git a/src/gui/kima2.cpp b/src/gui/kima2.cpp index 372e273..cb210ef 100644 --- a/src/gui/kima2.cpp +++ b/src/gui/kima2.cpp @@ -1,5 +1,7 @@ #include "mainwindow.h" +#include + #include @@ -9,8 +11,8 @@ int main(int argc, char* argv[]) QApplication kimaApp{argc, argv}; - MainWindow mainWin{}; - mainWin.show(); + auto mainWin = std::make_unique(); + mainWin->show(); return kimaApp.exec(); } diff --git a/src/gui/mainwindow.cpp b/src/gui/mainwindow.cpp index c94ac19..d352cfe 100644 --- a/src/gui/mainwindow.cpp +++ b/src/gui/mainwindow.cpp @@ -2,5 +2,10 @@ MainWindow::MainWindow() { - ui.setupUi(this); -} \ No newline at end of file + ui_.setupUi(this); + + connect(ui_.actionQuit, &QAction::triggered, qApp, QApplication::quit); + + marketplace_ = std::make_unique(); +} + diff --git a/src/gui/mainwindow.h b/src/gui/mainwindow.h index 2cc3dad..943382c 100644 --- a/src/gui/mainwindow.h +++ b/src/gui/mainwindow.h @@ -1,9 +1,13 @@ #ifndef MAINWINDOW_H #define MAINWINDOW_H +#include + #include "ui_mainwindow.h" #include +#include + class MainWindow : public QMainWindow { Q_OBJECT @@ -12,7 +16,8 @@ class MainWindow : public QMainWindow MainWindow(); private: - Ui::MainWindow ui; + Ui::MainWindow ui_; + std::unique_ptr marketplace_; }; #endif \ No newline at end of file diff --git a/src/gui/mainwindow.ui b/src/gui/mainwindow.ui index ca4bfd5..79a4517 100644 --- a/src/gui/mainwindow.ui +++ b/src/gui/mainwindow.ui @@ -23,8 +23,36 @@ 24 + + + &Datei + + + + + + &Bearbeiten + + + + + + + + + .. + + + &Beenden + + + + + &Verkäufer... + + diff --git a/src/gui/sellerdialog.ui b/src/gui/sellerdialog.ui new file mode 100644 index 0000000..b789849 --- /dev/null +++ b/src/gui/sellerdialog.ui @@ -0,0 +1,115 @@ + + + sellerDialog + + + Qt::NonModal + + + + 0 + 0 + 400 + 300 + + + + Verkäufer Dialog + + + true + + + + + + + + + + + + + Neu + + + + + + + Bearbeiten + + + + + + + Löschen + + + + + + + Qt::Vertical + + + + 20 + 40 + + + + + + + + + + + + Qt::Horizontal + + + QDialogButtonBox::Cancel|QDialogButtonBox::Ok + + + + + + + + + buttonBox + accepted() + sellerDialog + accept() + + + 248 + 254 + + + 157 + 274 + + + + + buttonBox + rejected() + sellerDialog + reject() + + + 316 + 260 + + + 286 + 274 + + + + +