refactoring...

This commit is contained in:
2020-09-05 01:22:09 +03:00
parent 5a49104273
commit 23b275d17d
65 changed files with 193 additions and 214 deletions

View File

@@ -1,20 +1,22 @@
cmake_minimum_required(VERSION 3.0) cmake_minimum_required(VERSION 3.0)
cmake_policy(SET CMP0017 NEW) # need include() with .cmake cmake_policy(SET CMP0017 NEW) # need include() with .cmake
project(qad) project(cd)
set(qad_MAJOR 1) set(cd_MAJOR 1)
set(qad_MINOR 9) set(cd_MINOR 0)
set(qad_REVISION 0) set(cd_REVISION 0)
set(qad_SUFFIX ) set(cd_SUFFIX )
set(qad_COMPANY SHS) set(cd_COMPANY SHS)
set(qad_DOMAIN org.SHS) set(cd_DOMAIN org.SHS)
if ("x${CMAKE_MODULE_PATH}" STREQUAL "x") if ("x${CMAKE_MODULE_PATH}" STREQUAL "x")
set(CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake") set(CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake")
endif() endif()
find_package(PIP REQUIRED)
include(SHSTKMacros) include(SHSTKMacros)
include(QtWraps) include(QtWraps)
shstk_begin_project(qad QAD) shstk_begin_project(cd CD)
include(SHSTKQtMacros) include(SHSTKQtMacros)
shstk_qt_founded(QtVersions) shstk_qt_founded(QtVersions)
@@ -23,43 +25,41 @@ foreach(_v ${_QT_VERSIONS_})
option(Qt${_v} "Build for Qt${_v}" ON) option(Qt${_v} "Build for Qt${_v}" ON)
endforeach() endforeach()
if (NOT DEFINED ANDROID_PLATFORM)
find_package(OpenGL REQUIRED)
endif()
#include_directories(${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_BINARY_DIR})
option(UTILS "Build various utils" ${_plugins_default_}) option(UTILS "Build various utils" ${_plugins_default_})
option(DESIGNER_PLUGINS "Build Qt designer plugins" ${_plugins_default_})
macro(qad_library NAME _MODULES _LIBS) macro(cd_library NAME _MODULES _LIBS)
shstk_qt_project(qad_${NAME} FALSE "qad" "${_MODULES}" "${_LIBS}" ${ARGN}) shstk_qt_project(cd_${NAME} FALSE "cd" "${_MODULES}" "${_LIBS}" ${ARGN})
shstk_qt_install("qad" FALSE qad_${NAME} "${out_HDR}" "${out_QM}") shstk_qt_install("cd" FALSE cd_${NAME} "${out_HDR}" "${out_QM}")
endmacro() endmacro()
macro(qad_application NAME _MODULES _LIBS) macro(cd_application NAME _MODULES _LIBS)
shstk_qt_project(${NAME} TRUE "qad" "${_MODULES}" "${_LIBS}" ${ARGN}) shstk_qt_project(${NAME} TRUE "cd" "${_MODULES}" "${_LIBS}" ${ARGN})
shstk_qt_install("qad" TRUE ${NAME} "" "${out_QM}") shstk_qt_install("cd" TRUE ${NAME} "" "${out_QM}")
endmacro() endmacro()
macro(qad_plugin NAME _MODULES _LIBS) macro(cd_plugin NAME _MODULES _LIBS)
shstk_qt_plugin(qad_${NAME} "${_MODULES}" "qad_${NAME};${_LIBS}") shstk_qt_plugin(cd_${NAME} "${_MODULES}" "cd_${NAME};${_LIBS}")
endmacro() endmacro()
shstk_install(qad FALSE "" "${QAD_VERSION_FILE}") shstk_install(cd FALSE "" "${CD_VERSION_FILE}")
if (NOT LOCAL) if (NOT LOCAL)
file(GLOB CMAKES "cmake/*.cmake" "cmake/*.in") file(GLOB CMAKES "cmake/*.cmake" "cmake/*.in")
install(FILES ${CMAKES} DESTINATION ${CMAKE_ROOT}/Modules) install(FILES ${CMAKES} DESTINATION ${CMAKE_ROOT}/Modules)
endif() endif()
set(_qt_libs cd_core)
set(_qt_plugs)
set(_qt_apps )
add_subdirectory(libs) add_subdirectory(libs)
if (UTILS) if (UTILS)
add_subdirectory(utils) add_subdirectory(utils)
endif() endif()
message("----------QAD----------") message("----------CD-----------")
message(" Build for ${QtVersions}") message(" Build for ${QtVersions}")
message(" Linkage: ${qad_LIB_TYPE_MSG}") message(" Linkage: ${cd_LIB_TYPE_MSG}")
message(" Type : ${qad_BUILD_TYPE}") message(" Type : ${cd_BUILD_TYPE}")
message(" Install: \"${CMAKE_INSTALL_PREFIX}\"") message(" Install: \"${CMAKE_INSTALL_PREFIX}\"")
message("") message("")
print_list("${_qt_libs}" " Libraries:" " * ") print_list("${_qt_libs}" " Libraries:" " * ")

