summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--CMakeLists.txt89
-rw-r--r--qt-ui/CMakeLists.txt104
-rw-r--r--qt-ui/printer.cpp (renamed from printer.cpp)0
-rw-r--r--qt-ui/printer.h (renamed from printer.h)0
-rw-r--r--qt-ui/templatelayout.cpp (renamed from templatelayout.cpp)0
-rw-r--r--qt-ui/templatelayout.h (renamed from templatelayout.h)0
6 files changed, 106 insertions, 87 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 8ae1e9b45..ba6544210 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -159,13 +159,6 @@ else()
find_package(Grantlee5 REQUIRED)
set(GRANTLEE_LIBRARIES Grantlee5::Templates)
endif()
- set(SUBSURFACE_PRINTING_SRCS
- printer.cpp
- templatelayout.cpp
- qt-ui/templateedit.cpp
- qt-ui/printdialog.cpp
- qt-ui/printoptions.cpp
- )
set(PRINTING_PKG PrintSupport)
set(PRINTING_LIB Qt5::PrintSupport)
endif()
@@ -174,7 +167,6 @@ if(NO_USERMANUAL)
message(STATUS "building without usermanual")
add_definitions(-DNO_USERMANUAL)
else()
- set(USERMANUAL qt-ui/usermanual.cpp)
set(WEBKIT_PKG WebKitWidgets)
set(WEBKIT_LIB Qt5::WebKitWidgets)
endif()
@@ -410,71 +402,6 @@ set(SUBSURFACE_MODELS_LIB_SRCS
)
source_group("Subsurface Models" FILES ${SUBSURFACE_MODELS})
-# the interface, in C++
-set(SUBSURFACE_INTERFACE
- qt-ui/updatemanager.cpp
- qt-ui/about.cpp
- qt-ui/divecomputermanagementdialog.cpp
- qt-ui/divelistview.cpp
- qt-ui/diveplanner.cpp
- qt-ui/diveshareexportdialog.cpp
- qt-ui/downloadfromdivecomputer.cpp
- qt-ui/globe.cpp
- qt-ui/graphicsview-common.cpp
- qt-ui/kmessagewidget.cpp
- qt-ui/maintab.cpp
- qt-ui/mainwindow.cpp
- qt-ui/modeldelegates.cpp
- qt-ui/metrics.cpp
- qt-ui/notificationwidget.cpp
- qt-ui/preferences.cpp
- qt-ui/simplewidgets.cpp
- qt-ui/starwidget.cpp
- qt-ui/subsurfacewebservices.cpp
- qt-ui/tableview.cpp
- qt-ui/divelogimportdialog.cpp
- qt-ui/tagwidget.cpp
- qt-ui/groupedlineedit.cpp
- ${USERMANUAL}
- qt-ui/divelogexportdialog.cpp
- qt-ui/divepicturewidget.cpp
- qt-ui/usersurvey.cpp
- qt-ui/configuredivecomputerdialog.cpp
- qt-ui/undocommands.cpp
- qt-ui/locationinformation.cpp
- qt-ui/qtwaitingspinner.cpp
- ${SUBSURFACE_PRINTING_SRCS}
- ${SOCIALNETWORKS}
- ${BT_SRC_FILES}
-)
-source_group("Subsurface Interface" FILES ${SUBSURFACE_INTERFACE})
-
-# the profile widget
-set(SUBSURFACE_PROFILE_LIB_SRCS
- qt-ui/profile/profilewidget2.cpp
- qt-ui/profile/diverectitem.cpp
- qt-ui/profile/divepixmapitem.cpp
- qt-ui/profile/divelineitem.cpp
- qt-ui/profile/divetextitem.cpp
- qt-ui/profile/animationfunctions.cpp
- qt-ui/profile/divecartesianaxis.cpp
- qt-ui/profile/diveprofileitem.cpp
- qt-ui/profile/diveeventitem.cpp
- qt-ui/profile/divetooltipitem.cpp
- qt-ui/profile/ruleritem.cpp
- qt-ui/profile/tankitem.cpp
-)
-source_group("Subsurface Profile" FILES ${SUBSURFACE_PROFILE_LIB_SRCS})
-
-# the yearly statistics widget.
-set(SUBSURFACE_STATISTICS_LIB_SRCS
- qt-ui/statistics/statisticswidget.cpp
- qt-ui/statistics/yearstatistics.cpp
- qt-ui/statistics/statisticsbar.cpp
- qt-ui/statistics/monthstatistics.cpp
-)
-source_group("Subsurface Statistics" FILES ${SUBSURFACE_STATISTICS_LIB_SRCS})
-
# the main app.
set(SUBSURFACE_APP
main.cpp
@@ -483,24 +410,10 @@ set(SUBSURFACE_APP
)
source_group("Subsurface App" FILES ${SUBSURFACE_APP})
-# create the libraries
-file(GLOB SUBSURFACE_UI qt-ui/*.ui)
-qt5_wrap_ui(SUBSURFACE_UI_HDRS ${SUBSURFACE_UI})
-qt5_add_resources(SUBSURFACE_RESOURCES subsurface.qrc)
-source_group("Subsurface Interface Files" FILES ${SUBSURFACE_UI})
-
add_library(subsurface_corelib STATIC ${SUBSURFACE_CORE_LIB_SRCS} )
target_link_libraries(subsurface_corelib ${QT_LIBRARIES})
add_library(subsurface_models STATIC ${SUBSURFACE_MODELS_LIB_SRCS})
target_link_libraries(subsurface_models ${QT_LIBRARIES})
-add_library(subsurface_profile STATIC ${SUBSURFACE_PROFILE_LIB_SRCS})
-target_link_libraries(subsurface_profile ${QT_LIBRARIES})
-add_library(subsurface_statistics STATIC ${SUBSURFACE_STATISTICS_LIB_SRCS})
-target_link_libraries(subsurface_statistics ${QT_LIBRARIES})
-add_library(subsurface_generated_ui STATIC ${SUBSURFACE_UI_HDRS})
-target_link_libraries(subsurface_generated_ui ${QT_LIBRARIES})
-add_library(subsurface_interface STATIC ${SUBSURFACE_INTERFACE})
-target_link_libraries(subsurface_interface ${QT_LIBRARIES} ${MARBLE_LIBRARIES})
# add pthread to the end of the library list on Linux
# this is only needed on Ubuntu (why do these idiots break everything?)
@@ -509,6 +422,8 @@ if(CMAKE_SYSTEM_NAME STREQUAL "Linux" AND NOT ANDROID)
set(SUBSURFACE_LINK_LIBRARIES ${SUBSURFACE_LINK_LIBRARIES} -lpthread)
endif()
+add_subdirectory(qt-ui)
+
# create the executables
if(SUBSURFACE_MOBILE)
set(MOBILE_SRC qt-mobile/qmlmanager.cpp qt-mobile/qmlprofile.cpp qt-models/divelistmodel.cpp)
diff --git a/qt-ui/CMakeLists.txt b/qt-ui/CMakeLists.txt
new file mode 100644
index 000000000..9def39ff3
--- /dev/null
+++ b/qt-ui/CMakeLists.txt
@@ -0,0 +1,104 @@
+# create the libraries
+file(GLOB SUBSURFACE_UI *.ui)
+qt5_wrap_ui(SUBSURFACE_UI_HDRS ${SUBSURFACE_UI})
+qt5_add_resources(SUBSURFACE_RESOURCES subsurface.qrc)
+source_group("Subsurface Interface Files" FILES ${SUBSURFACE_UI})
+
+# the interface, in C++
+set(SUBSURFACE_INTERFACE
+ updatemanager.cpp
+ about.cpp
+ divecomputermanagementdialog.cpp
+ divelistview.cpp
+ diveplanner.cpp
+ diveshareexportdialog.cpp
+ downloadfromdivecomputer.cpp
+ globe.cpp
+ graphicsview-common.cpp
+ kmessagewidget.cpp
+ maintab.cpp
+ mainwindow.cpp
+ modeldelegates.cpp
+ metrics.cpp
+ notificationwidget.cpp
+ preferences.cpp
+ simplewidgets.cpp
+ starwidget.cpp
+ subsurfacewebservices.cpp
+ tableview.cpp
+ divelogimportdialog.cpp
+ tagwidget.cpp
+ groupedlineedit.cpp
+ divelogexportdialog.cpp
+ divepicturewidget.cpp
+ usersurvey.cpp
+ configuredivecomputerdialog.cpp
+ undocommands.cpp
+ locationinformation.cpp
+ qtwaitingspinner.cpp
+)
+
+if(NOT NO_USERMANUAL)
+ set(SUBSURFACE_INTERFACE ${SUBSURFACE_INTERFACE}
+ usermanual.cpp
+ )
+endif()
+
+if(NOT NO_PRINTING)
+ set(SUBSURFACE_INTERFACE ${SUBSURFACE_INTERFACE}
+ templateedit.cpp
+ printdialog.cpp
+ printoptions.cpp
+ printer.cpp
+ templatelayout.cpp
+ )
+endif()
+
+if (FBSUPPORT)
+ set(SUBSURFACE_INTERFACE ${SUBSURFACE_INTERFACE}
+ socialnetworks.cpp
+ )
+endif()
+
+if (BTSUPPORT)
+ set(SUBSURFACE_INTERFACE ${SUBSURFACE_INTERFACE}
+ btdeviceselectiondialog.cpp
+ )
+endif()
+
+source_group("Subsurface Interface" FILES ${SUBSURFACE_INTERFACE})
+
+# the profile widget
+set(SUBSURFACE_PROFILE_LIB_SRCS
+ profile/profilewidget2.cpp
+ profile/diverectitem.cpp
+ profile/divepixmapitem.cpp
+ profile/divelineitem.cpp
+ profile/divetextitem.cpp
+ profile/animationfunctions.cpp
+ profile/divecartesianaxis.cpp
+ profile/diveprofileitem.cpp
+ profile/diveeventitem.cpp
+ profile/divetooltipitem.cpp
+ profile/ruleritem.cpp
+ profile/tankitem.cpp
+)
+source_group("Subsurface Profile" FILES ${SUBSURFACE_PROFILE_LIB_SRCS})
+
+# the yearly statistics widget.
+set(SUBSURFACE_STATISTICS_LIB_SRCS
+ statistics/statisticswidget.cpp
+ statistics/yearstatistics.cpp
+ statistics/statisticsbar.cpp
+ statistics/monthstatistics.cpp
+)
+source_group("Subsurface Statistics" FILES ${SUBSURFACE_STATISTICS_LIB_SRCS})
+
+add_library(subsurface_profile STATIC ${SUBSURFACE_PROFILE_LIB_SRCS})
+target_link_libraries(subsurface_profile ${QT_LIBRARIES})
+add_library(subsurface_statistics STATIC ${SUBSURFACE_STATISTICS_LIB_SRCS})
+target_link_libraries(subsurface_statistics ${QT_LIBRARIES})
+add_library(subsurface_generated_ui STATIC ${SUBSURFACE_UI_HDRS})
+target_link_libraries(subsurface_generated_ui ${QT_LIBRARIES})
+add_library(subsurface_interface STATIC ${SUBSURFACE_INTERFACE})
+target_link_libraries(subsurface_interface ${QT_LIBRARIES} ${MARBLE_LIBRARIES})
diff --git a/printer.cpp b/qt-ui/printer.cpp
index f0197d446..f0197d446 100644
--- a/printer.cpp
+++ b/qt-ui/printer.cpp
diff --git a/printer.h b/qt-ui/printer.h
index 979cacd6a..979cacd6a 100644
--- a/printer.h
+++ b/qt-ui/printer.h
diff --git a/templatelayout.cpp b/qt-ui/templatelayout.cpp
index a376459a6..a376459a6 100644
--- a/templatelayout.cpp
+++ b/qt-ui/templatelayout.cpp
diff --git a/templatelayout.h b/qt-ui/templatelayout.h
index a2868e7ff..a2868e7ff 100644
--- a/templatelayout.h
+++ b/qt-ui/templatelayout.h