- adapted to new ScStw import paths
- fixed cancel not working
This commit is contained in:
parent
ace103c6bc
commit
39d66c2150
16 changed files with 64 additions and 165 deletions
|
@ -31,7 +31,6 @@ private:
|
|||
ScStwClient * scStwClient;
|
||||
|
||||
QTimer * timerTextRefreshTimer;
|
||||
// TODO: DOINEED? QTimer * nextStartActionTimer;
|
||||
|
||||
ScStwRace * localRace;
|
||||
ScStwRemoteMonitorRace * remoteRace;
|
||||
|
|
|
@ -21,7 +21,11 @@ import QtQuick.Window 2.2
|
|||
import QtQuick.Controls 2.4
|
||||
import QtQuick.Layouts 1.3
|
||||
import QtGraphicalEffects 1.0
|
||||
import com.itsblue.speedclimbingstopwatch 2.0
|
||||
|
||||
import de.itsblue.ScStw 2.0
|
||||
import de.itsblue.ScStw.Styling 2.0
|
||||
import de.itsblue.ScStw.Styling.Components 1.0
|
||||
import de.itsblue.ScStwApp 2.0
|
||||
|
||||
import "../components"
|
||||
|
||||
|
|
|
@ -21,7 +21,11 @@ import QtQuick.Window 2.2
|
|||
import QtQuick.Controls 2.4
|
||||
import QtQuick.Layouts 1.3
|
||||
import QtGraphicalEffects 1.0
|
||||
import com.itsblue.speedclimbingstopwatch 2.0
|
||||
|
||||
import de.itsblue.ScStw 2.0
|
||||
import de.itsblue.ScStw.Styling 2.0
|
||||
import de.itsblue.ScStw.Styling.Components 1.0
|
||||
import de.itsblue.ScStwApp 2.0
|
||||
|
||||
import "../components"
|
||||
|
||||
|
|
|
@ -21,7 +21,12 @@ import QtQuick.Window 2.2
|
|||
import QtQuick.Controls 2.4
|
||||
import QtQuick.Layouts 1.3
|
||||
import QtGraphicalEffects 1.0
|
||||
import com.itsblue.speedclimbingstopwatch 2.0
|
||||
|
||||
import de.itsblue.ScStw 2.0
|
||||
import de.itsblue.ScStw.Styling 2.0
|
||||
import de.itsblue.ScStw.Styling.Components 1.0
|
||||
import de.itsblue.ScStwApp 2.0
|
||||
|
||||
import "../components"
|
||||
|
||||
|
||||
|
|
|
@ -21,7 +21,11 @@ import QtQuick.Window 2.2
|
|||
import QtQuick.Controls 2.4
|
||||
import QtQuick.Layouts 1.3
|
||||
import QtGraphicalEffects 1.0
|
||||
import com.itsblue.speedclimbingstopwatch 2.0
|
||||
|
||||
import de.itsblue.ScStw 2.0
|
||||
import de.itsblue.ScStw.Styling 2.0
|
||||
import de.itsblue.ScStw.Styling.Components 1.0
|
||||
import de.itsblue.ScStwApp 2.0
|
||||
|
||||
import "../components"
|
||||
|
||||
|
|
|
@ -21,7 +21,12 @@ import QtQuick.Window 2.2
|
|||
import QtQuick.Controls 2.4
|
||||
import QtQuick.Layouts 1.3
|
||||
import QtGraphicalEffects 1.0
|
||||
import com.itsblue.speedclimbingstopwatch 2.0
|
||||
|
||||
import de.itsblue.ScStw 2.0
|
||||
import de.itsblue.ScStw.Styling 2.0
|
||||
import de.itsblue.ScStw.Styling.Components 1.0
|
||||
import de.itsblue.ScStwApp 2.0
|
||||
|
||||
import "../components"
|
||||
|
||||
RemoteDataListView {
|
||||
|
|
|
@ -7,7 +7,11 @@ import QtGraphicalEffects 1.0
|
|||
import QtQuick.Controls.Styles 1.4
|
||||
import QtQuick.Templates 2.12 as T
|
||||
|
||||
import com.itsblue.speedclimbingstopwatch 2.0
|
||||
|
||||
import de.itsblue.ScStw 2.0
|
||||
import de.itsblue.ScStw.Styling 2.0
|
||||
import de.itsblue.ScStw.Styling.Components 1.0
|
||||
import de.itsblue.ScStwApp 2.0
|
||||
|
||||
import "../components"
|
||||
|
||||
|
|
|
@ -5,7 +5,12 @@ import QtQuick.Controls 2.2
|
|||
import QtQuick.Layouts 1.3
|
||||
import QtGraphicalEffects 1.0
|
||||
import QtQuick.Controls.Styles 1.4
|
||||
import com.itsblue.speedclimbingstopwatch 2.0
|
||||
|
||||
import de.itsblue.ScStw 2.0
|
||||
import de.itsblue.ScStw.Styling 2.0
|
||||
import de.itsblue.ScStw.Styling.Components 1.0
|
||||
import de.itsblue.ScStwApp 2.0
|
||||
|
||||
import "../components"
|
||||
|
||||
Column {
|
||||
|
|
|
@ -6,7 +6,11 @@ import QtQuick.Layouts 1.3
|
|||
import QtGraphicalEffects 1.0
|
||||
import QtQuick.Controls.Styles 1.4
|
||||
|
||||
import com.itsblue.speedclimbingstopwatch 2.0
|
||||
import de.itsblue.ScStw 2.0
|
||||
import de.itsblue.ScStw.Styling 2.0
|
||||
import de.itsblue.ScStw.Styling.Components 1.0
|
||||
import de.itsblue.ScStwApp 2.0
|
||||
|
||||
import "../components"
|
||||
|
||||
Column {
|
||||
|
|
|
@ -1,70 +0,0 @@
|
|||
/*
|
||||
Speed Climbing Stopwatch - Simple Stopwatch for Climbers
|
||||
Copyright (C) 2018 Itsblue Development - Dorian Zeder
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU Affero General Public License as published
|
||||
by the Free Software Foundation, version 3 of the License.
|
||||
|
||||
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 Affero General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Affero General Public License
|
||||
along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
import QtQuick 2.0
|
||||
|
||||
SequentialAnimation {
|
||||
id: root
|
||||
property QtObject target
|
||||
property string fadeProperty: "scale"
|
||||
property int fadeDuration: 150
|
||||
property int fadeDuration_in: fadeDuration
|
||||
property int fadeDuration_out: fadeDuration
|
||||
property alias outValue: outAnimation.to
|
||||
property alias inValue: inAnimation.to
|
||||
property alias outEasingType: outAnimation.easing.type
|
||||
property alias inEasingType: inAnimation.easing.type
|
||||
property string easingType: "Quad"
|
||||
ParallelAnimation {
|
||||
NumberAnimation { // in the default case, fade scale to 0
|
||||
id: outAnimation
|
||||
target: root.target
|
||||
property: "scale"
|
||||
duration: root.fadeDuration_in
|
||||
to: 0.9
|
||||
easing.type: Easing["In"+root.easingType]
|
||||
}
|
||||
NumberAnimation { // in the default case, fade scale to 0
|
||||
id: outAnimation2
|
||||
target: root.target
|
||||
property: "opacity"
|
||||
duration: root.fadeDuration_in
|
||||
to: 0
|
||||
easing.type: Easing["In"+root.easingType]
|
||||
}
|
||||
}
|
||||
PropertyAction { } // actually change the property targeted by the Behavior between the 2 other animations
|
||||
ParallelAnimation {
|
||||
NumberAnimation { // in the default case, fade scale back to 1
|
||||
id: inAnimation
|
||||
target: root.target
|
||||
property: root.fadeProperty
|
||||
duration: root.fadeDuration_out
|
||||
to: 1
|
||||
easing.type: Easing["Out"+root.easingType]
|
||||
}
|
||||
NumberAnimation { // in the default case, fade scale to 0
|
||||
id: inAnimation2
|
||||
target: root.target
|
||||
property: "opacity"
|
||||
duration: root.fadeDuration_in
|
||||
to: 1
|
||||
easing.type: Easing["In"+root.easingType]
|
||||
}
|
||||
}
|
||||
|
||||
}
|
|
@ -1,65 +0,0 @@
|
|||
import QtQuick 2.3
|
||||
import QtQuick.Controls 2.4
|
||||
import QtQuick.Controls.Styles 1.2
|
||||
|
||||
BusyIndicator {
|
||||
id: control
|
||||
|
||||
property double animationSpeed: 1000
|
||||
property double formFactor: 4.5
|
||||
|
||||
property color lineColor: "#21be2b"
|
||||
|
||||
contentItem: Item {
|
||||
implicitWidth: 64
|
||||
implicitHeight: 64
|
||||
|
||||
Item {
|
||||
id: item
|
||||
|
||||
anchors.fill: parent
|
||||
|
||||
property int currentHeight: 0
|
||||
|
||||
SequentialAnimation {
|
||||
running: control.running
|
||||
loops: Animation.Infinite
|
||||
|
||||
NumberAnimation {
|
||||
target: item
|
||||
property: "currentHeight"
|
||||
from: 0
|
||||
to: 800
|
||||
duration: control.animationSpeed
|
||||
}
|
||||
}
|
||||
|
||||
Row {
|
||||
|
||||
anchors.fill: parent
|
||||
|
||||
spacing: item.width / 9
|
||||
|
||||
Repeater {
|
||||
id: repeater
|
||||
model: 5
|
||||
|
||||
Rectangle {
|
||||
|
||||
property double heightMultiplier: Math.abs( Math.sin( ( ((item.currentHeight/100) + (index*(control.formFactor/repeater.model)))) * (Math.PI/8) ) )
|
||||
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
|
||||
width: item.width / 9
|
||||
height: ( heightMultiplier ) * ( item.height - 1 ) + 1
|
||||
|
||||
radius: width * 0.5
|
||||
|
||||
color: control.lineColor
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
|
@ -1,6 +1,8 @@
|
|||
import QtQuick 2.10
|
||||
import QtQuick.Controls 2.4
|
||||
|
||||
import de.itsblue.ScStw.Styling.Components 1.0
|
||||
|
||||
Item {
|
||||
id: control
|
||||
|
||||
|
@ -73,8 +75,12 @@ Item {
|
|||
|
||||
}
|
||||
|
||||
FancyBusyIndicator {
|
||||
BusyIndicator {
|
||||
anchors.centerIn: parent
|
||||
|
||||
width: app.landscape() ? parent.height * 0.1:parent.width * 0.1
|
||||
height: width
|
||||
|
||||
opacity: !(status === 200 || status === 902) ? 1:0
|
||||
|
||||
Behavior on opacity {
|
||||
|
|
|
@ -26,7 +26,10 @@ import "./ProfilesDialog"
|
|||
import "./SettingsDialog"
|
||||
//import QtQuick.Layouts 1.11
|
||||
|
||||
import com.itsblue.speedclimbingstopwatch 2.0
|
||||
import de.itsblue.ScStw 2.0
|
||||
import de.itsblue.ScStw.Styling 2.0
|
||||
import de.itsblue.ScStw.Styling.Components 1.0
|
||||
import de.itsblue.ScStwApp 2.0
|
||||
|
||||
Window {
|
||||
visible: true
|
||||
|
@ -873,7 +876,7 @@ Window {
|
|||
}
|
||||
|
||||
function cancel() {
|
||||
var ret = speedBackend.race.cancelStart(false)
|
||||
var ret = speedBackend.race.cancel()
|
||||
if(ret !== 200){
|
||||
console.log("+ --- error canellingr race: " + ret)
|
||||
}
|
||||
|
|
|
@ -3,7 +3,6 @@
|
|||
<file>main.qml</file>
|
||||
<file>components/ProgressCircle.qml</file>
|
||||
<file>components/ConnectionDelegate.qml</file>
|
||||
<file>components/FadeAnimation.qml</file>
|
||||
<file>components/ConnectionIcon.qml</file>
|
||||
<file>components/NextPageDelegate.qml</file>
|
||||
<file>components/FancyButton.qml</file>
|
||||
|
@ -12,7 +11,6 @@
|
|||
<file>components/InputDelegate.qml</file>
|
||||
<file>components/SmoothSliderDelegate.qml</file>
|
||||
<file>components/RemoteDataListView.qml</file>
|
||||
<file>components/FancyBusyIndicator.qml</file>
|
||||
<file>ProfilesDialog/ProfilesDialog.qml</file>
|
||||
<file>ProfilesDialog/ProfilesStack.qml</file>
|
||||
<file>ProfilesDialog/ProfileListPage.qml</file>
|
||||
|
|
|
@ -54,12 +54,8 @@
|
|||
//#include "headers/speedtimer.h"
|
||||
//#include "headers/climbingrace.h"
|
||||
#include "headers/scstwappbackend.h"
|
||||
#include <scstwtimer.h>
|
||||
#include <scstwrace.h>
|
||||
#include <ScStw.hpp>
|
||||
#include <scstwtimer.h>
|
||||
#include <scstwapptheme.h>
|
||||
#include <scstwappthememanager.h>
|
||||
#include <scstwlibraries.h>
|
||||
#include <scstwstyling.h>
|
||||
#include <QTranslator>
|
||||
|
||||
int main(int argc, char *argv[])
|
||||
|
@ -88,21 +84,18 @@ int main(int argc, char *argv[])
|
|||
|
||||
AppSettings * pAppSettings = new AppSettings();
|
||||
|
||||
// setup speed backend and App themes
|
||||
qmlRegisterType<ScStwAppBackend>("com.itsblue.speedclimbingstopwatch", 2, 0, "SpeedBackend");
|
||||
qmlRegisterType<ScStwRace>("com.itsblue.speedclimbingstopwatch", 2, 0, "ScStwRace");
|
||||
qmlRegisterType<ScStwTimer>("com.itsblue.speedclimbingstopwatch", 2, 0, "ScStwTimer");
|
||||
qmlRegisterUncreatableType<ScStwAppTheme>("com.itsblue.speedclimbingstopwatch", 2, 0, "ScStwAppTheme", "The ScStwAppTheme has to be managed by a ScStwAppTheme manager and is therefore not creatable");
|
||||
qmlRegisterType<ScStwAppThemeManager>("com.itsblue.speedclimbingstopwatch", 2, 0, "ScStwAppThemeManager");
|
||||
qmlRegisterType<ScStw>("com.itsblue.speedclimbingstopwatch", 2, 0, "ScStw");
|
||||
qmlRegisterType<ScStwClient>("com.itsblue.speedclimbingstopwatch", 2, 0, "ScStwClient");
|
||||
// setup speed backend
|
||||
qmlRegisterType<ScStwAppBackend>("de.itsblue.ScStwApp", 2, 0, "SpeedBackend");
|
||||
|
||||
QQmlApplicationEngine engine;
|
||||
ScStwLibraries::init();
|
||||
ScStwStyling::init(&engine);
|
||||
|
||||
engine.load(QUrl(QStringLiteral("qrc:/main.qml")));
|
||||
|
||||
QQmlContext *context = engine.rootContext();
|
||||
|
||||
// stup app settings
|
||||
// setup app settings
|
||||
context->setContextProperty("_cppAppSettings", pAppSettings);
|
||||
|
||||
if (engine.rootObjects().isEmpty())
|
||||
|
|
|
@ -1 +1 @@
|
|||
Subproject commit c027fa242afc77746af5028af2919ffd3905658b
|
||||
Subproject commit 81ee19819c8698054279557090c94280c43ea41d
|
Reference in a new issue