Code cleanup
This commit is contained in:
parent
a9ba4ccf86
commit
8624770f60
3 changed files with 54 additions and 89 deletions
|
@ -12,6 +12,7 @@ SET( Plugin_EXTRA
|
||||||
Button.qml
|
Button.qml
|
||||||
Dialog.qml
|
Dialog.qml
|
||||||
icon.png
|
icon.png
|
||||||
|
InfoBox.qml
|
||||||
main.qml
|
main.qml
|
||||||
mainscripts.js
|
mainscripts.js
|
||||||
NavButton.qml
|
NavButton.qml
|
||||||
|
|
|
@ -238,68 +238,18 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Image{
|
InfoBox{
|
||||||
//TODO turn into component?
|
|
||||||
anchors.left: textFuzzyBeforeUnit.right
|
anchors.left: textFuzzyBeforeUnit.right
|
||||||
anchors.leftMargin: 5
|
|
||||||
anchors.verticalCenter: textFuzzyBeforeUnit.verticalCenter
|
anchors.verticalCenter: textFuzzyBeforeUnit.verticalCenter
|
||||||
|
|
||||||
source: imageInfo
|
infotext: "Enter a value indicating how many minutes before the set value that the action may be executed. The action will be executed at a random time within the interval."
|
||||||
width: 15
|
|
||||||
height: 15
|
|
||||||
|
|
||||||
MouseArea{
|
|
||||||
anchors.fill: parent
|
|
||||||
hoverEnabled: true
|
|
||||||
onEntered: {
|
|
||||||
infobox.opacity = 1
|
|
||||||
infobox.infoboxtext = "Enter a value indicating how many minutes before the set value that the action may be executed. The action will be executed at a random time within the interval."
|
|
||||||
}
|
|
||||||
onExited: {
|
|
||||||
infobox.opacity = 0
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
Image{
|
InfoBox{
|
||||||
//TODO turn into component?
|
|
||||||
anchors.left: textFuzzyAfterUnit.right
|
anchors.left: textFuzzyAfterUnit.right
|
||||||
anchors.leftMargin: 5
|
|
||||||
anchors.verticalCenter: textFuzzyAfterUnit.verticalCenter
|
anchors.verticalCenter: textFuzzyAfterUnit.verticalCenter
|
||||||
|
|
||||||
source: imageInfo
|
infotext: "Enter a value indicating how many minutes after the set value that the action may be executed. The action will be executed at a random time within the interval."
|
||||||
width: 15
|
|
||||||
height: 15
|
|
||||||
|
|
||||||
MouseArea{
|
|
||||||
anchors.fill: parent
|
|
||||||
hoverEnabled: true
|
|
||||||
onEntered: {
|
|
||||||
infobox.opacity = 1
|
|
||||||
infobox.infoboxtext = "Enter a value indicating how many minutes after the set value that the action may be executed. The action will be executed at a random time within the interval."
|
|
||||||
}
|
|
||||||
onExited: {
|
|
||||||
infobox.opacity = 0
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
Rectangle{
|
|
||||||
id: infobox
|
|
||||||
property alias infoboxtext: infoboxtext.text
|
|
||||||
opacity: 0
|
|
||||||
color: "antiquewhite"
|
|
||||||
width: infoboxtext.width + 4
|
|
||||||
height: infoboxtext.height + 4
|
|
||||||
border.color: "black"
|
|
||||||
border.width: 1
|
|
||||||
Text{
|
|
||||||
id: infoboxtext
|
|
||||||
anchors.centerIn: parent
|
|
||||||
width: 200
|
|
||||||
wrapMode: Text.WordWrap
|
|
||||||
text: ""
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -359,26 +309,11 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Image{
|
InfoBox{
|
||||||
anchors.left: textOffsetUnit.right
|
anchors.left: textOffsetUnit.right
|
||||||
anchors.leftMargin: 5
|
|
||||||
anchors.verticalCenter: textOffsetUnit.verticalCenter
|
anchors.verticalCenter: textOffsetUnit.verticalCenter
|
||||||
|
z: 200 //No use, but wait until, the correct design is set, add them in correct order or something then
|
||||||
source: imageInfo
|
infotext: "Enter a positive or negative value for how many minutes before or after sunset/sunrise this action will be executed."
|
||||||
width: 15
|
|
||||||
height: 15
|
|
||||||
|
|
||||||
MouseArea{
|
|
||||||
anchors.fill: parent
|
|
||||||
hoverEnabled: true
|
|
||||||
onEntered: {
|
|
||||||
infobox.opacity = 1
|
|
||||||
infobox.infoboxtext = "Enter a positive or negative value for how many minutes before or after sunset/sunrise this action will be executed."
|
|
||||||
}
|
|
||||||
onExited: {
|
|
||||||
infobox.opacity = 0
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -515,26 +450,11 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Image{
|
InfoBox{
|
||||||
anchors.left: inputDim.right
|
anchors.left: inputDim.right
|
||||||
anchors.leftMargin: 5
|
|
||||||
anchors.verticalCenter: inputDim.verticalCenter
|
anchors.verticalCenter: inputDim.verticalCenter
|
||||||
|
|
||||||
source: imageInfo
|
infotext: "Enter a dim percent value between 0 (no light) and 100 (full light)"
|
||||||
width: 15
|
|
||||||
height: 15
|
|
||||||
|
|
||||||
MouseArea{
|
|
||||||
anchors.fill: parent
|
|
||||||
hoverEnabled: true
|
|
||||||
onEntered: {
|
|
||||||
infobox.opacity = 1
|
|
||||||
infobox.infoboxtext = "Enter a dim percent value between 0 (no light) and 100 (full light)"
|
|
||||||
}
|
|
||||||
onExited: {
|
|
||||||
infobox.opacity = 0
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
44
telldus-gui/Plugins/SchedulerGUISimple/InfoBox.qml
Normal file
44
telldus-gui/Plugins/SchedulerGUISimple/InfoBox.qml
Normal file
|
@ -0,0 +1,44 @@
|
||||||
|
import Qt 4.7
|
||||||
|
|
||||||
|
Image{
|
||||||
|
property string infotext: ""
|
||||||
|
anchors.leftMargin: 5
|
||||||
|
|
||||||
|
source: imageInfo
|
||||||
|
width: 15
|
||||||
|
height: 15
|
||||||
|
z: 200
|
||||||
|
|
||||||
|
MouseArea{
|
||||||
|
anchors.fill: parent
|
||||||
|
hoverEnabled: true
|
||||||
|
onEntered: {
|
||||||
|
infobox.opacity = 1
|
||||||
|
infobox.infoboxtext = parent.infotext
|
||||||
|
infobox.anchors.top = parent.bottom
|
||||||
|
infobox.anchors.horizontalCenter = parent.horizontalCenter
|
||||||
|
}
|
||||||
|
onExited: {
|
||||||
|
infobox.opacity = 0
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
Rectangle{
|
||||||
|
id: infobox
|
||||||
|
property alias infoboxtext: infoboxtext.text
|
||||||
|
opacity: 0
|
||||||
|
color: "antiquewhite"
|
||||||
|
width: infoboxtext.width + 4
|
||||||
|
height: infoboxtext.height + 4
|
||||||
|
border.color: "black"
|
||||||
|
border.width: 1
|
||||||
|
z: 200
|
||||||
|
Text{
|
||||||
|
id: infoboxtext
|
||||||
|
anchors.centerIn: parent
|
||||||
|
width: 200
|
||||||
|
wrapMode: Text.WordWrap
|
||||||
|
text: ""
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
Loading…
Add table
Add a link
Reference in a new issue