Images added
|
@ -97,21 +97,21 @@ Rectangle{
|
||||||
State {
|
State {
|
||||||
//TODO if no sunrise/sunset exists (arctic circle...), check so it works anyway
|
//TODO if no sunrise/sunset exists (arctic circle...), check so it works anyway
|
||||||
name: "sunrise"
|
name: "sunrise"
|
||||||
PropertyChanges { target: triggerImage; source: "/home/stefan/Downloads/sunrise.png"; opacity: 1 } //TODO: images!!
|
PropertyChanges { target: triggerImage; source: imageTriggerSunrise; opacity: 1 }
|
||||||
PropertyChanges { target: triggerTime; opacity: 0 }
|
PropertyChanges { target: triggerTime; opacity: 0 }
|
||||||
PropertyChanges { target: pointRectMouseArea; drag.target: undefined }
|
PropertyChanges { target: pointRectMouseArea; drag.target: undefined }
|
||||||
PropertyChanges { target: pointRect; x: getSunRiseTime.call(pointRect.parent.width, pointRect.width) }
|
PropertyChanges { target: pointRect; x: getSunRiseTime.call(pointRect.parent.width, pointRect.width) }
|
||||||
},
|
},
|
||||||
State {
|
State {
|
||||||
name: "sunset"
|
name: "sunset"
|
||||||
PropertyChanges { target: triggerImage; source: "/home/stefan/Downloads/sunset.png"; opacity: 1 } //TODO: images!!
|
PropertyChanges { target: triggerImage; source: imageTriggerSunset; opacity: 1 }
|
||||||
PropertyChanges { target: triggerTime; opacity: 0 }
|
PropertyChanges { target: triggerTime; opacity: 0 }
|
||||||
PropertyChanges { target: pointRectMouseArea; drag.target: undefined }
|
PropertyChanges { target: pointRectMouseArea; drag.target: undefined }
|
||||||
PropertyChanges { target: pointRect; x: getSunSetTime.call(pointRect.parent.width, pointRect.width) }
|
PropertyChanges { target: pointRect; x: getSunSetTime.call(pointRect.parent.width, pointRect.width) }
|
||||||
},
|
},
|
||||||
State {
|
State {
|
||||||
name: "absolute"
|
name: "absolute"
|
||||||
PropertyChanges { target: triggerImage; opacity: 0; } //TODO: images!!
|
PropertyChanges { target: triggerImage; opacity: 0; }
|
||||||
PropertyChanges { target: triggerTime; opacity: 1 }
|
PropertyChanges { target: triggerTime; opacity: 1 }
|
||||||
PropertyChanges { target: pointRectMouseArea; drag.target: parent }
|
PropertyChanges { target: pointRectMouseArea; drag.target: parent }
|
||||||
PropertyChanges { target: pointRect; x: xvalue }
|
PropertyChanges { target: pointRect; x: xvalue }
|
||||||
|
@ -122,8 +122,6 @@ Rectangle{
|
||||||
id: triggerTime
|
id: triggerTime
|
||||||
width: 20; height: 20
|
width: 20; height: 20
|
||||||
anchors.centerIn: parent
|
anchors.centerIn: parent
|
||||||
//anchors.horizontalCenter: parent.horizontalCenter
|
|
||||||
//anchors.verticalCenter: parent.verticalCenter
|
|
||||||
Text{
|
Text{
|
||||||
text: fuzzyAfter //TODO debug getTime(pointRect.x, pointRect.width); font.pointSize: 6; horizontalAlignment: Text.AlignHCenter; verticalAlignment: Text.AlignBottom
|
text: fuzzyAfter //TODO debug getTime(pointRect.x, pointRect.width); font.pointSize: 6; horizontalAlignment: Text.AlignHCenter; verticalAlignment: Text.AlignBottom
|
||||||
}
|
}
|
||||||
|
@ -133,7 +131,7 @@ Rectangle{
|
||||||
id: triggerImage
|
id: triggerImage
|
||||||
anchors.fill: parent
|
anchors.fill: parent
|
||||||
width: 20; height: 20
|
width: 20; height: 20
|
||||||
source: "/home/stefan/Downloads/11949889941371111141clock_michael_breuer_01.svg.hi.png"
|
source: imageTriggerAbsolute
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -142,24 +140,22 @@ Rectangle{
|
||||||
State {
|
State {
|
||||||
name: "on"
|
name: "on"
|
||||||
PropertyChanges { target: pointRect; actionTypeColor: "blue"; actionTypeOpacity: 1 } //TODO: images!!
|
PropertyChanges { target: pointRect; actionTypeColor: "blue"; actionTypeOpacity: 1 } //TODO: images!!
|
||||||
PropertyChanges { target: pointRect; actionTypeImage: "/home/stefan/Projects/tellstick/trunk/telldus-gui/TelldusCenter/images/devices.png" }
|
PropertyChanges { target: pointRect; actionTypeImage: imageActionOn }
|
||||||
},
|
},
|
||||||
State{
|
State{
|
||||||
name: "off"
|
name: "off"
|
||||||
PropertyChanges { target: pointRect; actionTypeColor: "gainsboro"; actionTypeOpacity: 0 }
|
PropertyChanges { target: pointRect; actionTypeColor: "gainsboro"; actionTypeOpacity: 0 }
|
||||||
PropertyChanges { target: pointRect; actionTypeImage: "/home/stefan/Projects/tellstick/trunk/telldus-gui/TelldusCenter/images/devices-bw.png" }
|
PropertyChanges { target: pointRect; actionTypeImage: imageActionOff }
|
||||||
//PropertyChanges { target: actionImage; source: "/home/stefan/Projects/tellstick/trunk/telldus-gui/TelldusCenter/images/devices-bw.png" }
|
|
||||||
},
|
},
|
||||||
State{
|
State{
|
||||||
name: "dim"
|
name: "dim"
|
||||||
PropertyChanges { target: pointRect; actionTypeColor: "green"; actionTypeOpacity: 1 }
|
PropertyChanges { target: pointRect; actionTypeColor: "green"; actionTypeOpacity: 1 }
|
||||||
PropertyChanges { target: pointRect; actionTypeImage: "/home/stefan/Projects/tellstick/trunk/telldus-gui/TelldusCenter/images/TelldusCenter_128.png" }
|
PropertyChanges { target: pointRect; actionTypeImage: imageActionDim }
|
||||||
//something opacity = dim for example
|
|
||||||
},
|
},
|
||||||
State{
|
State{
|
||||||
name: "bell"
|
name: "bell"
|
||||||
PropertyChanges { target: pointRect; actionTypeColor: getLastPointColor() }
|
PropertyChanges { target: pointRect; actionTypeColor: getLastPointColor() }
|
||||||
PropertyChanges { target: pointRect; actionTypeImage: "icon.png" }
|
PropertyChanges { target: pointRect; actionTypeImage: imageActionBell }
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
|
||||||
|
|
|
@ -11,6 +11,14 @@ SET( Plugin_EXTRA
|
||||||
icon.png
|
icon.png
|
||||||
main.qml
|
main.qml
|
||||||
schedulerscripts.js
|
schedulerscripts.js
|
||||||
|
absolute.png
|
||||||
|
sunrise.png
|
||||||
|
sunset.png
|
||||||
|
on.png
|
||||||
|
off.png
|
||||||
|
dim.png
|
||||||
|
bell.png
|
||||||
|
info.png
|
||||||
)
|
)
|
||||||
|
|
||||||
INCLUDE( ../TelldusCenterPlugin.cmake NO_POLICY_SCOPE )
|
INCLUDE( ../TelldusCenterPlugin.cmake NO_POLICY_SCOPE )
|
||||||
|
|
|
@ -200,7 +200,7 @@
|
||||||
TextInput{
|
TextInput{
|
||||||
id: inputFuzzyBeforeText
|
id: inputFuzzyBeforeText
|
||||||
anchors.fill: parent
|
anchors.fill: parent
|
||||||
maximumLength: 5
|
maximumLength: 4
|
||||||
selectByMouse: true
|
selectByMouse: true
|
||||||
color: "#151515"; selectionColor: "mediumseagreen"
|
color: "#151515"; selectionColor: "mediumseagreen"
|
||||||
text: "0" //container.actionPoint.fuzzyBefore
|
text: "0" //container.actionPoint.fuzzyBefore
|
||||||
|
@ -219,7 +219,7 @@
|
||||||
TextInput{
|
TextInput{
|
||||||
id: inputFuzzyAfterText
|
id: inputFuzzyAfterText
|
||||||
anchors.fill: parent
|
anchors.fill: parent
|
||||||
maximumLength: 5
|
maximumLength: 4
|
||||||
selectByMouse: true
|
selectByMouse: true
|
||||||
color: "#151515"; selectionColor: "mediumseagreen"
|
color: "#151515"; selectionColor: "mediumseagreen"
|
||||||
text: actionPoint.fuzzyAfter
|
text: actionPoint.fuzzyAfter
|
||||||
|
@ -238,7 +238,9 @@
|
||||||
anchors.leftMargin: 5
|
anchors.leftMargin: 5
|
||||||
anchors.verticalCenter: textFuzzyBeforeUnit.verticalCenter
|
anchors.verticalCenter: textFuzzyBeforeUnit.verticalCenter
|
||||||
|
|
||||||
source: "icon.png" //TODO info-icon
|
source: imageInfo
|
||||||
|
width: 15
|
||||||
|
height: 15
|
||||||
|
|
||||||
MouseArea{
|
MouseArea{
|
||||||
anchors.fill: parent
|
anchors.fill: parent
|
||||||
|
@ -259,7 +261,9 @@
|
||||||
anchors.leftMargin: 5
|
anchors.leftMargin: 5
|
||||||
anchors.verticalCenter: textFuzzyAfterUnit.verticalCenter
|
anchors.verticalCenter: textFuzzyAfterUnit.verticalCenter
|
||||||
|
|
||||||
source: "icon.png" //TODO info-icon
|
source: imageInfo
|
||||||
|
width: 15
|
||||||
|
height: 15
|
||||||
|
|
||||||
MouseArea{
|
MouseArea{
|
||||||
anchors.fill: parent
|
anchors.fill: parent
|
||||||
|
@ -342,19 +346,19 @@
|
||||||
id: typeSelection
|
id: typeSelection
|
||||||
ListElement{
|
ListElement{
|
||||||
name: "on"
|
name: "on"
|
||||||
imagesource: "/home/stefan/Projects/tellstick/trunk/telldus-gui/TelldusCenter/images/devices.png"
|
imagesource: "on.png" //TODO cannot use javascript properties here... do in some other way, maybe a list with names here?
|
||||||
}
|
}
|
||||||
ListElement{
|
ListElement{
|
||||||
name: "off"
|
name: "off"
|
||||||
imagesource: "/home/stefan/Projects/tellstick/trunk/telldus-gui/TelldusCenter/images/devices-bw.png"
|
imagesource: "off.png"
|
||||||
}
|
}
|
||||||
ListElement{
|
ListElement{
|
||||||
name: "dim"
|
name: "dim"
|
||||||
imagesource: "/home/stefan/Projects/tellstick/trunk/telldus-gui/TelldusCenter/images/TelldusCenter_128.png"
|
imagesource: "dim.png"
|
||||||
}
|
}
|
||||||
ListElement{
|
ListElement{
|
||||||
name: "bell"
|
name: "bell"
|
||||||
imagesource: "icon.png"
|
imagesource: "bell.png"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -373,13 +377,6 @@
|
||||||
anchors.fill: parent
|
anchors.fill: parent
|
||||||
id: mainImage
|
id: mainImage
|
||||||
source: actionPoint.actionTypeImage
|
source: actionPoint.actionTypeImage
|
||||||
/*states: State {
|
|
||||||
name: "typeLoaded"; when: actionPoint.actionTypeImage != undefined
|
|
||||||
PropertyChanges { target: mainImage
|
|
||||||
source: actionPoint.actionTypeImage
|
|
||||||
}
|
|
||||||
}
|
|
||||||
*/
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -22,6 +22,16 @@ com.telldus.schedulersimplegui = function() {
|
||||||
deviceList.push(list[i]);
|
deviceList.push(list[i]);
|
||||||
}
|
}
|
||||||
view.setProperty('deviceModel', deviceList);
|
view.setProperty('deviceModel', deviceList);
|
||||||
|
//set images:
|
||||||
|
view.setProperty("imageTriggerSunrise", "sunrise.png");
|
||||||
|
view.setProperty("imageTriggerSunset", "sunset.png");
|
||||||
|
view.setProperty("imageTriggerAbsolute", "absolute.png");
|
||||||
|
view.setProperty("imageActionOn", "on.png");
|
||||||
|
view.setProperty("imageActionOff", "off.png");
|
||||||
|
view.setProperty("imageActionDim", "dim.png");
|
||||||
|
view.setProperty("imageActionBell", "bell.png");
|
||||||
|
view.setProperty("imageInfo", "info.png");
|
||||||
|
|
||||||
view.load("main.qml");
|
view.load("main.qml");
|
||||||
application.addWidget("scheduler.simple", "icon.png", view);
|
application.addWidget("scheduler.simple", "icon.png", view);
|
||||||
|
|
||||||
|
|
BIN
telldus-gui/Plugins/SchedulerGUISimple/absolute.png
Normal file
After Width: | Height: | Size: 32 KiB |
BIN
telldus-gui/Plugins/SchedulerGUISimple/bell.png
Normal file
After Width: | Height: | Size: 2.3 KiB |
BIN
telldus-gui/Plugins/SchedulerGUISimple/dim.png
Normal file
After Width: | Height: | Size: 11 KiB |
BIN
telldus-gui/Plugins/SchedulerGUISimple/info.png
Normal file
After Width: | Height: | Size: 32 KiB |
|
@ -7,8 +7,7 @@ import "schedulerscripts.js" as Scripts
|
||||||
width: 800 //TODO how?
|
width: 800 //TODO how?
|
||||||
height: 600 //TODO how?
|
height: 600 //TODO how?
|
||||||
property variant sunData
|
property variant sunData
|
||||||
property string dimImageSource: "/home/stefan/Projects/tellstick/trunk/telldus-gui/TelldusCenter/images/TelldusCenter_128.png" //TODO use this somehow?
|
|
||||||
|
|
||||||
Component{
|
Component{
|
||||||
id: listRow
|
id: listRow
|
||||||
|
|
||||||
|
|
BIN
telldus-gui/Plugins/SchedulerGUISimple/off.png
Normal file
After Width: | Height: | Size: 1.4 KiB |
BIN
telldus-gui/Plugins/SchedulerGUISimple/on.png
Normal file
After Width: | Height: | Size: 1.4 KiB |
BIN
telldus-gui/Plugins/SchedulerGUISimple/sunrise.png
Normal file
After Width: | Height: | Size: 10 KiB |
BIN
telldus-gui/Plugins/SchedulerGUISimple/sunset.png
Normal file
After Width: | Height: | Size: 11 KiB |