commit 0cfcc1d5952f6360cc142410b3395ba8cca5cf4a Author: Michael Mandl Date: Thu May 10 18:41:14 2018 +0200 initial import diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..c55df6d --- /dev/null +++ b/.gitignore @@ -0,0 +1,2 @@ +compile_commands.json +_build diff --git a/CMakeLists.txt b/CMakeLists.txt new file mode 100644 index 0000000..908eff4 --- /dev/null +++ b/CMakeLists.txt @@ -0,0 +1,5 @@ +cmake_minimum_required(VERSION 3.5) + +set(CMAKE_EXPORT_COMPILE_COMMANDS ON) + +add_subdirectory(source) diff --git a/source/CMakeLists.txt b/source/CMakeLists.txt new file mode 100644 index 0000000..a28384f --- /dev/null +++ b/source/CMakeLists.txt @@ -0,0 +1,27 @@ +cmake_minimum_required(VERSION 3.6) + +project(LogoTest LANGUAGES CXX) + +find_package(Qt5Widgets REQUIRED) + +set(CMAKE_AUTOMOC ON) + +qt5_wrap_ui(UI_HEADERS + mainwindow.ui +) + +add_executable(${PROJECT_NAME} + LogoTest.cpp + mainwindow.cpp + ${UI_HEADERS} +) + +target_include_directories(${PROJECT_NAME} + PRIVATE + ${CMAKE_CURRENT_BINARY_DIR} +) + +target_link_libraries(${PROJECT_NAME} + PRIVATE + Qt5::Widgets +) diff --git a/source/LogoTest.cpp b/source/LogoTest.cpp new file mode 100644 index 0000000..30539a1 --- /dev/null +++ b/source/LogoTest.cpp @@ -0,0 +1,11 @@ +#include "mainwindow.h" +#include + +int main(int argc, char **argv) +{ + QApplication app(argc, argv); + MainWindow mainWindow; + mainWindow.show(); + + return app.exec(); +} diff --git a/source/mainwindow.cpp b/source/mainwindow.cpp new file mode 100644 index 0000000..c41b6fd --- /dev/null +++ b/source/mainwindow.cpp @@ -0,0 +1,16 @@ +#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/source/mainwindow.h b/source/mainwindow.h new file mode 100644 index 0000000..2847620 --- /dev/null +++ b/source/mainwindow.h @@ -0,0 +1,19 @@ +#pragma once + +#include + +namespace Ui { + class MainWindow; +}; + +class MainWindow : public QMainWindow +{ + Q_OBJECT + + public: + MainWindow(QWidget *parent = nullptr); + ~MainWindow(); + + private: + Ui::MainWindow *ui; +}; diff --git a/source/mainwindow.ui b/source/mainwindow.ui new file mode 100644 index 0000000..6e80a62 --- /dev/null +++ b/source/mainwindow.ui @@ -0,0 +1,31 @@ + + + MainWindow + + + + 0 + 0 + 800 + 600 + + + + MainWindow + + + + + + 0 + 0 + 800 + 19 + + + + + + + +