View File

@@ -1,16 +1,8 @@
#[[ #[[
Create imported targets: Create imported targets:
* QAD::Utils * CD::Core
* QAD::Widgets * CD::Qt
* QAD::Application
* QAD::Blockview
* QAD::Graphic
* QAD::SQLTable
* QAD::TouchWidgets
* QAD::Doc
* QAD::PIQt
* QAD::PIQtUtils
These targets include directories and dependencies These targets include directories and dependencies
@@ -18,124 +10,128 @@ These targets include directories and dependencies
cmake_policy(SET CMP0011 NEW) # don`t affect includer policies cmake_policy(SET CMP0011 NEW) # don`t affect includer policies
cmake_policy(SET CMP0020 NEW) # Automatically link Qt executables to qtmain target on Windows cmake_policy(SET CMP0020 NEW) # Automatically link Qt executables to qtmain target on Windows
if(NOT BUILDING_qad) find_package(PIP REQUIRED)
find_package(PIP QUIET) find_package(QAD QUIET)
include(QtWraps) include(QtWraps)
include(SHSTKMacros) include(SHSTKMacros)
endif()
shstk_is_parent_exists(hasParent PARENT_DIRECTORY) shstk_is_parent_exists(hasParent PARENT_DIRECTORY)
set(_SEARCH_DIR)
if(WIN32) shstk_set_find_dirs(cd)
find_package(MinGW REQUIRED) set(_SEARCH_DIR ${cd_LIBDIR})
if (NOT BUILDING_cd)
list(APPEND _SEARCH_DIR $ENV{SMSDK_DIR}/lib)
shstk_find_header(cd CD "cd_version.h" "")
endif() endif()
shstk_set_find_dirs(qad) if(CD_FIND_VERSION VERSION_GREATER CD_VERSION)
message(FATAL_ERROR "CD version ${CD_VERSION} is available, but ${CD_FIND_VERSION} requested!")
if (NOT BUILDING_qad)
find_file(QAD_H_INCLUDE "qad_types.h" HINTS ${PIP_DIR}/include/qad ${qad_INCDIR} $ENV{SMSDK_DIR}/include/qad)
#if (DEFINED ANDROID_PLATFORM)
# set(QAD_INCLUDES ${ANDROID_SYSTEM_LIBRARY_PATH}/usr/include/qad)
#else()
get_filename_component(QAD_INCLUDES ${QAD_H_INCLUDE} PATH)
#endif()
set(_SEARCH_DIR ${qad_LIBDIR} $ENV{SMSDK_DIR}/lib)
shstk_find_header(QAD "qad_version.h" "")
endif() endif()
if(QAD_FIND_VERSION VERSION_GREATER QAD_VERSION)
message(FATAL_ERROR "QAD version ${QAD_VERSION} is available, but ${QAD_FIND_VERSION} requested!")
endif()
set(__libs "utils;widgets;application;blockview;graphic;sql_table;touch_widgets;doc") set(__libs "core")
if (PIP_FOUND OR BUILDING_pip)
list(APPEND __libs "piqt;piqt_utils")
endif()
set(__module_utils Utils ) set(__module_core Core)
set(__module_widgets Widgets ) set( __inc_core "")
set(__module_application Application ) set(__libs_core "")
set(__module_blockview Blockview ) set(__deps_core "PIP")
set(__module_graphic Graphic )
set(__module_sql_table SQLTable )
set(__module_touch_widgets TouchWidgets )
set(__module_doc Doc )
set(__module_piqt PIQt )
set(__module_piqt_utils PIQtUtils )
foreach (_l ${__libs}) if (BUILDING_cd)
set( __inc_${_l} "")
set(__deps_${_l} "")
set(__libs_${_l} "")
endforeach()
set(__deps_widgets "QAD::Utils") if (NOT SET_TARGETS_cd)
set(__deps_application "QAD::Widgets") message("create aliases")
set(__deps_blockview "QAD::Widgets") foreach (_l ${__libs})
set(__deps_graphic "QAD::Widgets") set(_m ${__module_${_l}})
set(__deps_sql_table "QAD::Widgets") if((NOT TARGET CD::${_m}) AND TARGET cd_${_l})
set(__deps_piqt "QAD::Widgets;PIP") message("alias CD::${_m} = cd_${_l}")
set(__deps_piqt_utils "QAD::Blockview;QAD::PIQt") add_library(CD::${_m} ALIAS cd_${_l})
endif()
#message("find QAD ${BUILDING_qad}")
if (BUILDING_qad)
if (NOT SET_TARGETS_qad)
set(SET_TARGETS_qad ON CACHE BOOL "")
#message("create aliases")
foreach(_l ${__libs})
foreach(_v ${_QT_VERSIONS_})
set(_m ${__module_${_l}})
string(REPLACE ":" "_" _m_str "${_m}")
if((NOT TARGET QAD::${_m}${_v}) AND TARGET qad_${_l}${_v})
#message("alias QAD::${_m}${_v} = qad_${_l}${_v}")
set(MULTILIB_qad_${_l}_SUFFIX_Qt${_v} ${_v} CACHE STRING "")
add_library(QAD::${_m}${_v} ALIAS qad_${_l}${_v})
endif()
endforeach()
list(APPEND QT_MULTILIB_LIST QAD::${_m})
endforeach() endforeach()
endif() endif()
set(QAD_FOUND ON CACHE BOOL "")
else() else()
#message("create interfaces") message("create interfaces")
foreach(_l ${__libs}) foreach (_l ${__libs})
foreach(_v ${_QT_VERSIONS_}) set(_m ${__module_${_l}})
set(_m ${__module_${_l}}) find_library(CD_LIBRARY_${_l} cd_${_l} HINTS ${_SEARCH_DIR})
string(REPLACE ":" "_" _m_str "${_m}") if((NOT TARGET CD::${_m}) AND CD_LIBRARY_${_l})
find_library(QAD_LIBRARY_${_l}${_v} qad_${_l}${_v} HINTS ${qad_LIBDIR}) add_library(CD::${_m} UNKNOWN IMPORTED)
#message("found ${_l}${_v} = ${QAD_LIBRARY_${_l}${_v}}") set_target_properties(CD::${_m} PROPERTIES
if((NOT TARGET QAD::${_m}${_v}) AND QAD_LIBRARY_${_l}${_v}) IMPORTED_LOCATION "${CD_LIBRARY_${_l}}"
#message("imported QAD::${_m}${_v} = ${QAD_LIBRARY_${_l}${_v}}") INTERFACE_INCLUDE_DIRECTORIES "${cd_INCLUDES};${__inc_${_l}}"
set(MULTILIB_qad_${_l}_SUFFIX_Qt${_v} ${_v} CACHE STRING "") INTERFACE_LINK_LIBRARIES "${__deps_${_l}};${__libs_${_l}}")
add_library(QAD::${_m}${_v} UNKNOWN IMPORTED) message("imported CD::${_m} = ${CD_LIBRARY_${_l}} ${__deps_${_l}} ${__libs_${_l}} ${__inc_${_l}}")
set(_deps) endif()
foreach (_d ${__deps_${_l}})
if (${_d} MATCHES "QAD::*")
list(APPEND _deps ${_d}${_v})
else()
list(APPEND _deps ${_d})
endif()
endforeach()
set_target_properties(QAD::${_m}${_v} PROPERTIES
IMPORTED_LOCATION "${QAD_LIBRARY_${_l}${_v}}"
INTERFACE_INCLUDE_DIRECTORIES "${QAD_INCLUDES}"
INTERFACE_LINK_LIBRARIES "${_deps}")
endif()
endforeach()
list(APPEND QT_MULTILIB_LIST QAD::${_m})
endforeach() endforeach()
endif() endif()
if(hasParent)
set(QT_MULTILIB_LIST ${QT_MULTILIB_LIST} PARENT_SCOPE) if (QAD_FOUND OR BUILDING_qad)
set(__libs "qt")
set(__module_qt Qt)
set( __inc_qt "")
set(__libs_qt "")
set(__deps_qt "QAD::PIQt;QAD::Graphic;CD::Core")
if (BUILDING_cd)
if (NOT SET_TARGETS_cd)
set(SET_TARGETS_cd ON CACHE BOOL "")
message("create aliases")
foreach(_l ${__libs})
foreach(_v ${_QT_VERSIONS_})
set(_m ${__module_${_l}})
if((NOT TARGET CD::${_m}${_v}) AND TARGET cd_${_l}${_v})
message("alias CD::${_m}${_v} = cd_${_l}${_v}")
set(MULTILIB_CD__${_m}_SUFFIX_Qt${_v} ${_v} CACHE STRING "")
add_library(CD::${_m}${_v} ALIAS cd_${_l}${_v})
endif()
endforeach()
list(APPEND QT_MULTILIB_LIST CD::${_m})
endforeach()
endif()
else()
message("create interfaces")
foreach(_l ${__libs})
foreach(_v ${_QT_VERSIONS_})
set(_m ${__module_${_l}})
find_library(CD_LIBRARY_${_l}${_v} cd_${_l}${_v} HINTS ${cd_LIBDIR})
#message("found ${_l}${_v} = ${CD_LIBRARY_${_l}${_v}}")
if((NOT TARGET CD::${_m}${_v}) AND CD_LIBRARY_${_l}${_v})
message("imported CD::${_m}${_v} = ${CD_LIBRARY_${_l}${_v}}")
set(MULTILIB_CD__${_m}_SUFFIX_Qt${_v} ${_v} CACHE STRING "")
add_library(CD::${_m}${_v} UNKNOWN IMPORTED)
set(_deps)
foreach (_d ${__deps_${_l}})
if (${_d} MATCHES "CD::*")
list(APPEND _deps ${_d}${_v})
else()
list(APPEND _deps ${_d})
endif()
endforeach()
set_target_properties(CD::${_m}${_v} PROPERTIES
IMPORTED_LOCATION "${CD_LIBRARY_${_l}${_v}}"
INTERFACE_INCLUDE_DIRECTORIES "${cd_INCLUDES}"
INTERFACE_LINK_LIBRARIES "${_deps}")
endif()
endforeach()
list(APPEND QT_MULTILIB_LIST CD::${_m})
endforeach()
endif()
if(hasParent)
set(QT_MULTILIB_LIST ${QT_MULTILIB_LIST} PARENT_SCOPE)
endif()
endif() endif()
set(QAD_FOUND ON CACHE BOOL "")
set(CD_FOUND ON CACHE BOOL "")

