mirror of https://github.com/nymea/nymea.git
Merge PR #201: Rework button interface inheritance
commit
bd753212e2
|
|
@ -1,2 +1,8 @@
|
|||
{
|
||||
"description": "The base for all buttons that emit a pressed event.",
|
||||
"events": [
|
||||
{
|
||||
"name": "pressed"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
|
|
|||
|
|
@ -20,6 +20,7 @@
|
|||
<file>battery.json</file>
|
||||
<file>batterylevel.json</file>
|
||||
<file>button.json</file>
|
||||
<file>multibutton.json</file>
|
||||
<file>simplebutton.json</file>
|
||||
<file>longpressbutton.json</file>
|
||||
<file>simplemultibutton.json</file>
|
||||
|
|
|
|||
|
|
@ -1,5 +1,6 @@
|
|||
{
|
||||
"extends": "simplebutton",
|
||||
"description": "A button that emits different events, pressed and longpressed, depending on how long the user presses it. Note that the button should only emit one of them at a time. I.e. don't emit pressed on botton down and later longPressed if the user keeps on holding the button. Such a longpress should only emit longPressed. Common practice is to emit pressed if a release event is received before a timeout expires, else emit longpress when the timeout expires.",
|
||||
"extends": "button",
|
||||
"events": [
|
||||
{
|
||||
"name": "longPressed"
|
||||
|
|
|
|||
|
|
@ -1,5 +1,6 @@
|
|||
{
|
||||
"extends": "longpressbutton",
|
||||
"description": "A remote control with multiple buttons that can distinguish between short and long presses. Note that the button should only emit one of them at a time. I.e. don't emit pressed on botton down and later longPressed if the user keeps on holding the button. Such a longpress should only emit longPressed. Common practice is to emit pressed if a release event is received before a timeout expires, else emit longpress when the timeout expires.",
|
||||
"extends": "simplemultibutton",
|
||||
"events": [
|
||||
{
|
||||
"name": "longPressed",
|
||||
|
|
|
|||
|
|
@ -0,0 +1,15 @@
|
|||
{
|
||||
"description": "A remote control with multiple buttons. Emits pressed(buttonName) on button presses.",
|
||||
"extends": "button",
|
||||
"events": [
|
||||
{
|
||||
"name": "pressed",
|
||||
"params": [
|
||||
{
|
||||
"name": "buttonName",
|
||||
"type": "QString"
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
|
|
@ -1,8 +1,4 @@
|
|||
{
|
||||
"extends": "button",
|
||||
"events": [
|
||||
{
|
||||
"name": "pressed"
|
||||
}
|
||||
]
|
||||
"description": "Deprecated - Use button instead."
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,14 +1,4 @@
|
|||
{
|
||||
"extends": "button",
|
||||
"events": [
|
||||
{
|
||||
"name": "pressed",
|
||||
"params": [
|
||||
{
|
||||
"name": "buttonName",
|
||||
"type": "QString"
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
"description": "Deprecated - Use multibutton instead",
|
||||
"extends": "multibutton"
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue