WIP-dont-use

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
Dirk Hohndel 2024-08-30 21:19:27 -07:00
parent 29d9405a72
commit 52f156ee47
9 changed files with 24 additions and 19 deletions

View file

@ -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()

View file

@ -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

View file

@ -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()

View file

@ -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 + "%"
}

View file

@ -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: {

View file

@ -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

View file

@ -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)