View File

@@ -1 +1,2 @@
add_directories_with_include("qad_") list(APPEND QT_MULTILIB_LIST cd_qt)
shstk_add_directories_with_include(FALSE "cd_")

View File

@@ -1,37 +0,0 @@
cmake_minimum_required(VERSION 3.0)
project(cd_utils)
find_package(MinGW REQUIRED)
include_directories(${CMAKE_CURRENT_BINARY_DIR} ${CMAKE_CURRENT_SOURCE_DIR} ${PIP_INCLUDES})
file(GLOB CPPS_UTILS "cdutils_*.cpp")
file(GLOB HDRS_UTILS "cdutils_*.h")
add_library(${PROJECT_NAME} SHARED ${CPPS_UTILS} ${HDRS_UTILS})
target_link_libraries(${PROJECT_NAME} ${PIP_LIBRARY})
generate_export_header(${PROJECT_NAME})
list(APPEND HDRS_UTILS "${CMAKE_CURRENT_BINARY_DIR}/${PROJECT_NAME}_export.h")
add_executable(cdutilstest "cdutilstest.cpp" "cdtest.h")
target_link_libraries(cdutilstest ${PIP_LIBRARY} ${PROJECT_NAME})
message(STATUS "Building ${PROJECT_NAME}")
if(LIB)
list(APPEND _ALL_TARGETS ${PROJECT_NAME})
set(_ALL_TARGETS ${_ALL_TARGETS} PARENT_SCOPE)
if(WIN32)
install(FILES ${HDRS_UTILS} DESTINATION ${MINGW_INCLUDE})
install(TARGETS ${PROJECT_NAME} ARCHIVE DESTINATION ${MINGW_LIB})
install(TARGETS ${PROJECT_NAME} RUNTIME DESTINATION ${MINGW_BIN})
else()
install(FILES ${HDRS_UTILS} DESTINATION ${CMAKE_INSTALL_PREFIX}/include)
install(TARGETS ${PROJECT_NAME} DESTINATION ${CMAKE_INSTALL_PREFIX}/lib)
endif()
#message(STATUS "Install ${PROJECT_NAME} to system \"${CMAKE_INSTALL_PREFIX}\"")
else()
if(WIN32)
install(TARGETS ${PROJECT_NAME} RUNTIME DESTINATION bin)
install(TARGETS ${PROJECT_NAME} ARCHIVE DESTINATION lib)
else()
install(TARGETS ${PROJECT_NAME} DESTINATION lib)
endif()
install(FILES ${HDRS_UTILS} DESTINATION include)
#message(STATUS "Install ${PROJECT_NAME} to local \"bin\"")
endif()

