mirror of
https://github.com/subsurface/subsurface.git
synced 2024-11-28 05:00:20 +00:00
fdc2fd35bf
Add a header file that contains a duplicate of the enums, that are needed in QML in one class. the unit enums are added imidiatly, since they are needed or will be neede shortly in Settings and DivePlannerSettings This class will also contain Q_PROPERTY and signal/slot for variables used in QML. This is done to allow e.g. deco_mode qPrefUnits::planner_deco_mode() void qPrefUnits::set_planner_deco_mode(deco_mode) as strongly typed in C++ and DECO_MODE planner_deco_mode() void set_planner_deco_mode(DECO_MODE) as strongly typed in QML Remark: wrong assignments gives errors in QML The advantage over using strings or the value directly is that QML detects typos and flags them as errors/warnings. It is important to note that the class may only contain a) a function call to the implementation b) a reference to a global variable e.g. prefs. Added note to the original definitions of the enums that they have been duplicated. Signed-off-by: jan Iversen <jan@casacondor.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
27 lines
972 B
CMake
27 lines
972 B
CMake
# mobile backend functions
|
|
|
|
set(SUBSURFACE_MOBILE_SRCS
|
|
qmlinterface.cpp
|
|
qmlmanager.cpp
|
|
qml/kirigami/src/columnview.cpp
|
|
qml/kirigami/src/delegaterecycler.cpp
|
|
qml/kirigami/src/enums.cpp
|
|
qml/kirigami/src/formlayoutattached.cpp
|
|
qml/kirigami/src/icon.cpp
|
|
qml/kirigami/src/kirigamiplugin.cpp
|
|
qml/kirigami/src/mnemonicattached.cpp
|
|
qml/kirigami/src/scenepositionattached.cpp
|
|
qml/kirigami/src/settings.cpp
|
|
qml/kirigami/src/wheelhandler.cpp
|
|
qml/kirigami/src/libkirigami/basictheme.cpp
|
|
qml/kirigami/src/libkirigami/kirigamipluginfactory.cpp
|
|
qml/kirigami/src/libkirigami/platformtheme.cpp
|
|
qml/kirigami/src/libkirigami/tabletmodewatcher.cpp
|
|
)
|
|
|
|
if (SUBSURFACE_TARGET_EXECUTABLE MATCHES "MobileExecutable")
|
|
include_directories(${CMAKE_SOURCE_DIR}/mobile-widgets/qml/kirigami/src/libkirigami)
|
|
add_definitions(-DKIRIGAMI_BUILD_TYPE_STATIC)
|
|
add_library(subsurface_mobile STATIC ${SUBSURFACE_MOBILE_SRCS})
|
|
target_link_libraries(subsurface_mobile ${QT_LIBRARIES})
|
|
endif()
|