Index: denali.pro =================================================================== diff -u -rc8738a653871153a32d0f960ffbb1f0dded6673b -r7c895d9b6c198a48ab75ac2090b0a61d99bbd1ab --- denali.pro (.../denali.pro) (revision c8738a653871153a32d0f960ffbb1f0dded6673b) +++ denali.pro (.../denali.pro) (revision 7c895d9b6c198a48ab75ac2090b0a61d99bbd1ab) @@ -1,68 +1,417 @@ -QT += quick -CONFIG += c++14 -Wall - -# The following define makes your compiler emit warnings if you use -# any Qt feature that has been marked deprecated (the exact warnings -# depend on your compiler). Refer to the documentation for the -# deprecated API to know how to port your code away from it. -DEFINES += QT_DEPRECATED_WARNINGS - -# You can also make your code fail to compile if it uses deprecated APIs. -# In order to do so, uncomment the following line. -# You can also select to disable deprecated APIs only up to a certain version of Qt. -#DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0x060000 # disables all the APIs deprecated before Qt 6.0.0 - -INCLUDEPATH += \ - sources \ - sources/storage \ - sources/gui - -HEADERS += \ - sources/applicationcontroller.h \ - sources/applicationpost.h \ - sources/canbus/canbus.h \ - sources/configuration/display.h \ - sources/configuration/sound.h \ - sources/gui/guiactions.h \ - sources/gui/guiview.h \ - sources/gui/guicontroller.h \ - sources/maintimer.h \ - sources/storage/filehandler.h \ - sources/storage/logger.h \ - sources/storage/settings.h - -SOURCES += \ - main.cpp \ - sources/applicationcontroller.cpp \ - sources/applicationpost.cpp \ - sources/canbus/canbus.cpp \ - sources/configuration/display.cpp \ - sources/configuration/sound.cpp \ - sources/gui/guiactions.cpp \ - sources/gui/guiview.cpp \ - sources/gui/guicontroller.cpp \ - sources/maintimer.cpp \ - sources/storage/filehandler.cpp \ - sources/storage/logger.cpp \ - sources/storage/settings.cpp - -RESOURCES += \ - denali.qrc - -DEFINES += \ - VER_MAJOR="0" \ - VER_MINOR="4" \ - VER_REVIS="\\\"${buildNumber}\\\"" \ - VER_DEVEL="999" - - -# Additional import path used to resolve QML modules in Qt Creator's code model -QML_IMPORT_PATH = - -# Additional import path used to resolve QML modules just for Qt Quick Designer -QML_DESIGNER_IMPORT_PATH = - -# Default rules for deployment. -qnx: target.path = /tmp/$${TARGET}/bin -else: unix:!android: target.path = /opt/$${TARGET}/bin -!isEmpty(target.path): INSTALLS += target +QT += widgets qml quick serialbus concurrent +CONFIG += c++17 warn_on +QMAKE_CXXFLAGS += -Wall -Werror -Wimplicit-fallthrough # -save-temps # see .ii and .s files + +#CONFIG += disable_crc +disable_crc { + message( *** IMPORTANT : DISABLED CRC CHECK *** ) + DEFINES += DISABLE_CRC +} + +#CONFIG += disable_keepalive +disable_keepalive { + message( *** IMPORTANT : DISABLED KEEP ALIVE *** ) + DEFINES += DISABLE_KEEP_ALIVE +} + +# The following define makes your compiler emit warnings if you use +# any Qt feature that has been marked deprecated (the exact warnings +# depend on your compiler). Refer to the documentation for the +# deprecated API to know how to port your code away from it. +DEFINES += QT_DEPRECATED_WARNINGS + +# You can also make your code fail to compile if it uses deprecated APIs. +# In order to do so, uncomment the following line. +# You can also select to disable deprecated APIs only up to a certain version of Qt. +#DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0x060000 # disables all the APIs deprecated before Qt 6.0.0 + +INCLUDEPATH += \ + common \ + sources \ + sources/storage \ + sources/gui \ + sources/canbus \ + sources/utility \ + sources/abstract \ + sources/model \ + sources/model/hd/adjustment \ + sources/model/hd/alarm \ + sources/model/hd/data \ + sources/model/dg/data \ + sources/view \ + sources/view/hd/adjustment \ + sources/view/hd/alarm \ + sources/view/hd/data \ + sources/view/dg/data + +HEADERS += \ + \ # common + common/AlarmDefs.h \ + common/DGDefs.h \ + common/HDDefs.h \ + common/MsgDefs.h \ + \ # Main + sources/main.h \ + sources/Threads.h \ + sources/MainTimer.h \ + sources/ApplicationPost.h \ + \ # Controllers + sources/ApplicationController.h \ + \ # ---------- Models ---------- + sources/model/MModel.h \ + sources/model/MAbstract.h \ + sources/model/MPowerOff.h \ + sources/model/MEndTreatmentResponse.h \ + sources/model/MStartTreatmentResponse.h \ + sources/model/MTreatmentParametersResp.h \ + sources/model/MDGDebugText.h \ + sources/model/MHDDebugText.h \ + \ # ---------- Models - Alarm + sources/model/hd/alarm/MAlarmCleared.h \ + sources/model/hd/alarm/MAlarmTriggered.h \ + sources/model/hd/alarm/MAlarmStatusData.h \ + \ # ---------- Models - HD - Adjustment - In-Treatment + sources/model/hd/adjustment/MTreatmentAdjustRequests.h \ + sources/model/hd/adjustment/MTreatmentAdjustDurationResponse.h \ + sources/model/hd/adjustment/MTreatmentAdjustBloodDialysateResponse.h \ + sources/model/hd/adjustment/MTreatmentAdjustUltrafiltrationStateResponse.h \ + sources/model/hd/adjustment/MTreatmentAdjustUltrafiltrationEditResponse.h \ + sources/model/hd/adjustment/MTreatmentAdjustUltrafiltrationConfirmResponse.h \ + sources/model/hd/adjustment/MTreatmentAdjustSalineResponse.h \ + \ # ---------- Models - HD - Data + sources/model/hd/data/MTreatmentTimeData.h \ + sources/model/hd/data/MTreatmentFlowsData.h \ + sources/model/hd/data/MTreatmentOutletFlowData.h \ + sources/model/hd/data/MTreatmentRangesData.h \ + sources/model/hd/data/MTreatmentPressureOcclusionData.h \ + sources/model/hd/data/MTreatmentStatesData.h \ + sources/model/hd/data/MHDOperationModeData.h \ + sources/model/hd/data/MTreatmentSalineData.h \ + sources/model/hd/data/MPrimingData.h \ + \ # ---------- Models - DG - Data + sources/model/dg/data/MDGDrainPumpData.h \ + sources/model/dg/data/MDGHeatersData.h \ + sources/model/dg/data/MDGLoadCellReadingsData.h \ + sources/model/dg/data/MDGOperationModeData.h \ + sources/model/dg/data/MDGPressuresData.h \ + sources/model/dg/data/MDGReservoirData.h \ + sources/model/dg/data/MDGROPumpData.h \ + sources/model/dg/data/MDGTemperaturesData.h \ + sources/model/dg/data/MDGValvesStatesData.h \ + \ # CANBus + sources/canbus/CanInterface.h \ + sources/canbus/FrameInterface.h \ + \ # Denali Message + sources/canbus/MessageGlobals.h \ + sources/canbus/MessageAcknowModel.h \ + sources/canbus/MessageBuilder.h \ + sources/canbus/MessageInterpreter.h \ + sources/canbus/MessageDispatcher.h \ + \ # Gui + sources/gui/GuiGlobals.h \ + sources/gui/GuiView.h \ + sources/gui/GuiController.h \ + \ # ---------- Views ---------- + sources/view/VTreatmentCreate.h \ + sources/view/VTreatmentEnd.h \ + sources/view/VTreatmentBegin.h \ + sources/view/VEventSpy.h \ + sources/view/VView.h \ + sources/view/VPowerOff.h \ + sources/view/VPriming.h \ + \ # ---------- Views - Alarm + sources/view/hd/alarm/VAlarmStatus.h \ + \ # ---------- Views - HD - Adjustment - In-Treatment + sources/view/hd/adjustment/VTreatmentAdjustmentResponseBase.h \ + sources/view/hd/adjustment/VTreatmentAdjustmentDuration.h \ + sources/view/hd/adjustment/VTreatmentAdjustmentFlows.h \ + sources/view/hd/adjustment/VTreatmentAdjustmentUltrafiltrationState.h \ + sources/view/hd/adjustment/VTreatmentAdjustmentUltrafiltrationEdit.h \ + sources/view/hd/adjustment/VTreatmentAdjustmentUltrafiltrationConfirm.h \ + sources/view/hd/adjustment/VTreatmentAdjustmentSaline.h \ + \ # ---------- Views - HD - Data + sources/view/hd/data/VTreatmentTime.h \ + sources/view/hd/data/VTreatmentBloodFlow.h \ + sources/view/hd/data/VTreatmentDialysateFlow.h \ + sources/view/hd/data/VTreatmentUltrafiltration.h \ + sources/view/hd/data/VTreatmentRanges.h \ + sources/view/hd/data/VTreatmentPressureOcclusion.h \ + sources/view/hd/data/VHDOperationModeData.h \ + sources/view/hd/data/VTreatmentSalineData.h \ + sources/view/hd/data/VHDTreatmentStatesData.h \ + \ # ---------- Views - DG - Data + sources/view/dg/data/VDGDrainPumpData.h \ + sources/view/dg/data/VDGHeatersData.h \ + sources/view/dg/data/VDGLoadCellReadingsData.h \ + sources/view/dg/data/VDGOperationModeData.h \ + sources/view/dg/data/VDGPressuresData.h \ + sources/view/dg/data/VDGROPumpData.h \ + sources/view/dg/data/VDGReservoirData.h \ + sources/view/dg/data/VDGTemperaturesData.h \ + sources/view/dg/data/VDGValvesStatesData.h \ + \ # Storage + sources/storage/StorageGlobals.h \ + sources/storage/Logger.h \ + sources/storage/FileHandler.h \ + sources/storage/FileSaver.h \ + sources/storage/DriveWatcher.h \ + \ # Utility + sources/utility/crc.h \ + sources/utility/format.h \ + sources/utility/types.h +# sources/configuration/display.h \ +# sources/configuration/sound.h \ +# sources/storage/settings.h \ + +SOURCES += \ + \ # common + \ # Main + main.cpp \ + sources/Threads.cpp \ + sources/MainTimer.cpp \ + sources/ApplicationPost.cpp \ + \ # Controllers + sources/ApplicationController.cpp \ + \ # ---------- Models ---------- + sources/model/MAbstract.cpp \ + sources/model/MPowerOff.cpp \ + sources/model/MHDDebugText.cpp \ + sources/model/MEndTreatmentResponse.cpp \ + sources/model/MStartTreatmentResponse.cpp \ + sources/model/MTreatmentParametersResp.cpp \ + sources/model/MDGDebugText.cpp \ + \ # ---------- Models - Alarm + sources/model/hd/alarm/MAlarmCleared.cpp \ + sources/model/hd/alarm/MAlarmTriggered.cpp \ + sources/model/hd/alarm/MAlarmStatusData.cpp \ + \ # ---------- Models - HD - Adjustment - In-Treatment + sources/model/hd/adjustment/MTreatmentAdjustDurationResponse.cpp \ + sources/model/hd/adjustment/MTreatmentAdjustBloodDialysateResponse.cpp \ + sources/model/hd/adjustment/MTreatmentAdjustUltrafiltrationStateResponse.cpp \ + sources/model/hd/adjustment/MTreatmentAdjustUltrafiltrationEditResponse.cpp \ + sources/model/hd/adjustment/MTreatmentAdjustUltrafiltrationConfirmResponse.cpp \ + sources/model/hd/adjustment/MTreatmentAdjustSalineResponse.cpp \ + \ # ---------- Models - HD - Data + sources/model/hd/data/MTreatmentTimeData.cpp \ + sources/model/hd/data/MTreatmentFlowsData.cpp \ + sources/model/hd/data/MTreatmentOutletFlowData.cpp \ + sources/model/hd/data/MTreatmentRangesData.cpp \ + sources/model/hd/data/MTreatmentPressureOcclusionData.cpp \ + sources/model/hd/data/MTreatmentStatesData.cpp \ + sources/model/hd/data/MHDOperationModeData.cpp \ + sources/model/hd/data/MTreatmentSalineData.cpp \ + sources/model/hd/data/MPrimingData.cpp \ + \ # ---------- Models - DG - Data + sources/model/dg/data/MDGDrainPumpData.cpp \ + sources/model/dg/data/MDGHeatersData.cpp \ + sources/model/dg/data/MDGLoadCellReadingsData.cpp \ + sources/model/dg/data/MDGOperationModeData.cpp \ + sources/model/dg/data/MDGPressuresData.cpp \ + sources/model/dg/data/MDGReservoirData.cpp \ + sources/model/dg/data/MDGROPumpData.cpp \ + sources/model/dg/data/MDGTemperaturesData.cpp \ + sources/model/dg/data/MDGValvesStatesData.cpp \ + \ # CANBus + sources/canbus/CanInterface.cpp \ + sources/canbus/FrameInterface.cpp \ + \ # Denali Message + sources/canbus/MessageAcknowModel.cpp \ + sources/canbus/MessageBuilder.cpp \ + sources/canbus/MessageDispatcher.cpp \ + sources/canbus/MessageInterpreter.cpp \ + \ # Gui + sources/gui/GuiGlobals.cpp \ + sources/gui/GuiView.cpp \ + sources/gui/GuiController.cpp \ + \ # ---------- Views ---------- + sources/view/VTreatmentCreate.cpp \ + sources/view/VTreatmentEnd.cpp \ + sources/view/VTreatmentBegin.cpp \ + sources/view/VEventSpy.cpp \ + sources/view/VPriming.cpp \ + sources/view/VPowerOff.cpp \ + \ # ---------- Views - Alarm + sources/view/hd/alarm/VAlarmStatus.cpp \ + \ # ---------- Views - HD - Adjustment - In-Treatment + sources/view/hd/adjustment/VTreatmentAdjustmentResponseBase.cpp \ + sources/view/hd/adjustment/VTreatmentAdjustmentDuration.cpp \ + sources/view/hd/adjustment/VTreatmentAdjustmentFlows.cpp \ + sources/view/hd/adjustment/VTreatmentAdjustmentUltrafiltrationConfirm.cpp \ + sources/view/hd/adjustment/VTreatmentAdjustmentUltrafiltrationEdit.cpp \ + sources/view/hd/adjustment/VTreatmentAdjustmentUltrafiltrationState.cpp \ + sources/view/hd/adjustment/VTreatmentAdjustmentSaline.cpp \ + \ # ---------- Views - HD - Data + sources/view/hd/data/VTreatmentTime.cpp \ + sources/view/hd/data/VTreatmentBloodFlow.cpp \ + sources/view/hd/data/VTreatmentDialysateFlow.cpp \ + sources/view/hd/data/VTreatmentUltrafiltration.cpp \ + sources/view/hd/data/VTreatmentRanges.cpp \ + sources/view/hd/data/VTreatmentPressureOcclusion.cpp \ + sources/view/hd/data/VHDOperationModeData.cpp \ + sources/view/hd/data/VTreatmentSalineData.cpp \ + sources/view/hd/data/VHDTreatmentStatesData.cpp \ + \ # ---------- Views - DG - Data + sources/view/dg/data/VDGDrainPumpData.cpp \ + sources/view/dg/data/VDGHeatersData.cpp \ + sources/view/dg/data/VDGLoadCellReadingsData.cpp \ + sources/view/dg/data/VDGOperationModeData.cpp \ + sources/view/dg/data/VDGPressuresData.cpp \ + sources/view/dg/data/VDGROPumpData.cpp \ + sources/view/dg/data/VDGReservoirData.cpp \ + sources/view/dg/data/VDGTemperaturesData.cpp \ + sources/view/dg/data/VDGValvesStatesData.cpp \ + \ # Storage + sources/storage/StorageGlobals.cpp \ + sources/storage/FileHandler.cpp \ + sources/storage/Logger.cpp \ + sources/storage/DriveWatcher.cpp \ + sources/storage/FileSaver.cpp \ + \ # Utility + sources/utility/crc.cpp \ + sources/utility/format.cpp \ + sources/utility/types.cpp + + +RESOURCES += \ + denali.qrc + +DEFINES += \ + VER_MAJOR="\\\"${majorVersion}\\\"" \ + VER_MINOR="\\\"${minorVersion}\\\"" \ + VER_MICRO="\\\"${microVersion}\\\"" \ + VER_REVIS="\\\"${buildNumber}\\\"" \ + VER_REVIS_DEV=\\\"$$system( date "+%m%d%H%M" )\\\" \ + VER_APPLY=\\\"$$system( touch -m main.cpp )\\\" \ + VER_BRANCH=\\\"$$system( git rev-parse --abbrev-ref HEAD )\\\" + +CodeCoverage { + message(Building with Squish Coco) + COVERAGE_OPTIONS += --cs-qt4 + COVERAGE_OPTIONS += --cs-exclude-path=build=testunits + COVERAGE_OPTIONS += --cs-exclude-file-regex=ui_.* + COVERAGE_OPTIONS += --cs-exclude-file-regex=moc_.* + COVERAGE_OPTIONS += --cs-exclude-file-regex=main.cpp + COVERAGE_OPTIONS += --cs-exclude-file-regex=qmlcache* + COVERAGE_OPTIONS += --cs-exclude-file-regex=tst_* + + QMAKE_CFLAGS += $$COVERAGE_OPTIONS + QMAKE_CXXFLAGS += $$COVERAGE_OPTIONS + QMAKE_LFLAGS += $$COVERAGE_OPTIONS + DEFINES += SQUISH_COCO_BULD +} + +tst_canbus { + message(Building with QtTest test case canbus) + QT += testlib + DEFINES += UNIT_TEST \ + TEST_CLASS_INCLUDE=\\\"unittests/tst_canbus.h\\\" \ + TEST_CLASS_NAME=tst_canbus + HEADERS += \ + unittests/tst_canbus.h + SOURCES += \ + unittests/tst_canbus.cpp +} + +tst_logging { + message(Building with QtTest test case logging) + QT += testlib + DEFINES += UNIT_TEST \ + TEST_CLASS_INCLUDE=\\\"unittests/tst_logging.h\\\" \ + TEST_CLASS_NAME=tst_logging + HEADERS += \ + unittests/tst_logging.h + SOURCES += \ + unittests/tst_logging.cpp +} + +tst_utilities { + message(Building with QtTest test case utilities) + QT += testlib + DEFINES += UNIT_TEST \ + TEST_CLASS_INCLUDE=\\\"unittests/tst_utilities.h\\\" \ + TEST_CLASS_NAME=tst_utilities + HEADERS += \ + unittests/tst_utilities.h + SOURCES += \ + unittests/tst_utilities.cpp +} + +tst_acknow { + message(Building with QtTest test case acknow) + QT += testlib + DEFINES += UNIT_TEST \ + TEST_CLASS_INCLUDE=\\\"unittests/tst_acknow.h\\\" \ + TEST_CLASS_NAME=tst_acknow + HEADERS += \ + unittests/tst_acknow.h + SOURCES += \ + unittests/tst_acknow.cpp +} + +tst_models { + message(Building with QtTest test case models) + QT += testlib + DEFINES += UNIT_TEST \ + TEST_CLASS_INCLUDE=\\\"unittests/tst_models.h\\\" \ + TEST_CLASS_NAME=tst_models + HEADERS += \ + unittests/tst_models.h + SOURCES += \ + unittests/tst_models.cpp +} + +tst_views { + message(Building with QtTest test case views) + QT += testlib + DEFINES += UNIT_TEST \ + TEST_CLASS_INCLUDE=\\\"unittests/tst_views.h\\\" \ + TEST_CLASS_NAME=tst_views + HEADERS += \ + unittests/tst_views.h + SOURCES += \ + unittests/tst_views.cpp +} + +tst_initializations { + message(Building with QtTest test case initializations) + QT += testlib + DEFINES += UNIT_TEST \ + TEST_CLASS_INCLUDE=\\\"unittests/tst_initializations.h\\\" \ + TEST_CLASS_NAME=tst_initializations + HEADERS += unittests/tst_initializations.h + SOURCES += unittests/tst_initializations.cpp +} + +tst_threads { + message(Building with QtTest test case threads) + QT += testlib + DEFINES += UNIT_TEST \ + TEST_CLASS_INCLUDE=\\\"unittests/tst_threads.h\\\" \ + TEST_CLASS_NAME=tst_threads + HEADERS += unittests/tst_threads.h + SOURCES += unittests/tst_threads.cpp +} + +tst_messaging { + message(Building with QtTest test case messaging) + QT += testlib + DEFINES += UNIT_TEST \ + TEST_CLASS_INCLUDE=\\\"unittests/tst_messaging.h\\\" \ + TEST_CLASS_NAME=tst_messaging + HEADERS += unittests/tst_messaging.h + SOURCES += unittests/tst_messaging.cpp +} + +# Additional import path used to resolve QML modules in Qt Creator's code model +QML_IMPORT_PATH = + +# Additional import path used to resolve QML modules just for Qt Quick Designer +QML_DESIGNER_IMPORT_PATH = + +# Default rules for deployment. +qnx: target.path = /tmp/$${TARGET}/bin +else: unix:!android: target.path = /home/root +!isEmpty(target.path): INSTALLS += target + +DISTFILES += \ + README.md