19
libs/core/CMakeLists.txt Normal file
View File

@@ -0,0 +1,19 @@
cmake_minimum_required(VERSION 3.0)
project(cd_core)
include_directories(${CMAKE_CURRENT_BINARY_DIR} ${CMAKE_CURRENT_SOURCE_DIR} ${PIP_INCLUDES})
file(GLOB CPPS "cdutils_*.cpp")
file(GLOB HDRS "cdutils_*.h")
import_version(${PROJECT_NAME} cd)
set_deploy_property(${PROJECT_NAME} ${cd_LIB_TYPE}
LABEL "Core CD library"
FULLNAME "${cd_DOMAIN}.${PROJECT_NAME}"
COMPANY "${cd_COMPANY}"
INFO "Control & Debug library")
make_rc(${PROJECT_NAME} _RC)
add_library(${PROJECT_NAME} ${cd_LIB_TYPE} ${CPPS} ${HDRS} ${_RC})
target_include_directories(${PROJECT_NAME} PUBLIC ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_BINARY_DIR})
target_link_libraries(${PROJECT_NAME} PIP)
generate_export_header(${PROJECT_NAME})
list(APPEND HDRS "${CMAKE_CURRENT_BINARY_DIR}/${PROJECT_NAME}_export.h")
shstk_install("qad" FALSE ${PROJECT_NAME} "${HDRS}")

