moved meta-data to sub-project
parent
639e1b21e2
commit
441a01bdc3
|
@ -9,18 +9,16 @@ set(CMAKE_AUTORCC ON)
|
|||
|
||||
qt5_wrap_ui(UI_HEADERS
|
||||
mainwindow.ui
|
||||
MetaDataWidget.ui
|
||||
)
|
||||
qt5_add_resources(UI_RESOURCES
|
||||
mainwindow.qrc
|
||||
|
||||
qt5_add_resources(UI_RESOURCES
|
||||
mainwindow.qrc
|
||||
)
|
||||
|
||||
add_executable(${PROJECT_NAME}
|
||||
LogoTest.cpp
|
||||
DataModel.cpp
|
||||
MetaDataModel.cpp
|
||||
mainwindow.cpp
|
||||
MetaDataWidget.cpp
|
||||
${UI_HEADERS}
|
||||
${UI_RESOURCES}
|
||||
)
|
||||
|
@ -37,5 +35,8 @@ target_include_directories(${PROJECT_NAME}
|
|||
|
||||
target_link_libraries(${PROJECT_NAME}
|
||||
PRIVATE
|
||||
MetaData
|
||||
Qt5::Widgets
|
||||
)
|
||||
|
||||
add_subdirectory(MetaData)
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
#pragma once
|
||||
|
||||
#include "MetaDataModel.h"
|
||||
#include "MetaData/MetaDataModel.h"
|
||||
|
||||
#include <QJsonObject>
|
||||
|
||||
|
|
|
@ -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;
|
||||
case 2:
|
||||
if (value.toDate() != m_dateOfTest)
|
||||
if (value.toDate() != m_dateOfBirth)
|
||||
{
|
||||
m_dateOfTest = value.toDate();
|
||||
m_dateOfBirth = value.toDate();
|
||||
valueChanged = true;
|
||||
}
|
||||
break;
|
||||
case 3:
|
||||
if (value.toDate() != m_dateOfBirth)
|
||||
if (value.toDate() != m_dateOfTest)
|
||||
{
|
||||
m_dateOfBirth = value.toDate();
|
||||
m_dateOfTest = value.toDate();
|
||||
valueChanged = true;
|
||||
}
|
||||
break;
|
|
@ -2,7 +2,6 @@
|
|||
#include "ui_mainwindow.h"
|
||||
|
||||
#include "DataModel.h"
|
||||
#include "MetaDataModel.h"
|
||||
|
||||
#include <QJsonObject>
|
||||
#include <QJsonDocument>
|
||||
|
|
|
@ -103,7 +103,7 @@
|
|||
<customwidget>
|
||||
<class>MetaDataWidget</class>
|
||||
<extends>QWidget</extends>
|
||||
<header>MetaDataWidget.h</header>
|
||||
<header>MetaData/MetaDataWidget.h</header>
|
||||
<container>1</container>
|
||||
</customwidget>
|
||||
</customwidgets>
|
||||
|
|
Loading…
Reference in New Issue