mirror of
https://github.com/subsurface/subsurface.git
synced 2024-12-05 00:21:29 +00:00
1ecd5065a0
This allows Subsurface to obtain the coordinates of a dive directly from a GPS track. It parses a GPX file (GPX V1.0 or V1.1) from a GPS to locate the trackpoint immediatedly after the start of a dive. There is an additional "Use GPS file" button in the Edit Dive Site panel that is selected from the Notes tab. Image: This allows one to select a GPX file, bringing up the Import GPS dialog. There is extensive provision for cross-checking that the dive track synchronises with the dive start and end. If the Save button in the dialog is pressed the dive coordinates are copied into the Dive Coordinates text box in the Edit Dive Site panel. The map moves to indicate the location of the dive site. The bulk of the work is done in importgps.cpp. The code is pretty intergrated: I tried to break it up in smaller commits but that was not feasible. The code includes responses to the comments by @neolit123 and @bstoeger. The C-based file input was replaced with Qt-based code using QChar, QString and QFile. [Dirk Hohndel: fixed several small issues in the .ui file, removed various headers includes that weren't needed and fixed printing of minutes as zero padded] Signed-off-by: willemferguson <willemferguson@zoology.up.ac.za> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
188 lines
4.3 KiB
CMake
188 lines
4.3 KiB
CMake
# create the libraries
|
|
file(GLOB SUBSURFACE_UI *.ui)
|
|
qt5_wrap_ui(SUBSURFACE_UI_HDRS ${SUBSURFACE_UI})
|
|
source_group("Subsurface Interface Files" FILES ${SUBSURFACE_UI})
|
|
|
|
if(BTSUPPORT)
|
|
set(BT_SRC_FILES btdeviceselectiondialog.cpp)
|
|
endif()
|
|
|
|
include_directories(.
|
|
${CMAKE_CURRENT_BINARY_DIR}
|
|
${CMAKE_BINARY_DIR}
|
|
)
|
|
|
|
add_subdirectory(preferences)
|
|
|
|
set (SUBSURFACE_UI
|
|
about.ui
|
|
btdeviceselectiondialog.ui
|
|
configuredivecomputerdialog.ui
|
|
divecomponentselection.ui
|
|
divecomputermanagementdialog.ui
|
|
divelogexportdialog.ui
|
|
divelogimportdialog.ui
|
|
divesiteimportdialog.ui
|
|
diveplanner.ui
|
|
diveshareexportdialog.ui
|
|
downloadfromdivecomputer.ui
|
|
filterwidget2.ui
|
|
findmovedimagesdialog.ui
|
|
importgps.ui
|
|
listfilter.ui
|
|
locationinformation.ui
|
|
mainwindow.ui
|
|
plannerDetails.ui
|
|
plannerSettings.ui
|
|
printoptions.ui
|
|
renumber.ui
|
|
searchbar.ui
|
|
setpoint.ui
|
|
shiftimagetimes.ui
|
|
shifttimes.ui
|
|
tableview.ui
|
|
templateedit.ui
|
|
urldialog.ui
|
|
usersurvey.ui
|
|
webservices.ui
|
|
tab-widgets/maintab.ui
|
|
tab-widgets/TabDiveStatistics.ui
|
|
tab-widgets/TabDiveInformation.ui
|
|
tab-widgets/TabDivePhotos.ui
|
|
tab-widgets/TabDiveExtraInfo.ui
|
|
tab-widgets/TabDiveEquipment.ui
|
|
tab-widgets/TabDiveSite.ui
|
|
)
|
|
|
|
# the interface, in C++
|
|
set(SUBSURFACE_INTERFACE
|
|
about.cpp
|
|
about.h
|
|
configuredivecomputerdialog.cpp
|
|
configuredivecomputerdialog.h
|
|
divecomputermanagementdialog.cpp
|
|
divecomputermanagementdialog.h
|
|
divelistview.cpp
|
|
divelistview.h
|
|
divelogexportdialog.cpp
|
|
divelogexportdialog.h
|
|
divelogimportdialog.cpp
|
|
divelogimportdialog.h
|
|
divepicturewidget.cpp
|
|
divepicturewidget.h
|
|
diveplanner.cpp
|
|
diveplanner.h
|
|
diveshareexportdialog.cpp
|
|
diveshareexportdialog.h
|
|
divesiteimportdialog.cpp
|
|
divesiteimportdialog.h
|
|
downloadfromdivecomputer.cpp
|
|
downloadfromdivecomputer.h
|
|
filterwidget2.cpp
|
|
filterwidget2.h
|
|
findmovedimagesdialog.cpp
|
|
findmovedimagesdialog.h
|
|
groupedlineedit.cpp
|
|
groupedlineedit.h
|
|
importgps.cpp
|
|
importgps.h
|
|
kmessagewidget.cpp
|
|
kmessagewidget.h
|
|
locationinformation.cpp
|
|
locationinformation.h
|
|
mainwindow.cpp
|
|
mainwindow.h
|
|
mapwidget.cpp
|
|
mapwidget.h
|
|
modeldelegates.cpp
|
|
modeldelegates.h
|
|
notificationwidget.cpp
|
|
notificationwidget.h
|
|
qtwaitingspinner.cpp
|
|
qtwaitingspinner.h
|
|
simplewidgets.cpp
|
|
simplewidgets.h
|
|
starwidget.cpp
|
|
starwidget.h
|
|
subsurfacewebservices.cpp
|
|
subsurfacewebservices.h
|
|
tab-widgets/TabBase.cpp
|
|
tab-widgets/TabBase.h
|
|
tab-widgets/TabDiveExtraInfo.cpp
|
|
tab-widgets/TabDiveExtraInfo.h
|
|
tab-widgets/TabDiveEquipment.cpp
|
|
tab-widgets/TabDiveEquipment.h
|
|
tab-widgets/TabDiveInformation.cpp
|
|
tab-widgets/TabDiveInformation.h
|
|
tab-widgets/TabDivePhotos.cpp
|
|
tab-widgets/TabDivePhotos.h
|
|
tab-widgets/TabDiveStatistics.cpp
|
|
tab-widgets/TabDiveStatistics.h
|
|
tab-widgets/TabDiveSite.cpp
|
|
tab-widgets/TabDiveSite.h
|
|
tab-widgets/maintab.cpp
|
|
tab-widgets/maintab.h
|
|
tableview.cpp
|
|
tableview.h
|
|
tagwidget.cpp
|
|
tagwidget.h
|
|
textedit.cpp
|
|
textedit.h
|
|
updatemanager.cpp
|
|
updatemanager.h
|
|
usersurvey.cpp
|
|
usersurvey.h
|
|
)
|
|
|
|
if(NOT NO_USERMANUAL)
|
|
set(SUBSURFACE_INTERFACE ${SUBSURFACE_INTERFACE}
|
|
usermanual.cpp
|
|
usermanual.h
|
|
)
|
|
endif()
|
|
|
|
if(NOT NO_PRINTING)
|
|
set(SUBSURFACE_INTERFACE ${SUBSURFACE_INTERFACE}
|
|
printdialog.cpp
|
|
printdialog.h
|
|
printer.cpp
|
|
printer.h
|
|
printoptions.cpp
|
|
printoptions.h
|
|
templateedit.cpp
|
|
templateedit.h
|
|
templatelayout.cpp
|
|
templatelayout.h
|
|
)
|
|
endif()
|
|
|
|
if (BTSUPPORT)
|
|
set(SUBSURFACE_INTERFACE ${SUBSURFACE_INTERFACE}
|
|
btdeviceselectiondialog.cpp
|
|
btdeviceselectiondialog.h
|
|
)
|
|
endif()
|
|
|
|
source_group("Subsurface Interface" FILES ${SUBSURFACE_INTERFACE})
|
|
|
|
# the yearly statistics widget.
|
|
set(SUBSURFACE_STATISTICS_LIB_SRCS
|
|
statistics/monthstatistics.cpp
|
|
statistics/monthstatistics.h
|
|
statistics/statisticsbar.cpp
|
|
statistics/statisticsbar.h
|
|
statistics/statisticswidget.cpp
|
|
statistics/statisticswidget.h
|
|
statistics/yearstatistics.cpp
|
|
statistics/yearstatistics.h
|
|
)
|
|
source_group("Subsurface Statistics" FILES ${SUBSURFACE_STATISTICS_LIB_SRCS})
|
|
|
|
qt5_wrap_ui(SUBSURFACE_UI_SRCS ${SUBSURFACE_UI})
|
|
|
|
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} ${SUBSURFACE_UI_SRCS})
|
|
target_link_libraries(subsurface_interface ${QT_LIBRARIES} ${GRANTLEE_LIBRARIES} subsurface_desktop_preferences)
|