mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
WIP-dont-use
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
parent
29d9405a72
commit
52f156ee47
9 changed files with 24 additions and 19 deletions
|
@ -375,7 +375,7 @@ android {
|
|||
../install-root-$${QT_ARCH}/lib/libzip.a \
|
||||
../install-root-$${QT_ARCH}/lib/libxslt.a \
|
||||
../install-root-$${QT_ARCH}/lib/libxml2.a \
|
||||
../install-root-$${QT_ARCH}/lib/libsqlite3.a \
|
||||
../install-root-$${QT_ARCH}/lib/libsqliteX.so \
|
||||
../install-root-$${QT_ARCH}/lib/libssl_1_1.so \
|
||||
../install-root-$${QT_ARCH}/lib/libcrypto_1_1.so \
|
||||
../googlemaps-build/libplugins_geoservices_qtgeoservices_googlemaps_$${QT_ARCH}.so
|
||||
|
|
|
@ -2,12 +2,12 @@
|
|||
|
||||
set(SUBSURFACE_MOBILE_SRCS
|
||||
qmlinterface.cpp
|
||||
qmlmanager.cpp
|
||||
qmlmanager.cpp
|
||||
statsmanager.cpp
|
||||
themeinterface.cpp
|
||||
)
|
||||
|
||||
if (SUBSURFACE_TARGET_EXECUTABLE MATCHES "MobileExecutable")
|
||||
add_library(subsurface_mobile STATIC ${SUBSURFACE_MOBILE_SRCS})
|
||||
target_link_libraries(subsurface_mobile ${QT_LIBRARIES})
|
||||
add_library(subsurface_mobile STATIC ${SUBSURFACE_MOBILE_SRCS})
|
||||
target_link_libraries(subsurface_mobile ${QT_LIBRARIES})
|
||||
endif()
|
||||
|
|
|
@ -38,7 +38,7 @@ Kirigami.ScrollablePage {
|
|||
|
||||
Component {
|
||||
id: diveOrTripDelegate
|
||||
Kirigami.AbstractListItem {
|
||||
Controls.ItemDelegate {
|
||||
// this allows us to access properties of the currentItem from outside
|
||||
property variant myData: model
|
||||
property var view: ListView.view
|
||||
|
@ -46,7 +46,7 @@ Kirigami.ScrollablePage {
|
|||
property bool invalid: isInvalid === true
|
||||
id: diveOrTripDelegateItem
|
||||
padding: 0
|
||||
supportsMouseEvents: true
|
||||
//supportsMouseEvents: true
|
||||
anchors {
|
||||
left: parent ? parent.left : undefined
|
||||
right: parent ? parent.right : undefined
|
||||
|
@ -458,7 +458,7 @@ Kirigami.ScrollablePage {
|
|||
icon {
|
||||
name: ":/icons/list-add"
|
||||
}
|
||||
color: subsurfaceTheme.textColor
|
||||
//color: subsurfaceTheme.textColor
|
||||
text: qsTr("Add dive")
|
||||
onTriggered: {
|
||||
startAddDive()
|
||||
|
@ -469,7 +469,7 @@ Kirigami.ScrollablePage {
|
|||
icon {
|
||||
name: ":icons/ic_filter_list"
|
||||
}
|
||||
color: subsurfaceTheme.textColor
|
||||
//color: subsurfaceTheme.textColor
|
||||
text: qsTr("Filter dives")
|
||||
onTriggered: {
|
||||
rootItem.filterToggle = !rootItem.filterToggle
|
||||
|
|
|
@ -12,10 +12,10 @@ TemplatePage {
|
|||
|
||||
property int selectedExport: ExportType.EX_DIVES_XML
|
||||
|
||||
FileDialog {
|
||||
FolderDialog {
|
||||
id: saveAsDialog
|
||||
folder: shortcuts.documents
|
||||
selectFolder: true
|
||||
currentFolder: shortcuts.documents
|
||||
//selectFolder: true
|
||||
onAccepted: {
|
||||
manager.exportToFile(selectedExport, fileUrls, anonymize.checked)
|
||||
pageStack.pop()
|
||||
|
|
|
@ -645,7 +645,7 @@ TemplatePage {
|
|||
to: 150
|
||||
stepSize: 1
|
||||
value: PrefTechnicalDetails.gflow
|
||||
validator: RegExpValidator { regExp: /1?\d{0,2}%?/ }
|
||||
validator: RegularExpressionValidator { regularExpression: /1?\d{0,2}%?/ }
|
||||
textFromValue: function (value, locale) {
|
||||
return value + "%"
|
||||
}
|
||||
|
@ -679,7 +679,7 @@ TemplatePage {
|
|||
to: 150
|
||||
stepSize: 1
|
||||
value: PrefTechnicalDetails.gfhigh
|
||||
validator: RegExpValidator { regExp: /1?\d{0,2}%?/ }
|
||||
validator: RegularExpressionValidator { regularExpression: /1?\d{0,2}%?/ }
|
||||
textFromValue: function (value, locale) {
|
||||
return value + "%"
|
||||
}
|
||||
|
|
|
@ -47,7 +47,7 @@ Kirigami.Page {
|
|||
|
||||
Component {
|
||||
id: chartListDelegate
|
||||
Kirigami.AbstractListItem {
|
||||
Controls.ItemDelegate {
|
||||
id: chartListDelegateItem
|
||||
height: isHeader ? 1 + 8 * Kirigami.Units.smallSpacing : 11 * Kirigami.Units.smallSpacing // delegateInnerItem.height
|
||||
onClicked: {
|
||||
|
|
|
@ -735,9 +735,9 @@ if you have network connectivity and want to sync your data to cloud storage."),
|
|||
}
|
||||
}
|
||||
|
||||
QMLManager {
|
||||
id: manager
|
||||
}
|
||||
// QMLManager {
|
||||
// id: manager
|
||||
// }
|
||||
|
||||
property bool initialized: manager.initialized
|
||||
|
||||
|
|
|
@ -10,6 +10,7 @@
|
|||
#include <QColor>
|
||||
#include <QFile>
|
||||
#include <QTimer>
|
||||
#include <qqmlintegration.h>
|
||||
|
||||
#include "core/btdiscovery.h"
|
||||
#include "core/downloadfromdcthread.h"
|
||||
|
@ -29,6 +30,7 @@ struct DiveSiteChange; // An obscure implementation artifact - remove in due cou
|
|||
|
||||
class QMLManager : public QObject {
|
||||
Q_OBJECT
|
||||
QML_ELEMENT
|
||||
Q_PROPERTY(bool loadFromCloud MEMBER m_loadFromCloud WRITE setLoadFromCloud NOTIFY loadFromCloudChanged)
|
||||
Q_PROPERTY(QString startPageText MEMBER m_startPageText WRITE setStartPageText NOTIFY startPageTextChanged)
|
||||
Q_PROPERTY(bool verboseEnabled MEMBER m_verboseEnabled WRITE setVerboseEnabled NOTIFY verboseEnabledChanged)
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
// SPDX-License-Identifier: GPL-2.0
|
||||
#include <QQmlEngine>
|
||||
#include <QQuickItem>
|
||||
#include <QDebug>
|
||||
|
||||
#ifdef MAP_SUPPORT
|
||||
#include "map-widget/qmlmapwidgethelper.h"
|
||||
|
@ -97,6 +98,9 @@ void run_mobile_ui(double initial_font_size)
|
|||
#endif
|
||||
QScreen *appScreen = QApplication::screens().at(0);
|
||||
int availableScreenWidth = appScreen->availableSize().width();
|
||||
|
||||
QScopedPointer<QMLManager> qmlmanager(new QMLManager);
|
||||
|
||||
QQmlApplicationEngine engine;
|
||||
QQmlContext *ctxt = engine.rootContext();
|
||||
|
||||
|
@ -121,6 +125,7 @@ void run_mobile_ui(double initial_font_size)
|
|||
ctxt->setContextProperty("vendorList", vendorList);
|
||||
ctxt->setContextProperty("swipeModel", MobileModels::instance()->swipeModel());
|
||||
ctxt->setContextProperty("diveModel", MobileModels::instance()->listModel());
|
||||
ctxt->setContextProperty("manager", qmlmanager->instance());
|
||||
set_non_bt_addresses();
|
||||
|
||||
// we need to setup the initial font size before the QML UI is instantiated
|
||||
|
@ -131,8 +136,6 @@ void run_mobile_ui(double initial_font_size)
|
|||
ctxt->setContextProperty("logModel", MessageHandlerModel::self());
|
||||
ctxt->setContextProperty("subsurfaceTheme", themeInterface);
|
||||
|
||||
qmlRegisterUncreatableType<QMLManager>("org.subsurfacedivelog.mobile",1,0,"ExportType","Enum is not a type");
|
||||
|
||||
#ifdef SUBSURFACE_MOBILE_DESKTOP
|
||||
if (!testqml.empty()) {
|
||||
QString fileLoad(testqml.c_str());
|
||||
|
|
Loading…
Add table
Reference in a new issue