see changelog 0.04
This commit is contained in:
parent
79b5b71243
commit
385df9a5a9
9 changed files with 179 additions and 80 deletions
|
@ -7,12 +7,15 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
|
|||
## [Unreleased]
|
||||
### Added
|
||||
- added profiles dialog
|
||||
|
||||
## [0.04] - 2018-08-11
|
||||
### Added
|
||||
- buzzer icon in the upper left corner indicating that the buzzer is connected
|
||||
### Fixed
|
||||
- start seqnece continues in a buggy way when cancel is being pressed while 'at your marks' or 'ready'
|
||||
- bug that made the start sequence freeze if a delay of zero or lower or a non valid number was set as delay
|
||||
### Changed
|
||||
- increased the size f the back buttons in settings / profiles dialog
|
||||
- increased the size of the back buttons in settings / profiles dialog
|
||||
|
||||
## [0.03 - BETA] - 2018-07-29
|
||||
### Added
|
||||
|
@ -20,7 +23,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
|
|||
- new screen in landscape mode
|
||||
- buttons for settings and profiles
|
||||
- the screen stays on now
|
||||
- the volume sontrols control the media volume directly
|
||||
- the volume csontrols control the media volume directly
|
||||
- settings dialog
|
||||
- capabilitie to connect to a Buzzer via Wifi
|
||||
- it is now possible to setup an automatic start sequence that spells the command
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
<?xml version="1.0"?>
|
||||
<manifest package="com.itsblue.speedclimbing_stopwatchtest" xmlns:android="http://schemas.android.com/apk/res/android" android:versionName="0.03" android:versionCode="3" android:installLocation="auto">
|
||||
<manifest package="com.itsblue.speedclimbing_stopwatch" xmlns:android="http://schemas.android.com/apk/res/android" android:versionName="0.04" android:versionCode="4" android:installLocation="auto">
|
||||
<application android:hardwareAccelerated="true" android:name="org.qtproject.qt5.android.bindings.QtApplication" android:label="speedclimbing stw" android:icon="@drawable/icon">
|
||||
<activity android:configChanges="orientation|uiMode|screenLayout|screenSize|smallestScreenSize|layoutDirection|locale|fontScale|keyboard|keyboardHidden|navigation" android:name="com.itsblue.StayAwake" android:label="speedclimbing stw" android:screenOrientation="unspecified" android:launchMode="singleTop">
|
||||
<intent-filter>
|
||||
|
@ -66,7 +66,7 @@
|
|||
|
||||
</application>
|
||||
|
||||
<uses-sdk android:minSdkVersion="16" android:targetSdkVersion="16"/>
|
||||
<uses-sdk android:minSdkVersion="16" android:targetSdkVersion="26"/>
|
||||
<supports-screens android:largeScreens="true" android:normalScreens="true" android:anyDensity="true" android:smallScreens="true"/>
|
||||
|
||||
<!-- The following comment will be replaced upon deployment with default permissions based on the dependencies of the application.
|
||||
|
|
|
@ -18,7 +18,9 @@ public:
|
|||
QVariant data(const QModelIndex &index, int role) const Q_DECL_OVERRIDE;
|
||||
QHash<int, QByteArray> roleNames() const Q_DECL_OVERRIDE;
|
||||
|
||||
|
||||
Q_INVOKABLE bool append(QString name);
|
||||
Q_INVOKABLE void remove(int row);
|
||||
signals:
|
||||
|
||||
public slots:
|
||||
|
|
|
@ -204,28 +204,82 @@ Popup {
|
|||
/*-----List of all profiles-----*/
|
||||
Component {
|
||||
id: profileListComp
|
||||
Tumbler {
|
||||
id: control
|
||||
property string title: "profiles"
|
||||
property string secondButt: "add"
|
||||
model: SqlProfileModel{}
|
||||
delegate: Text {
|
||||
text: model.name
|
||||
color: control.visualFocus ? control.palette.highlight : control.palette.text
|
||||
font: control.font
|
||||
opacity: 1.0 - Math.abs(Tumbler.displacement) / (control.visibleItemCount / 2)
|
||||
horizontalAlignment: Text.AlignHCenter
|
||||
verticalAlignment: Text.AlignVCenter
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
ListView {
|
||||
id: profileList
|
||||
model: profileModel.model
|
||||
property string title: "profiles"
|
||||
property string secondButt: "add"
|
||||
|
||||
Label {
|
||||
visible: profileList.count <= 0
|
||||
opacity: profileList.count <= 0 ? 1:0
|
||||
text: "add a profile by clicking +"
|
||||
anchors.centerIn: parent
|
||||
font.pixelSize: parent.width*0.06
|
||||
Behavior on opacity {
|
||||
NumberAnimation {
|
||||
duration: 200
|
||||
easing.type: Easing.InOutQuad
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
delegate: SwipeDelegate {
|
||||
id: swipeDelegate
|
||||
text: model.name
|
||||
|
||||
width: profileList.width
|
||||
|
||||
font.pixelSize: profiles_stack.text_pixelSize
|
||||
|
||||
function remove() {
|
||||
removeAnim.start()
|
||||
}
|
||||
|
||||
background: Rectangle {
|
||||
color: pressed ? Qt.darker("white", 1.1):"white"
|
||||
|
||||
}
|
||||
|
||||
Rectangle {
|
||||
color: "grey"
|
||||
height: 1
|
||||
width: parent.width * 0.9
|
||||
visible: index > 0
|
||||
anchors {
|
||||
horizontalCenter: parent.horizontalCenter
|
||||
top: parent.top
|
||||
}
|
||||
}
|
||||
|
||||
NumberAnimation {
|
||||
id: removeAnim
|
||||
target: swipeDelegate
|
||||
property: "height"
|
||||
to: 0
|
||||
easing.type: Easing.InOutQuad
|
||||
onStopped: profileModel.model.remove(index)
|
||||
}
|
||||
|
||||
Component {
|
||||
id: component
|
||||
|
||||
Rectangle {
|
||||
color: mouse.pressed ? "#333" : "#444"
|
||||
color: mouseAr.pressed ? "#333" : "#444"
|
||||
width: parent.width
|
||||
height: parent.height
|
||||
clip: true
|
||||
|
@ -235,24 +289,59 @@ Popup {
|
|||
text: qsTr("Press me!")
|
||||
color: "#21be2b"
|
||||
anchors.centerIn: parent
|
||||
|
||||
}
|
||||
|
||||
MouseArea {
|
||||
id: mouseAr
|
||||
anchors.fill: parent
|
||||
onClicked: {
|
||||
model.remove(index)
|
||||
swipeDelegate.remove()
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
swipe.left: component
|
||||
swipe.right: component
|
||||
swipe.transition: Transition {
|
||||
SmoothedAnimation { velocity: 3; easing.type: Easing.InOutCubic }
|
||||
}
|
||||
|
||||
swipe.left: Row {
|
||||
anchors.left: parent.left
|
||||
height: parent.height
|
||||
|
||||
Label {
|
||||
id: moveLabel
|
||||
text: qsTr("Move")
|
||||
color: "white"
|
||||
verticalAlignment: Label.AlignVCenter
|
||||
padding: 12
|
||||
height: parent.height
|
||||
|
||||
SwipeDelegate.onClicked: console.log("Moving...")
|
||||
|
||||
background: Rectangle {
|
||||
color: moveLabel.SwipeDelegate.pressed ? Qt.darker("#ffbf47", 1.1) : "#ffbf47"
|
||||
}
|
||||
}
|
||||
Label {
|
||||
id: deleteLabel
|
||||
text: qsTr("Delete")
|
||||
color: "white"
|
||||
verticalAlignment: Label.AlignVCenter
|
||||
padding: 12
|
||||
height: parent.height
|
||||
|
||||
SwipeDelegate.onClicked: console.log("Deleting...")
|
||||
|
||||
background: Rectangle {
|
||||
color: deleteLabel.SwipeDelegate.pressed ? Qt.darker("tomato", 1.1) : "tomato"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
ScrollIndicator.vertical: ScrollIndicator { }
|
||||
}
|
||||
*/
|
||||
}
|
||||
|
||||
/*-----Option to add a profile-----*/
|
||||
|
@ -268,6 +357,11 @@ Popup {
|
|||
onTextChanged: {
|
||||
parent.newProfileName = text
|
||||
}
|
||||
Keys.onReturnPressed: {
|
||||
if(profileModel.model.append(text)){
|
||||
profiles_stack.pop()
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -129,7 +129,7 @@ Popup {
|
|||
|
||||
StackView {
|
||||
id: options_stack
|
||||
property int text_pixelSize: headlineUnderline.width * 0.08
|
||||
property int text_pixelSize: root.height * 0.06
|
||||
initialItem: settings
|
||||
width: headlineUnderline.width
|
||||
|
||||
|
@ -137,7 +137,7 @@ Popup {
|
|||
top: parent.top
|
||||
left: parent.left
|
||||
leftMargin: ( parent.width - headlineUnderline.width ) / 2
|
||||
topMargin: parent.height * 0.12
|
||||
topMargin: headlineUnderline.anchors.topMargin * 0.8
|
||||
bottom: parent.bottom
|
||||
}
|
||||
|
||||
|
@ -194,6 +194,7 @@ Popup {
|
|||
//make a short delay and go back to normal options
|
||||
shortDelay.start()
|
||||
}
|
||||
|
||||
Timer {
|
||||
id: shortDelay
|
||||
running: false
|
||||
|
@ -247,53 +248,25 @@ Popup {
|
|||
/*-----Page to setup automatc start sequence-----*/
|
||||
Component {
|
||||
id: autostart
|
||||
|
||||
Column {
|
||||
id: autostart_col
|
||||
property string title: "Autostart"
|
||||
|
||||
property int delegateHeight: height*0.18
|
||||
|
||||
SwitchDelegate {
|
||||
id: ready_del
|
||||
text: qsTr("say 'ready'")
|
||||
checked: _cppAppSettings.loadSetting("ready_en") === "true"
|
||||
width: parent.width
|
||||
height: parent.delegateHeight
|
||||
|
||||
font.pixelSize: options_stack.text_pixelSize
|
||||
|
||||
onCheckedChanged: {
|
||||
_cppAppSettings.writeSetting("ready_en",checked)
|
||||
}
|
||||
|
||||
indicator: Rectangle {
|
||||
implicitWidth: 48
|
||||
implicitHeight: 26
|
||||
x: ready_del.width - width - ready_del.rightPadding
|
||||
y: parent.height / 2 - height / 2
|
||||
radius: 13
|
||||
color: ready_del.checked ? "#17a81a" : "transparent"
|
||||
border.color: ready_del.checked ? "#17a81a" : "#cccccc"
|
||||
Behavior on color{
|
||||
ColorAnimation{
|
||||
duration: 200
|
||||
}
|
||||
}
|
||||
|
||||
Rectangle {
|
||||
x: ready_del.checked ? parent.width - width : 0
|
||||
width: 26
|
||||
height: 26
|
||||
radius: 13
|
||||
color: ready_del.down ? "#cccccc" : "#ffffff"
|
||||
border.color: ready_del.checked ? (ready_del.down ? "#17a81a" : "#21be2b") : "#999999"
|
||||
Behavior on x{
|
||||
NumberAnimation {
|
||||
property: "x"
|
||||
duration: 200
|
||||
easing.type: Easing.InOutQuad
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
indicator: SimpleIndicator{}
|
||||
}
|
||||
|
||||
ItemDelegate {
|
||||
|
@ -302,12 +275,15 @@ Popup {
|
|||
enabled: ready_del.checked
|
||||
width: parent.width
|
||||
font.pixelSize: options_stack.text_pixelSize
|
||||
height: parent.delegateHeight
|
||||
|
||||
TextField {
|
||||
focus: true
|
||||
placeholderText: "time"
|
||||
width: parent.width * 0.3
|
||||
height: parent.height
|
||||
anchors.right: parent.right
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
inputMethodHints: Qt.ImhFormattedNumbersOnly
|
||||
|
||||
text: _cppAppSettings.loadSetting("ready_delay")
|
||||
|
@ -323,42 +299,15 @@ Popup {
|
|||
text: qsTr("say\n'at your marks'")
|
||||
checked: _cppAppSettings.loadSetting("at_marks_en") === "true"
|
||||
width: parent.width
|
||||
//height: parent.delegateHeight * 1.5
|
||||
|
||||
font.pixelSize: options_stack.text_pixelSize
|
||||
|
||||
onCheckedChanged: {
|
||||
_cppAppSettings.writeSetting("at_marks_en",at_marks_del.checked)
|
||||
}
|
||||
|
||||
indicator: Rectangle {
|
||||
implicitWidth: 48
|
||||
implicitHeight: 26
|
||||
x: at_marks_del.width - width - at_marks_del.rightPadding
|
||||
y: parent.height / 2 - height / 2
|
||||
radius: 13
|
||||
color: at_marks_del.checked ? "#17a81a" : "transparent"
|
||||
border.color: at_marks_del.checked ? "#17a81a" : "#cccccc"
|
||||
Behavior on color{
|
||||
ColorAnimation{
|
||||
duration: 200
|
||||
}
|
||||
}
|
||||
|
||||
Rectangle {
|
||||
x: at_marks_del.checked ? parent.width - width : 0
|
||||
width: 26
|
||||
height: 26
|
||||
radius: 13
|
||||
color: at_marks_del.down ? "#cccccc" : "#ffffff"
|
||||
border.color: at_marks_del.checked ? (at_marks_del.down ? "#17a81a" : "#21be2b") : "#999999"
|
||||
Behavior on x{
|
||||
NumberAnimation {
|
||||
property: "x"
|
||||
duration: 200
|
||||
easing.type: Easing.InOutQuad
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
indicator: SimpleIndicator{}
|
||||
}
|
||||
|
||||
ItemDelegate {
|
||||
|
@ -366,13 +315,17 @@ Popup {
|
|||
text: "delay (ms)"
|
||||
enabled: at_marks_del.checked
|
||||
width: parent.width
|
||||
height: parent.delegateHeight
|
||||
|
||||
font.pixelSize: options_stack.text_pixelSize
|
||||
|
||||
TextField {
|
||||
focus: true
|
||||
placeholderText: "time"
|
||||
width: parent.width * 0.3
|
||||
height: parent.height
|
||||
anchors.right: parent.right
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
inputMethodHints: Qt.ImhFormattedNumbersOnly
|
||||
|
||||
text: _cppAppSettings.loadSetting("at_marks_delay")
|
||||
|
|
35
qml/SimpleIndicator.qml
Normal file
35
qml/SimpleIndicator.qml
Normal file
|
@ -0,0 +1,35 @@
|
|||
import QtQuick 2.0
|
||||
|
||||
Rectangle {
|
||||
property bool checked: parent.checked
|
||||
property bool down: parent.down
|
||||
property int set_height: parent.font.pixelSize * 1.4
|
||||
implicitWidth: set_height * 1.84
|
||||
implicitHeight: set_height
|
||||
x: ready_del.width - width - ready_del.rightPadding
|
||||
y: parent.height / 2 - height / 2
|
||||
radius: implicitHeight * 0.5
|
||||
color: parent.checked ? "#17a81a" : "transparent"
|
||||
border.color: parent.checked ? "#17a81a" : "#cccccc"
|
||||
Behavior on color{
|
||||
ColorAnimation{
|
||||
duration: 200
|
||||
}
|
||||
}
|
||||
|
||||
Rectangle {
|
||||
x: parent.checked ? parent.width - width : 0
|
||||
width: parent.height
|
||||
height: parent.height
|
||||
radius: height * 0.5
|
||||
color: parent.down ? "#cccccc" : "#ffffff"
|
||||
border.color: parent.checked ? (parent.down ? "#17a81a" : "#21be2b") : "#999999"
|
||||
Behavior on x{
|
||||
NumberAnimation {
|
||||
property: "x"
|
||||
duration: 200
|
||||
easing.type: Easing.InOutQuad
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
15
qml/main.qml
15
qml/main.qml
|
@ -385,9 +385,9 @@ Window {
|
|||
id: settingsDialog
|
||||
}
|
||||
|
||||
ProfilesDialog {
|
||||
id: profilesDialog
|
||||
}
|
||||
// ProfilesDialog {
|
||||
// id: profilesDialog
|
||||
// }
|
||||
|
||||
/*-------------------
|
||||
lower line and menu
|
||||
|
@ -423,9 +423,11 @@ Window {
|
|||
left: root.landscape() ? undefined:parent.left
|
||||
top: root.landscape() ? parent.top:undefined
|
||||
//align in landscape mode
|
||||
topMargin: root.landscape() ? (parent.height - (height * 2)) / 3:undefined
|
||||
//for two buttons: topMargin: root.landscape() ? (parent.height - (height * 2)) / 3:undefined
|
||||
topMargin: root.landscape() ? (parent.height * 0.5 - (height * 0.5)):undefined
|
||||
//align in portrait mode
|
||||
leftMargin: root.landscape() ? undefined:(parent.width - width * 2) / 3
|
||||
//for two buttons: leftMargin: root.landscape() ? undefined:(parent.width - width * 2) / 3
|
||||
leftMargin: root.landscape() ? undefined:(parent.width * 0.5 - width * 0.5)
|
||||
}
|
||||
|
||||
height: root.landscape() ? parent.width * 0.7:parent.height * 0.7
|
||||
|
@ -462,6 +464,7 @@ Window {
|
|||
}
|
||||
}
|
||||
|
||||
/*
|
||||
RoundButton {
|
||||
id: profilesButt
|
||||
|
||||
|
@ -506,6 +509,8 @@ Window {
|
|||
}
|
||||
}
|
||||
}
|
||||
*/
|
||||
|
||||
}
|
||||
|
||||
/*----------------------
|
||||
|
|
|
@ -5,5 +5,6 @@
|
|||
<file>SettingsDialog.qml</file>
|
||||
<file>ProgressCircle.qml</file>
|
||||
<file>ProfilesDialog.qml</file>
|
||||
<file>SimpleIndicator.qml</file>
|
||||
</qresource>
|
||||
</RCC>
|
||||
|
|
|
@ -71,3 +71,9 @@ bool SqlProfileModel::append(QString name)
|
|||
submitAll();
|
||||
return(true);
|
||||
}
|
||||
|
||||
void SqlProfileModel::remove(int row)
|
||||
{
|
||||
removeRows(row, 1);
|
||||
submitAll();
|
||||
}
|
||||
|
|
Reference in a new issue