2019-06-25 20:59:10 +02:00
|
|
|
// This file is part of Friendiqa
|
|
|
|
// https://git.friendi.ca/lubuwest/Friendiqa
|
2020-05-24 21:14:23 +02:00
|
|
|
// Copyright (C) 2020 Marco R. <thomasschmidt45@gmx.net>
|
2019-06-25 20:59:10 +02:00
|
|
|
//
|
|
|
|
// This program is free software: you can redistribute it and/or modify
|
|
|
|
// it under the terms of the GNU General Public License as published by
|
|
|
|
// the Free Software Foundation, either version 3 of the License, or
|
|
|
|
// (at your option) any later version.
|
|
|
|
//
|
|
|
|
// In addition, as a special exception, the copyright holders give
|
|
|
|
// permission to link the code of portions of this program with the
|
|
|
|
// OpenSSL library under certain conditions as described in each
|
|
|
|
// individual source file, and distribute linked combinations including
|
|
|
|
// the two.
|
|
|
|
//
|
|
|
|
// You must obey the GNU General Public License in all respects for all
|
|
|
|
// of the code used other than OpenSSL. If you modify file(s) with this
|
|
|
|
// exception, you may extend this exception to your version of the
|
|
|
|
// file(s), but you are not obligated to do so. If you do not wish to do
|
|
|
|
// so, delete this exception statement from your version. If you delete
|
|
|
|
// this exception statement from all source files in the program, then
|
|
|
|
// also delete it here.
|
|
|
|
//
|
|
|
|
// This program is distributed in the hope that it will be useful,
|
|
|
|
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
// GNU General Public License for more details.
|
|
|
|
//
|
|
|
|
// You should have received a copy of the GNU General Public License
|
|
|
|
// along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
|
|
|
|
|
|
import QtQuick 2.11
|
2020-05-24 21:14:23 +02:00
|
|
|
import QtQuick.Controls 2.12
|
2021-10-28 21:56:00 +02:00
|
|
|
import QtQuick.Controls.Material 2.12
|
2019-06-25 20:59:10 +02:00
|
|
|
import "qrc:/qml/configqml"
|
2020-05-24 21:14:23 +02:00
|
|
|
import "qrc:/qml/genericqml"
|
2019-06-25 20:59:10 +02:00
|
|
|
import "qrc:/js/service.js" as Service
|
|
|
|
|
2021-10-28 21:56:00 +02:00
|
|
|
Page{
|
|
|
|
//color:"white"
|
2019-06-25 20:59:10 +02:00
|
|
|
width:root.width
|
2020-05-24 21:14:23 +02:00
|
|
|
height: root.height
|
|
|
|
|
|
|
|
//height:root.height
|
2021-10-28 21:56:00 +02:00
|
|
|
Label {
|
2019-06-25 20:59:10 +02:00
|
|
|
text: qsTr("Sync Interval (0=None)")
|
2021-05-12 21:41:34 +02:00
|
|
|
font.pointSize: osSettings.bigFontSize
|
2019-06-25 20:59:10 +02:00
|
|
|
//visible: false
|
2021-05-12 21:41:34 +02:00
|
|
|
x: root.fontFactor*osSettings.bigFontSize; y: root.fontFactor*osSettings.bigFontSize; //width:35*mm;wrapMode: Text.Wrap
|
2019-06-25 20:59:10 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
Slider{ id: messageIntervalSlider
|
2021-05-12 21:41:34 +02:00
|
|
|
x:8*root.fontFactor*osSettings.bigFontSize; y: 4*root.fontFactor*osSettings.bigFontSize;
|
|
|
|
width: root.width-10*root.fontFactor*osSettings.bigFontSize;
|
|
|
|
height:2*root.fontFactor*osSettings.bigFontSize
|
2020-05-24 21:14:23 +02:00
|
|
|
value: globaloptions.hasOwnProperty("syncinterval")?globaloptions.syncinterval:0
|
2019-06-25 20:59:10 +02:00
|
|
|
from: 0;to:120; stepSize: 15
|
|
|
|
}
|
|
|
|
Rectangle{
|
2021-05-12 21:41:34 +02:00
|
|
|
x: root.fontFactor*osSettings.bigFontSize; y:4*root.fontFactor*osSettings.bigFontSize;
|
|
|
|
width: 4*root.fontFactor*osSettings.bigFontSize; height: 2*root.fontFactor*osSettings.bigFontSize;
|
2021-10-28 21:56:00 +02:00
|
|
|
color: Material.dialogColor
|
|
|
|
radius: 0.5*mm
|
2021-05-12 21:41:34 +02:00
|
|
|
TextEdit{
|
|
|
|
id: messageIntervalField
|
|
|
|
anchors.fill: parent
|
|
|
|
font.pointSize: osSettings.bigFontSize
|
|
|
|
verticalAlignment:TextEdit.AlignRight
|
2021-10-28 21:56:00 +02:00
|
|
|
color: Material.primaryTextColor
|
2021-05-12 21:41:34 +02:00
|
|
|
text:messageIntervalSlider.value
|
|
|
|
focus: true
|
|
|
|
selectByMouse: true
|
|
|
|
onTextChanged: {
|
|
|
|
Service.updateglobaloptions(root.db,"syncinterval",text);
|
|
|
|
if(osSettings.osType=="Android"){
|
2019-06-25 20:59:10 +02:00
|
|
|
alarm.setAlarm(text);
|
2021-05-12 21:41:34 +02:00
|
|
|
} else if(osSettings.osType=="Linux" && text !=0){
|
|
|
|
root.updateSyncinterval(parseInt(text))
|
|
|
|
}
|
|
|
|
}
|
2019-06-25 20:59:10 +02:00
|
|
|
}
|
|
|
|
}
|
2021-10-28 21:56:00 +02:00
|
|
|
Label{x: 6*root.fontFactor*osSettings.bigFontSize; y: 4*root.fontFactor*osSettings.bigFontSize;
|
2021-05-12 21:41:34 +02:00
|
|
|
width: 2*root.fontFactor*osSettings.bigFontSize; height: 1.5*root.fontFactor*osSettings.bigFontSize;
|
|
|
|
font.pointSize: osSettings.bigFontSize
|
2019-06-25 20:59:10 +02:00
|
|
|
text:qsTr("Min.")
|
|
|
|
}
|
|
|
|
|
2020-05-24 21:14:23 +02:00
|
|
|
ScrollView{
|
|
|
|
width: root.width
|
2021-05-12 21:41:34 +02:00
|
|
|
height: root.height - 10*root.fontFactor*osSettings.bigFontSize;
|
|
|
|
y:7*root.fontFactor*osSettings.bigFontSize
|
2020-05-24 21:14:23 +02:00
|
|
|
clip:true
|
|
|
|
Column{
|
|
|
|
width: parent.width
|
|
|
|
spacing:mm
|
|
|
|
SyncComponent{adapter:"Timeline"}
|
|
|
|
SyncComponent{adapter:"Replies"}
|
|
|
|
SyncComponent{ adapter:"DirectMessages"}
|
|
|
|
SyncComponent{ adapter:"Notifications"}
|
|
|
|
SyncComponent{ adapter: "Events"}
|
2021-05-12 21:41:34 +02:00
|
|
|
SyncComponent{adapter: "FriendRequests"}
|
2020-05-24 21:14:23 +02:00
|
|
|
}
|
2019-06-25 20:59:10 +02:00
|
|
|
}
|
|
|
|
|
2021-10-28 21:56:00 +02:00
|
|
|
// MButton{
|
|
|
|
// id:closeButton
|
|
|
|
// anchors.top: parent.top
|
|
|
|
// anchors.topMargin: osSettings.bigFontSize
|
|
|
|
// anchors.right: parent.right
|
|
|
|
// anchors.rightMargin: 1*mm
|
|
|
|
// width: 2*root.fontFactor*osSettings.bigFontSize;
|
|
|
|
// text: "\uf057"
|
|
|
|
// font.pointSize: osSettings.bigFontSize
|
|
|
|
// onClicked:{rootstackView.pop()}
|
|
|
|
// }
|
2019-06-25 20:59:10 +02:00
|
|
|
}
|