added genus tab

This commit is contained in:
Michael Mandl 2018-05-20 19:13:18 +02:00
parent 668ddaa626
commit 168d6f6cc9
6 changed files with 102 additions and 2 deletions

View file

@ -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)

View file

@ -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
)

View file

@ -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;
}

View file

@ -0,0 +1,19 @@
#pragma once
#include <QWidget>
namespace Ui {
class GenusWidget;
};
class GenusWidget : public QWidget
{
Q_OBJECT
private:
Ui::GenusWidget *ui;
public:
GenusWidget(QWidget *parent = nullptr);
~GenusWidget();
};

View file

@ -0,0 +1,24 @@
<?xml version="1.0" encoding="UTF-8"?>
<ui version="4.0">
<class>GenusWidget</class>
<widget class="QWidget" name="GenusWidget">
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>556</width>
<height>210</height>
</rect>
</property>
<property name="windowTitle">
<string>Form</string>
</property>
<layout class="QVBoxLayout" name="verticalLayout">
<item>
<widget class="QTableView" name="tableView"/>
</item>
</layout>
</widget>
<resources/>
<connections/>
</ui>

View file

@ -30,10 +30,15 @@
</item>
</layout>
</widget>
<widget class="QWidget" name="tab_2">
<widget class="QWidget" name="GenusTab">
<attribute name="title">
<string>Tab 2</string>
<string>Subtest 3: Genus</string>
</attribute>
<layout class="QVBoxLayout" name="verticalLayout_3">
<item>
<widget class="GenusWidget" name="widget" native="true"/>
</item>
</layout>
</widget>
</widget>
</item>
@ -129,6 +134,12 @@
<header>MetaData/MetaDataWidget.h</header>
<container>1</container>
</customwidget>
<customwidget>
<class>GenusWidget</class>
<extends>QWidget</extends>
<header>Genus/GenusWidget.h</header>
<container>1</container>
</customwidget>
</customwidgets>
<resources>
<include location="mainwindow.qrc"/>