moved meta-data to sub-project
This commit is contained in:
parent
639e1b21e2
commit
441a01bdc3
10 changed files with 43 additions and 12 deletions
|
@ -9,8 +9,8 @@ set(CMAKE_AUTORCC ON)
|
||||||
|
|
||||||
qt5_wrap_ui(UI_HEADERS
|
qt5_wrap_ui(UI_HEADERS
|
||||||
mainwindow.ui
|
mainwindow.ui
|
||||||
MetaDataWidget.ui
|
|
||||||
)
|
)
|
||||||
|
|
||||||
qt5_add_resources(UI_RESOURCES
|
qt5_add_resources(UI_RESOURCES
|
||||||
mainwindow.qrc
|
mainwindow.qrc
|
||||||
)
|
)
|
||||||
|
@ -18,9 +18,7 @@ qt5_wrap_ui(UI_HEADERS
|
||||||
add_executable(${PROJECT_NAME}
|
add_executable(${PROJECT_NAME}
|
||||||
LogoTest.cpp
|
LogoTest.cpp
|
||||||
DataModel.cpp
|
DataModel.cpp
|
||||||
MetaDataModel.cpp
|
|
||||||
mainwindow.cpp
|
mainwindow.cpp
|
||||||
MetaDataWidget.cpp
|
|
||||||
${UI_HEADERS}
|
${UI_HEADERS}
|
||||||
${UI_RESOURCES}
|
${UI_RESOURCES}
|
||||||
)
|
)
|
||||||
|
@ -37,5 +35,8 @@ target_include_directories(${PROJECT_NAME}
|
||||||
|
|
||||||
target_link_libraries(${PROJECT_NAME}
|
target_link_libraries(${PROJECT_NAME}
|
||||||
PRIVATE
|
PRIVATE
|
||||||
|
MetaData
|
||||||
Qt5::Widgets
|
Qt5::Widgets
|
||||||
)
|
)
|
||||||
|
|
||||||
|
add_subdirectory(MetaData)
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include "MetaDataModel.h"
|
#include "MetaData/MetaDataModel.h"
|
||||||
|
|
||||||
#include <QJsonObject>
|
#include <QJsonObject>
|
||||||
|
|
||||||
|
|
31
source/MetaData/CMakeLists.txt
Normal file
31
source/MetaData/CMakeLists.txt
Normal file
|
@ -0,0 +1,31 @@
|
||||||
|
cmake_minimum_required(VERSION 3.6)
|
||||||
|
|
||||||
|
project(MetaData LANGUAGES CXX)
|
||||||
|
|
||||||
|
find_package(Qt5Widgets REQUIRED)
|
||||||
|
|
||||||
|
set(CMAKE_AUTOMOC ON)
|
||||||
|
|
||||||
|
qt5_wrap_ui(UI_HEADERS
|
||||||
|
MetaDataWidget.ui
|
||||||
|
)
|
||||||
|
|
||||||
|
add_library(${PROJECT_NAME}
|
||||||
|
MetaDataModel.cpp
|
||||||
|
MetaDataWidget.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
|
||||||
|
)
|
|
@ -72,16 +72,16 @@ bool MetaDataModel::setData(
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case 2:
|
case 2:
|
||||||
if (value.toDate() != m_dateOfTest)
|
if (value.toDate() != m_dateOfBirth)
|
||||||
{
|
{
|
||||||
m_dateOfTest = value.toDate();
|
m_dateOfBirth = value.toDate();
|
||||||
valueChanged = true;
|
valueChanged = true;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case 3:
|
case 3:
|
||||||
if (value.toDate() != m_dateOfBirth)
|
if (value.toDate() != m_dateOfTest)
|
||||||
{
|
{
|
||||||
m_dateOfBirth = value.toDate();
|
m_dateOfTest = value.toDate();
|
||||||
valueChanged = true;
|
valueChanged = true;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
|
@ -2,7 +2,6 @@
|
||||||
#include "ui_mainwindow.h"
|
#include "ui_mainwindow.h"
|
||||||
|
|
||||||
#include "DataModel.h"
|
#include "DataModel.h"
|
||||||
#include "MetaDataModel.h"
|
|
||||||
|
|
||||||
#include <QJsonObject>
|
#include <QJsonObject>
|
||||||
#include <QJsonDocument>
|
#include <QJsonDocument>
|
||||||
|
|
|
@ -103,7 +103,7 @@
|
||||||
<customwidget>
|
<customwidget>
|
||||||
<class>MetaDataWidget</class>
|
<class>MetaDataWidget</class>
|
||||||
<extends>QWidget</extends>
|
<extends>QWidget</extends>
|
||||||
<header>MetaDataWidget.h</header>
|
<header>MetaData/MetaDataWidget.h</header>
|
||||||
<container>1</container>
|
<container>1</container>
|
||||||
</customwidget>
|
</customwidget>
|
||||||
</customwidgets>
|
</customwidgets>
|
||||||
|
|
Loading…
Reference in a new issue