summaryrefslogtreecommitdiffstats
path: root/examples
diff options
context:
space:
mode:
authorAlan Alpert <alan.alpert@nokia.com>2010-04-21 07:14:07 (GMT)
committerAlan Alpert <alan.alpert@nokia.com>2010-04-21 07:14:07 (GMT)
commitd420eb68b9a306f0fccf3000a8af31aa00cb0cd9 (patch)
tree44c958741cd0189acd5ac875d57d28165f051aae /examples
parent202af3021362d3c8066bc479a95e7aad889bd928 (diff)
parentb72f9dacb352aa4be888c5f7f1a482dbcba1f456 (diff)
downloadQt-d420eb68b9a306f0fccf3000a8af31aa00cb0cd9.zip
Qt-d420eb68b9a306f0fccf3000a8af31aa00cb0cd9.tar.gz
Qt-d420eb68b9a306f0fccf3000a8af31aa00cb0cd9.tar.bz2
Merge branch '4.7' of git@scm.dev.nokia.troll.no:qt/qt-qml into 4.7
Diffstat (limited to 'examples')
-rw-r--r--examples/declarative/animations/animations.qmlproject16
-rw-r--r--examples/declarative/aspectratio/aspectratio.qmlproject16
-rw-r--r--examples/declarative/behaviors/behaviors.qmlproject16
-rw-r--r--examples/declarative/border-image/border-image.qmlproject16
-rw-r--r--examples/declarative/clocks/clocks.qmlproject16
-rw-r--r--examples/declarative/connections/connections.qmlproject16
-rw-r--r--examples/declarative/dial/dial.qmlproject16
-rw-r--r--examples/declarative/dynamic/dynamic.qmlproject16
-rw-r--r--examples/declarative/effects/effects.qmlproject16
-rw-r--r--examples/declarative/examples.qmlproject16
-rw-r--r--examples/declarative/extending/adding/example.qml2
-rw-r--r--examples/declarative/extending/adding/main.cpp3
-rw-r--r--examples/declarative/extending/adding/person.h12
-rw-r--r--examples/declarative/extending/attached/birthdayparty.cpp10
-rw-r--r--examples/declarative/extending/attached/birthdayparty.h18
-rw-r--r--examples/declarative/extending/attached/example.qml10
-rw-r--r--examples/declarative/extending/attached/main.cpp6
-rw-r--r--examples/declarative/extending/attached/person.h33
-rw-r--r--examples/declarative/extending/binding/binding.pro4
-rw-r--r--examples/declarative/extending/binding/birthdayparty.cpp18
-rw-r--r--examples/declarative/extending/binding/birthdayparty.h26
-rw-r--r--examples/declarative/extending/binding/example.qml6
-rw-r--r--examples/declarative/extending/binding/happybirthdaysong.cpp (renamed from examples/declarative/extending/binding/happybirthday.cpp)12
-rw-r--r--examples/declarative/extending/binding/happybirthdaysong.h (renamed from examples/declarative/extending/binding/happybirthday.h)17
-rw-r--r--examples/declarative/extending/binding/main.cpp10
-rw-r--r--examples/declarative/extending/binding/person.h33
-rw-r--r--examples/declarative/extending/coercion/birthdayparty.cpp10
-rw-r--r--examples/declarative/extending/coercion/birthdayparty.h14
-rw-r--r--examples/declarative/extending/coercion/example.qml4
-rw-r--r--examples/declarative/extending/coercion/main.cpp6
-rw-r--r--examples/declarative/extending/coercion/person.h20
-rw-r--r--examples/declarative/extending/default/birthdayparty.cpp10
-rw-r--r--examples/declarative/extending/default/birthdayparty.h16
-rw-r--r--examples/declarative/extending/default/example.qml4
-rw-r--r--examples/declarative/extending/default/main.cpp6
-rw-r--r--examples/declarative/extending/default/person.h20
-rw-r--r--examples/declarative/extending/extended/lineedit.h10
-rw-r--r--examples/declarative/extending/extending.qmlproject16
-rw-r--r--examples/declarative/extending/grouped/birthdayparty.cpp10
-rw-r--r--examples/declarative/extending/grouped/birthdayparty.h16
-rw-r--r--examples/declarative/extending/grouped/example.qml4
-rw-r--r--examples/declarative/extending/grouped/main.cpp6
-rw-r--r--examples/declarative/extending/grouped/person.h33
-rw-r--r--examples/declarative/extending/properties/birthdayparty.cpp10
-rw-r--r--examples/declarative/extending/properties/birthdayparty.h14
-rw-r--r--examples/declarative/extending/properties/example.qml4
-rw-r--r--examples/declarative/extending/properties/main.cpp4
-rw-r--r--examples/declarative/extending/properties/person.h10
-rw-r--r--examples/declarative/extending/signal/birthdayparty.cpp10
-rw-r--r--examples/declarative/extending/signal/birthdayparty.h18
-rw-r--r--examples/declarative/extending/signal/example.qml4
-rw-r--r--examples/declarative/extending/signal/main.cpp6
-rw-r--r--examples/declarative/extending/signal/person.h33
-rw-r--r--examples/declarative/extending/valuesource/birthdayparty.cpp14
-rw-r--r--examples/declarative/extending/valuesource/birthdayparty.h25
-rw-r--r--examples/declarative/extending/valuesource/example.qml6
-rw-r--r--examples/declarative/extending/valuesource/happybirthdaysong.cpp (renamed from examples/declarative/extending/valuesource/happybirthday.cpp)12
-rw-r--r--examples/declarative/extending/valuesource/happybirthdaysong.h (renamed from examples/declarative/extending/valuesource/happybirthday.h)15
-rw-r--r--examples/declarative/extending/valuesource/main.cpp10
-rw-r--r--examples/declarative/extending/valuesource/person.h33
-rw-r--r--examples/declarative/extending/valuesource/valuesource.pro4
-rw-r--r--examples/declarative/fillmode/fillmode.qmlproject16
-rw-r--r--examples/declarative/flipable/flipable.qmlproject16
-rw-r--r--examples/declarative/focus/Core/GridMenu.qml4
-rw-r--r--examples/declarative/focus/Core/ListViewDelegate.qml61
-rw-r--r--examples/declarative/focus/Core/ListViews.qml6
-rw-r--r--examples/declarative/focus/focus.qmlproject16
-rw-r--r--examples/declarative/fonts/fonts.qmlproject16
-rw-r--r--examples/declarative/gestures/gestures.qmlproject16
-rw-r--r--examples/declarative/gridview/gridview.qmlproject16
-rw-r--r--examples/declarative/imageprovider/imageprovider.qmlproject16
-rw-r--r--examples/declarative/images/images.qmlproject16
-rw-r--r--examples/declarative/layouts/layouts.qmlproject16
-rw-r--r--examples/declarative/listmodel-threaded/listmodel-threaded.qmlproject16
-rw-r--r--examples/declarative/listview/listview.qmlproject16
-rw-r--r--examples/declarative/mousearea/mousearea.qmlproject16
-rw-r--r--examples/declarative/objectlistmodel/objectlistmodel.qmlproject16
-rw-r--r--examples/declarative/package/package.qmlproject16
-rw-r--r--examples/declarative/parallax/parallax.qmlproject16
-rw-r--r--examples/declarative/plugins/plugins.qmlproject16
-rw-r--r--examples/declarative/progressbar/progressbar.qmlproject16
-rw-r--r--examples/declarative/proxywidgets/proxywidgets.qmlproject16
-rw-r--r--examples/declarative/scrollbar/scrollbar.qmlproject16
-rw-r--r--examples/declarative/searchbox/searchbox.qmlproject16
-rw-r--r--examples/declarative/slideswitch/slideswitch.qmlproject16
-rw-r--r--examples/declarative/sql/sql.qmlproject16
-rw-r--r--examples/declarative/states/states.qmlproject16
-rw-r--r--examples/declarative/tabwidget/tabwidget.qmlproject16
-rw-r--r--examples/declarative/tic-tac-toe/tic-tac-toe.qmlproject16
-rw-r--r--examples/declarative/tutorials/tutorials.qmlproject16
-rw-r--r--examples/declarative/tvtennis/tvtennis.qmlproject16
-rw-r--r--examples/declarative/velocity/velocity.qmlproject16
-rw-r--r--examples/declarative/webview/webview.qmlproject16
-rw-r--r--examples/declarative/workerscript/workerscript.qmlproject16
-rw-r--r--examples/declarative/xmldata/xmldata.qmlproject16
-rw-r--r--examples/declarative/xmlhttprequest/xmlhttprequest.qmlproject16
-rw-r--r--examples/network/bearermonitor/bearermonitor.cpp28
-rw-r--r--examples/network/bearermonitor/bearermonitor.h7
-rw-r--r--examples/network/bearermonitor/bearermonitor.pro27
-rw-r--r--examples/network/bearermonitor/bearermonitor_maemo.ui310
-rw-r--r--examples/network/bearermonitor/sessionwidget.cpp11
-rw-r--r--examples/network/bearermonitor/sessionwidget.h9
-rw-r--r--examples/network/bearermonitor/sessionwidget_maemo.ui262
-rw-r--r--examples/qtconcurrent/map/main.cpp2
-rw-r--r--examples/script/script.pro2
105 files changed, 1683 insertions, 375 deletions
diff --git a/examples/declarative/animations/animations.qmlproject b/examples/declarative/animations/animations.qmlproject
new file mode 100644
index 0000000..d4909f8
--- /dev/null
+++ b/examples/declarative/animations/animations.qmlproject
@@ -0,0 +1,16 @@
+import QmlProject 1.0
+
+Project {
+ /* Include .qml, .js, and image files from current directory and subdirectories */
+ QmlFiles {
+ directory: "."
+ }
+ JavaScriptFiles {
+ directory: "."
+ }
+ ImageFiles {
+ directory: "."
+ }
+ /* List of plugin directories passed to QML runtime */
+ // importPaths: [ " ../exampleplugin " ]
+}
diff --git a/examples/declarative/aspectratio/aspectratio.qmlproject b/examples/declarative/aspectratio/aspectratio.qmlproject
new file mode 100644
index 0000000..d4909f8
--- /dev/null
+++ b/examples/declarative/aspectratio/aspectratio.qmlproject
@@ -0,0 +1,16 @@
+import QmlProject 1.0
+
+Project {
+ /* Include .qml, .js, and image files from current directory and subdirectories */
+ QmlFiles {
+ directory: "."
+ }
+ JavaScriptFiles {
+ directory: "."
+ }
+ ImageFiles {
+ directory: "."
+ }
+ /* List of plugin directories passed to QML runtime */
+ // importPaths: [ " ../exampleplugin " ]
+}
diff --git a/examples/declarative/behaviors/behaviors.qmlproject b/examples/declarative/behaviors/behaviors.qmlproject
new file mode 100644
index 0000000..d4909f8
--- /dev/null
+++ b/examples/declarative/behaviors/behaviors.qmlproject
@@ -0,0 +1,16 @@
+import QmlProject 1.0
+
+Project {
+ /* Include .qml, .js, and image files from current directory and subdirectories */
+ QmlFiles {
+ directory: "."
+ }
+ JavaScriptFiles {
+ directory: "."
+ }
+ ImageFiles {
+ directory: "."
+ }
+ /* List of plugin directories passed to QML runtime */
+ // importPaths: [ " ../exampleplugin " ]
+}
diff --git a/examples/declarative/border-image/border-image.qmlproject b/examples/declarative/border-image/border-image.qmlproject
new file mode 100644
index 0000000..d4909f8
--- /dev/null
+++ b/examples/declarative/border-image/border-image.qmlproject
@@ -0,0 +1,16 @@
+import QmlProject 1.0
+
+Project {
+ /* Include .qml, .js, and image files from current directory and subdirectories */
+ QmlFiles {
+ directory: "."
+ }
+ JavaScriptFiles {
+ directory: "."
+ }
+ ImageFiles {
+ directory: "."
+ }
+ /* List of plugin directories passed to QML runtime */
+ // importPaths: [ " ../exampleplugin " ]
+}
diff --git a/examples/declarative/clocks/clocks.qmlproject b/examples/declarative/clocks/clocks.qmlproject
new file mode 100644
index 0000000..d4909f8
--- /dev/null
+++ b/examples/declarative/clocks/clocks.qmlproject
@@ -0,0 +1,16 @@
+import QmlProject 1.0
+
+Project {
+ /* Include .qml, .js, and image files from current directory and subdirectories */
+ QmlFiles {
+ directory: "."
+ }
+ JavaScriptFiles {
+ directory: "."
+ }
+ ImageFiles {
+ directory: "."
+ }
+ /* List of plugin directories passed to QML runtime */
+ // importPaths: [ " ../exampleplugin " ]
+}
diff --git a/examples/declarative/connections/connections.qmlproject b/examples/declarative/connections/connections.qmlproject
new file mode 100644
index 0000000..d4909f8
--- /dev/null
+++ b/examples/declarative/connections/connections.qmlproject
@@ -0,0 +1,16 @@
+import QmlProject 1.0
+
+Project {
+ /* Include .qml, .js, and image files from current directory and subdirectories */
+ QmlFiles {
+ directory: "."
+ }
+ JavaScriptFiles {
+ directory: "."
+ }
+ ImageFiles {
+ directory: "."
+ }
+ /* List of plugin directories passed to QML runtime */
+ // importPaths: [ " ../exampleplugin " ]
+}
diff --git a/examples/declarative/dial/dial.qmlproject b/examples/declarative/dial/dial.qmlproject
new file mode 100644
index 0000000..d4909f8
--- /dev/null
+++ b/examples/declarative/dial/dial.qmlproject
@@ -0,0 +1,16 @@
+import QmlProject 1.0
+
+Project {
+ /* Include .qml, .js, and image files from current directory and subdirectories */
+ QmlFiles {
+ directory: "."
+ }
+ JavaScriptFiles {
+ directory: "."
+ }
+ ImageFiles {
+ directory: "."
+ }
+ /* List of plugin directories passed to QML runtime */
+ // importPaths: [ " ../exampleplugin " ]
+}
diff --git a/examples/declarative/dynamic/dynamic.qmlproject b/examples/declarative/dynamic/dynamic.qmlproject
new file mode 100644
index 0000000..d4909f8
--- /dev/null
+++ b/examples/declarative/dynamic/dynamic.qmlproject
@@ -0,0 +1,16 @@
+import QmlProject 1.0
+
+Project {
+ /* Include .qml, .js, and image files from current directory and subdirectories */
+ QmlFiles {
+ directory: "."
+ }
+ JavaScriptFiles {
+ directory: "."
+ }
+ ImageFiles {
+ directory: "."
+ }
+ /* List of plugin directories passed to QML runtime */
+ // importPaths: [ " ../exampleplugin " ]
+}
diff --git a/examples/declarative/effects/effects.qmlproject b/examples/declarative/effects/effects.qmlproject
new file mode 100644
index 0000000..d4909f8
--- /dev/null
+++ b/examples/declarative/effects/effects.qmlproject
@@ -0,0 +1,16 @@
+import QmlProject 1.0
+
+Project {
+ /* Include .qml, .js, and image files from current directory and subdirectories */
+ QmlFiles {
+ directory: "."
+ }
+ JavaScriptFiles {
+ directory: "."
+ }
+ ImageFiles {
+ directory: "."
+ }
+ /* List of plugin directories passed to QML runtime */
+ // importPaths: [ " ../exampleplugin " ]
+}
diff --git a/examples/declarative/examples.qmlproject b/examples/declarative/examples.qmlproject
new file mode 100644
index 0000000..d4909f8
--- /dev/null
+++ b/examples/declarative/examples.qmlproject
@@ -0,0 +1,16 @@
+import QmlProject 1.0
+
+Project {
+ /* Include .qml, .js, and image files from current directory and subdirectories */
+ QmlFiles {
+ directory: "."
+ }
+ JavaScriptFiles {
+ directory: "."
+ }
+ ImageFiles {
+ directory: "."
+ }
+ /* List of plugin directories passed to QML runtime */
+ // importPaths: [ " ../exampleplugin " ]
+}
diff --git a/examples/declarative/extending/adding/example.qml b/examples/declarative/extending/adding/example.qml
index c608f94..dc891e7 100644
--- a/examples/declarative/extending/adding/example.qml
+++ b/examples/declarative/extending/adding/example.qml
@@ -1,6 +1,6 @@
+// ![0]
import People 1.0
-// ![0]
Person {
name: "Bob Jones"
shoeSize: 12
diff --git a/examples/declarative/extending/adding/main.cpp b/examples/declarative/extending/adding/main.cpp
index b9e5aa3..7b33895 100644
--- a/examples/declarative/extending/adding/main.cpp
+++ b/examples/declarative/extending/adding/main.cpp
@@ -47,8 +47,9 @@
int main(int argc, char ** argv)
{
QCoreApplication app(argc, argv);
-
+//![0]
qmlRegisterType<Person>("People", 1,0, "Person");
+//![0]
QDeclarativeEngine engine;
QDeclarativeComponent component(&engine, ":example.qml");
diff --git a/examples/declarative/extending/adding/person.h b/examples/declarative/extending/adding/person.h
index 7a9e0f0..d6de9a9 100644
--- a/examples/declarative/extending/adding/person.h
+++ b/examples/declarative/extending/adding/person.h
@@ -43,12 +43,11 @@
#include <QObject>
// ![0]
-#include <qdeclarative.h>
-
-class Person : public QObject {
-Q_OBJECT
-Q_PROPERTY(QString name READ name WRITE setName)
-Q_PROPERTY(int shoeSize READ shoeSize WRITE setShoeSize)
+class Person : public QObject
+{
+ Q_OBJECT
+ Q_PROPERTY(QString name READ name WRITE setName)
+ Q_PROPERTY(int shoeSize READ shoeSize WRITE setShoeSize)
public:
Person(QObject *parent = 0);
@@ -57,6 +56,7 @@ public:
int shoeSize() const;
void setShoeSize(int);
+
private:
QString m_name;
int m_shoeSize;
diff --git a/examples/declarative/extending/attached/birthdayparty.cpp b/examples/declarative/extending/attached/birthdayparty.cpp
index d4f2675..7fa1748 100644
--- a/examples/declarative/extending/attached/birthdayparty.cpp
+++ b/examples/declarative/extending/attached/birthdayparty.cpp
@@ -56,18 +56,18 @@ void BirthdayPartyAttached::setRsvp(const QDate &d)
}
BirthdayParty::BirthdayParty(QObject *parent)
-: QObject(parent), m_celebrant(0)
+: QObject(parent), m_host(0)
{
}
-Person *BirthdayParty::celebrant() const
+Person *BirthdayParty::host() const
{
- return m_celebrant;
+ return m_host;
}
-void BirthdayParty::setCelebrant(Person *c)
+void BirthdayParty::setHost(Person *c)
{
- m_celebrant = c;
+ m_host = c;
}
QDeclarativeListProperty<Person> BirthdayParty::guests()
diff --git a/examples/declarative/extending/attached/birthdayparty.h b/examples/declarative/extending/attached/birthdayparty.h
index 7c45d21..1c66f8c 100644
--- a/examples/declarative/extending/attached/birthdayparty.h
+++ b/examples/declarative/extending/attached/birthdayparty.h
@@ -48,8 +48,8 @@
class BirthdayPartyAttached : public QObject
{
-Q_OBJECT
-Q_PROPERTY(QDate rsvp READ rsvp WRITE setRsvp)
+ Q_OBJECT
+ Q_PROPERTY(QDate rsvp READ rsvp WRITE setRsvp)
public:
BirthdayPartyAttached(QObject *object);
@@ -62,15 +62,15 @@ private:
class BirthdayParty : public QObject
{
-Q_OBJECT
-Q_PROPERTY(Person *celebrant READ celebrant WRITE setCelebrant)
-Q_PROPERTY(QDeclarativeListProperty<Person> guests READ guests)
-Q_CLASSINFO("DefaultProperty", "guests")
+ Q_OBJECT
+ Q_PROPERTY(Person *host READ host WRITE setHost)
+ Q_PROPERTY(QDeclarativeListProperty<Person> guests READ guests)
+ Q_CLASSINFO("DefaultProperty", "guests")
public:
BirthdayParty(QObject *parent = 0);
- Person *celebrant() const;
- void setCelebrant(Person *);
+ Person *host() const;
+ void setHost(Person *);
QDeclarativeListProperty<Person> guests();
int guestCount() const;
@@ -78,7 +78,7 @@ public:
static BirthdayPartyAttached *qmlAttachedProperties(QObject *);
private:
- Person *m_celebrant;
+ Person *m_host;
QList<Person *> m_guests;
};
diff --git a/examples/declarative/extending/attached/example.qml b/examples/declarative/extending/attached/example.qml
index 952eb93..50f0a32 100644
--- a/examples/declarative/extending/attached/example.qml
+++ b/examples/declarative/extending/attached/example.qml
@@ -1,16 +1,17 @@
import People 1.0
BirthdayParty {
- celebrant: Boy {
+ host: Boy {
name: "Bob Jones"
shoe { size: 12; color: "white"; brand: "Nike"; price: 90.0 }
}
// ![1]
Boy {
- name: "Joan Hodges"
- BirthdayParty.rsvp: "2009-07-06"
+ name: "Leo Hodges"
shoe { size: 10; color: "black"; brand: "Reebok"; price: 59.95 }
+
+ BirthdayParty.rsvp: "2009-07-06"
}
// ![1]
Boy {
@@ -19,11 +20,12 @@ BirthdayParty {
}
Girl {
name: "Anne Brown"
- BirthdayParty.rsvp: "2009-07-01"
shoe.size: 7
shoe.color: "red"
shoe.brand: "Marc Jacobs"
shoe.price: 699.99
+
+ BirthdayParty.rsvp: "2009-07-01"
}
}
diff --git a/examples/declarative/extending/attached/main.cpp b/examples/declarative/extending/attached/main.cpp
index fd2d525..f1055ae 100644
--- a/examples/declarative/extending/attached/main.cpp
+++ b/examples/declarative/extending/attached/main.cpp
@@ -60,10 +60,10 @@ int main(int argc, char ** argv)
QDeclarativeComponent component(&engine, ":example.qml");
BirthdayParty *party = qobject_cast<BirthdayParty *>(component.create());
- if (party && party->celebrant()) {
- qWarning() << party->celebrant()->name() << "is having a birthday!";
+ if (party && party->host()) {
+ qWarning() << party->host()->name() << "is having a birthday!";
- if (qobject_cast<Boy *>(party->celebrant()))
+ if (qobject_cast<Boy *>(party->host()))
qWarning() << "He is inviting:";
else
qWarning() << "She is inviting:";
diff --git a/examples/declarative/extending/attached/person.h b/examples/declarative/extending/attached/person.h
index 7a4b9c3..2f444c5 100644
--- a/examples/declarative/extending/attached/person.h
+++ b/examples/declarative/extending/attached/person.h
@@ -43,14 +43,14 @@
#include <QObject>
#include <QColor>
-#include <qdeclarative.h>
-class ShoeDescription : public QObject {
-Q_OBJECT
-Q_PROPERTY(int size READ size WRITE setSize)
-Q_PROPERTY(QColor color READ color WRITE setColor)
-Q_PROPERTY(QString brand READ brand WRITE setBrand)
-Q_PROPERTY(qreal price READ price WRITE setPrice)
+class ShoeDescription : public QObject
+{
+ Q_OBJECT
+ Q_PROPERTY(int size READ size WRITE setSize)
+ Q_PROPERTY(QColor color READ color WRITE setColor)
+ Q_PROPERTY(QString brand READ brand WRITE setBrand)
+ Q_PROPERTY(qreal price READ price WRITE setPrice)
public:
ShoeDescription(QObject *parent = 0);
@@ -72,10 +72,11 @@ private:
qreal m_price;
};
-class Person : public QObject {
-Q_OBJECT
-Q_PROPERTY(QString name READ name WRITE setName)
-Q_PROPERTY(ShoeDescription *shoe READ shoe)
+class Person : public QObject
+{
+ Q_OBJECT
+ Q_PROPERTY(QString name READ name WRITE setName)
+ Q_PROPERTY(ShoeDescription *shoe READ shoe)
public:
Person(QObject *parent = 0);
@@ -88,14 +89,16 @@ private:
ShoeDescription m_shoe;
};
-class Boy : public Person {
-Q_OBJECT
+class Boy : public Person
+{
+ Q_OBJECT
public:
Boy(QObject * parent = 0);
};
-class Girl : public Person {
-Q_OBJECT
+class Girl : public Person
+{
+ Q_OBJECT
public:
Girl(QObject * parent = 0);
};
diff --git a/examples/declarative/extending/binding/binding.pro b/examples/declarative/extending/binding/binding.pro
index 903712e..896ce25 100644
--- a/examples/declarative/extending/binding/binding.pro
+++ b/examples/declarative/extending/binding/binding.pro
@@ -8,10 +8,10 @@ QT += declarative
SOURCES += main.cpp \
person.cpp \
birthdayparty.cpp \
- happybirthday.cpp
+ happybirthdaysong.cpp
HEADERS += person.h \
birthdayparty.h \
- happybirthday.h
+ happybirthdaysong.h
RESOURCES += binding.qrc
target.path = $$[QT_INSTALL_EXAMPLES]/declarative/extending/binding
sources.files = $$SOURCES $$HEADERS $$RESOURCES $$FORMS binding.pro
diff --git a/examples/declarative/extending/binding/birthdayparty.cpp b/examples/declarative/extending/binding/birthdayparty.cpp
index e5be2b9..000bb1f 100644
--- a/examples/declarative/extending/binding/birthdayparty.cpp
+++ b/examples/declarative/extending/binding/birthdayparty.cpp
@@ -60,20 +60,20 @@ void BirthdayPartyAttached::setRsvp(const QDate &d)
BirthdayParty::BirthdayParty(QObject *parent)
-: QObject(parent), m_celebrant(0)
+: QObject(parent), m_host(0)
{
}
-Person *BirthdayParty::celebrant() const
+Person *BirthdayParty::host() const
{
- return m_celebrant;
+ return m_host;
}
-void BirthdayParty::setCelebrant(Person *c)
+void BirthdayParty::setHost(Person *c)
{
- if (c == m_celebrant) return;
- m_celebrant = c;
- emit celebrantChanged();
+ if (c == m_host) return;
+ m_host = c;
+ emit hostChanged();
}
QDeclarativeListProperty<Person> BirthdayParty::guests()
@@ -97,12 +97,12 @@ void BirthdayParty::startParty()
emit partyStarted(time);
}
-QString BirthdayParty::speaker() const
+QString BirthdayParty::announcement() const
{
return QString();
}
-void BirthdayParty::setSpeaker(const QString &speak)
+void BirthdayParty::setAnnouncement(const QString &speak)
{
qWarning() << qPrintable(speak);
}
diff --git a/examples/declarative/extending/binding/birthdayparty.h b/examples/declarative/extending/binding/birthdayparty.h
index e2757bc..c3f033e 100644
--- a/examples/declarative/extending/binding/birthdayparty.h
+++ b/examples/declarative/extending/binding/birthdayparty.h
@@ -49,8 +49,8 @@
class BirthdayPartyAttached : public QObject
{
-Q_OBJECT
-Q_PROPERTY(QDate rsvp READ rsvp WRITE setRsvp NOTIFY rsvpChanged)
+ Q_OBJECT
+ Q_PROPERTY(QDate rsvp READ rsvp WRITE setRsvp NOTIFY rsvpChanged)
public:
BirthdayPartyAttached(QObject *object);
@@ -66,35 +66,35 @@ private:
class BirthdayParty : public QObject
{
-Q_OBJECT
+ Q_OBJECT
// ![0]
-Q_PROPERTY(Person *celebrant READ celebrant WRITE setCelebrant NOTIFY celebrantChanged)
+ Q_PROPERTY(Person *host READ host WRITE setHost NOTIFY hostChanged)
// ![0]
-Q_PROPERTY(QDeclarativeListProperty<Person> guests READ guests)
-Q_PROPERTY(QString speaker READ speaker WRITE setSpeaker)
-Q_CLASSINFO("DefaultProperty", "guests")
+ Q_PROPERTY(QDeclarativeListProperty<Person> guests READ guests)
+ Q_PROPERTY(QString announcement READ announcement WRITE setAnnouncement)
+ Q_CLASSINFO("DefaultProperty", "guests")
public:
BirthdayParty(QObject *parent = 0);
- Person *celebrant() const;
- void setCelebrant(Person *);
+ Person *host() const;
+ void setHost(Person *);
QDeclarativeListProperty<Person> guests();
int guestCount() const;
Person *guest(int) const;
- QString speaker() const;
- void setSpeaker(const QString &);
+ QString announcement() const;
+ void setAnnouncement(const QString &);
static BirthdayPartyAttached *qmlAttachedProperties(QObject *);
void startParty();
signals:
void partyStarted(const QTime &time);
- void celebrantChanged();
+ void hostChanged();
private:
- Person *m_celebrant;
+ Person *m_host;
QList<Person *> m_guests;
};
diff --git a/examples/declarative/extending/binding/example.qml b/examples/declarative/extending/binding/example.qml
index b66bc86..82eb3be 100644
--- a/examples/declarative/extending/binding/example.qml
+++ b/examples/declarative/extending/binding/example.qml
@@ -4,9 +4,9 @@ import People 1.0
BirthdayParty {
id: theParty
- speaker: HappyBirthday { name: theParty.celebrant.name }
+ HappyBirthdaySong on announcement { name: theParty.host.name }
- celebrant: Boy {
+ host: Boy {
name: "Bob Jones"
shoe { size: 12; color: "white"; brand: "Nike"; price: 90.0 }
}
@@ -15,7 +15,7 @@ BirthdayParty {
Boy {
- name: "Joan Hodges"
+ name: "Leo Hodges"
BirthdayParty.rsvp: "2009-07-06"
shoe { size: 10; color: "black"; brand: "Reebok"; price: 59.95 }
}
diff --git a/examples/declarative/extending/binding/happybirthday.cpp b/examples/declarative/extending/binding/happybirthdaysong.cpp
index aa5f937..a40e7fb 100644
--- a/examples/declarative/extending/binding/happybirthday.cpp
+++ b/examples/declarative/extending/binding/happybirthdaysong.cpp
@@ -38,10 +38,10 @@
** $QT_END_LICENSE$
**
****************************************************************************/
-#include "happybirthday.h"
+#include "happybirthdaysong.h"
#include <QTimer>
-HappyBirthday::HappyBirthday(QObject *parent)
+HappyBirthdaySong::HappyBirthdaySong(QObject *parent)
: QObject(parent), m_line(-1)
{
setName(QString());
@@ -50,17 +50,17 @@ HappyBirthday::HappyBirthday(QObject *parent)
timer->start(1000);
}
-void HappyBirthday::setTarget(const QDeclarativeProperty &p)
+void HappyBirthdaySong::setTarget(const QDeclarativeProperty &p)
{
m_target = p;
}
-QString HappyBirthday::name() const
+QString HappyBirthdaySong::name() const
{
return m_name;
}
-void HappyBirthday::setName(const QString &name)
+void HappyBirthdaySong::setName(const QString &name)
{
if (m_name == name)
return;
@@ -77,7 +77,7 @@ void HappyBirthday::setName(const QString &name)
emit nameChanged();
}
-void HappyBirthday::advance()
+void HappyBirthdaySong::advance()
{
m_line = (m_line + 1) % m_lyrics.count();
diff --git a/examples/declarative/extending/binding/happybirthday.h b/examples/declarative/extending/binding/happybirthdaysong.h
index 0e5a90a..e825b86 100644
--- a/examples/declarative/extending/binding/happybirthday.h
+++ b/examples/declarative/extending/binding/happybirthdaysong.h
@@ -38,22 +38,21 @@
** $QT_END_LICENSE$
**
****************************************************************************/
-#ifndef HAPPYBIRTHDAY_H
-#define HAPPYBIRTHDAY_H
+#ifndef HAPPYBIRTHDAYSONG_H
+#define HAPPYBIRTHDAYSONG_H
#include <QDeclarativePropertyValueSource>
#include <QDeclarativeProperty>
-#include <qdeclarative.h>
#include <QStringList>
-class HappyBirthday : public QObject, public QDeclarativePropertyValueSource
+class HappyBirthdaySong : public QObject, public QDeclarativePropertyValueSource
{
-Q_OBJECT
-Q_PROPERTY(QString name READ name WRITE setName NOTIFY nameChanged)
-Q_INTERFACES(QDeclarativePropertyValueSource)
+ Q_OBJECT
+ Q_PROPERTY(QString name READ name WRITE setName NOTIFY nameChanged)
+ Q_INTERFACES(QDeclarativePropertyValueSource)
public:
- HappyBirthday(QObject *parent = 0);
+ HappyBirthdaySong(QObject *parent = 0);
virtual void setTarget(const QDeclarativeProperty &);
@@ -72,5 +71,5 @@ private:
QString m_name;
};
-#endif // HAPPYBIRTHDAY_H
+#endif // HAPPYBIRTHDAYSONG_H
diff --git a/examples/declarative/extending/binding/main.cpp b/examples/declarative/extending/binding/main.cpp
index ce6c50d..2495676 100644
--- a/examples/declarative/extending/binding/main.cpp
+++ b/examples/declarative/extending/binding/main.cpp
@@ -43,7 +43,7 @@
#include <QDeclarativeComponent>
#include <QDebug>
#include "birthdayparty.h"
-#include "happybirthday.h"
+#include "happybirthdaysong.h"
#include "person.h"
int main(int argc, char ** argv)
@@ -51,7 +51,7 @@ int main(int argc, char ** argv)
QCoreApplication app(argc, argv);
qmlRegisterType<BirthdayPartyAttached>();
qmlRegisterType<BirthdayParty>("People", 1,0, "BirthdayParty");
- qmlRegisterType<HappyBirthday>("People", 1,0, "HappyBirthday");
+ qmlRegisterType<HappyBirthdaySong>("People", 1,0, "HappyBirthdaySong");
qmlRegisterType<ShoeDescription>();
qmlRegisterType<Person>();
qmlRegisterType<Boy>("People", 1,0, "Boy");
@@ -61,10 +61,10 @@ int main(int argc, char ** argv)
QDeclarativeComponent component(&engine, ":example.qml");
BirthdayParty *party = qobject_cast<BirthdayParty *>(component.create());
- if (party && party->celebrant()) {
- qWarning() << party->celebrant()->name() << "is having a birthday!";
+ if (party && party->host()) {
+ qWarning() << party->host()->name() << "is having a birthday!";
- if (qobject_cast<Boy *>(party->celebrant()))
+ if (qobject_cast<Boy *>(party->host()))
qWarning() << "He is inviting:";
else
qWarning() << "She is inviting:";
diff --git a/examples/declarative/extending/binding/person.h b/examples/declarative/extending/binding/person.h
index 0edfcdd..2a68da0 100644
--- a/examples/declarative/extending/binding/person.h
+++ b/examples/declarative/extending/binding/person.h
@@ -43,14 +43,14 @@
#include <QObject>
#include <QColor>
-#include <qdeclarative.h>
-class ShoeDescription : public QObject {
-Q_OBJECT
-Q_PROPERTY(int size READ size WRITE setSize NOTIFY shoeChanged)
-Q_PROPERTY(QColor color READ color WRITE setColor NOTIFY shoeChanged)
-Q_PROPERTY(QString brand READ brand WRITE setBrand NOTIFY shoeChanged)
-Q_PROPERTY(qreal price READ price WRITE setPrice NOTIFY shoeChanged)
+class ShoeDescription : public QObject
+{
+ Q_OBJECT
+ Q_PROPERTY(int size READ size WRITE setSize NOTIFY shoeChanged)
+ Q_PROPERTY(QColor color READ color WRITE setColor NOTIFY shoeChanged)
+ Q_PROPERTY(QString brand READ brand WRITE setBrand NOTIFY shoeChanged)
+ Q_PROPERTY(qreal price READ price WRITE setPrice NOTIFY shoeChanged)
public:
ShoeDescription(QObject *parent = 0);
@@ -75,11 +75,12 @@ private:
qreal m_price;
};
-class Person : public QObject {
-Q_OBJECT
-Q_PROPERTY(QString name READ name WRITE setName NOTIFY nameChanged)
+class Person : public QObject
+{
+ Q_OBJECT
+ Q_PROPERTY(QString name READ name WRITE setName NOTIFY nameChanged)
// ![0]
-Q_PROPERTY(ShoeDescription *shoe READ shoe CONSTANT)
+ Q_PROPERTY(ShoeDescription *shoe READ shoe CONSTANT)
// ![0]
public:
Person(QObject *parent = 0);
@@ -96,14 +97,16 @@ private:
ShoeDescription m_shoe;
};
-class Boy : public Person {
-Q_OBJECT
+class Boy : public Person
+{
+ Q_OBJECT
public:
Boy(QObject * parent = 0);
};
-class Girl : public Person {
-Q_OBJECT
+class Girl : public Person
+{
+ Q_OBJECT
public:
Girl(QObject * parent = 0);
};
diff --git a/examples/declarative/extending/coercion/birthdayparty.cpp b/examples/declarative/extending/coercion/birthdayparty.cpp
index 523a42d..4f415a3 100644
--- a/examples/declarative/extending/coercion/birthdayparty.cpp
+++ b/examples/declarative/extending/coercion/birthdayparty.cpp
@@ -41,18 +41,18 @@
#include "birthdayparty.h"
BirthdayParty::BirthdayParty(QObject *parent)
-: QObject(parent), m_celebrant(0)
+: QObject(parent), m_host(0)
{
}
-Person *BirthdayParty::celebrant() const
+Person *BirthdayParty::host() const
{
- return m_celebrant;
+ return m_host;
}
-void BirthdayParty::setCelebrant(Person *c)
+void BirthdayParty::setHost(Person *c)
{
- m_celebrant = c;
+ m_host = c;
}
QDeclarativeListProperty<Person> BirthdayParty::guests()
diff --git a/examples/declarative/extending/coercion/birthdayparty.h b/examples/declarative/extending/coercion/birthdayparty.h
index a5d14f9..ee77e9a 100644
--- a/examples/declarative/extending/coercion/birthdayparty.h
+++ b/examples/declarative/extending/coercion/birthdayparty.h
@@ -42,28 +42,28 @@
#define BIRTHDAYPARTY_H
#include <QObject>
-#include <qdeclarative.h>
+#include <QDeclarativeListProperty>
#include "person.h"
class BirthdayParty : public QObject
{
-Q_OBJECT
+ Q_OBJECT
// ![0]
-Q_PROPERTY(Person *celebrant READ celebrant WRITE setCelebrant)
-Q_PROPERTY(QDeclarativeListProperty<Person> guests READ guests)
+ Q_PROPERTY(Person *host READ host WRITE setHost)
+ Q_PROPERTY(QDeclarativeListProperty<Person> guests READ guests)
// ![0]
public:
BirthdayParty(QObject *parent = 0);
- Person *celebrant() const;
- void setCelebrant(Person *);
+ Person *host() const;
+ void setHost(Person *);
QDeclarativeListProperty<Person> guests();
int guestCount() const;
Person *guest(int) const;
private:
- Person *m_celebrant;
+ Person *m_host;
QList<Person *> m_guests;
};
diff --git a/examples/declarative/extending/coercion/example.qml b/examples/declarative/extending/coercion/example.qml
index 64d26b0..7b45950 100644
--- a/examples/declarative/extending/coercion/example.qml
+++ b/examples/declarative/extending/coercion/example.qml
@@ -2,12 +2,12 @@ import People 1.0
// ![0]
BirthdayParty {
- celebrant: Boy {
+ host: Boy {
name: "Bob Jones"
shoeSize: 12
}
guests: [
- Boy { name: "Joan Hodges" },
+ Boy { name: "Leo Hodges" },
Boy { name: "Jack Smith" },
Girl { name: "Anne Brown" }
]
diff --git a/examples/declarative/extending/coercion/main.cpp b/examples/declarative/extending/coercion/main.cpp
index 312aff9..2c7b545 100644
--- a/examples/declarative/extending/coercion/main.cpp
+++ b/examples/declarative/extending/coercion/main.cpp
@@ -60,10 +60,10 @@ int main(int argc, char ** argv)
QDeclarativeComponent component(&engine, ":example.qml");
BirthdayParty *party = qobject_cast<BirthdayParty *>(component.create());
- if (party && party->celebrant()) {
- qWarning() << party->celebrant()->name() << "is having a birthday!";
+ if (party && party->host()) {
+ qWarning() << party->host()->name() << "is having a birthday!";
- if (qobject_cast<Boy *>(party->celebrant()))
+ if (qobject_cast<Boy *>(party->host()))
qWarning() << "He is inviting:";
else
qWarning() << "She is inviting:";
diff --git a/examples/declarative/extending/coercion/person.h b/examples/declarative/extending/coercion/person.h
index 861f135..1c95da7 100644
--- a/examples/declarative/extending/coercion/person.h
+++ b/examples/declarative/extending/coercion/person.h
@@ -42,12 +42,12 @@
#define PERSON_H
#include <QObject>
-#include <qdeclarative.h>
-class Person : public QObject {
-Q_OBJECT
-Q_PROPERTY(QString name READ name WRITE setName)
-Q_PROPERTY(int shoeSize READ shoeSize WRITE setShoeSize)
+class Person : public QObject
+{
+ Q_OBJECT
+ Q_PROPERTY(QString name READ name WRITE setName)
+ Q_PROPERTY(int shoeSize READ shoeSize WRITE setShoeSize)
public:
Person(QObject *parent = 0);
@@ -63,15 +63,17 @@ private:
// ![0]
-class Boy : public Person {
-Q_OBJECT
+class Boy : public Person
+{
+ Q_OBJECT
public:
Boy(QObject * parent = 0);
};
-class Girl : public Person {
-Q_OBJECT
+class Girl : public Person
+{
+ Q_OBJECT
public:
Girl(QObject * parent = 0);
};
diff --git a/examples/declarative/extending/default/birthdayparty.cpp b/examples/declarative/extending/default/birthdayparty.cpp
index 523a42d..4f415a3 100644
--- a/examples/declarative/extending/default/birthdayparty.cpp
+++ b/examples/declarative/extending/default/birthdayparty.cpp
@@ -41,18 +41,18 @@
#include "birthdayparty.h"
BirthdayParty::BirthdayParty(QObject *parent)
-: QObject(parent), m_celebrant(0)
+: QObject(parent), m_host(0)
{
}
-Person *BirthdayParty::celebrant() const
+Person *BirthdayParty::host() const
{
- return m_celebrant;
+ return m_host;
}
-void BirthdayParty::setCelebrant(Person *c)
+void BirthdayParty::setHost(Person *c)
{
- m_celebrant = c;
+ m_host = c;
}
QDeclarativeListProperty<Person> BirthdayParty::guests()
diff --git a/examples/declarative/extending/default/birthdayparty.h b/examples/declarative/extending/default/birthdayparty.h
index c0cb0a4..9741040 100644
--- a/examples/declarative/extending/default/birthdayparty.h
+++ b/examples/declarative/extending/default/birthdayparty.h
@@ -42,28 +42,28 @@
#define BIRTHDAYPARTY_H
#include <QObject>
-#include <qdeclarative.h>
+#include <QDeclarativeListProperty>
#include "person.h"
// ![0]
class BirthdayParty : public QObject
{
-Q_OBJECT
-Q_PROPERTY(Person *celebrant READ celebrant WRITE setCelebrant)
-Q_PROPERTY(QDeclarativeListProperty<Person> guests READ guests)
-Q_CLASSINFO("DefaultProperty", "guests")
+ Q_OBJECT
+ Q_PROPERTY(Person *host READ host WRITE setHost)
+ Q_PROPERTY(QDeclarativeListProperty<Person> guests READ guests)
+ Q_CLASSINFO("DefaultProperty", "guests")
public:
BirthdayParty(QObject *parent = 0);
- Person *celebrant() const;
- void setCelebrant(Person *);
+ Person *host() const;
+ void setHost(Person *);
QDeclarativeListProperty<Person> guests();
int guestCount() const;
Person *guest(int) const;
private:
- Person *m_celebrant;
+ Person *m_host;
QList<Person *> m_guests;
};
// ![0]
diff --git a/examples/declarative/extending/default/example.qml b/examples/declarative/extending/default/example.qml
index 58035f9..c0f3cbb 100644
--- a/examples/declarative/extending/default/example.qml
+++ b/examples/declarative/extending/default/example.qml
@@ -2,12 +2,12 @@ import People 1.0
// ![0]
BirthdayParty {
- celebrant: Boy {
+ host: Boy {
name: "Bob Jones"
shoeSize: 12
}
- Boy { name: "Joan Hodges" }
+ Boy { name: "Leo Hodges" }
Boy { name: "Jack Smith" }
Girl { name: "Anne Brown" }
}
diff --git a/examples/declarative/extending/default/main.cpp b/examples/declarative/extending/default/main.cpp
index 06282ad..2ffd180 100644
--- a/examples/declarative/extending/default/main.cpp
+++ b/examples/declarative/extending/default/main.cpp
@@ -58,10 +58,10 @@ int main(int argc, char ** argv)
QDeclarativeComponent component(&engine, ":example.qml");
BirthdayParty *party = qobject_cast<BirthdayParty *>(component.create());
- if (party && party->celebrant()) {
- qWarning() << party->celebrant()->name() << "is having a birthday!";
+ if (party && party->host()) {
+ qWarning() << party->host()->name() << "is having a birthday!";
- if (qobject_cast<Boy *>(party->celebrant()))
+ if (qobject_cast<Boy *>(party->host()))
qWarning() << "He is inviting:";
else
qWarning() << "She is inviting:";
diff --git a/examples/declarative/extending/default/person.h b/examples/declarative/extending/default/person.h
index 832bf11..3e56860 100644
--- a/examples/declarative/extending/default/person.h
+++ b/examples/declarative/extending/default/person.h
@@ -42,12 +42,12 @@
#define PERSON_H
#include <QObject>
-#include <qdeclarative.h>
-class Person : public QObject {
-Q_OBJECT
-Q_PROPERTY(QString name READ name WRITE setName)
-Q_PROPERTY(int shoeSize READ shoeSize WRITE setShoeSize)
+class Person : public QObject
+{
+ Q_OBJECT
+ Q_PROPERTY(QString name READ name WRITE setName)
+ Q_PROPERTY(int shoeSize READ shoeSize WRITE setShoeSize)
public:
Person(QObject *parent = 0);
@@ -61,14 +61,16 @@ private:
int m_shoeSize;
};
-class Boy : public Person {
-Q_OBJECT
+class Boy : public Person
+{
+ Q_OBJECT
public:
Boy(QObject * parent = 0);
};
-class Girl : public Person {
-Q_OBJECT
+class Girl : public Person
+{
+ Q_OBJECT
public:
Girl(QObject * parent = 0);
};
diff --git a/examples/declarative/extending/extended/lineedit.h b/examples/declarative/extending/extended/lineedit.h
index 9730b91..3a464b0 100644
--- a/examples/declarative/extending/extended/lineedit.h
+++ b/examples/declarative/extending/extended/lineedit.h
@@ -45,11 +45,11 @@
class LineEditExtension : public QObject
{
-Q_OBJECT
-Q_PROPERTY(int leftMargin READ leftMargin WRITE setLeftMargin NOTIFY marginsChanged)
-Q_PROPERTY(int rightMargin READ rightMargin WRITE setRightMargin NOTIFY marginsChanged)
-Q_PROPERTY(int topMargin READ topMargin WRITE setTopMargin NOTIFY marginsChanged)
-Q_PROPERTY(int bottomMargin READ bottomMargin WRITE setBottomMargin NOTIFY marginsChanged)
+ Q_OBJECT
+ Q_PROPERTY(int leftMargin READ leftMargin WRITE setLeftMargin NOTIFY marginsChanged)
+ Q_PROPERTY(int rightMargin READ rightMargin WRITE setRightMargin NOTIFY marginsChanged)
+ Q_PROPERTY(int topMargin READ topMargin WRITE setTopMargin NOTIFY marginsChanged)
+ Q_PROPERTY(int bottomMargin READ bottomMargin WRITE setBottomMargin NOTIFY marginsChanged)
public:
LineEditExtension(QObject *);
diff --git a/examples/declarative/extending/extending.qmlproject b/examples/declarative/extending/extending.qmlproject
new file mode 100644
index 0000000..d4909f8
--- /dev/null
+++ b/examples/declarative/extending/extending.qmlproject
@@ -0,0 +1,16 @@
+import QmlProject 1.0
+
+Project {
+ /* Include .qml, .js, and image files from current directory and subdirectories */
+ QmlFiles {
+ directory: "."
+ }
+ JavaScriptFiles {
+ directory: "."
+ }
+ ImageFiles {
+ directory: "."
+ }
+ /* List of plugin directories passed to QML runtime */
+ // importPaths: [ " ../exampleplugin " ]
+}
diff --git a/examples/declarative/extending/grouped/birthdayparty.cpp b/examples/declarative/extending/grouped/birthdayparty.cpp
index 523a42d..4f415a3 100644
--- a/examples/declarative/extending/grouped/birthdayparty.cpp
+++ b/examples/declarative/extending/grouped/birthdayparty.cpp
@@ -41,18 +41,18 @@
#include "birthdayparty.h"
BirthdayParty::BirthdayParty(QObject *parent)
-: QObject(parent), m_celebrant(0)
+: QObject(parent), m_host(0)
{
}
-Person *BirthdayParty::celebrant() const
+Person *BirthdayParty::host() const
{
- return m_celebrant;
+ return m_host;
}
-void BirthdayParty::setCelebrant(Person *c)
+void BirthdayParty::setHost(Person *c)
{
- m_celebrant = c;
+ m_host = c;
}
QDeclarativeListProperty<Person> BirthdayParty::guests()
diff --git a/examples/declarative/extending/grouped/birthdayparty.h b/examples/declarative/extending/grouped/birthdayparty.h
index 4ac5602..31d21b2 100644
--- a/examples/declarative/extending/grouped/birthdayparty.h
+++ b/examples/declarative/extending/grouped/birthdayparty.h
@@ -42,27 +42,27 @@
#define BIRTHDAYPARTY_H
#include <QObject>
-#include <qdeclarative.h>
+#include <QDeclarativeListProperty>
#include "person.h"
class BirthdayParty : public QObject
{
-Q_OBJECT
-Q_PROPERTY(Person *celebrant READ celebrant WRITE setCelebrant)
-Q_PROPERTY(QDeclarativeListProperty<Person> guests READ guests)
-Q_CLASSINFO("DefaultProperty", "guests")
+ Q_OBJECT
+ Q_PROPERTY(Person *host READ host WRITE setHost)
+ Q_PROPERTY(QDeclarativeListProperty<Person> guests READ guests)
+ Q_CLASSINFO("DefaultProperty", "guests")
public:
BirthdayParty(QObject *parent = 0);
- Person *celebrant() const;
- void setCelebrant(Person *);
+ Person *host() const;
+ void setHost(Person *);
QDeclarativeListProperty<Person> guests();
int guestCount() const;
Person *guest(int) const;
private:
- Person *m_celebrant;
+ Person *m_host;
QList<Person *> m_guests;
};
diff --git a/examples/declarative/extending/grouped/example.qml b/examples/declarative/extending/grouped/example.qml
index 55912ed..91b7a06 100644
--- a/examples/declarative/extending/grouped/example.qml
+++ b/examples/declarative/extending/grouped/example.qml
@@ -2,13 +2,13 @@ import People 1.0
// ![0]
BirthdayParty {
- celebrant: Boy {
+ host: Boy {
name: "Bob Jones"
shoe { size: 12; color: "white"; brand: "Nike"; price: 90.0 }
}
Boy {
- name: "Joan Hodges"
+ name: "Leo Hodges"
shoe { size: 10; color: "black"; brand: "Reebok"; price: 59.95 }
}
// ![1]
diff --git a/examples/declarative/extending/grouped/main.cpp b/examples/declarative/extending/grouped/main.cpp
index b383a8b..baf32cf 100644
--- a/examples/declarative/extending/grouped/main.cpp
+++ b/examples/declarative/extending/grouped/main.cpp
@@ -59,10 +59,10 @@ int main(int argc, char ** argv)
QDeclarativeComponent component(&engine, ":example.qml");
BirthdayParty *party = qobject_cast<BirthdayParty *>(component.create());
- if (party && party->celebrant()) {
- qWarning() << party->celebrant()->name() << "is having a birthday!";
+ if (party && party->host()) {
+ qWarning() << party->host()->name() << "is having a birthday!";
- if (qobject_cast<Boy *>(party->celebrant()))
+ if (qobject_cast<Boy *>(party->host()))
qWarning() << "He is inviting:";
else
qWarning() << "She is inviting:";
diff --git a/examples/declarative/extending/grouped/person.h b/examples/declarative/extending/grouped/person.h
index 216c015..a031e69 100644
--- a/examples/declarative/extending/grouped/person.h
+++ b/examples/declarative/extending/grouped/person.h
@@ -43,14 +43,14 @@
#include <QObject>
#include <QColor>
-#include <qdeclarative.h>
-class ShoeDescription : public QObject {
-Q_OBJECT
-Q_PROPERTY(int size READ size WRITE setSize)
-Q_PROPERTY(QColor color READ color WRITE setColor)
-Q_PROPERTY(QString brand READ brand WRITE setBrand)
-Q_PROPERTY(qreal price READ price WRITE setPrice)
+class ShoeDescription : public QObject
+{
+ Q_OBJECT
+ Q_PROPERTY(int size READ size WRITE setSize)
+ Q_PROPERTY(QColor color READ color WRITE setColor)
+ Q_PROPERTY(QString brand READ brand WRITE setBrand)
+ Q_PROPERTY(qreal price READ price WRITE setPrice)
public:
ShoeDescription(QObject *parent = 0);
@@ -72,11 +72,12 @@ private:
qreal m_price;
};
-class Person : public QObject {
-Q_OBJECT
-Q_PROPERTY(QString name READ name WRITE setName)
+class Person : public QObject
+{
+ Q_OBJECT
+ Q_PROPERTY(QString name READ name WRITE setName)
// ![1]
-Q_PROPERTY(ShoeDescription *shoe READ shoe)
+ Q_PROPERTY(ShoeDescription *shoe READ shoe)
// ![1]
public:
Person(QObject *parent = 0);
@@ -90,14 +91,16 @@ private:
ShoeDescription m_shoe;
};
-class Boy : public Person {
-Q_OBJECT
+class Boy : public Person
+{
+ Q_OBJECT
public:
Boy(QObject * parent = 0);
};
-class Girl : public Person {
-Q_OBJECT
+class Girl : public Person
+{
+ Q_OBJECT
public:
Girl(QObject * parent = 0);
};
diff --git a/examples/declarative/extending/properties/birthdayparty.cpp b/examples/declarative/extending/properties/birthdayparty.cpp
index 14fd6a3..27d17a1 100644
--- a/examples/declarative/extending/properties/birthdayparty.cpp
+++ b/examples/declarative/extending/properties/birthdayparty.cpp
@@ -41,19 +41,19 @@
#include "birthdayparty.h"
BirthdayParty::BirthdayParty(QObject *parent)
-: QObject(parent), m_celebrant(0)
+: QObject(parent), m_host(0)
{
}
// ![0]
-Person *BirthdayParty::celebrant() const
+Person *BirthdayParty::host() const
{
- return m_celebrant;
+ return m_host;
}
-void BirthdayParty::setCelebrant(Person *c)
+void BirthdayParty::setHost(Person *c)
{
- m_celebrant = c;
+ m_host = c;
}
QDeclarativeListProperty<Person> BirthdayParty::guests()
diff --git a/examples/declarative/extending/properties/birthdayparty.h b/examples/declarative/extending/properties/birthdayparty.h
index dd01562..39ce9ba 100644
--- a/examples/declarative/extending/properties/birthdayparty.h
+++ b/examples/declarative/extending/properties/birthdayparty.h
@@ -42,33 +42,33 @@
#define BIRTHDAYPARTY_H
#include <QObject>
-#include <qdeclarative.h>
+#include <QDeclarativeListProperty>
#include "person.h"
// ![0]
class BirthdayParty : public QObject
{
-Q_OBJECT
+ Q_OBJECT
// ![0]
// ![1]
-Q_PROPERTY(Person *celebrant READ celebrant WRITE setCelebrant)
+ Q_PROPERTY(Person *host READ host WRITE setHost)
// ![1]
// ![2]
-Q_PROPERTY(QDeclarativeListProperty<Person> guests READ guests)
+ Q_PROPERTY(QDeclarativeListProperty<Person> guests READ guests)
// ![2]
// ![3]
public:
BirthdayParty(QObject *parent = 0);
- Person *celebrant() const;
- void setCelebrant(Person *);
+ Person *host() const;
+ void setHost(Person *);
QDeclarativeListProperty<Person> guests();
int guestCount() const;
Person *guest(int) const;
private:
- Person *m_celebrant;
+ Person *m_host;
QList<Person *> m_guests;
};
// ![3]
diff --git a/examples/declarative/extending/properties/example.qml b/examples/declarative/extending/properties/example.qml
index 9594a84..35abdd6 100644
--- a/examples/declarative/extending/properties/example.qml
+++ b/examples/declarative/extending/properties/example.qml
@@ -2,12 +2,12 @@ import People 1.0
// ![0]
BirthdayParty {
- celebrant: Person {
+ host: Person {
name: "Bob Jones"
shoeSize: 12
}
guests: [
- Person { name: "Joan Hodges" },
+ Person { name: "Leo Hodges" },
Person { name: "Jack Smith" },
Person { name: "Anne Brown" }
]
diff --git a/examples/declarative/extending/properties/main.cpp b/examples/declarative/extending/properties/main.cpp
index 350f8bd..85e9584 100644
--- a/examples/declarative/extending/properties/main.cpp
+++ b/examples/declarative/extending/properties/main.cpp
@@ -56,8 +56,8 @@ int main(int argc, char ** argv)
QDeclarativeComponent component(&engine, ":example.qml");
BirthdayParty *party = qobject_cast<BirthdayParty *>(component.create());
- if (party && party->celebrant()) {
- qWarning() << party->celebrant()->name() << "is having a birthday!";
+ if (party && party->host()) {
+ qWarning() << party->host()->name() << "is having a birthday!";
qWarning() << "They are inviting:";
for (int ii = 0; ii < party->guestCount(); ++ii)
qWarning() << " " << party->guest(ii)->name();
diff --git a/examples/declarative/extending/properties/person.h b/examples/declarative/extending/properties/person.h
index 7504d18..0029b09 100644
--- a/examples/declarative/extending/properties/person.h
+++ b/examples/declarative/extending/properties/person.h
@@ -42,12 +42,12 @@
#define PERSON_H
#include <QObject>
-#include <qdeclarative.h>
-class Person : public QObject {
-Q_OBJECT
-Q_PROPERTY(QString name READ name WRITE setName)
-Q_PROPERTY(int shoeSize READ shoeSize WRITE setShoeSize)
+class Person : public QObject
+{
+ Q_OBJECT
+ Q_PROPERTY(QString name READ name WRITE setName)
+ Q_PROPERTY(int shoeSize READ shoeSize WRITE setShoeSize)
public:
Person(QObject *parent = 0);
diff --git a/examples/declarative/extending/signal/birthdayparty.cpp b/examples/declarative/extending/signal/birthdayparty.cpp
index 65ff530..740c8c9 100644
--- a/examples/declarative/extending/signal/birthdayparty.cpp
+++ b/examples/declarative/extending/signal/birthdayparty.cpp
@@ -57,18 +57,18 @@ void BirthdayPartyAttached::setRsvp(const QDate &d)
BirthdayParty::BirthdayParty(QObject *parent)
-: QObject(parent), m_celebrant(0)
+: QObject(parent), m_host(0)
{
}
-Person *BirthdayParty::celebrant() const
+Person *BirthdayParty::host() const
{
- return m_celebrant;
+ return m_host;
}
-void BirthdayParty::setCelebrant(Person *c)
+void BirthdayParty::setHost(Person *c)
{
- m_celebrant = c;
+ m_host = c;
}
QDeclarativeListProperty<Person> BirthdayParty::guests()
diff --git a/examples/declarative/extending/signal/birthdayparty.h b/examples/declarative/extending/signal/birthdayparty.h
index a2b35cd..ae4dd39 100644
--- a/examples/declarative/extending/signal/birthdayparty.h
+++ b/examples/declarative/extending/signal/birthdayparty.h
@@ -48,8 +48,8 @@
class BirthdayPartyAttached : public QObject
{
-Q_OBJECT
-Q_PROPERTY(QDate rsvp READ rsvp WRITE setRsvp)
+ Q_OBJECT
+ Q_PROPERTY(QDate rsvp READ rsvp WRITE setRsvp)
public:
BirthdayPartyAttached(QObject *object);
@@ -62,15 +62,15 @@ private:
class BirthdayParty : public QObject
{
-Q_OBJECT
-Q_PROPERTY(Person *celebrant READ celebrant WRITE setCelebrant)
-Q_PROPERTY(QDeclarativeListProperty<Person> guests READ guests)
-Q_CLASSINFO("DefaultProperty", "guests")
+ Q_OBJECT
+ Q_PROPERTY(Person *host READ host WRITE setHost)
+ Q_PROPERTY(QDeclarativeListProperty<Person> guests READ guests)
+ Q_CLASSINFO("DefaultProperty", "guests")
public:
BirthdayParty(QObject *parent = 0);
- Person *celebrant() const;
- void setCelebrant(Person *);
+ Person *host() const;
+ void setHost(Person *);
QDeclarativeListProperty<Person> guests();
int guestCount() const;
@@ -85,7 +85,7 @@ signals:
// ![0]
private:
- Person *m_celebrant;
+ Person *m_host;
QList<Person *> m_guests;
};
QML_DECLARE_TYPEINFO(BirthdayParty, QML_HAS_ATTACHED_PROPERTIES)
diff --git a/examples/declarative/extending/signal/example.qml b/examples/declarative/extending/signal/example.qml
index c7d4792..83d6a23 100644
--- a/examples/declarative/extending/signal/example.qml
+++ b/examples/declarative/extending/signal/example.qml
@@ -5,13 +5,13 @@ BirthdayParty {
onPartyStarted: console.log("This party started rockin' at " + time);
// ![0]
- celebrant: Boy {
+ host: Boy {
name: "Bob Jones"
shoe { size: 12; color: "white"; brand: "Nike"; price: 90.0 }
}
Boy {
- name: "Joan Hodges"
+ name: "Leo Hodges"
BirthdayParty.rsvp: "2009-07-06"
shoe { size: 10; color: "black"; brand: "Reebok"; price: 59.95 }
}
diff --git a/examples/declarative/extending/signal/main.cpp b/examples/declarative/extending/signal/main.cpp
index 1b23a46..453f688 100644
--- a/examples/declarative/extending/signal/main.cpp
+++ b/examples/declarative/extending/signal/main.cpp
@@ -60,10 +60,10 @@ int main(int argc, char ** argv)
QDeclarativeComponent component(&engine, ":example.qml");
BirthdayParty *party = qobject_cast<BirthdayParty *>(component.create());
- if (party && party->celebrant()) {
- qWarning() << party->celebrant()->name() << "is having a birthday!";
+ if (party && party->host()) {
+ qWarning() << party->host()->name() << "is having a birthday!";
- if (qobject_cast<Boy *>(party->celebrant()))
+ if (qobject_cast<Boy *>(party->host()))
qWarning() << "He is inviting:";
else
qWarning() << "She is inviting:";
diff --git a/examples/declarative/extending/signal/person.h b/examples/declarative/extending/signal/person.h
index 7a4b9c3..2f444c5 100644
--- a/examples/declarative/extending/signal/person.h
+++ b/examples/declarative/extending/signal/person.h
@@ -43,14 +43,14 @@
#include <QObject>
#include <QColor>
-#include <qdeclarative.h>
-class ShoeDescription : public QObject {
-Q_OBJECT
-Q_PROPERTY(int size READ size WRITE setSize)
-Q_PROPERTY(QColor color READ color WRITE setColor)
-Q_PROPERTY(QString brand READ brand WRITE setBrand)
-Q_PROPERTY(qreal price READ price WRITE setPrice)
+class ShoeDescription : public QObject
+{
+ Q_OBJECT
+ Q_PROPERTY(int size READ size WRITE setSize)
+ Q_PROPERTY(QColor color READ color WRITE setColor)
+ Q_PROPERTY(QString brand READ brand WRITE setBrand)
+ Q_PROPERTY(qreal price READ price WRITE setPrice)
public:
ShoeDescription(QObject *parent = 0);
@@ -72,10 +72,11 @@ private:
qreal m_price;
};
-class Person : public QObject {
-Q_OBJECT
-Q_PROPERTY(QString name READ name WRITE setName)
-Q_PROPERTY(ShoeDescription *shoe READ shoe)
+class Person : public QObject
+{
+ Q_OBJECT
+ Q_PROPERTY(QString name READ name WRITE setName)
+ Q_PROPERTY(ShoeDescription *shoe READ shoe)
public:
Person(QObject *parent = 0);
@@ -88,14 +89,16 @@ private:
ShoeDescription m_shoe;
};
-class Boy : public Person {
-Q_OBJECT
+class Boy : public Person
+{
+ Q_OBJECT
public:
Boy(QObject * parent = 0);
};
-class Girl : public Person {
-Q_OBJECT
+class Girl : public Person
+{
+ Q_OBJECT
public:
Girl(QObject * parent = 0);
};
diff --git a/examples/declarative/extending/valuesource/birthdayparty.cpp b/examples/declarative/extending/valuesource/birthdayparty.cpp
index 99d98be..b915f4f 100644
--- a/examples/declarative/extending/valuesource/birthdayparty.cpp
+++ b/examples/declarative/extending/valuesource/birthdayparty.cpp
@@ -57,18 +57,18 @@ void BirthdayPartyAttached::setRsvp(const QDate &d)
BirthdayParty::BirthdayParty(QObject *parent)
-: QObject(parent), m_celebrant(0)
+: QObject(parent), m_host(0)
{
}
-Person *BirthdayParty::celebrant() const
+Person *BirthdayParty::host() const
{
- return m_celebrant;
+ return m_host;
}
-void BirthdayParty::setCelebrant(Person *c)
+void BirthdayParty::setHost(Person *c)
{
- m_celebrant = c;
+ m_host = c;
}
QDeclarativeListProperty<Person> BirthdayParty::guests()
@@ -92,12 +92,12 @@ void BirthdayParty::startParty()
emit partyStarted(time);
}
-QString BirthdayParty::speaker() const
+QString BirthdayParty::announcement() const
{
return QString();
}
-void BirthdayParty::setSpeaker(const QString &speak)
+void BirthdayParty::setAnnouncement(const QString &speak)
{
qWarning() << qPrintable(speak);
}
diff --git a/examples/declarative/extending/valuesource/birthdayparty.h b/examples/declarative/extending/valuesource/birthdayparty.h
index a9b3102..5f25781 100644
--- a/examples/declarative/extending/valuesource/birthdayparty.h
+++ b/examples/declarative/extending/valuesource/birthdayparty.h
@@ -49,8 +49,8 @@
class BirthdayPartyAttached : public QObject
{
-Q_OBJECT
-Q_PROPERTY(QDate rsvp READ rsvp WRITE setRsvp)
+ Q_OBJECT
+ Q_PROPERTY(QDate rsvp READ rsvp WRITE setRsvp)
public:
BirthdayPartyAttached(QObject *object);
@@ -63,26 +63,25 @@ private:
class BirthdayParty : public QObject
{
-Q_OBJECT
-Q_PROPERTY(Person *celebrant READ celebrant WRITE setCelebrant)
-Q_PROPERTY(QDeclarativeListProperty<Person> guests READ guests)
+ Q_OBJECT
+ Q_PROPERTY(Person *host READ host WRITE setHost)
+ Q_PROPERTY(QDeclarativeListProperty<Person> guests READ guests)
// ![0]
-Q_PROPERTY(QString speaker READ speaker WRITE setSpeaker)
+ Q_PROPERTY(QString announcement READ announcement WRITE setAnnouncement)
// ![0]
-Q_CLASSINFO("DefaultProperty", "guests")
+ Q_CLASSINFO("DefaultProperty", "guests")
public:
BirthdayParty(QObject *parent = 0);
- Person *celebrant() const;
- void setCelebrant(Person *);
+ Person *host() const;
+ void setHost(Person *);
QDeclarativeListProperty<Person> guests();
int guestCount() const;
Person *guest(int) const;
-
- QString speaker() const;
- void setSpeaker(const QString &);
+ QString announcement() const;
+ void setAnnouncement(const QString &);
static BirthdayPartyAttached *qmlAttachedProperties(QObject *);
@@ -91,7 +90,7 @@ signals:
void partyStarted(const QTime &time);
private:
- Person *m_celebrant;
+ Person *m_host;
QList<Person *> m_guests;
};
QML_DECLARE_TYPEINFO(BirthdayParty, QML_HAS_ATTACHED_PROPERTIES)
diff --git a/examples/declarative/extending/valuesource/example.qml b/examples/declarative/extending/valuesource/example.qml
index 7cdf8c0..5b8c8af 100644
--- a/examples/declarative/extending/valuesource/example.qml
+++ b/examples/declarative/extending/valuesource/example.qml
@@ -2,19 +2,19 @@ import People 1.0
// ![0]
BirthdayParty {
- speaker: HappyBirthday { name: "Bob Jones" }
+ HappyBirthdaySong on announcement { name: "Bob Jones" }
// ![0]
onPartyStarted: console.log("This party started rockin' at " + time);
- celebrant: Boy {
+ host: Boy {
name: "Bob Jones"
shoe { size: 12; color: "white"; brand: "Nike"; price: 90.0 }
}
Boy {
- name: "Joan Hodges"
+ name: "Leo Hodges"
BirthdayParty.rsvp: "2009-07-06"
shoe { size: 10; color: "black"; brand: "Reebok"; price: 59.95 }
}
diff --git a/examples/declarative/extending/valuesource/happybirthday.cpp b/examples/declarative/extending/valuesource/happybirthdaysong.cpp
index 0dbbd6e..8ea5c2b 100644
--- a/examples/declarative/extending/valuesource/happybirthday.cpp
+++ b/examples/declarative/extending/valuesource/happybirthdaysong.cpp
@@ -38,10 +38,10 @@
** $QT_END_LICENSE$
**
****************************************************************************/
-#include "happybirthday.h"
+#include "happybirthdaysong.h"
#include <QTimer>
-HappyBirthday::HappyBirthday(QObject *parent)
+HappyBirthdaySong::HappyBirthdaySong(QObject *parent)
: QObject(parent), m_line(-1)
{
setName(QString());
@@ -50,17 +50,17 @@ HappyBirthday::HappyBirthday(QObject *parent)
timer->start(1000);
}
-void HappyBirthday::setTarget(const QDeclarativeProperty &p)
+void HappyBirthdaySong::setTarget(const QDeclarativeProperty &p)
{
m_target = p;
}
-QString HappyBirthday::name() const
+QString HappyBirthdaySong::name() const
{
return m_name;
}
-void HappyBirthday::setName(const QString &name)
+void HappyBirthdaySong::setName(const QString &name)
{
m_name = name;
@@ -72,7 +72,7 @@ void HappyBirthday::setName(const QString &name)
m_lyrics << "";
}
-void HappyBirthday::advance()
+void HappyBirthdaySong::advance()
{
m_line = (m_line + 1) % m_lyrics.count();
diff --git a/examples/declarative/extending/valuesource/happybirthday.h b/examples/declarative/extending/valuesource/happybirthdaysong.h
index 8548eb8..3d07909 100644
--- a/examples/declarative/extending/valuesource/happybirthday.h
+++ b/examples/declarative/extending/valuesource/happybirthdaysong.h
@@ -38,8 +38,8 @@
** $QT_END_LICENSE$
**
****************************************************************************/
-#ifndef HAPPYBIRTHDAY_H
-#define HAPPYBIRTHDAY_H
+#ifndef HAPPYBIRTHDAYSONG_H
+#define HAPPYBIRTHDAYSONG_H
#include <QDeclarativePropertyValueSource>
#include <QDeclarativeProperty>
@@ -48,14 +48,15 @@
#include <QStringList>
// ![0]
-class HappyBirthday : public QObject, public QDeclarativePropertyValueSource
+class HappyBirthdaySong : public QObject, public QDeclarativePropertyValueSource
{
-Q_OBJECT
+ Q_OBJECT
+ Q_INTERFACES(QDeclarativePropertyValueSource)
// ![0]
-Q_PROPERTY(QString name READ name WRITE setName)
+ Q_PROPERTY(QString name READ name WRITE setName)
// ![1]
public:
- HappyBirthday(QObject *parent = 0);
+ HappyBirthdaySong(QObject *parent = 0);
virtual void setTarget(const QDeclarativeProperty &);
// ![1]
@@ -75,5 +76,5 @@ private:
};
// ![2]
-#endif // HAPPYBIRTHDAY_H
+#endif // HAPPYBIRTHDAYSONG_H
diff --git a/examples/declarative/extending/valuesource/main.cpp b/examples/declarative/extending/valuesource/main.cpp
index 2574917..00840ee 100644
--- a/examples/declarative/extending/valuesource/main.cpp
+++ b/examples/declarative/extending/valuesource/main.cpp
@@ -43,7 +43,7 @@
#include <QDeclarativeComponent>
#include <QDebug>
#include "birthdayparty.h"
-#include "happybirthday.h"
+#include "happybirthdaysong.h"
#include "person.h"
int main(int argc, char ** argv)
@@ -52,7 +52,7 @@ int main(int argc, char ** argv)
qmlRegisterType<BirthdayPartyAttached>();
qmlRegisterType<BirthdayParty>("People", 1,0, "BirthdayParty");
- qmlRegisterType<HappyBirthday>("People", 1,0, "HappyBirthday");
+ qmlRegisterType<HappyBirthdaySong>("People", 1,0, "HappyBirthdaySong");
qmlRegisterType<ShoeDescription>();
qmlRegisterType<Person>();
qmlRegisterType<Boy>("People", 1,0, "Boy");
@@ -62,10 +62,10 @@ int main(int argc, char ** argv)
QDeclarativeComponent component(&engine, ":example.qml");
BirthdayParty *party = qobject_cast<BirthdayParty *>(component.create());
- if (party && party->celebrant()) {
- qWarning() << party->celebrant()->name() << "is having a birthday!";
+ if (party && party->host()) {
+ qWarning() << party->host()->name() << "is having a birthday!";
- if (qobject_cast<Boy *>(party->celebrant()))
+ if (qobject_cast<Boy *>(party->host()))
qWarning() << "He is inviting:";
else
qWarning() << "She is inviting:";
diff --git a/examples/declarative/extending/valuesource/person.h b/examples/declarative/extending/valuesource/person.h
index 7a4b9c3..2f444c5 100644
--- a/examples/declarative/extending/valuesource/person.h
+++ b/examples/declarative/extending/valuesource/person.h
@@ -43,14 +43,14 @@
#include <QObject>
#include <QColor>
-#include <qdeclarative.h>
-class ShoeDescription : public QObject {
-Q_OBJECT
-Q_PROPERTY(int size READ size WRITE setSize)
-Q_PROPERTY(QColor color READ color WRITE setColor)
-Q_PROPERTY(QString brand READ brand WRITE setBrand)
-Q_PROPERTY(qreal price READ price WRITE setPrice)
+class ShoeDescription : public QObject
+{
+ Q_OBJECT
+ Q_PROPERTY(int size READ size WRITE setSize)
+ Q_PROPERTY(QColor color READ color WRITE setColor)
+ Q_PROPERTY(QString brand READ brand WRITE setBrand)
+ Q_PROPERTY(qreal price READ price WRITE setPrice)
public:
ShoeDescription(QObject *parent = 0);
@@ -72,10 +72,11 @@ private:
qreal m_price;
};
-class Person : public QObject {
-Q_OBJECT
-Q_PROPERTY(QString name READ name WRITE setName)
-Q_PROPERTY(ShoeDescription *shoe READ shoe)
+class Person : public QObject
+{
+ Q_OBJECT
+ Q_PROPERTY(QString name READ name WRITE setName)
+ Q_PROPERTY(ShoeDescription *shoe READ shoe)
public:
Person(QObject *parent = 0);
@@ -88,14 +89,16 @@ private:
ShoeDescription m_shoe;
};
-class Boy : public Person {
-Q_OBJECT
+class Boy : public Person
+{
+ Q_OBJECT
public:
Boy(QObject * parent = 0);
};
-class Girl : public Person {
-Q_OBJECT
+class Girl : public Person
+{
+ Q_OBJECT
public:
Girl(QObject * parent = 0);
};
diff --git a/examples/declarative/extending/valuesource/valuesource.pro b/examples/declarative/extending/valuesource/valuesource.pro
index d3409b6..0626c98 100644
--- a/examples/declarative/extending/valuesource/valuesource.pro
+++ b/examples/declarative/extending/valuesource/valuesource.pro
@@ -8,10 +8,10 @@ QT += declarative
SOURCES += main.cpp \
person.cpp \
birthdayparty.cpp \
- happybirthday.cpp
+ happybirthdaysong.cpp
HEADERS += person.h \
birthdayparty.h \
- happybirthday.h
+ happybirthdaysong.h
RESOURCES += valuesource.qrc
target.path = $$[QT_INSTALL_EXAMPLES]/declarative/extending/valuesource
sources.files = $$SOURCES $$HEADERS $$RESOURCES $$FORMS valuesource.pro
diff --git a/examples/declarative/fillmode/fillmode.qmlproject b/examples/declarative/fillmode/fillmode.qmlproject
new file mode 100644
index 0000000..d4909f8
--- /dev/null
+++ b/examples/declarative/fillmode/fillmode.qmlproject
@@ -0,0 +1,16 @@
+import QmlProject 1.0
+
+Project {
+ /* Include .qml, .js, and image files from current directory and subdirectories */
+ QmlFiles {
+ directory: "."
+ }
+ JavaScriptFiles {
+ directory: "."
+ }
+ ImageFiles {
+ directory: "."
+ }
+ /* List of plugin directories passed to QML runtime */
+ // importPaths: [ " ../exampleplugin " ]
+}
diff --git a/examples/declarative/flipable/flipable.qmlproject b/examples/declarative/flipable/flipable.qmlproject
new file mode 100644
index 0000000..d4909f8
--- /dev/null
+++ b/examples/declarative/flipable/flipable.qmlproject
@@ -0,0 +1,16 @@
+import QmlProject 1.0
+
+Project {
+ /* Include .qml, .js, and image files from current directory and subdirectories */
+ QmlFiles {
+ directory: "."
+ }
+ JavaScriptFiles {
+ directory: "."
+ }
+ ImageFiles {
+ directory: "."
+ }
+ /* List of plugin directories passed to QML runtime */
+ // importPaths: [ " ../exampleplugin " ]
+}
diff --git a/examples/declarative/focus/Core/GridMenu.qml b/examples/declarative/focus/Core/GridMenu.qml
index c37b17a..3f727fd 100644
--- a/examples/declarative/focus/Core/GridMenu.qml
+++ b/examples/declarative/focus/Core/GridMenu.qml
@@ -43,9 +43,7 @@ FocusScope {
onClicked: {
GridView.view.currentIndex = index
- container.focus = true
- gridMenu.focus = true
- mainView.focus = true
+ container.forceFocus()
}
}
diff --git a/examples/declarative/focus/Core/ListViewDelegate.qml b/examples/declarative/focus/Core/ListViewDelegate.qml
index 96324d7..14e2548 100644
--- a/examples/declarative/focus/Core/ListViewDelegate.qml
+++ b/examples/declarative/focus/Core/ListViewDelegate.qml
@@ -1,45 +1,40 @@
import Qt 4.7
-Component {
- Item {
- id: container
- x: 5; width: ListView.view.width - 10; height: 60
+Item {
+ id: container
+ x: 5; width: ListView.view.width - 10; height: 60
- Rectangle {
- id: content
- anchors.centerIn: parent; width: container.width - 40; height: container.height - 10
- color: "transparent"
- smooth: true
- radius: 10
+ Rectangle {
+ id: content
+ anchors.centerIn: parent; width: container.width - 40; height: container.height - 10
+ color: "transparent"
+ smooth: true
+ radius: 10
- Rectangle { color: "#91AA9D"; x: 3; y: 3; width: parent.width - 6; height: parent.height - 6; radius: 8 }
- Text {
- text: "List element " + (index + 1); color: "#193441"; font.bold: false; anchors.centerIn: parent
- font.pixelSize: 14
- }
+ Rectangle { color: "#91AA9D"; x: 3; y: 3; width: parent.width - 6; height: parent.height - 6; radius: 8 }
+ Text {
+ text: "List element " + (index + 1); color: "#193441"; font.bold: false; anchors.centerIn: parent
+ font.pixelSize: 14
}
+ }
- MouseArea {
- id: mouseArea
- anchors.fill: parent
- hoverEnabled: true
+ MouseArea {
+ id: mouseArea
+ anchors.fill: parent
+ hoverEnabled: true
- onClicked: {
- ListView.view.currentIndex = index
- container.focus = true
- ListView.view.focus = true
- listViews.focus = true
- mainView.focus = true
- }
+ onClicked: {
+ ListView.view.currentIndex = index
+ container.forceFocus()
}
+ }
- states: State {
- name: "active"; when: container.focus == true
- PropertyChanges { target: content; color: "#FCFFF5"; scale: 1.1 }
- }
+ states: State {
+ name: "active"; when: container.focus == true
+ PropertyChanges { target: content; color: "#FCFFF5"; scale: 1.1 }
+ }
- transitions: Transition {
- NumberAnimation { properties: "scale"; duration: 100 }
- }
+ transitions: Transition {
+ NumberAnimation { properties: "scale"; duration: 100 }
}
}
diff --git a/examples/declarative/focus/Core/ListViews.qml b/examples/declarative/focus/Core/ListViews.qml
index f4384c8..089f821 100644
--- a/examples/declarative/focus/Core/ListViews.qml
+++ b/examples/declarative/focus/Core/ListViews.qml
@@ -10,7 +10,7 @@ FocusScope {
y: wantsFocus ? 10 : 40; width: parent.width / 3; height: parent.height - 20
focus: true
KeyNavigation.up: gridMenu; KeyNavigation.left: contextMenu; KeyNavigation.right: list2
- model: 10
+ model: 10; cacheBuffer: 200
delegate: ListViewDelegate {}
Behavior on y {
@@ -22,7 +22,7 @@ FocusScope {
id: list2
y: wantsFocus ? 10 : 40; x: parent.width / 3; width: parent.width / 3; height: parent.height - 20
KeyNavigation.up: gridMenu; KeyNavigation.left: list1; KeyNavigation.right: list3
- model: 10
+ model: 10; cacheBuffer: 200
delegate: ListViewDelegate {}
Behavior on y {
@@ -34,7 +34,7 @@ FocusScope {
id: list3
y: wantsFocus ? 10 : 40; x: 2 * parent.width / 3; width: parent.width / 3; height: parent.height - 20
KeyNavigation.up: gridMenu; KeyNavigation.left: list2
- model: 10
+ model: 10; cacheBuffer: 200
delegate: ListViewDelegate {}
Behavior on y {
diff --git a/examples/declarative/focus/focus.qmlproject b/examples/declarative/focus/focus.qmlproject
new file mode 100644
index 0000000..d4909f8
--- /dev/null
+++ b/examples/declarative/focus/focus.qmlproject
@@ -0,0 +1,16 @@
+import QmlProject 1.0
+
+Project {
+ /* Include .qml, .js, and image files from current directory and subdirectories */
+ QmlFiles {
+ directory: "."
+ }
+ JavaScriptFiles {
+ directory: "."
+ }
+ ImageFiles {
+ directory: "."
+ }
+ /* List of plugin directories passed to QML runtime */
+ // importPaths: [ " ../exampleplugin " ]
+}
diff --git a/examples/declarative/fonts/fonts.qmlproject b/examples/declarative/fonts/fonts.qmlproject
new file mode 100644
index 0000000..d4909f8
--- /dev/null
+++ b/examples/declarative/fonts/fonts.qmlproject
@@ -0,0 +1,16 @@
+import QmlProject 1.0
+
+Project {
+ /* Include .qml, .js, and image files from current directory and subdirectories */
+ QmlFiles {
+ directory: "."
+ }
+ JavaScriptFiles {
+ directory: "."
+ }
+ ImageFiles {
+ directory: "."
+ }
+ /* List of plugin directories passed to QML runtime */
+ // importPaths: [ " ../exampleplugin " ]
+}
diff --git a/examples/declarative/gestures/gestures.qmlproject b/examples/declarative/gestures/gestures.qmlproject
new file mode 100644
index 0000000..d4909f8
--- /dev/null
+++ b/examples/declarative/gestures/gestures.qmlproject
@@ -0,0 +1,16 @@
+import QmlProject 1.0
+
+Project {
+ /* Include .qml, .js, and image files from current directory and subdirectories */
+ QmlFiles {
+ directory: "."
+ }
+ JavaScriptFiles {
+ directory: "."
+ }
+ ImageFiles {
+ directory: "."
+ }
+ /* List of plugin directories passed to QML runtime */
+ // importPaths: [ " ../exampleplugin " ]
+}
diff --git a/examples/declarative/gridview/gridview.qmlproject b/examples/declarative/gridview/gridview.qmlproject
new file mode 100644
index 0000000..d4909f8
--- /dev/null
+++ b/examples/declarative/gridview/gridview.qmlproject
@@ -0,0 +1,16 @@
+import QmlProject 1.0
+
+Project {
+ /* Include .qml, .js, and image files from current directory and subdirectories */
+ QmlFiles {
+ directory: "."
+ }
+ JavaScriptFiles {
+ directory: "."
+ }
+ ImageFiles {
+ directory: "."
+ }
+ /* List of plugin directories passed to QML runtime */
+ // importPaths: [ " ../exampleplugin " ]
+}
diff --git a/examples/declarative/imageprovider/imageprovider.qmlproject b/examples/declarative/imageprovider/imageprovider.qmlproject
new file mode 100644
index 0000000..d4909f8
--- /dev/null
+++ b/examples/declarative/imageprovider/imageprovider.qmlproject
@@ -0,0 +1,16 @@
+import QmlProject 1.0
+
+Project {
+ /* Include .qml, .js, and image files from current directory and subdirectories */
+ QmlFiles {
+ directory: "."
+ }
+ JavaScriptFiles {
+ directory: "."
+ }
+ ImageFiles {
+ directory: "."
+ }
+ /* List of plugin directories passed to QML runtime */
+ // importPaths: [ " ../exampleplugin " ]
+}
diff --git a/examples/declarative/images/images.qmlproject b/examples/declarative/images/images.qmlproject
new file mode 100644
index 0000000..d4909f8
--- /dev/null
+++ b/examples/declarative/images/images.qmlproject
@@ -0,0 +1,16 @@
+import QmlProject 1.0
+
+Project {
+ /* Include .qml, .js, and image files from current directory and subdirectories */
+ QmlFiles {
+ directory: "."
+ }
+ JavaScriptFiles {
+ directory: "."
+ }
+ ImageFiles {
+ directory: "."
+ }
+ /* List of plugin directories passed to QML runtime */
+ // importPaths: [ " ../exampleplugin " ]
+}
diff --git a/examples/declarative/layouts/layouts.qmlproject b/examples/declarative/layouts/layouts.qmlproject
new file mode 100644
index 0000000..d4909f8
--- /dev/null
+++ b/examples/declarative/layouts/layouts.qmlproject
@@ -0,0 +1,16 @@
+import QmlProject 1.0
+
+Project {
+ /* Include .qml, .js, and image files from current directory and subdirectories */
+ QmlFiles {
+ directory: "."
+ }
+ JavaScriptFiles {
+ directory: "."
+ }
+ ImageFiles {
+ directory: "."
+ }
+ /* List of plugin directories passed to QML runtime */
+ // importPaths: [ " ../exampleplugin " ]
+}
diff --git a/examples/declarative/listmodel-threaded/listmodel-threaded.qmlproject b/examples/declarative/listmodel-threaded/listmodel-threaded.qmlproject
new file mode 100644
index 0000000..d4909f8
--- /dev/null
+++ b/examples/declarative/listmodel-threaded/listmodel-threaded.qmlproject
@@ -0,0 +1,16 @@
+import QmlProject 1.0
+
+Project {
+ /* Include .qml, .js, and image files from current directory and subdirectories */
+ QmlFiles {
+ directory: "."
+ }
+ JavaScriptFiles {
+ directory: "."
+ }
+ ImageFiles {
+ directory: "."
+ }
+ /* List of plugin directories passed to QML runtime */
+ // importPaths: [ " ../exampleplugin " ]
+}
diff --git a/examples/declarative/listview/listview.qmlproject b/examples/declarative/listview/listview.qmlproject
new file mode 100644
index 0000000..d4909f8
--- /dev/null
+++ b/examples/declarative/listview/listview.qmlproject
@@ -0,0 +1,16 @@
+import QmlProject 1.0
+
+Project {
+ /* Include .qml, .js, and image files from current directory and subdirectories */
+ QmlFiles {
+ directory: "."
+ }
+ JavaScriptFiles {
+ directory: "."
+ }
+ ImageFiles {
+ directory: "."
+ }
+ /* List of plugin directories passed to QML runtime */
+ // importPaths: [ " ../exampleplugin " ]
+}
diff --git a/examples/declarative/mousearea/mousearea.qmlproject b/examples/declarative/mousearea/mousearea.qmlproject
new file mode 100644
index 0000000..d4909f8
--- /dev/null
+++ b/examples/declarative/mousearea/mousearea.qmlproject
@@ -0,0 +1,16 @@
+import QmlProject 1.0
+
+Project {
+ /* Include .qml, .js, and image files from current directory and subdirectories */
+ QmlFiles {
+ directory: "."
+ }
+ JavaScriptFiles {
+ directory: "."
+ }
+ ImageFiles {
+ directory: "."
+ }
+ /* List of plugin directories passed to QML runtime */
+ // importPaths: [ " ../exampleplugin " ]
+}
diff --git a/examples/declarative/objectlistmodel/objectlistmodel.qmlproject b/examples/declarative/objectlistmodel/objectlistmodel.qmlproject
new file mode 100644
index 0000000..d4909f8
--- /dev/null
+++ b/examples/declarative/objectlistmodel/objectlistmodel.qmlproject
@@ -0,0 +1,16 @@
+import QmlProject 1.0
+
+Project {
+ /* Include .qml, .js, and image files from current directory and subdirectories */
+ QmlFiles {
+ directory: "."
+ }
+ JavaScriptFiles {
+ directory: "."
+ }
+ ImageFiles {
+ directory: "."
+ }
+ /* List of plugin directories passed to QML runtime */
+ // importPaths: [ " ../exampleplugin " ]
+}
diff --git a/examples/declarative/package/package.qmlproject b/examples/declarative/package/package.qmlproject
new file mode 100644
index 0000000..d4909f8
--- /dev/null
+++ b/examples/declarative/package/package.qmlproject
@@ -0,0 +1,16 @@
+import QmlProject 1.0
+
+Project {
+ /* Include .qml, .js, and image files from current directory and subdirectories */
+ QmlFiles {
+ directory: "."
+ }
+ JavaScriptFiles {
+ directory: "."
+ }
+ ImageFiles {
+ directory: "."
+ }
+ /* List of plugin directories passed to QML runtime */
+ // importPaths: [ " ../exampleplugin " ]
+}
diff --git a/examples/declarative/parallax/parallax.qmlproject b/examples/declarative/parallax/parallax.qmlproject
new file mode 100644
index 0000000..d4909f8
--- /dev/null
+++ b/examples/declarative/parallax/parallax.qmlproject
@@ -0,0 +1,16 @@
+import QmlProject 1.0
+
+Project {
+ /* Include .qml, .js, and image files from current directory and subdirectories */
+ QmlFiles {
+ directory: "."
+ }
+ JavaScriptFiles {
+ directory: "."
+ }
+ ImageFiles {
+ directory: "."
+ }
+ /* List of plugin directories passed to QML runtime */
+ // importPaths: [ " ../exampleplugin " ]
+}
diff --git a/examples/declarative/plugins/plugins.qmlproject b/examples/declarative/plugins/plugins.qmlproject
new file mode 100644
index 0000000..d4909f8
--- /dev/null
+++ b/examples/declarative/plugins/plugins.qmlproject
@@ -0,0 +1,16 @@
+import QmlProject 1.0
+
+Project {
+ /* Include .qml, .js, and image files from current directory and subdirectories */
+ QmlFiles {
+ directory: "."
+ }
+ JavaScriptFiles {
+ directory: "."
+ }
+ ImageFiles {
+ directory: "."
+ }
+ /* List of plugin directories passed to QML runtime */
+ // importPaths: [ " ../exampleplugin " ]
+}
diff --git a/examples/declarative/progressbar/progressbar.qmlproject b/examples/declarative/progressbar/progressbar.qmlproject
new file mode 100644
index 0000000..d4909f8
--- /dev/null
+++ b/examples/declarative/progressbar/progressbar.qmlproject
@@ -0,0 +1,16 @@
+import QmlProject 1.0
+
+Project {
+ /* Include .qml, .js, and image files from current directory and subdirectories */
+ QmlFiles {
+ directory: "."
+ }
+ JavaScriptFiles {
+ directory: "."
+ }
+ ImageFiles {
+ directory: "."
+ }
+ /* List of plugin directories passed to QML runtime */
+ // importPaths: [ " ../exampleplugin " ]
+}
diff --git a/examples/declarative/proxywidgets/proxywidgets.qmlproject b/examples/declarative/proxywidgets/proxywidgets.qmlproject
new file mode 100644
index 0000000..d4909f8
--- /dev/null
+++ b/examples/declarative/proxywidgets/proxywidgets.qmlproject
@@ -0,0 +1,16 @@
+import QmlProject 1.0
+
+Project {
+ /* Include .qml, .js, and image files from current directory and subdirectories */
+ QmlFiles {
+ directory: "."
+ }
+ JavaScriptFiles {
+ directory: "."
+ }
+ ImageFiles {
+ directory: "."
+ }
+ /* List of plugin directories passed to QML runtime */
+ // importPaths: [ " ../exampleplugin " ]
+}
diff --git a/examples/declarative/scrollbar/scrollbar.qmlproject b/examples/declarative/scrollbar/scrollbar.qmlproject
new file mode 100644
index 0000000..d4909f8
--- /dev/null
+++ b/examples/declarative/scrollbar/scrollbar.qmlproject
@@ -0,0 +1,16 @@
+import QmlProject 1.0
+
+Project {
+ /* Include .qml, .js, and image files from current directory and subdirectories */
+ QmlFiles {
+ directory: "."
+ }
+ JavaScriptFiles {
+ directory: "."
+ }
+ ImageFiles {
+ directory: "."
+ }
+ /* List of plugin directories passed to QML runtime */
+ // importPaths: [ " ../exampleplugin " ]
+}
diff --git a/examples/declarative/searchbox/searchbox.qmlproject b/examples/declarative/searchbox/searchbox.qmlproject
new file mode 100644
index 0000000..d4909f8
--- /dev/null
+++ b/examples/declarative/searchbox/searchbox.qmlproject
@@ -0,0 +1,16 @@
+import QmlProject 1.0
+
+Project {
+ /* Include .qml, .js, and image files from current directory and subdirectories */
+ QmlFiles {
+ directory: "."
+ }
+ JavaScriptFiles {
+ directory: "."
+ }
+ ImageFiles {
+ directory: "."
+ }
+ /* List of plugin directories passed to QML runtime */
+ // importPaths: [ " ../exampleplugin " ]
+}
diff --git a/examples/declarative/slideswitch/slideswitch.qmlproject b/examples/declarative/slideswitch/slideswitch.qmlproject
new file mode 100644
index 0000000..d4909f8
--- /dev/null
+++ b/examples/declarative/slideswitch/slideswitch.qmlproject
@@ -0,0 +1,16 @@
+import QmlProject 1.0
+
+Project {
+ /* Include .qml, .js, and image files from current directory and subdirectories */
+ QmlFiles {
+ directory: "."
+ }
+ JavaScriptFiles {
+ directory: "."
+ }
+ ImageFiles {
+ directory: "."
+ }
+ /* List of plugin directories passed to QML runtime */
+ // importPaths: [ " ../exampleplugin " ]
+}
diff --git a/examples/declarative/sql/sql.qmlproject b/examples/declarative/sql/sql.qmlproject
new file mode 100644
index 0000000..d4909f8
--- /dev/null
+++ b/examples/declarative/sql/sql.qmlproject
@@ -0,0 +1,16 @@
+import QmlProject 1.0
+
+Project {
+ /* Include .qml, .js, and image files from current directory and subdirectories */
+ QmlFiles {
+ directory: "."
+ }
+ JavaScriptFiles {
+ directory: "."
+ }
+ ImageFiles {
+ directory: "."
+ }
+ /* List of plugin directories passed to QML runtime */
+ // importPaths: [ " ../exampleplugin " ]
+}
diff --git a/examples/declarative/states/states.qmlproject b/examples/declarative/states/states.qmlproject
new file mode 100644
index 0000000..d4909f8
--- /dev/null
+++ b/examples/declarative/states/states.qmlproject
@@ -0,0 +1,16 @@
+import QmlProject 1.0
+
+Project {
+ /* Include .qml, .js, and image files from current directory and subdirectories */
+ QmlFiles {
+ directory: "."
+ }
+ JavaScriptFiles {
+ directory: "."
+ }
+ ImageFiles {
+ directory: "."
+ }
+ /* List of plugin directories passed to QML runtime */
+ // importPaths: [ " ../exampleplugin " ]
+}
diff --git a/examples/declarative/tabwidget/tabwidget.qmlproject b/examples/declarative/tabwidget/tabwidget.qmlproject
new file mode 100644
index 0000000..d4909f8
--- /dev/null
+++ b/examples/declarative/tabwidget/tabwidget.qmlproject
@@ -0,0 +1,16 @@
+import QmlProject 1.0
+
+Project {
+ /* Include .qml, .js, and image files from current directory and subdirectories */
+ QmlFiles {
+ directory: "."
+ }
+ JavaScriptFiles {
+ directory: "."
+ }
+ ImageFiles {
+ directory: "."
+ }
+ /* List of plugin directories passed to QML runtime */
+ // importPaths: [ " ../exampleplugin " ]
+}
diff --git a/examples/declarative/tic-tac-toe/tic-tac-toe.qmlproject b/examples/declarative/tic-tac-toe/tic-tac-toe.qmlproject
new file mode 100644
index 0000000..d4909f8
--- /dev/null
+++ b/examples/declarative/tic-tac-toe/tic-tac-toe.qmlproject
@@ -0,0 +1,16 @@
+import QmlProject 1.0
+
+Project {
+ /* Include .qml, .js, and image files from current directory and subdirectories */
+ QmlFiles {
+ directory: "."
+ }
+ JavaScriptFiles {
+ directory: "."
+ }
+ ImageFiles {
+ directory: "."
+ }
+ /* List of plugin directories passed to QML runtime */
+ // importPaths: [ " ../exampleplugin " ]
+}
diff --git a/examples/declarative/tutorials/tutorials.qmlproject b/examples/declarative/tutorials/tutorials.qmlproject
new file mode 100644
index 0000000..d4909f8
--- /dev/null
+++ b/examples/declarative/tutorials/tutorials.qmlproject
@@ -0,0 +1,16 @@
+import QmlProject 1.0
+
+Project {
+ /* Include .qml, .js, and image files from current directory and subdirectories */
+ QmlFiles {
+ directory: "."
+ }
+ JavaScriptFiles {
+ directory: "."
+ }
+ ImageFiles {
+ directory: "."
+ }
+ /* List of plugin directories passed to QML runtime */
+ // importPaths: [ " ../exampleplugin " ]
+}
diff --git a/examples/declarative/tvtennis/tvtennis.qmlproject b/examples/declarative/tvtennis/tvtennis.qmlproject
new file mode 100644
index 0000000..d4909f8
--- /dev/null
+++ b/examples/declarative/tvtennis/tvtennis.qmlproject
@@ -0,0 +1,16 @@
+import QmlProject 1.0
+
+Project {
+ /* Include .qml, .js, and image files from current directory and subdirectories */
+ QmlFiles {
+ directory: "."
+ }
+ JavaScriptFiles {
+ directory: "."
+ }
+ ImageFiles {
+ directory: "."
+ }
+ /* List of plugin directories passed to QML runtime */
+ // importPaths: [ " ../exampleplugin " ]
+}
diff --git a/examples/declarative/velocity/velocity.qmlproject b/examples/declarative/velocity/velocity.qmlproject
new file mode 100644
index 0000000..d4909f8
--- /dev/null
+++ b/examples/declarative/velocity/velocity.qmlproject
@@ -0,0 +1,16 @@
+import QmlProject 1.0
+
+Project {
+ /* Include .qml, .js, and image files from current directory and subdirectories */
+ QmlFiles {
+ directory: "."
+ }
+ JavaScriptFiles {
+ directory: "."
+ }
+ ImageFiles {
+ directory: "."
+ }
+ /* List of plugin directories passed to QML runtime */
+ // importPaths: [ " ../exampleplugin " ]
+}
diff --git a/examples/declarative/webview/webview.qmlproject b/examples/declarative/webview/webview.qmlproject
new file mode 100644
index 0000000..d4909f8
--- /dev/null
+++ b/examples/declarative/webview/webview.qmlproject
@@ -0,0 +1,16 @@
+import QmlProject 1.0
+
+Project {
+ /* Include .qml, .js, and image files from current directory and subdirectories */
+ QmlFiles {
+ directory: "."
+ }
+ JavaScriptFiles {
+ directory: "."
+ }
+ ImageFiles {
+ directory: "."
+ }
+ /* List of plugin directories passed to QML runtime */
+ // importPaths: [ " ../exampleplugin " ]
+}
diff --git a/examples/declarative/workerscript/workerscript.qmlproject b/examples/declarative/workerscript/workerscript.qmlproject
new file mode 100644
index 0000000..d4909f8
--- /dev/null
+++ b/examples/declarative/workerscript/workerscript.qmlproject
@@ -0,0 +1,16 @@
+import QmlProject 1.0
+
+Project {
+ /* Include .qml, .js, and image files from current directory and subdirectories */
+ QmlFiles {
+ directory: "."
+ }
+ JavaScriptFiles {
+ directory: "."
+ }
+ ImageFiles {
+ directory: "."
+ }
+ /* List of plugin directories passed to QML runtime */
+ // importPaths: [ " ../exampleplugin " ]
+}
diff --git a/examples/declarative/xmldata/xmldata.qmlproject b/examples/declarative/xmldata/xmldata.qmlproject
new file mode 100644
index 0000000..d4909f8
--- /dev/null
+++ b/examples/declarative/xmldata/xmldata.qmlproject
@@ -0,0 +1,16 @@
+import QmlProject 1.0
+
+Project {
+ /* Include .qml, .js, and image files from current directory and subdirectories */
+ QmlFiles {
+ directory: "."
+ }
+ JavaScriptFiles {
+ directory: "."
+ }
+ ImageFiles {
+ directory: "."
+ }
+ /* List of plugin directories passed to QML runtime */
+ // importPaths: [ " ../exampleplugin " ]
+}
diff --git a/examples/declarative/xmlhttprequest/xmlhttprequest.qmlproject b/examples/declarative/xmlhttprequest/xmlhttprequest.qmlproject
new file mode 100644
index 0000000..d4909f8
--- /dev/null
+++ b/examples/declarative/xmlhttprequest/xmlhttprequest.qmlproject
@@ -0,0 +1,16 @@
+import QmlProject 1.0
+
+Project {
+ /* Include .qml, .js, and image files from current directory and subdirectories */
+ QmlFiles {
+ directory: "."
+ }
+ JavaScriptFiles {
+ directory: "."
+ }
+ ImageFiles {
+ directory: "."
+ }
+ /* List of plugin directories passed to QML runtime */
+ // importPaths: [ " ../exampleplugin " ]
+}
diff --git a/examples/network/bearermonitor/bearermonitor.cpp b/examples/network/bearermonitor/bearermonitor.cpp
index 5b2bad1..4a6c6ff 100644
--- a/examples/network/bearermonitor/bearermonitor.cpp
+++ b/examples/network/bearermonitor/bearermonitor.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
@@ -43,7 +43,7 @@
#include "sessionwidget.h"
#include <QDebug>
-
+#include <QMessageBox>
#ifdef Q_OS_WIN
#include <winsock2.h>
#undef interface
@@ -57,15 +57,20 @@ BearerMonitor::BearerMonitor(QWidget *parent)
: QWidget(parent)
{
setupUi(this);
+#if defined(Q_WS_MAEMO_5) || defined(Q_WS_MAEMO_6)
+ newSessionButton->hide();
+ deleteSessionButton->hide();
+#else
delete tabWidget->currentWidget();
sessionGroup->hide();
-#if defined (Q_OS_SYMBIAN) || defined(Q_OS_WINCE)
+#endif
+#if defined (Q_OS_SYMBIAN) || defined(Q_OS_WINCE) || defined(Q_WS_MAEMO_5) || defined(Q_WS_MAEMO_6)
setWindowState(Qt::WindowMaximized);
#endif
updateConfigurations();
-
+#if !defined(Q_WS_MAEMO_5) && !defined(Q_WS_MAEMO_6)
onlineStateChanged(!manager.allConfigurations(QNetworkConfiguration::Active).isEmpty());
-
+#endif
QNetworkConfiguration defaultConfiguration = manager.defaultConfiguration();
for (int i = 0; i < treeWidget->topLevelItemCount(); ++i) {
QTreeWidgetItem *item = treeWidget->topLevelItem(i);
@@ -101,9 +106,10 @@ BearerMonitor::BearerMonitor(QWidget *parent)
connect(newSessionButton, SIGNAL(clicked()),
this, SLOT(createNewSession()));
+#if !defined(Q_WS_MAEMO_5) && !defined(Q_WS_MAEMO_6)
connect(deleteSessionButton, SIGNAL(clicked()),
this, SLOT(deleteSession()));
-
+#endif
connect(scanButton, SIGNAL(clicked()),
this, SLOT(performScan()));
}
@@ -234,9 +240,15 @@ void BearerMonitor::updateConfigurations()
void BearerMonitor::onlineStateChanged(bool isOnline)
{
if (isOnline)
+#if defined(Q_WS_MAEMO_5) || defined(Q_WS_MAEMO_6)
+ QMessageBox::information(this, "Connection state changed", "Online", QMessageBox::Close);
+ else
+ QMessageBox::information(this, "Connection state changed", "Offline", QMessageBox::Close);
+#else
onlineState->setText(tr("Online"));
else
onlineState->setText(tr("Offline"));
+#endif
}
#ifdef Q_OS_WIN
@@ -362,7 +374,9 @@ void BearerMonitor::createSessionFor(QTreeWidgetItem *item)
tabWidget->addTab(session, conf.name());
+#if !defined(Q_WS_MAEMO_5) && !defined(Q_WS_MAEMO_6)
sessionGroup->show();
+#endif
sessionWidgets.append(session);
}
@@ -374,6 +388,7 @@ void BearerMonitor::createNewSession()
createSessionFor(item);
}
+#if !defined(Q_WS_MAEMO_5) && !defined(Q_WS_MAEMO_6)
void BearerMonitor::deleteSession()
{
SessionWidget *session = qobject_cast<SessionWidget *>(tabWidget->currentWidget());
@@ -386,6 +401,7 @@ void BearerMonitor::deleteSession()
sessionGroup->hide();
}
}
+#endif
void BearerMonitor::performScan()
{
diff --git a/examples/network/bearermonitor/bearermonitor.h b/examples/network/bearermonitor/bearermonitor.h
index d7025dd..3172b5b 100644
--- a/examples/network/bearermonitor/bearermonitor.h
+++ b/examples/network/bearermonitor/bearermonitor.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
@@ -46,6 +46,8 @@
#include <qnetworksession.h>
#if defined (Q_OS_SYMBIAN) || defined(Q_OS_WINCE)
#include "ui_bearermonitor_240_320.h"
+#elif defined(Q_WS_MAEMO_5) || defined(Q_WS_MAEMO_6)
+#include "ui_bearermonitor_maemo.h"
#else
#include "ui_bearermonitor_640_480.h"
#endif
@@ -80,8 +82,9 @@ private slots:
void createSessionFor(QTreeWidgetItem *item);
void createNewSession();
+#if !defined(Q_WS_MAEMO_5) && !defined(Q_WS_MAEMO_6)
void deleteSession();
-
+#endif
void performScan();
private:
diff --git a/examples/network/bearermonitor/bearermonitor.pro b/examples/network/bearermonitor/bearermonitor.pro
index 4b86187..42100bc 100644
--- a/examples/network/bearermonitor/bearermonitor.pro
+++ b/examples/network/bearermonitor/bearermonitor.pro
@@ -1,3 +1,6 @@
+TARGET = bearermonitor
+QT = core gui network
+
HEADERS = sessionwidget.h \
bearermonitor.h
@@ -5,22 +8,18 @@ SOURCES = main.cpp \
bearermonitor.cpp \
sessionwidget.cpp
-FORMS = bearermonitor_240_320.ui \
- bearermonitor_640_480.ui \
- sessionwidget.ui
-
-TARGET = bearermonitor
-
-QT = core gui network
-
-win32 {
- !wince* {
- LIBS += -lWs2_32
- } else {
- LIBS += -lWs2
- }
+maemo5|maemo6 {
+ FORMS = bearermonitor_maemo.ui \
+ sessionwidget_maemo.ui
+} else {
+ FORMS = bearermonitor_240_320.ui \
+ bearermonitor_640_480.ui \
+ sessionwidget.ui
}
+win32:!wince*:LIBS += -lWs2_32
+wince*:LIBS += -lWs2
+
CONFIG += console
symbian:TARGET.CAPABILITY = NetworkServices ReadUserData
diff --git a/examples/network/bearermonitor/bearermonitor_maemo.ui b/examples/network/bearermonitor/bearermonitor_maemo.ui
new file mode 100644
index 0000000..5f17e7d
--- /dev/null
+++ b/examples/network/bearermonitor/bearermonitor_maemo.ui
@@ -0,0 +1,310 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<ui version="4.0">
+ <class>BearerMonitor</class>
+ <widget class="QWidget" name="BearerMonitor">
+ <property name="geometry">
+ <rect>
+ <x>0</x>
+ <y>0</y>
+ <width>612</width>
+ <height>495</height>
+ </rect>
+ </property>
+ <property name="windowTitle">
+ <string>Form</string>
+ </property>
+ <layout class="QHBoxLayout" name="horizontalLayout_3">
+ <item>
+ <widget class="QTabWidget" name="tabWidget">
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="Expanding" vsizetype="Preferred">
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="currentIndex">
+ <number>0</number>
+ </property>
+ <property name="usesScrollButtons">
+ <bool>false</bool>
+ </property>
+ <widget class="QWidget" name="tab">
+ <attribute name="title">
+ <string>Configurations</string>
+ </attribute>
+ <layout class="QHBoxLayout" name="horizontalLayout_2">
+ <item>
+ <widget class="QTreeWidget" name="treeWidget">
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="Preferred" vsizetype="Preferred">
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <attribute name="headerVisible">
+ <bool>false</bool>
+ </attribute>
+ <column>
+ <property name="text">
+ <string>1</string>
+ </property>
+ </column>
+ </widget>
+ </item>
+ <item>
+ <layout class="QVBoxLayout" name="verticalLayout_2">
+ <item>
+ <layout class="QHBoxLayout" name="configurationNameLayout">
+ <item>
+ <widget class="QLabel" name="configurationNameLabel">
+ <property name="text">
+ <string>Name:</string>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <widget class="QLabel" name="configurationName">
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="MinimumExpanding" vsizetype="Preferred">
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="text">
+ <string/>
+ </property>
+ </widget>
+ </item>
+ </layout>
+ </item>
+ <item>
+ <layout class="QHBoxLayout" name="configurationStateLayout">
+ <item>
+ <widget class="QLabel" name="configurationStateLabel">
+ <property name="text">
+ <string>State:</string>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <widget class="QLabel" name="configurationState">
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="MinimumExpanding" vsizetype="Preferred">
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="text">
+ <string/>
+ </property>
+ </widget>
+ </item>
+ </layout>
+ </item>
+ <item>
+ <layout class="QHBoxLayout" name="configurationTypeLayout">
+ <item>
+ <widget class="QLabel" name="configurationTypeLabel">
+ <property name="text">
+ <string>Type:</string>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <widget class="QLabel" name="configurationType">
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="MinimumExpanding" vsizetype="Preferred">
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="text">
+ <string>Invalid</string>
+ </property>
+ </widget>
+ </item>
+ </layout>
+ </item>
+ <item>
+ <layout class="QHBoxLayout" name="configurationPurposeLayout">
+ <item>
+ <widget class="QLabel" name="configurationPurposeLabel">
+ <property name="text">
+ <string>Purpose:</string>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <widget class="QLabel" name="configurationPurpose">
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="MinimumExpanding" vsizetype="Preferred">
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="text">
+ <string>Unknown</string>
+ </property>
+ </widget>
+ </item>
+ </layout>
+ </item>
+ <item>
+ <layout class="QHBoxLayout" name="configurationIdentifierLayout">
+ <item>
+ <widget class="QLabel" name="configurationIdentifierLabel">
+ <property name="text">
+ <string>Identifier:</string>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <widget class="QLabel" name="configurationIdentifier">
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="MinimumExpanding" vsizetype="Preferred">
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="text">
+ <string/>
+ </property>
+ </widget>
+ </item>
+ </layout>
+ </item>
+ <item>
+ <layout class="QHBoxLayout" name="configurationRoamingLayout">
+ <item>
+ <widget class="QLabel" name="configurationRoamingLabel">
+ <property name="text">
+ <string>Roaming:</string>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <widget class="QLabel" name="configurationRoaming">
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="MinimumExpanding" vsizetype="Preferred">
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="text">
+ <string/>
+ </property>
+ </widget>
+ </item>
+ </layout>
+ </item>
+ <item>
+ <layout class="QHBoxLayout" name="configurationChildrenLayout">
+ <item>
+ <widget class="QLabel" name="configurationChildrenLabel">
+ <property name="text">
+ <string>Children:</string>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <widget class="QLabel" name="configurationChildren">
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="MinimumExpanding" vsizetype="Preferred">
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="text">
+ <string/>
+ </property>
+ </widget>
+ </item>
+ </layout>
+ </item>
+ <item>
+ <widget class="QGroupBox" name="nlaGroup">
+ <property name="title">
+ <string>Network Location Awareness</string>
+ </property>
+ <layout class="QHBoxLayout" name="horizontalLayout">
+ <item>
+ <widget class="QPushButton" name="registerButton">
+ <property name="text">
+ <string>Register</string>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <widget class="QPushButton" name="unregisterButton">
+ <property name="text">
+ <string>Unregister</string>
+ </property>
+ </widget>
+ </item>
+ </layout>
+ </widget>
+ </item>
+ <item>
+ <widget class="QPushButton" name="newSessionButton">
+ <property name="text">
+ <string>New Session</string>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <widget class="QPushButton" name="deleteSessionButton">
+ <property name="text">
+ <string>Delete Session</string>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <widget class="QPushButton" name="scanButton">
+ <property name="text">
+ <string>Scan</string>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <widget class="QProgressBar" name="progressBar">
+ <property name="maximum">
+ <number>0</number>
+ </property>
+ <property name="value">
+ <number>23280</number>
+ </property>
+ <property name="textVisible">
+ <bool>false</bool>
+ </property>
+ <property name="invertedAppearance">
+ <bool>false</bool>
+ </property>
+ <property name="format">
+ <string>%p%</string>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <spacer name="verticalSpacer">
+ <property name="orientation">
+ <enum>Qt::Vertical</enum>
+ </property>
+ <property name="sizeHint" stdset="0">
+ <size>
+ <width>20</width>
+ <height>40</height>
+ </size>
+ </property>
+ </spacer>
+ </item>
+ </layout>
+ </item>
+ </layout>
+ </widget>
+ </widget>
+ </item>
+ </layout>
+ </widget>
+ <resources/>
+ <connections/>
+</ui>
diff --git a/examples/network/bearermonitor/sessionwidget.cpp b/examples/network/bearermonitor/sessionwidget.cpp
index 655c1ac..443f4b2 100644
--- a/examples/network/bearermonitor/sessionwidget.cpp
+++ b/examples/network/bearermonitor/sessionwidget.cpp
@@ -75,6 +75,10 @@ SessionWidget::SessionWidget(const QNetworkConfiguration &config, QWidget *paren
this, SLOT(closeSession()));
connect(stopSessionButton, SIGNAL(clicked()),
this, SLOT(stopSession()));
+#if defined(Q_WS_MAEMO_5) || defined(Q_WS_MAEMO_6)
+ connect(deleteSessionButton, SIGNAL(clicked()),
+ this, SLOT(deleteSession()));
+#endif
}
SessionWidget::~SessionWidget()
@@ -91,6 +95,13 @@ void SessionWidget::timerEvent(QTimerEvent *e)
}
}
+#if defined(Q_WS_MAEMO_5) || defined(Q_WS_MAEMO_6)
+void SessionWidget::deleteSession()
+{
+ delete this;
+}
+#endif
+
void SessionWidget::updateSession()
{
updateSessionState(session->state());
diff --git a/examples/network/bearermonitor/sessionwidget.h b/examples/network/bearermonitor/sessionwidget.h
index ae5cc96..5e9d62c 100644
--- a/examples/network/bearermonitor/sessionwidget.h
+++ b/examples/network/bearermonitor/sessionwidget.h
@@ -42,8 +42,11 @@
#ifndef SESSIONWIDGET_H
#define SESSIONWIDGET_H
+#if defined(Q_WS_MAEMO_5) || defined(Q_WS_MAEMO_6)
+#include "ui_sessionwidget_maemo.h"
+#else
#include "ui_sessionwidget.h"
-
+#endif
#include <qnetworksession.h>
QT_USE_NAMESPACE
@@ -68,7 +71,9 @@ private Q_SLOTS:
void closeSession();
void stopSession();
void updateSession();
-
+#if defined(Q_WS_MAEMO_5) || defined(Q_WS_MAEMO_6)
+ void deleteSession();
+#endif
private:
QNetworkSession *session;
int statsTimer;
diff --git a/examples/network/bearermonitor/sessionwidget_maemo.ui b/examples/network/bearermonitor/sessionwidget_maemo.ui
new file mode 100644
index 0000000..86f915c
--- /dev/null
+++ b/examples/network/bearermonitor/sessionwidget_maemo.ui
@@ -0,0 +1,262 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<ui version="4.0">
+ <class>SessionWidget</class>
+ <widget class="QWidget" name="SessionWidget">
+ <property name="geometry">
+ <rect>
+ <x>0</x>
+ <y>0</y>
+ <width>497</width>
+ <height>615</height>
+ </rect>
+ </property>
+ <property name="windowTitle">
+ <string>Form</string>
+ </property>
+ <layout class="QHBoxLayout" name="horizontalLayout">
+ <item>
+ <layout class="QVBoxLayout" name="verticalLayout">
+ <item>
+ <layout class="QHBoxLayout" name="sessionIdLayout">
+ <item>
+ <widget class="QLabel" name="sessionIdLabel">
+ <property name="text">
+ <string>Session ID:</string>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <widget class="QLabel" name="sessionId">
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="MinimumExpanding" vsizetype="Preferred">
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="text">
+ <string/>
+ </property>
+ </widget>
+ </item>
+ </layout>
+ </item>
+ <item>
+ <layout class="QHBoxLayout" name="sessionStateLayout">
+ <item>
+ <widget class="QLabel" name="sessionStateLabel">
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="Preferred" vsizetype="Preferred">
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="text">
+ <string>Session State:</string>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <widget class="QLabel" name="sessionState">
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="MinimumExpanding" vsizetype="Preferred">
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="text">
+ <string>Invalid</string>
+ </property>
+ </widget>
+ </item>
+ </layout>
+ </item>
+ <item>
+ <layout class="QHBoxLayout" name="configurationLayout">
+ <item>
+ <widget class="QLabel" name="configurationLabel">
+ <property name="text">
+ <string>Configuration:</string>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <widget class="QLabel" name="configuration">
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="MinimumExpanding" vsizetype="Preferred">
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="text">
+ <string/>
+ </property>
+ </widget>
+ </item>
+ </layout>
+ </item>
+ <item>
+ <layout class="QHBoxLayout" name="bearerLayout">
+ <item>
+ <widget class="QLabel" name="bearerLabel">
+ <property name="text">
+ <string>Bearer:</string>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <widget class="QLabel" name="bearer">
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="MinimumExpanding" vsizetype="Preferred">
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="text">
+ <string/>
+ </property>
+ </widget>
+ </item>
+ </layout>
+ </item>
+ <item>
+ <layout class="QHBoxLayout" name="interfaceNameLayout">
+ <item>
+ <widget class="QLabel" name="interfaceNameLabel">
+ <property name="text">
+ <string>Interface Name:</string>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <widget class="QLabel" name="interfaceName">
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="MinimumExpanding" vsizetype="Preferred">
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="text">
+ <string/>
+ </property>
+ </widget>
+ </item>
+ </layout>
+ </item>
+ <item>
+ <layout class="QHBoxLayout" name="interfaceGuidLayout">
+ <item>
+ <widget class="QLabel" name="interfaceGuidLabel">
+ <property name="text">
+ <string>Interface GUID:</string>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <widget class="QLabel" name="interfaceGuid">
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="MinimumExpanding" vsizetype="Preferred">
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="text">
+ <string/>
+ </property>
+ </widget>
+ </item>
+ </layout>
+ </item>
+ <item>
+ <layout class="QHBoxLayout" name="lastErrorLayout">
+ <item>
+ <widget class="QLabel" name="lastErrorLabel">
+ <property name="text">
+ <string>Last Error:</string>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <widget class="QLabel" name="lastError">
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="MinimumExpanding" vsizetype="Preferred">
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="text">
+ <string/>
+ </property>
+ </widget>
+ </item>
+ </layout>
+ </item>
+ <item>
+ <layout class="QHBoxLayout" name="errorStringLayout">
+ <item>
+ <widget class="QLabel" name="errorStringLabel">
+ <property name="text">
+ <string>Error String</string>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <widget class="QLabel" name="errorString">
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="MinimumExpanding" vsizetype="Preferred">
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="text">
+ <string/>
+ </property>
+ </widget>
+ </item>
+ </layout>
+ </item>
+ </layout>
+ </item>
+ <item>
+ <layout class="QVBoxLayout" name="verticalLayout_2">
+ <item>
+ <widget class="QPushButton" name="openSessionButton">
+ <property name="text">
+ <string>Open</string>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <widget class="QPushButton" name="closeSessionButton">
+ <property name="text">
+ <string>Close</string>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <widget class="QPushButton" name="openSyncSessionButton">
+ <property name="text">
+ <string>Blocking Open</string>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <widget class="QPushButton" name="stopSessionButton">
+ <property name="text">
+ <string>Stop</string>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <widget class="QPushButton" name="deleteSessionButton">
+ <property name="text">
+ <string>Delete</string>
+ </property>
+ </widget>
+ </item>
+ </layout>
+ </item>
+ </layout>
+ </widget>
+ <resources/>
+ <connections/>
+</ui>
diff --git a/examples/qtconcurrent/map/main.cpp b/examples/qtconcurrent/map/main.cpp
index 6afefca..6068d30 100644
--- a/examples/qtconcurrent/map/main.cpp
+++ b/examples/qtconcurrent/map/main.cpp
@@ -67,7 +67,7 @@ int main(int argc, char *argv[])
// Use QtConcurrentBlocking::mapped to apply the scale function to all the
// images in the list.
- QList<QImage> thumbnails = QtConcurrent::blockingMapped<QList<QImage> >(images, scale);
+ QList<QImage> thumbnails = QtConcurrent::blockingMapped(images, scale);
return 0;
}
diff --git a/examples/script/script.pro b/examples/script/script.pro
index 9d9d524..a95ad13 100644
--- a/examples/script/script.pro
+++ b/examples/script/script.pro
@@ -3,7 +3,7 @@ SUBDIRS = customclass
!contains(QT_CONFIG, no-gui):SUBDIRS += helloscript context2d defaultprototypes
!wince*:!contains(QT_CONFIG, no-gui):SUBDIRS += qscript marshal
-!wince*:SUBDIRS += marshal
+!wince*:SUBDIRS *= marshal
!wince*:!cross_compile:!contains(QT_CONFIG, no-gui):SUBDIRS += calculator qstetrix
symbian: SUBDIRS = context2d