View File

@@ -21,13 +21,13 @@
#define CDUTILS_C_H #define CDUTILS_C_H
#include "cdutils_interface.h" #include "cdutils_interface.h"
#include "cd_utils_export.h" #include "cd_core_export.h"
namespace CDUtils { namespace CDUtils {
class CD_UTILS_EXPORT CInterface: public Interface class CD_CORE_EXPORT CInterface: public Interface
{ {
PIOBJECT_SUBCLASS(CInterface, Interface) PIOBJECT_SUBCLASS(CInterface, Interface)
public: public:
@@ -41,6 +41,6 @@ public:
} }
extern CD_UTILS_EXPORT CDUtils::CInterface C; extern CD_CORE_EXPORT CDUtils::CInterface C;
#endif // CDUTILS_C_H #endif // CDUTILS_C_H

View File

@@ -24,7 +24,7 @@
#include "cdutils_protocol.h" #include "cdutils_protocol.h"
#include "piconnection.h" #include "piconnection.h"
#include "pidatatransfer.h" #include "pidatatransfer.h"
#include "cd_utils_export.h" #include "cd_core_export.h"
namespace CDUtils { namespace CDUtils {
@@ -32,7 +32,7 @@ namespace CDUtils {
class CDCore; class CDCore;
class CD_UTILS_EXPORT __Core_Initializer__ { class CD_CORE_EXPORT __Core_Initializer__ {
public: public:
__Core_Initializer__(); __Core_Initializer__();
~__Core_Initializer__(); ~__Core_Initializer__();
@@ -41,7 +41,7 @@ public:
}; };
class CD_UTILS_EXPORT CDCore: public PIObject class CD_CORE_EXPORT CDCore: public PIObject
{ {
PIOBJECT(CDUtils::CDCore) PIOBJECT(CDUtils::CDCore)
friend class __Core_Initializer__; friend class __Core_Initializer__;

View File

@@ -22,7 +22,7 @@
#include "cdutils_types.h" #include "cdutils_types.h"
#include "piobject.h" #include "piobject.h"
#include "cd_utils_export.h" #include "cd_core_export.h"
namespace CDUtils { namespace CDUtils {
@@ -30,7 +30,7 @@ namespace CDUtils {
class CDCore; class CDCore;
class CD_UTILS_EXPORT Interface: public PIObject class CD_CORE_EXPORT Interface: public PIObject
{ {
PIOBJECT(CDUtils::Interface) PIOBJECT(CDUtils::Interface)
public: public:

View File

@@ -21,13 +21,13 @@
#define CDUTILS_K_H #define CDUTILS_K_H
#include "cdutils_interface.h" #include "cdutils_interface.h"
#include "cd_utils_export.h" #include "cd_core_export.h"
namespace CDUtils { namespace CDUtils {
class CD_UTILS_EXPORT KInterface: public Interface class CD_CORE_EXPORT KInterface: public Interface
{ {
PIOBJECT_SUBCLASS(KInterface, Interface) PIOBJECT_SUBCLASS(KInterface, Interface)
public: public:
@@ -42,6 +42,6 @@ public:
} }
extern CD_UTILS_EXPORT CDUtils::KInterface K; extern CD_CORE_EXPORT CDUtils::KInterface K;
#endif // CDUTILS_K_H #endif // CDUTILS_K_H

View File

@@ -21,13 +21,13 @@
#define CDUTILS_M_H #define CDUTILS_M_H
#include "cdutils_interface.h" #include "cdutils_interface.h"
#include "cd_utils_export.h" #include "cd_core_export.h"
namespace CDUtils { namespace CDUtils {
class CD_UTILS_EXPORT MInterface: public Interface class CD_CORE_EXPORT MInterface: public Interface
{ {
PIOBJECT_SUBCLASS(MInterface, Interface) PIOBJECT_SUBCLASS(MInterface, Interface)
public: public:
@@ -51,6 +51,6 @@ private:
} }
extern CD_UTILS_EXPORT CDUtils::MInterface M; extern CD_CORE_EXPORT CDUtils::MInterface M;
#endif // CDUTILS_M_H #endif // CDUTILS_M_H

View File

@@ -20,7 +20,7 @@
#ifndef CDUTILS_PARSER_H #ifndef CDUTILS_PARSER_H
#define CDUTILS_PARSER_H #define CDUTILS_PARSER_H
#include "cd_utils_export.h" #include "cd_core_export.h"
class PIIODevice; class PIIODevice;
@@ -30,7 +30,7 @@ class CDSection;
namespace CDParser { namespace CDParser {
CD_UTILS_EXPORT CDSection parse(PIIODevice * d, int cdsection_type); CD_CORE_EXPORT CDSection parse(PIIODevice * d, int cdsection_type);
} }

View File

@@ -21,7 +21,7 @@
#define CDUTILS_PROTOCOL_H #define CDUTILS_PROTOCOL_H
#include "pistring.h" #include "pistring.h"
#include "cd_utils_export.h" #include "cd_core_export.h"
namespace CDUtils { namespace CDUtils {
@@ -49,12 +49,12 @@ namespace CDUtils {
# pragma pack(push,1) # pragma pack(push,1)
struct CD_UTILS_EXPORT PacketHeader { struct CD_CORE_EXPORT PacketHeader {
int type; // CDPacketType int type; // CDPacketType
int session_id; int session_id;
}; };
struct CD_UTILS_EXPORT PacketKDirectChange { struct CD_CORE_EXPORT PacketKDirectChange {
PIDeque<int> path; PIDeque<int> path;
PIString value; PIString value;
}; };

View File

@@ -23,7 +23,7 @@
#include "pistring.h" #include "pistring.h"
#include "pimap.h" #include "pimap.h"
#include "pivariant.h" #include "pivariant.h"
#include "cd_utils_export.h" #include "cd_core_export.h"
class PIIODevice; class PIIODevice;
class PIEvaluator; class PIEvaluator;
@@ -48,7 +48,7 @@ enum MessageType {
typedef PIFlags<UpdateMode> UpdateModeFlags; typedef PIFlags<UpdateMode> UpdateModeFlags;
class CD_UTILS_EXPORT CDType { class CD_CORE_EXPORT CDType {
friend class CDSection; friend class CDSection;
friend class CDCore; friend class CDCore;
friend class Interface; friend class Interface;
@@ -113,7 +113,7 @@ protected:
}; };
class CD_UTILS_EXPORT CDSection { class CD_CORE_EXPORT CDSection {
friend class CDCore; friend class CDCore;
friend class Interface; friend class Interface;
friend class XInterface; friend class XInterface;

View File

@@ -21,13 +21,13 @@
#define CDUTILS_X_H #define CDUTILS_X_H
#include "cdutils_interface.h" #include "cdutils_interface.h"
#include "cd_utils_export.h" #include "cd_core_export.h"
namespace CDUtils { namespace CDUtils {
class CD_UTILS_EXPORT XInterface: public Interface class CD_CORE_EXPORT XInterface: public Interface
{ {
PIOBJECT_SUBCLASS(XInterface, Interface) PIOBJECT_SUBCLASS(XInterface, Interface)
public: public:
@@ -52,6 +52,6 @@ public:
} }
extern CD_UTILS_EXPORT CDUtils::XInterface X; extern CD_CORE_EXPORT CDUtils::XInterface X;
#endif // CDUTILS_X_H #endif // CDUTILS_X_H

View File

@@ -1 +0,0 @@
piqt_library(qcd_utils "Gui" "pip;qad_utils;qad_widgets;qad_graphic;cd_utils;piqt")

1
libs/qt/CMakeLists.txt Normal file
View File

@@ -0,0 +1 @@
cd_library(qt "Gui;Widgets" "cd_core;QAD::PIQt;QAD::Graphic")

View File

@@ -25,13 +25,13 @@
#include <QVariant> #include <QVariant>
#include "piobject.h" #include "piobject.h"
#include "cdutils_types.h" #include "cdutils_types.h"
#include "qcd_utils_export.h" #include "cd_qt_export.h"
class QCDCore; class QCDCore;
class QCD_UTILS_EXPORT __QCore_Initializer__ { class CD_QT_EXPORT __QCore_Initializer__ {
public: public:
__QCore_Initializer__(); __QCore_Initializer__();
~__QCore_Initializer__(); ~__QCore_Initializer__();
@@ -40,7 +40,7 @@ public:
}; };
class QCD_UTILS_EXPORT QCDCore: public QObject, public PIObject class CD_QT_EXPORT QCDCore: public QObject, public PIObject
{ {
Q_OBJECT Q_OBJECT
PIOBJECT(QCDCore) PIOBJECT(QCDCore)

View File

@@ -23,7 +23,7 @@
#include <QWidget> #include <QWidget>
#include <evalspinbox.h> #include <evalspinbox.h>
#include <pistring.h> #include <pistring.h>
#include "qcd_utils_export.h" #include "cd_qt_export.h"
namespace CDUtils { namespace CDUtils {
class CDType; class CDType;
@@ -38,7 +38,7 @@ class Graphic;
class Graphic; class Graphic;
class QCD_UTILS_EXPORT CDGraphicWidget: public QWidget { class CD_QT_EXPORT CDGraphicWidget: public QWidget {
Q_OBJECT Q_OBJECT
friend class CDGraphics; friend class CDGraphics;
friend class GDockWidget; friend class GDockWidget;

View File

@@ -22,13 +22,13 @@
#include <QDialog> #include <QDialog>
#include <cdutils_types.h> #include <cdutils_types.h>
#include "qcd_utils_export.h" #include "cd_qt_export.h"
namespace Ui { namespace Ui {
class QCDModeDialog; class QCDModeDialog;
} }
class QCD_UTILS_EXPORT QCDModeDialog: public QDialog class CD_QT_EXPORT QCDModeDialog: public QDialog
{ {
Q_OBJECT Q_OBJECT
public: public:

View File

@@ -24,7 +24,7 @@
#include <QItemDelegate> #include <QItemDelegate>
#include <QStyledItemDelegate> #include <QStyledItemDelegate>
#include "pistring.h" #include "pistring.h"
#include "qcd_utils_export.h" #include "cd_qt_export.h"
namespace CDUtils { namespace CDUtils {
class CDType; class CDType;
@@ -51,7 +51,7 @@ namespace QAD {
class CDItemModel; class CDItemModel;
class QCD_UTILS_EXPORT CDItem { class CD_QT_EXPORT CDItem {
friend class CDItemModel; friend class CDItemModel;
friend class CDView; friend class CDView;
public: public:
@@ -79,7 +79,7 @@ private:
}; };
class QCD_UTILS_EXPORT CDDelegate : public QStyledItemDelegate class CD_QT_EXPORT CDDelegate : public QStyledItemDelegate
{ {
Q_OBJECT Q_OBJECT
public: public:
@@ -95,7 +95,7 @@ public:
}; };
class QCD_UTILS_EXPORT CDItemModel : public QAbstractItemModel { class CD_QT_EXPORT CDItemModel : public QAbstractItemModel {
Q_OBJECT Q_OBJECT
friend class CDView; friend class CDView;
public: public:

View File

@@ -22,7 +22,7 @@
#include <QTreeView> #include <QTreeView>
#include "piobject.h" #include "piobject.h"
#include "qcd_utils_export.h" #include "cd_qt_export.h"
namespace CDUtils { namespace CDUtils {
class CDType; class CDType;
@@ -32,7 +32,7 @@ namespace CDUtils {
class CDItemModel; class CDItemModel;
class QSortFilterProxyModel; class QSortFilterProxyModel;
class QCD_UTILS_EXPORT CDView: public QTreeView, public PIObject class CD_QT_EXPORT CDView: public QTreeView, public PIObject
{ {
Q_OBJECT Q_OBJECT
PIOBJECT(CDView) PIOBJECT(CDView)

View File

@@ -1 +1 @@
add_directories("qad_") shstk_add_directories("cd_")

View File

@@ -7,7 +7,7 @@ else()
set(APP_ICON "") set(APP_ICON "")
endif() endif()
set(APP_INFO "CD Pult") set(APP_INFO "CD Pult")
piqt_application(${PROJECT_NAME} "Gui;Widgets" "qad_utils;qad_widgets;qad_graphic;qad_application;qcd_utils;piqt_utils") cd_application(${PROJECT_NAME} "Gui;Widgets" "cd_qt;QAD::Application;QAD::PIQtUtils")
if (Qt5_FOUND) if (Qt5_FOUND)
import_version(${PROJ_NAME}5 ${PROJECT_NAME}) import_version(${PROJ_NAME}5 ${PROJECT_NAME})
deploy_target(${PROJECT_NAME}5 DEPLOY_DIR ${CMAKE_CURRENT_BINARY_DIR} DESTINATION ${ROOT_DIR}/release) deploy_target(${PROJECT_NAME}5 DEPLOY_DIR ${CMAKE_CURRENT_BINARY_DIR} DESTINATION ${ROOT_DIR}/release)

View File

Before

Width:  |  Height:  |  Size: 9.4 KiB

After

Width:  |  Height:  |  Size: 9.4 KiB

View File

Before

Width:  |  Height:  |  Size: 36 KiB

After

Width:  |  Height:  |  Size: 36 KiB

View File

Before

Width:  |  Height:  |  Size: 33 KiB

After

Width:  |  Height:  |  Size: 33 KiB

View File

Before

Width:  |  Height:  |  Size: 32 KiB

After

Width:  |  Height:  |  Size: 32 KiB

View File

Before

Width:  |  Height:  |  Size: 3.3 KiB

After

Width:  |  Height:  |  Size: 3.3 KiB

View File

Before

Width:  |  Height:  |  Size: 25 KiB

After

Width:  |  Height:  |  Size: 25 KiB

View File

Before

Width:  |  Height:  |  Size: 44 KiB

After

Width:  |  Height:  |  Size: 44 KiB