Images added

This commit is contained in:
Stefan Persson 2011-01-20 11:48:08 +00:00
parent 14485794d9
commit 0c9babe203
13 changed files with 39 additions and 29 deletions

View file

@ -97,21 +97,21 @@ Rectangle{
State {
//TODO if no sunrise/sunset exists (arctic circle...), check so it works anyway
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: pointRectMouseArea; drag.target: undefined }
PropertyChanges { target: pointRect; x: getSunRiseTime.call(pointRect.parent.width, pointRect.width) }
},
State {
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: pointRectMouseArea; drag.target: undefined }
PropertyChanges { target: pointRect; x: getSunSetTime.call(pointRect.parent.width, pointRect.width) }
},
State {
name: "absolute"
PropertyChanges { target: triggerImage; opacity: 0; } //TODO: images!!
PropertyChanges { target: triggerImage; opacity: 0; }
PropertyChanges { target: triggerTime; opacity: 1 }
PropertyChanges { target: pointRectMouseArea; drag.target: parent }
PropertyChanges { target: pointRect; x: xvalue }
@ -122,8 +122,6 @@ Rectangle{
id: triggerTime
width: 20; height: 20
anchors.centerIn: parent
//anchors.horizontalCenter: parent.horizontalCenter
//anchors.verticalCenter: parent.verticalCenter
Text{
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
anchors.fill: parent
width: 20; height: 20
source: "/home/stefan/Downloads/11949889941371111141clock_michael_breuer_01.svg.hi.png"
source: imageTriggerAbsolute
}
}
}
@ -142,24 +140,22 @@ Rectangle{
State {
name: "on"
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{
name: "off"
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: actionImage; source: "/home/stefan/Projects/tellstick/trunk/telldus-gui/TelldusCenter/images/devices-bw.png" }
PropertyChanges { target: pointRect; actionTypeImage: imageActionOff }
},
State{
name: "dim"
PropertyChanges { target: pointRect; actionTypeColor: "green"; actionTypeOpacity: 1 }
PropertyChanges { target: pointRect; actionTypeImage: "/home/stefan/Projects/tellstick/trunk/telldus-gui/TelldusCenter/images/TelldusCenter_128.png" }
//something opacity = dim for example
PropertyChanges { target: pointRect; actionTypeImage: imageActionDim }
},
State{
name: "bell"
PropertyChanges { target: pointRect; actionTypeColor: getLastPointColor() }
PropertyChanges { target: pointRect; actionTypeImage: "icon.png" }
PropertyChanges { target: pointRect; actionTypeImage: imageActionBell }
}
]

View file

@ -11,6 +11,14 @@ SET( Plugin_EXTRA
icon.png
main.qml
schedulerscripts.js
absolute.png
sunrise.png
sunset.png
on.png
off.png
dim.png
bell.png
info.png
)
INCLUDE( ../TelldusCenterPlugin.cmake NO_POLICY_SCOPE )

View file

@ -200,7 +200,7 @@
TextInput{
id: inputFuzzyBeforeText
anchors.fill: parent
maximumLength: 5
maximumLength: 4
selectByMouse: true
color: "#151515"; selectionColor: "mediumseagreen"
text: "0" //container.actionPoint.fuzzyBefore
@ -219,7 +219,7 @@
TextInput{
id: inputFuzzyAfterText
anchors.fill: parent
maximumLength: 5
maximumLength: 4
selectByMouse: true
color: "#151515"; selectionColor: "mediumseagreen"
text: actionPoint.fuzzyAfter
@ -238,7 +238,9 @@
anchors.leftMargin: 5
anchors.verticalCenter: textFuzzyBeforeUnit.verticalCenter
source: "icon.png" //TODO info-icon
source: imageInfo
width: 15
height: 15
MouseArea{
anchors.fill: parent
@ -259,7 +261,9 @@
anchors.leftMargin: 5
anchors.verticalCenter: textFuzzyAfterUnit.verticalCenter
source: "icon.png" //TODO info-icon
source: imageInfo
width: 15
height: 15
MouseArea{
anchors.fill: parent
@ -342,19 +346,19 @@
id: typeSelection
ListElement{
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{
name: "off"
imagesource: "/home/stefan/Projects/tellstick/trunk/telldus-gui/TelldusCenter/images/devices-bw.png"
imagesource: "off.png"
}
ListElement{
name: "dim"
imagesource: "/home/stefan/Projects/tellstick/trunk/telldus-gui/TelldusCenter/images/TelldusCenter_128.png"
imagesource: "dim.png"
}
ListElement{
name: "bell"
imagesource: "icon.png"
imagesource: "bell.png"
}
}
}
@ -373,13 +377,6 @@
anchors.fill: parent
id: mainImage
source: actionPoint.actionTypeImage
/*states: State {
name: "typeLoaded"; when: actionPoint.actionTypeImage != undefined
PropertyChanges { target: mainImage
source: actionPoint.actionTypeImage
}
}
*/
}
}

View file

@ -22,6 +22,16 @@ com.telldus.schedulersimplegui = function() {
deviceList.push(list[i]);
}
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");
application.addWidget("scheduler.simple", "icon.png", view);

Binary file not shown.

After

Width:  |  Height:  |  Size: 32 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 11 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 32 KiB

View file

@ -7,8 +7,7 @@ import "schedulerscripts.js" as Scripts
width: 800 //TODO how?
height: 600 //TODO how?
property variant sunData
property string dimImageSource: "/home/stefan/Projects/tellstick/trunk/telldus-gui/TelldusCenter/images/TelldusCenter_128.png" //TODO use this somehow?
Component{
id: listRow

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 10 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 11 KiB