3 import 
QtQuick.Controls.Material 2.3
     4 import 
QtQuick.Controls.Universal 2.3
    34     property DataSyncViewModel viewModel: null
    46                 Layout.fillWidth: 
true    47                 text: qsTr(
"Synchronization")
    52                 icon.name: 
"view-refresh"    53                 icon.source: 
"qrc:/de/skycoder42/qtmvvm/quick/icons/ic_sync.svg"    54                 text: qsTr(
"Synchronize")
    55                 onClicked: viewModel.syncOrConnect()
    60                 icon.name: 
"fingerprint-gui"    61                 icon.source: 
"qrc:/de/skycoder42/qtmvvm/quick/icons/ic_fingerprint.svg"    62                 text: qsTr(
"Edit Identity")
    63                 onClicked: viewModel.showDeviceInfo()
    70                     text: qsTr(
"Update exchange key")
    71                     onClicked: viewModel.accountManager.updateExchangeKey()
    77                     text: qsTr(
"Reload devices list")
    78                     onClicked: viewModel.accountManager.listDevices()
    84                     text: qsTr(
"Change remote server")
    85                     onClicked: viewModel.changeRemote()
    89                     text: qsTr(
"Reset Identity")
    90                     onClicked: viewModel.performReset()
   110                 text: qsTr(
"Synchronization enabled")
   111                 Layout.fillWidth: true
   114                     viewModel: _dataSyncView.
viewModel.syncManager
   115                     viewModelProperty: 
"syncEnabled"   117                     viewProperty: 
"checked"   123                 Layout.fillWidth: 
true   124                 text: viewModel.statusString
   127                 horizontalAlignment: Text.AlignHCenter
   128                 verticalAlignment: Text.AlignVCenter
   133                 Layout.fillWidth: 
true   136                 value: viewModel.syncManager.syncProgress
   137                 visible: !_errorLabel.visible
   142                 Layout.fillWidth: 
true   143                 wrapMode: Text.WordWrap
   144                 text: viewModel.syncManager.lastError
   151                 Layout.fillWidth: 
true   152                 Layout.minimumHeight: 1
   153                 Layout.maximumHeight: 1
   158                 Layout.fillWidth: 
true   159                 text: qsTr(
"Other Devices:")
   163                 id: _devicesScrollView
   165                 Layout.fillWidth: 
true   166                 Layout.fillHeight: 
true   172                     model: viewModel.sortedModel
   173                     delegate: SwipeDelegate {
   175                         width: _devicesScrollView.width
   177                         contentItem: ColumnLayout {
   183                                 Layout.fillWidth: 
true   189                                 font.pointSize: _nameLabel.font.pointSize * 0.8
   190                                 Layout.fillWidth: 
true   193                                 elide: Text.ElideMiddle
   198                         ListView.onRemove: SequentialAnimation {
   200                                 target: _swipeDelegate
   201                                 property: 
"ListView.delayRemove"   205                                 target: _swipeDelegate
   208                                 easing.type: Easing.InOutQuad
   211                                 target: _swipeDelegate
   212                                 property: 
"ListView.delayRemove"   217                         swipe.right: Rectangle {
   218                             height: _devicesScrollView.height
   220                             anchors.right: parent.right
   223                                     return Material.color(Material.Red);
   225                                     return Universal.color(Universal.Red);
   231                                 anchors.centerIn: parent
   232                                 implicitHeight: parent.height
   233                                 implicitWidth: parent.width
   235                                 icon.name: 
"user-trash"   236                                 icon.source: 
"qrc:/de/skycoder42/qtmvvm/quick/icons/ic_delete_forever.svg"   237                                 text: qsTr(
"Remove Device")
   239                                 Material.foreground: "white"
   240                                 Universal.foreground: "white"
   243                                     _swipeDelegate.swipe.close();
   244                                     viewModel.removeDevice(index)
   257         anchors.right: parent.right
   258         anchors.bottom: parent.bottom
   261         text: qsTr(
"Add new devices")
   262         icon.name: checked ? "tab-close" : "list-add"
   263         icon.source: checked ?
   264                          "qrc:/
de/skycoder42/qtmvvm/quick/icons/ic_close.svg" :
   265                          "qrc:/
de/skycoder42/qtmvvm/quick/icons/ic_add.svg"
   269             text: qsTr(
"Network Exchange")
   270             icon.name: "network-connect"
   271             icon.source: "qrc:/
de/skycoder42/qtmvvm/quick/icons/ic_exchange.svg"
   273             onTriggered: viewModel.startNetworkExchange()
   277             text: qsTr(
"Export to file")
   278             icon.name: "document-export"
   279             icon.source: "qrc:/
de/skycoder42/qtmvvm/quick/icons/ic_export.svg"
   281             onTriggered: viewModel.startExport()
   285             text: qsTr(
"Import from file")
   286             icon.name: "document-import"
   287             icon.source: "qrc:/
de/skycoder42/qtmvvm/quick/icons/ic_import.svg"
   289             onTriggered: viewModel.startImport()
 A QML class to create a local mvvm multiway binding. 
 
The QML import for the QtMvvmDataSyncCore QML module. 
 
The QML import for the QtMvvmCore QML module. 
 
QString currentStyle
The name of the currently active Quick Controls 2 Style. 
 
A helper class to get style-dependant colors. 
 
The QML import for the QtMvvmQuick QML module. 
 
QObject viewModel
The object in the role of a viewmodel. 
 
A QML singleton to access common presenter methods globally.