diff --git a/graphics/icons/error.png b/graphics/icons/error.png
new file mode 100644
index 0000000..7c64f33
Binary files /dev/null and b/graphics/icons/error.png differ
diff --git a/qml/ErrorDialog.qml b/qml/ErrorDialog.qml
new file mode 100644
index 0000000..fe78f43
--- /dev/null
+++ b/qml/ErrorDialog.qml
@@ -0,0 +1,84 @@
+/*
+ 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 .
+*/
+
+import QtQuick 2.9
+import QtMultimedia 5.8
+import QtQuick.Window 2.2
+import QtQuick.Controls 2.2
+import QtQuick.Layouts 1.3
+import com.itsblue.speedclimbingstopwatch 1.0
+import "./styles"
+
+
+Popup {
+ id: root
+ x: startButt.x
+ y: startButt.y
+ width: startButt.width
+ height: startButt.height
+ modal: true
+
+ enter: Transition {
+ NumberAnimation { properties: "scale"; from: 0; to: 1; duration: 300; easing.type: Easing.Linear }
+ }
+
+ exit: Transition {
+ NumberAnimation { properties: "scale"; from: 1; to: 0; duration: 300; easing.type: Easing.Linear }
+ }
+
+ background: Rectangle {
+ radius: width * 0.5
+ color: StyleSettings.viewColor
+ border.color: StyleSettings.lineColor
+ border.width: 1
+
+ Label {
+ id: head_text
+ text: "error"
+ font.pixelSize: headlineUnderline.width * 0.1
+ color: enabled ? StyleSettings.textColor:StyleSettings.disabledTextColor
+ anchors {
+ horizontalCenter: parent.horizontalCenter
+ top: parent.top
+ topMargin: headlineUnderline.anchors.topMargin / 2 - height / 2
+ }
+ }
+
+ Rectangle {
+ id: headlineUnderline
+ height: 1
+ width: parent.width
+ color: StyleSettings.lineColor
+ anchors {
+ top: parent.top
+ left: parent.left
+ right: parent.right
+ topMargin: parent.height * 0.15
+ rightMargin: parent.radius - Math.sqrt(Math.pow(parent.radius,2)-Math.pow(parent.radius-anchors.topMargin,2))
+ leftMargin: parent.radius - Math.sqrt(Math.pow(parent.radius,2)-Math.pow(parent.radius-anchors.topMargin,2))
+ }
+ }
+
+ Image {
+ id: errorIcon
+ source: "qrc:/graphics/icons/error.png"
+ anchors.centerIn: parent
+ height: parent.height * 0.5
+ width: height
+ }
+ }
+}
diff --git a/qml/SettingsDialog.qml b/qml/SettingsDialog.qml
index a7168db..f568ee0 100644
--- a/qml/SettingsDialog.qml
+++ b/qml/SettingsDialog.qml
@@ -139,6 +139,7 @@ Popup {
StackView {
id: options_stack
property int text_pixelSize: root.height * 0.06
+ property int rowSpacing: root.height * 0.01
initialItem: settings
width: headlineUnderline.width
@@ -163,6 +164,7 @@ Popup {
Column {
property string title: qsTr("Options")
id: settings_col
+ spacing: options_stack.rowSpacing
/*----Connect to external devices----*/
NextPageDelegate {
@@ -199,6 +201,23 @@ Popup {
StyleSettings.setTheme()
}
}
+
+ /*----Error Dialog----*/
+ ItemDelegate {
+ id: error_del
+ text: qsTr("open error popup")
+ width: parent.width
+
+ contentItem: Text {
+ text: parent.text
+ color: StyleSettings.textColor
+ font.pixelSize: options_stack.text_pixelSize
+ }
+
+ onClicked: {
+ errorDialog.open()
+ }
+ }
}
}
diff --git a/qml/main.qml b/qml/main.qml
index 604bb75..b443ace 100644
--- a/qml/main.qml
+++ b/qml/main.qml
@@ -51,7 +51,7 @@ Window {
property var last_run : {
'stop_type': "", 'time': 0, 'react_time': 0
- };
+ }
//array that contains all connections an their atatus
property var connections: {
@@ -119,7 +119,7 @@ Window {
BaseStationConn {
id: baseConn
- ipAdress: "raspberrypi.local"
+ ipAdress: "localhost"
property var status: {'status': baseConn.state, 'progress': baseConn.progress, 'connections': baseConn.connections}
@@ -497,10 +497,11 @@ Window {
id: prog_refresh
running: parent.opacity === 1 && baseConn.state !== "connected"
interval: 1
- repeat: true
+ repeat: false
onTriggered: {
console.log("prog refresh timer")
prog.arcEnd = 360 * (( next_actionTimer.interval - ( new Date().getTime() - next_actionTimer.started_at ) ) / next_actionTimer.interval)
+ prog_refresh.start()
}
}
}
@@ -571,6 +572,10 @@ Window {
}
}
+ ErrorDialog {
+ id: errorDialog
+ }
+
// ProfilesDialog {
// id: profilesDialog
// }
diff --git a/qml/qml.qrc b/qml/qml.qrc
index 9474bf1..9ae381b 100644
--- a/qml/qml.qrc
+++ b/qml/qml.qrc
@@ -15,5 +15,6 @@
components/ConnectionIcon.qml
SpeedTimer.qml
components/NextPageDelegate.qml
+ ErrorDialog.qml
diff --git a/shared.qrc b/shared.qrc
index 1e8a3ea..30f93c4 100644
--- a/shared.qrc
+++ b/shared.qrc
@@ -21,5 +21,6 @@
graphics/icons/settings_black.png
graphics/icons/startpad_black.png
sounds/false.wav
+ graphics/icons/error.png
diff --git a/speedclimbing_stopwatch.pro b/speedclimbing_stopwatch.pro
index be79620..ab9240a 100644
--- a/speedclimbing_stopwatch.pro
+++ b/speedclimbing_stopwatch.pro
@@ -5,7 +5,6 @@ android {
}
VERSION = 0.04
CONFIG += c++11
-LIBS += -L/usr/lib/x86_64-linux-gnu
# The following define makes your compiler emit warnings if you use
# any feature of Qt which as been marked deprecated (the exact warnings
diff --git a/speedclimbing_stopwatch.pro.user.4.8-pre1 b/speedclimbing_stopwatch.pro.user.4.8-pre1
new file mode 100644
index 0000000..9823ad4
--- /dev/null
+++ b/speedclimbing_stopwatch.pro.user.4.8-pre1
@@ -0,0 +1,338 @@
+
+
+
+
+
+ EnvironmentId
+ {ada7f138-9843-49cd-ba57-7192ac5ef8b1}
+
+
+ ProjectExplorer.Project.ActiveTarget
+ 0
+
+
+ ProjectExplorer.Project.EditorSettings
+
+ true
+ false
+ true
+
+ Cpp
+
+ CppGlobal
+
+
+
+ QmlJS
+
+ QmlJSGlobal
+
+
+ 2
+ UTF-8
+ false
+ 4
+ false
+ 80
+ true
+ true
+ 1
+ true
+ false
+ 0
+ true
+ true
+ 0
+ 8
+ true
+ 1
+ true
+ true
+ true
+ false
+
+
+
+ ProjectExplorer.Project.PluginSettings
+
+
+ true
+
+
+
+ ProjectExplorer.Project.Target.0
+
+ Desktop Qt 5.11.2 GCC 64bit
+ Desktop Qt 5.11.2 GCC 64bit
+ qt.qt5.5112.gcc_64_kit
+ 0
+ 0
+ 0
+
+ /home/dorian/Documents/gitlab/build-speedclimbing_stopwatch-Desktop_Qt_5_11_2_GCC_64bit-Debug
+
+
+ true
+ qmake
+
+ QtProjectManager.QMakeBuildStep
+ true
+
+ false
+ false
+ false
+
+
+ true
+ Make
+
+ Qt4ProjectManager.MakeStep
+
+ -w
+ -r
+
+ false
+
+
+
+ 2
+ Build
+
+ ProjectExplorer.BuildSteps.Build
+
+
+
+ true
+ Make
+
+ Qt4ProjectManager.MakeStep
+
+ -w
+ -r
+
+ true
+ clean
+
+
+ 1
+ Clean
+
+ ProjectExplorer.BuildSteps.Clean
+
+ 2
+ false
+
+ Debug
+ Debug
+ Qt4ProjectManager.Qt4BuildConfiguration
+ 2
+ true
+
+
+ /home/dorian/Documents/gitlab/build-speedclimbing_stopwatch-Desktop_Qt_5_11_2_GCC_64bit-Release
+
+
+ true
+ qmake
+
+ QtProjectManager.QMakeBuildStep
+ false
+
+ false
+ false
+ true
+
+
+ true
+ Make
+
+ Qt4ProjectManager.MakeStep
+
+ -w
+ -r
+
+ false
+
+
+
+ 2
+ Build
+
+ ProjectExplorer.BuildSteps.Build
+
+
+
+ true
+ Make
+
+ Qt4ProjectManager.MakeStep
+
+ -w
+ -r
+
+ true
+ clean
+
+
+ 1
+ Clean
+
+ ProjectExplorer.BuildSteps.Clean
+
+ 2
+ false
+
+ Release
+ Release
+ Qt4ProjectManager.Qt4BuildConfiguration
+ 0
+ true
+
+
+ /home/dorian/Documents/gitlab/build-speedclimbing_stopwatch-Desktop_Qt_5_11_2_GCC_64bit-Profile
+
+
+ true
+ qmake
+
+ QtProjectManager.QMakeBuildStep
+ true
+
+ false
+ true
+ true
+
+
+ true
+ Make
+
+ Qt4ProjectManager.MakeStep
+
+ -w
+ -r
+
+ false
+
+
+
+ 2
+ Build
+
+ ProjectExplorer.BuildSteps.Build
+
+
+
+ true
+ Make
+
+ Qt4ProjectManager.MakeStep
+
+ -w
+ -r
+
+ true
+ clean
+
+
+ 1
+ Clean
+
+ ProjectExplorer.BuildSteps.Clean
+
+ 2
+ false
+
+ Profile
+ Profile
+ Qt4ProjectManager.Qt4BuildConfiguration
+ 0
+ true
+
+ 3
+
+
+ 0
+ Deploy
+
+ ProjectExplorer.BuildSteps.Deploy
+
+ 1
+ Deploy Configuration
+
+ ProjectExplorer.DefaultDeployConfiguration
+
+ 1
+
+
+ false
+ false
+ 1000
+
+ true
+
+ false
+ false
+ false
+ false
+ true
+ 0.01
+ 10
+ true
+ 1
+ 25
+
+ 1
+ true
+ false
+ true
+ valgrind
+
+ 0
+ 1
+ 2
+ 3
+ 4
+ 5
+ 6
+ 7
+ 8
+ 9
+ 10
+ 11
+ 12
+ 13
+ 14
+
+ 2
+
+ speedclimbing_stopwatch
+
+ Qt4ProjectManager.Qt4RunConfiguration:/home/dorian/Documents/gitlab/speedclimbing_stopwatch/speedclimbing_stopwatch.pro
+ true
+
+ speedclimbing_stopwatch.pro
+
+ /home/dorian/Documents/gitlab/build-speedclimbing_stopwatch-Desktop_Qt_5_11_2_GCC_64bit-Debug
+ 3768
+ false
+ true
+ false
+ false
+ true
+
+ 1
+
+
+
+ ProjectExplorer.Project.TargetCount
+ 1
+
+
+ ProjectExplorer.Project.Updater.FileVersion
+ 18
+
+
+ Version
+ 18
+
+