summaryrefslogtreecommitdiffstats
path: root/examples
diff options
context:
space:
mode:
authorErik Verbruggen <erik.verbruggen@theqtcompany.com>2016-01-21 12:09:20 +0100
committerErik Verbruggen <erik.verbruggen@theqtcompany.com>2016-02-04 10:18:50 +0000
commit9ada7aa0f5a41312c953ee3c34053edc4cf15df9 (patch)
tree993f282c241979d1c4f4fd574b7e181bbbb1eb36 /examples
parent291a963477e190540b2b9a6f0a5c8ce836812067 (diff)
Remove event_ prefix from event signals and slots.
Also only generate the C++ declarations and definitions when in "qt mode". Change-Id: I799ce3efe23e046d26180d1a6e690755523dbed1 Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
Diffstat (limited to 'examples')
-rw-r--r--examples/invoke-common/MainView.qml4
-rw-r--r--examples/invoke-common/SubView.qml4
-rw-r--r--examples/mediaplayer-common/Mediaplayer.qml10
-rw-r--r--examples/mediaplayer-widgets-dynamic/mediaplayer-widgets-dynamic.cpp6
-rw-r--r--examples/mediaplayer-widgets-static/mediaplayer-widgets-static.cpp6
-rw-r--r--examples/trafficlight-common/TrafficLight.qml4
6 files changed, 17 insertions, 17 deletions
diff --git a/examples/invoke-common/MainView.qml b/examples/invoke-common/MainView.qml
index b623592..0f51ae5 100644
--- a/examples/invoke-common/MainView.qml
+++ b/examples/invoke-common/MainView.qml
@@ -69,7 +69,7 @@ Window {
text: "Go Nowhere"
width: parent.width
height: parent.height / 2
- onClicked: stateMachine.event_goNowhere()
+ onClicked: stateMachine.goNowhere()
enabled: stateMachine.somewhere
}
@@ -79,7 +79,7 @@ Window {
width: parent.width
height: parent.height / 2
y: parent.height / 2
- onClicked: stateMachine.event_goSomewhere()
+ onClicked: stateMachine.goSomewhere()
enabled: stateMachine.nowhere
}
}
diff --git a/examples/invoke-common/SubView.qml b/examples/invoke-common/SubView.qml
index 8ab3614..cec32e3 100644
--- a/examples/invoke-common/SubView.qml
+++ b/examples/invoke-common/SubView.qml
@@ -57,7 +57,7 @@ Item {
text: "Go There"
width: parent.width / 2
height: parent.height
- onClicked: anywhere.event_goThere()
+ onClicked: anywhere.goThere()
}
Button {
@@ -67,6 +67,6 @@ Item {
width: parent.width / 2
height: parent.height
x: width
- onClicked: anywhere.event_goHere()
+ onClicked: anywhere.goHere()
}
}
diff --git a/examples/mediaplayer-common/Mediaplayer.qml b/examples/mediaplayer-common/Mediaplayer.qml
index d370ae9..c3e1b98 100644
--- a/examples/mediaplayer-common/Mediaplayer.qml
+++ b/examples/mediaplayer-common/Mediaplayer.qml
@@ -117,21 +117,21 @@ Window {
Connections {
target: stateMachine
- onEvent_playbackStarted: {
+ onPlaybackStarted: {
var media = data.media
theText.text = "Playing '" + media + "'"
- theLog.text = theLog.text + "\nevent_playbackStarted with data: " + JSON.stringify(data)
+ theLog.text = theLog.text + "\nplaybackStarted with data: " + JSON.stringify(data)
}
- onEvent_playbackStopped: {
+ onPlaybackStopped: {
var media = data.media
theText.text = "Stopped '" + media + "'"
- theLog.text = theLog.text + "\nevent_playbackStopped with data: " + JSON.stringify(data)
+ theLog.text = theLog.text + "\nplaybackStopped with data: " + JSON.stringify(data)
}
}
function tap(idx) {
var media = theModel.get(idx).media
var data = { "media": media }
- stateMachine.event_tap(data)
+ stateMachine.tap(data)
}
}
diff --git a/examples/mediaplayer-widgets-dynamic/mediaplayer-widgets-dynamic.cpp b/examples/mediaplayer-widgets-dynamic/mediaplayer-widgets-dynamic.cpp
index 286c18b..f36a62e 100644
--- a/examples/mediaplayer-widgets-dynamic/mediaplayer-widgets-dynamic.cpp
+++ b/examples/mediaplayer-widgets-dynamic/mediaplayer-widgets-dynamic.cpp
@@ -63,10 +63,10 @@ int main(int argc, char **argv)
machine->setParent(&mainWindow);
QObject::connect(&mainWindow, SIGNAL(tap(const QVariant &)),
- machine, SLOT(event_tap(const QVariant &)));
- QObject::connect(machine, SIGNAL(event_playbackStarted(const QVariant &)),
+ machine, SLOT(tap(const QVariant &)));
+ QObject::connect(machine, SIGNAL(playbackStarted(const QVariant &)),
&mainWindow, SLOT(started(const QVariant &)));
- QObject::connect(machine, SIGNAL(event_playbackStopped(const QVariant &)),
+ QObject::connect(machine, SIGNAL(playbackStopped(const QVariant &)),
&mainWindow, SLOT(stopped(const QVariant &)));
machine->start();
diff --git a/examples/mediaplayer-widgets-static/mediaplayer-widgets-static.cpp b/examples/mediaplayer-widgets-static/mediaplayer-widgets-static.cpp
index 65b8cb0..dcc6d59 100644
--- a/examples/mediaplayer-widgets-static/mediaplayer-widgets-static.cpp
+++ b/examples/mediaplayer-widgets-static/mediaplayer-widgets-static.cpp
@@ -62,10 +62,10 @@ int main(int argc, char **argv)
MainWindow mainWindow;
QObject::connect(&mainWindow, &MainWindow::tap,
- &machine, &MediaPlayerStateMachine::event_tap);
- QObject::connect(&machine, &MediaPlayerStateMachine::event_playbackStarted,
+ &machine, &MediaPlayerStateMachine::tap);
+ QObject::connect(&machine, &MediaPlayerStateMachine::playbackStarted,
&mainWindow, &MainWindow::started);
- QObject::connect(&machine, &MediaPlayerStateMachine::event_playbackStopped,
+ QObject::connect(&machine, &MediaPlayerStateMachine::playbackStopped,
&mainWindow, &MainWindow::stopped);
machine.start();
diff --git a/examples/trafficlight-common/TrafficLight.qml b/examples/trafficlight-common/TrafficLight.qml
index 552e41d..4d8cb15 100644
--- a/examples/trafficlight-common/TrafficLight.qml
+++ b/examples/trafficlight-common/TrafficLight.qml
@@ -109,9 +109,9 @@ Window {
onClicked: {
if (stateMachine.working)
- stateMachine.event_smash()
+ stateMachine.smash()
else
- stateMachine.event_repair()
+ stateMachine.repair()
}
}
}