From 168d6f6cc900031687490a1c160d3958d4325ecc Mon Sep 17 00:00:00 2001 From: Michael Mandl Date: Sun, 20 May 2018 19:13:18 +0200 Subject: [PATCH] added genus tab --- source/CMakeLists.txt | 2 ++ source/Genus/CMakeLists.txt | 30 ++++++++++++++++++++++++++++++ source/Genus/GenusWidget.cpp | 14 ++++++++++++++ source/Genus/GenusWidget.h | 19 +++++++++++++++++++ source/Genus/GenusWidget.ui | 24 ++++++++++++++++++++++++ source/mainwindow.ui | 15 +++++++++++++-- 6 files changed, 102 insertions(+), 2 deletions(-) create mode 100644 source/Genus/CMakeLists.txt create mode 100644 source/Genus/GenusWidget.cpp create mode 100644 source/Genus/GenusWidget.h create mode 100644 source/Genus/GenusWidget.ui diff --git a/source/CMakeLists.txt b/source/CMakeLists.txt index 7a39d17..d3eefd8 100644 --- a/source/CMakeLists.txt +++ b/source/CMakeLists.txt @@ -36,7 +36,9 @@ target_include_directories(${PROJECT_NAME} target_link_libraries(${PROJECT_NAME} PRIVATE MetaData + Genus Qt5::Widgets ) add_subdirectory(MetaData) +add_subdirectory(Genus) diff --git a/source/Genus/CMakeLists.txt b/source/Genus/CMakeLists.txt new file mode 100644 index 0000000..793c888 --- /dev/null +++ b/source/Genus/CMakeLists.txt @@ -0,0 +1,30 @@ +cmake_minimum_required(VERSION 3.6) + +project(Genus LANGUAGES CXX) + +find_package(Qt5Widgets REQUIRED) + +set(CMAKE_AUTOMOC ON) + +qt5_wrap_ui(UI_HEADERS + GenusWidget.ui +) + +add_library(${PROJECT_NAME} + GenusWidget.cpp + ${UI_HEADERS} +) + +set_target_properties(${PROJECT_NAME} + PROPERTIES CXX_STANDARD 14 +) + +target_include_directories(${PROJECT_NAME} + PRIVATE + ${CMAKE_CURRENT_BINARY_DIR} +) + +target_link_libraries(${PROJECT_NAME} + PRIVATE + Qt5::Widgets +) diff --git a/source/Genus/GenusWidget.cpp b/source/Genus/GenusWidget.cpp new file mode 100644 index 0000000..84c1571 --- /dev/null +++ b/source/Genus/GenusWidget.cpp @@ -0,0 +1,14 @@ +#include "GenusWidget.h" +#include "ui_GenusWidget.h" + +GenusWidget::GenusWidget(QWidget *parent) + : QWidget(parent) + , ui(new Ui::GenusWidget) +{ + ui->setupUi(this); +} + +GenusWidget::~GenusWidget() +{ + delete ui; +} diff --git a/source/Genus/GenusWidget.h b/source/Genus/GenusWidget.h new file mode 100644 index 0000000..f7346d2 --- /dev/null +++ b/source/Genus/GenusWidget.h @@ -0,0 +1,19 @@ +#pragma once + +#include + +namespace Ui { + class GenusWidget; +}; + +class GenusWidget : public QWidget +{ + Q_OBJECT + +private: + Ui::GenusWidget *ui; + +public: + GenusWidget(QWidget *parent = nullptr); + ~GenusWidget(); +}; diff --git a/source/Genus/GenusWidget.ui b/source/Genus/GenusWidget.ui new file mode 100644 index 0000000..c06e810 --- /dev/null +++ b/source/Genus/GenusWidget.ui @@ -0,0 +1,24 @@ + + + GenusWidget + + + + 0 + 0 + 556 + 210 + + + + Form + + + + + + + + + + diff --git a/source/mainwindow.ui b/source/mainwindow.ui index d114134..4702310 100644 --- a/source/mainwindow.ui +++ b/source/mainwindow.ui @@ -30,10 +30,15 @@ - + - Tab 2 + Subtest 3: Genus + + + + + @@ -129,6 +134,12 @@
MetaData/MetaDataWidget.h
1 + + GenusWidget + QWidget +
Genus/GenusWidget.h
+ 1 +