diff options
author | Bea Lam <bea.lam@nokia.com> | 2010-03-16 02:09:27 (GMT) |
---|---|---|
committer | Bea Lam <bea.lam@nokia.com> | 2010-03-16 02:09:27 (GMT) |
commit | dd703f7a7e676f26dcb3ad634d75e0c9f677db43 (patch) | |
tree | f29f903c584349fe7ef67d43613f9fddaeb85aba /examples | |
parent | 081fafe395d52ae42b57c36d1279e6ac05ae2cde (diff) | |
parent | e56c5483fe8b292545bb9f004d796abd8ae00589 (diff) | |
download | Qt-dd703f7a7e676f26dcb3ad634d75e0c9f677db43.zip Qt-dd703f7a7e676f26dcb3ad634d75e0c9f677db43.tar.gz Qt-dd703f7a7e676f26dcb3ad634d75e0c9f677db43.tar.bz2 |
Merge branch '4.7' of scm.dev.nokia.troll.no:qt/qt-qml into 4.7
Conflicts:
src/declarative/qml/qdeclarativeengine.cpp
tests/auto/declarative/qdeclarativelistmodel/tst_qdeclarativelistmodel.cpp
Diffstat (limited to 'examples')
33 files changed, 133 insertions, 84 deletions
diff --git a/examples/animation/animatedtiles/animatedtiles.pro b/examples/animation/animatedtiles/animatedtiles.pro index 1840b17..d700642 100644 --- a/examples/animation/animatedtiles/animatedtiles.pro +++ b/examples/animation/animatedtiles/animatedtiles.pro @@ -6,3 +6,8 @@ target.path = $$[QT_INSTALL_EXAMPLES]/animation/animatedtiles sources.files = $$SOURCES $$HEADERS $$RESOURCES $$FORMS animatedtiles.pro images sources.path = $$[QT_INSTALL_EXAMPLES]/animation/animatedtiles INSTALLS += target sources + +symbian { + TARGET.UID3 = 0xA000D7D1 + include($$QT_SOURCE_TREE/examples/symbianpkgrules.pri) +} diff --git a/examples/animation/appchooser/appchooser.pro b/examples/animation/appchooser/appchooser.pro index 847b60a..7d45da2 100644 --- a/examples/animation/appchooser/appchooser.pro +++ b/examples/animation/appchooser/appchooser.pro @@ -6,3 +6,8 @@ target.path = $$[QT_INSTALL_EXAMPLES]/animation/appchooser sources.files = $$SOURCES $$HEADERS $$RESOURCES $$FORMS appchooser.pro sources.path = $$[QT_INSTALL_EXAMPLES]/animation/appchooser INSTALLS += target sources + +symbian { + TARGET.UID3 = 0xA000E3F5 + include($$QT_SOURCE_TREE/examples/symbianpkgrules.pri) +} diff --git a/examples/animation/easing/easing.pro b/examples/animation/easing/easing.pro index 8e8a35f..a8eda70 100644 --- a/examples/animation/easing/easing.pro +++ b/examples/animation/easing/easing.pro @@ -12,3 +12,8 @@ target.path = $$[QT_INSTALL_EXAMPLES]/animation/easing sources.files = $$SOURCES $$HEADERS $$RESOURCES $$FORMS easing.pro images sources.path = $$[QT_INSTALL_EXAMPLES]/animation/easing INSTALLS += target sources + +symbian { + TARGET.UID3 = 0xA000E3F6 + include($$QT_SOURCE_TREE/examples/symbianpkgrules.pri) +} diff --git a/examples/animation/moveblocks/moveblocks.pro b/examples/animation/moveblocks/moveblocks.pro index b8e88b2..0a32ecf 100644 --- a/examples/animation/moveblocks/moveblocks.pro +++ b/examples/animation/moveblocks/moveblocks.pro @@ -5,3 +5,8 @@ target.path = $$[QT_INSTALL_EXAMPLES]/animation/moveblocks sources.files = $$SOURCES $$HEADERS $$RESOURCES $$FORMS moveblocks.pro sources.path = $$[QT_INSTALL_EXAMPLES]/animation/moveblocks INSTALLS += target sources + +symbian { + TARGET.UID3 = 0xA000E3F7 + include($$QT_SOURCE_TREE/examples/symbianpkgrules.pri) +} diff --git a/examples/animation/states/states.pro b/examples/animation/states/states.pro index f4d1e0b..9d9a9c1 100644 --- a/examples/animation/states/states.pro +++ b/examples/animation/states/states.pro @@ -6,3 +6,8 @@ target.path = $$[QT_INSTALL_EXAMPLES]/animation/states sources.files = $$SOURCES $$HEADERS $$RESOURCES $$FORMS states.pro sources.path = $$[QT_INSTALL_EXAMPLES]/animation/states INSTALLS += target sources + +symbian { + TARGET.UID3 = 0xA000E3F8 + include($$QT_SOURCE_TREE/examples/symbianpkgrules.pri) +} diff --git a/examples/animation/stickman/stickman.pro b/examples/animation/stickman/stickman.pro index 487ff3a..37ff8d3 100644 --- a/examples/animation/stickman/stickman.pro +++ b/examples/animation/stickman/stickman.pro @@ -17,3 +17,8 @@ target.path = $$[QT_INSTALL_EXAMPLES]/animation/stickman sources.files = $$SOURCES $$HEADERS $$RESOURCES $$FORMS stickman.pro sources.path = $$[QT_INSTALL_EXAMPLES]/animation/stickman INSTALLS += target sources + +symbian { + TARGET.UID3 = 0xA000E3F9 + include($$QT_SOURCE_TREE/examples/symbianpkgrules.pri) +} diff --git a/examples/declarative/animations/color-animation.qml b/examples/declarative/animations/color-animation.qml index 6740522..025134b 100644 --- a/examples/declarative/animations/color-animation.qml +++ b/examples/declarative/animations/color-animation.qml @@ -1,4 +1,5 @@ import Qt 4.6 +import Qt.labs.particles 1.0 Item { id: window diff --git a/examples/declarative/colorbrowser/colorbrowser.qml b/examples/declarative/colorbrowser/colorbrowser.qml index 421ae07..d4c21e7 100644 --- a/examples/declarative/colorbrowser/colorbrowser.qml +++ b/examples/declarative/colorbrowser/colorbrowser.qml @@ -16,7 +16,7 @@ Rectangle { GridView { id: gridView; model: visualModel.parts.grid; width: mainWindow.width; height: mainWindow.height cellWidth: 160; cellHeight: 160; interactive: false - onCurrentIndexChanged: listView.positionViewAtIndex(currentIndex) + onCurrentIndexChanged: listView.positionViewAtIndex(currentIndex, ListView.Contain) } } @@ -25,7 +25,7 @@ Rectangle { ListView { id: listView; model: visualModel.parts.list; orientation: Qt.Horizontal width: mainWindow.width; height: mainWindow.height; interactive: false - onCurrentIndexChanged: gridView.positionViewAtIndex(currentIndex) + onCurrentIndexChanged: gridView.positionViewAtIndex(currentIndex, GridView.Contain) highlightRangeMode: ListView.StrictlyEnforceRange; snapMode: ListView.SnapOneItem } } diff --git a/examples/declarative/dynamic/dynamic.qml b/examples/declarative/dynamic/dynamic.qml index 6af3e81..7de4d38 100644 --- a/examples/declarative/dynamic/dynamic.qml +++ b/examples/declarative/dynamic/dynamic.qml @@ -1,4 +1,5 @@ import Qt 4.6 +import Qt.labs.particles 1.0 import "qml" Item { diff --git a/examples/declarative/extending/adding/main.cpp b/examples/declarative/extending/adding/main.cpp index 76e0736..b9e5aa3 100644 --- a/examples/declarative/extending/adding/main.cpp +++ b/examples/declarative/extending/adding/main.cpp @@ -48,7 +48,7 @@ int main(int argc, char ** argv) { QCoreApplication app(argc, argv); - QML_REGISTER_TYPE(People, 1,0, Person, Person); + qmlRegisterType<Person>("People", 1,0, "Person"); QDeclarativeEngine engine; QDeclarativeComponent component(&engine, ":example.qml"); diff --git a/examples/declarative/extending/attached/main.cpp b/examples/declarative/extending/attached/main.cpp index 684d8d3..fd2d525 100644 --- a/examples/declarative/extending/attached/main.cpp +++ b/examples/declarative/extending/attached/main.cpp @@ -49,12 +49,12 @@ int main(int argc, char ** argv) { QCoreApplication app(argc, argv); - QML_REGISTER_NOCREATE_TYPE(BirthdayPartyAttached); - QML_REGISTER_TYPE(People, 1,0, BirthdayParty, BirthdayParty); - QML_REGISTER_NOCREATE_TYPE(ShoeDescription); - QML_REGISTER_NOCREATE_TYPE(Person); - QML_REGISTER_TYPE(People, 1,0, Boy, Boy); - QML_REGISTER_TYPE(People, 1,0, Girl, Girl); + qmlRegisterType<BirthdayPartyAttached>(); + qmlRegisterType<BirthdayParty>("People", 1,0, "BirthdayParty"); + qmlRegisterType<ShoeDescription>(); + qmlRegisterType<Person>(); + qmlRegisterType<Boy>("People", 1,0, "Boy"); + qmlRegisterType<Girl>("People", 1,0, "Girl"); QDeclarativeEngine engine; QDeclarativeComponent component(&engine, ":example.qml"); diff --git a/examples/declarative/extending/binding/main.cpp b/examples/declarative/extending/binding/main.cpp index 873f8c9..ce6c50d 100644 --- a/examples/declarative/extending/binding/main.cpp +++ b/examples/declarative/extending/binding/main.cpp @@ -49,14 +49,13 @@ int main(int argc, char ** argv) { QCoreApplication app(argc, argv); - - QML_REGISTER_NOCREATE_TYPE(BirthdayPartyAttached); - QML_REGISTER_TYPE(People, 1,0, BirthdayParty, BirthdayParty); - QML_REGISTER_TYPE(People, 1,0, HappyBirthday, HappyBirthday); - QML_REGISTER_NOCREATE_TYPE(ShoeDescription); - QML_REGISTER_NOCREATE_TYPE(Person); - QML_REGISTER_TYPE(People, 1,0, Boy, Boy); - QML_REGISTER_TYPE(People, 1,0, Girl, Girl); + qmlRegisterType<BirthdayPartyAttached>(); + qmlRegisterType<BirthdayParty>("People", 1,0, "BirthdayParty"); + qmlRegisterType<HappyBirthday>("People", 1,0, "HappyBirthday"); + qmlRegisterType<ShoeDescription>(); + qmlRegisterType<Person>(); + qmlRegisterType<Boy>("People", 1,0, "Boy"); + qmlRegisterType<Girl>("People", 1,0, "Girl"); QDeclarativeEngine engine; QDeclarativeComponent component(&engine, ":example.qml"); diff --git a/examples/declarative/extending/coercion/main.cpp b/examples/declarative/extending/coercion/main.cpp index 1e2209f..312aff9 100644 --- a/examples/declarative/extending/coercion/main.cpp +++ b/examples/declarative/extending/coercion/main.cpp @@ -49,12 +49,12 @@ int main(int argc, char ** argv) { QCoreApplication app(argc, argv); - QML_REGISTER_TYPE(People, 1,0, BirthdayParty, BirthdayParty); + qmlRegisterType<BirthdayParty>("People", 1,0, "BirthdayParty"); // ![0] - QML_REGISTER_NOCREATE_TYPE(Person); + qmlRegisterType<Person>(); // ![0] - QML_REGISTER_TYPE(People, 1,0, Boy, Boy); - QML_REGISTER_TYPE(People, 1,0, Girl, Girl); + qmlRegisterType<Boy>("People", 1,0, "Boy"); + qmlRegisterType<Girl>("People", 1,0, "Girl"); QDeclarativeEngine engine; QDeclarativeComponent component(&engine, ":example.qml"); diff --git a/examples/declarative/extending/default/main.cpp b/examples/declarative/extending/default/main.cpp index 7d7f8a1..06282ad 100644 --- a/examples/declarative/extending/default/main.cpp +++ b/examples/declarative/extending/default/main.cpp @@ -49,10 +49,10 @@ int main(int argc, char ** argv) { QCoreApplication app(argc, argv); - QML_REGISTER_TYPE(People, 1,0, BirthdayParty, BirthdayParty); - QML_REGISTER_NOCREATE_TYPE(Person); - QML_REGISTER_TYPE(People, 1,0, Boy, Boy); - QML_REGISTER_TYPE(People, 1,0, Girl, Girl); + qmlRegisterType<BirthdayParty>("People", 1,0, "BirthdayParty"); + qmlRegisterType<Person>(); + qmlRegisterType<Boy>("People", 1,0, "Boy"); + qmlRegisterType<Girl>("People", 1,0, "Girl"); QDeclarativeEngine engine; QDeclarativeComponent component(&engine, ":example.qml"); diff --git a/examples/declarative/extending/extended/main.cpp b/examples/declarative/extending/extended/main.cpp index 5cbeea3..ca7242d 100644 --- a/examples/declarative/extending/extended/main.cpp +++ b/examples/declarative/extending/extended/main.cpp @@ -49,7 +49,7 @@ int main(int argc, char ** argv) { QApplication app(argc, argv); - QML_REGISTER_EXTENDED_TYPE(People, 1,0, QLineEdit, QLineEdit, LineEditExtension); + qmlRegisterExtendedType<QLineEdit, LineEditExtension>("People", 1,0, "QLineEdit"); QDeclarativeEngine engine; QDeclarativeComponent component(&engine, ":example.qml"); diff --git a/examples/declarative/extending/grouped/main.cpp b/examples/declarative/extending/grouped/main.cpp index 15a0bb5..b383a8b 100644 --- a/examples/declarative/extending/grouped/main.cpp +++ b/examples/declarative/extending/grouped/main.cpp @@ -49,11 +49,11 @@ int main(int argc, char ** argv) { QCoreApplication app(argc, argv); - QML_REGISTER_TYPE(People, 1,0, BirthdayParty, BirthdayParty); - QML_REGISTER_NOCREATE_TYPE(ShoeDescription); - QML_REGISTER_NOCREATE_TYPE(Person); - QML_REGISTER_TYPE(People, 1,0, Boy, Boy); - QML_REGISTER_TYPE(People, 1,0, Girl, Girl); + qmlRegisterType<BirthdayParty>("People", 1,0, "BirthdayParty"); + qmlRegisterType<ShoeDescription>(); + qmlRegisterType<Person>(); + qmlRegisterType<Boy>("People", 1,0, "Boy"); + qmlRegisterType<Girl>("People", 1,0, "Girl"); QDeclarativeEngine engine; QDeclarativeComponent component(&engine, ":example.qml"); diff --git a/examples/declarative/extending/properties/main.cpp b/examples/declarative/extending/properties/main.cpp index ce69ad2..350f8bd 100644 --- a/examples/declarative/extending/properties/main.cpp +++ b/examples/declarative/extending/properties/main.cpp @@ -49,8 +49,8 @@ int main(int argc, char ** argv) { QCoreApplication app(argc, argv); - QML_REGISTER_TYPE(People, 1,0, BirthdayParty, BirthdayParty); - QML_REGISTER_TYPE(People, 1,0, Person, Person); + qmlRegisterType<BirthdayParty>("People", 1,0, "BirthdayParty"); + qmlRegisterType<Person>("People", 1,0, "Person"); QDeclarativeEngine engine; QDeclarativeComponent component(&engine, ":example.qml"); diff --git a/examples/declarative/extending/signal/main.cpp b/examples/declarative/extending/signal/main.cpp index afc1a66..1b23a46 100644 --- a/examples/declarative/extending/signal/main.cpp +++ b/examples/declarative/extending/signal/main.cpp @@ -49,12 +49,12 @@ int main(int argc, char ** argv) { QCoreApplication app(argc, argv); - QML_REGISTER_NOCREATE_TYPE(BirthdayPartyAttached); - QML_REGISTER_TYPE(People, 1,0, BirthdayParty, BirthdayParty); - QML_REGISTER_NOCREATE_TYPE(ShoeDescription); - QML_REGISTER_NOCREATE_TYPE(Person); - QML_REGISTER_TYPE(People, 1,0, Boy, Boy); - QML_REGISTER_TYPE(People, 1,0, Girl, Girl); + qmlRegisterType<BirthdayPartyAttached>(); + qmlRegisterType<BirthdayParty>("People", 1,0, "BirthdayParty"); + qmlRegisterType<ShoeDescription>(); + qmlRegisterType<Person>(); + qmlRegisterType<Boy>("People", 1,0, "Boy"); + qmlRegisterType<Girl>("People", 1,0, "Girl"); QDeclarativeEngine engine; QDeclarativeComponent component(&engine, ":example.qml"); diff --git a/examples/declarative/extending/valuesource/main.cpp b/examples/declarative/extending/valuesource/main.cpp index 873f8c9..2574917 100644 --- a/examples/declarative/extending/valuesource/main.cpp +++ b/examples/declarative/extending/valuesource/main.cpp @@ -50,13 +50,13 @@ int main(int argc, char ** argv) { QCoreApplication app(argc, argv); - QML_REGISTER_NOCREATE_TYPE(BirthdayPartyAttached); - QML_REGISTER_TYPE(People, 1,0, BirthdayParty, BirthdayParty); - QML_REGISTER_TYPE(People, 1,0, HappyBirthday, HappyBirthday); - QML_REGISTER_NOCREATE_TYPE(ShoeDescription); - QML_REGISTER_NOCREATE_TYPE(Person); - QML_REGISTER_TYPE(People, 1,0, Boy, Boy); - QML_REGISTER_TYPE(People, 1,0, Girl, Girl); + qmlRegisterType<BirthdayPartyAttached>(); + qmlRegisterType<BirthdayParty>("People", 1,0, "BirthdayParty"); + qmlRegisterType<HappyBirthday>("People", 1,0, "HappyBirthday"); + qmlRegisterType<ShoeDescription>(); + qmlRegisterType<Person>(); + qmlRegisterType<Boy>("People", 1,0, "Boy"); + qmlRegisterType<Girl>("People", 1,0, "Girl"); QDeclarativeEngine engine; QDeclarativeComponent component(&engine, ":example.qml"); diff --git a/examples/declarative/imageprovider/imageprovider.cpp b/examples/declarative/imageprovider/imageprovider.cpp index 253dbf5..011a63b 100644 --- a/examples/declarative/imageprovider/imageprovider.cpp +++ b/examples/declarative/imageprovider/imageprovider.cpp @@ -104,4 +104,5 @@ public: #include "imageprovider.moc" Q_EXPORT_PLUGIN(ImageProviderExtensionPlugin); +//![0] diff --git a/examples/declarative/imageprovider/imageprovider.qml b/examples/declarative/imageprovider/imageprovider.qml index f899b1e..a1f2794 100644 --- a/examples/declarative/imageprovider/imageprovider.qml +++ b/examples/declarative/imageprovider/imageprovider.qml @@ -1,5 +1,5 @@ import Qt 4.6 -import "ImageProviderCore" +import ImageProviderCore 1.0 //![0] ListView { width: 100 diff --git a/examples/declarative/tutorials/samegame/samegame4/content/BoomBlock.qml b/examples/declarative/tutorials/samegame/samegame4/content/BoomBlock.qml index 9ef455a..a6ef62c 100644 --- a/examples/declarative/tutorials/samegame/samegame4/content/BoomBlock.qml +++ b/examples/declarative/tutorials/samegame/samegame4/content/BoomBlock.qml @@ -1,4 +1,5 @@ import Qt 4.6 +import Qt.labs.particles 1.0 Item { id:block property int type: 0 diff --git a/examples/examples.pro b/examples/examples.pro index 8941eae..ec5cc5f9 100644 --- a/examples/examples.pro +++ b/examples/examples.pro @@ -36,6 +36,8 @@ symbian: SUBDIRS = \ mainwindows \ sql \ uitools \ + animation \ + gestures \ xml contains(QT_CONFIG, multimedia) { diff --git a/examples/gestures/imagegestures/imagegestures.pro b/examples/gestures/imagegestures/imagegestures.pro index 8c947e4..5365558 100644 --- a/examples/gestures/imagegestures/imagegestures.pro +++ b/examples/gestures/imagegestures/imagegestures.pro @@ -14,3 +14,8 @@ sources.files = $$SOURCES \ sources.path = $$[QT_INSTALL_EXAMPLES]/gestures/imagegestures INSTALLS += target \ sources + +symbian { + TARGET.UID3 = 0xA000D7D0 + include($$QT_SOURCE_TREE/examples/symbianpkgrules.pri) +} diff --git a/examples/network/fortuneclient/fortuneclient.pro b/examples/network/fortuneclient/fortuneclient.pro index c9dc39a..2b65f2f 100644 --- a/examples/network/fortuneclient/fortuneclient.pro +++ b/examples/network/fortuneclient/fortuneclient.pro @@ -12,7 +12,7 @@ INSTALLS += target sources symbian { include($$QT_SOURCE_TREE/examples/symbianpkgrules.pri) HEADERS += $$QT_SOURCE_TREE/examples/network/qftp/sym_iap_util.h - LIBS += -lesock + LIBS += -lesock -lcommdb -linsock # For IAP selection TARGET.CAPABILITY = "NetworkServices ReadUserData WriteUserData" TARGET.EPOCHEAPSIZE = 0x20000 0x2000000 } diff --git a/examples/network/fortuneserver/fortuneserver.pro b/examples/network/fortuneserver/fortuneserver.pro index 4dbc2e8..acb285b 100644 --- a/examples/network/fortuneserver/fortuneserver.pro +++ b/examples/network/fortuneserver/fortuneserver.pro @@ -13,7 +13,7 @@ symbian { TARGET.UID3 = 0xA000CF71 include($$QT_SOURCE_TREE/examples/symbianpkgrules.pri) HEADERS += $$QT_SOURCE_TREE/examples/network/qftp/sym_iap_util.h - LIBS += -lesock + LIBS += -lesock -lcommdb -linsock # For IAP selection TARGET.CAPABILITY = "All -TCB" TARGET.EPOCHEAPSIZE = 0x20000 0x2000000 } diff --git a/examples/network/network-chat/network-chat.pro b/examples/network/network-chat/network-chat.pro index 16c11e3..7438641 100644 --- a/examples/network/network-chat/network-chat.pro +++ b/examples/network/network-chat/network-chat.pro @@ -21,7 +21,8 @@ INSTALLS += target sources symbian { include($$QT_SOURCE_TREE/examples/symbianpkgrules.pri) HEADERS += $$QT_SOURCE_TREE/examples/network/qftp/sym_iap_util.h - LIBS += -lesock -lconnmon -lcharconv -linsock + LIBS += -lesock -lcommdb -linsock # For IAP selection + LIBS += -lcharconv TARGET.CAPABILITY = "NetworkServices ReadUserData WriteUserData" TARGET.EPOCHEAPSIZE = 0x20000 0x2000000 } diff --git a/examples/qws/svgalib/README b/examples/qws/svgalib/README index 0b2831f..227c066 100644 --- a/examples/qws/svgalib/README +++ b/examples/qws/svgalib/README @@ -1,5 +1,9 @@ -This is the SVGA screen driver plugin example from Qt 4.4. The code does -not compile with Qt 4.5, because the internal graphics engine has changed. +This is the SVGA screen driver plugin example for QWS. -This is unsupported code, provided for convenience in case there is -interest in porting it to Qt 4.5. +You may need to set the SVGALIB_DEFAULT_MODE environment +variable. These values have been confirmed to work on one specific +machine using svgalib 1.4.3: 18, 24, 34, 35, 36 + +There is a bug in the example causing missing updates in 8-bit mode +(e.g. modes 10 and 12). Fixing this bug is left as an exercise for the +reader. diff --git a/examples/qws/svgalib/svgalibpaintdevice.cpp b/examples/qws/svgalib/svgalibpaintdevice.cpp index 090311f..86613d2 100644 --- a/examples/qws/svgalib/svgalibpaintdevice.cpp +++ b/examples/qws/svgalib/svgalibpaintdevice.cpp @@ -48,7 +48,7 @@ SvgalibPaintDevice::SvgalibPaintDevice(QWidget *w) : QCustomRasterPaintDevice(w) { - pengine = new SvgalibPaintEngine; + pengine = new SvgalibPaintEngine(this); } SvgalibPaintDevice::~SvgalibPaintDevice() diff --git a/examples/qws/svgalib/svgalibpaintengine.cpp b/examples/qws/svgalib/svgalibpaintengine.cpp index 8713863..59740da 100644 --- a/examples/qws/svgalib/svgalibpaintengine.cpp +++ b/examples/qws/svgalib/svgalibpaintengine.cpp @@ -45,7 +45,8 @@ #include <vga.h> #include <vgagl.h> -SvgalibPaintEngine::SvgalibPaintEngine() +SvgalibPaintEngine::SvgalibPaintEngine(QPaintDevice *device) + : QRasterPaintEngine(device) { } @@ -61,7 +62,7 @@ bool SvgalibPaintEngine::begin(QPaintDevice *dev) simplePen = true; brush = Qt::NoBrush; simpleBrush = true; - matrix = QMatrix(); + matrix = QTransform(); simpleMatrix = true; setClip(QRect(0, 0, device->width(), device->height())); opaque = true; @@ -81,54 +82,52 @@ bool SvgalibPaintEngine::end() //! [1] //! [2] -void SvgalibPaintEngine::updateState(const QPaintEngineState &state) +void SvgalibPaintEngine::updateState() { - QPaintEngine::DirtyFlags flags = state.state(); + QRasterPaintEngineState *s = state(); - if (flags & DirtyTransform) { - matrix = state.matrix(); + if (s->dirty & DirtyTransform) { + matrix = s->matrix; simpleMatrix = (matrix.m12() == 0 && matrix.m21() == 0); } - if (flags & DirtyPen) { - pen = state.pen(); + if (s->dirty & DirtyPen) { + pen = s->pen; simplePen = (pen.width() == 0 || pen.widthF() <= 1) && (pen.style() == Qt::NoPen || pen.style() == Qt::SolidLine) && (pen.color().alpha() == 255); } - if (flags & DirtyBrush) { - brush = state.brush(); + if (s->dirty & DirtyBrush) { + brush = s->brush; simpleBrush = (brush.style() == Qt::SolidPattern || brush.style() == Qt::NoBrush) && (brush.color().alpha() == 255); } - if (flags & DirtyClipRegion) - setClip(state.clipRegion()); + if (s->dirty & DirtyClipRegion) + setClip(s->clipRegion); - if (flags & DirtyClipEnabled) { - clipEnabled = state.isClipEnabled(); + if (s->dirty & DirtyClipEnabled) { + clipEnabled = s->isClipEnabled(); updateClip(); } - if (flags & DirtyClipPath) { + if (s->dirty & DirtyClipPath) { setClip(QRegion()); simpleClip = false; } - if (flags & DirtyCompositionMode) { - const QPainter::CompositionMode m = state.compositionMode(); + if (s->dirty & DirtyCompositionMode) { + const QPainter::CompositionMode m = s->composition_mode; sourceOver = (m == QPainter::CompositionMode_SourceOver); } - if (flags & DirtyOpacity) - opaque = (state.opacity() == 256); + if (s->dirty & DirtyOpacity) + opaque = (s->opacity == 256); - if (flags & DirtyHints) - aliased = !(state.renderHints() & QPainter::Antialiasing); - - QRasterPaintEngine::updateState(state); + if (s->dirty & DirtyHints) + aliased = !(s->flags.antialiased); } //! [2] diff --git a/examples/qws/svgalib/svgalibpaintengine.h b/examples/qws/svgalib/svgalibpaintengine.h index f43d201..27b77ee 100644 --- a/examples/qws/svgalib/svgalibpaintengine.h +++ b/examples/qws/svgalib/svgalibpaintengine.h @@ -48,12 +48,12 @@ class SvgalibPaintEngine : public QRasterPaintEngine { public: - SvgalibPaintEngine(); + SvgalibPaintEngine(QPaintDevice *device); ~SvgalibPaintEngine(); bool begin(QPaintDevice *device); bool end(); - void updateState(const QPaintEngineState &state); + void updateState(); void drawRects(const QRect *rects, int rectCount); private: @@ -64,7 +64,7 @@ private: bool simplePen; QBrush brush; bool simpleBrush; - QMatrix matrix; + QTransform matrix; bool simpleMatrix; QRegion clip; bool clipEnabled; diff --git a/examples/sql/masterdetail/masterdetail.pro b/examples/sql/masterdetail/masterdetail.pro index 89e7e73..41a0274 100644 --- a/examples/sql/masterdetail/masterdetail.pro +++ b/examples/sql/masterdetail/masterdetail.pro @@ -15,4 +15,7 @@ sources.files = $$SOURCES *.h $$RESOURCES $$FORMS masterdetail.pro *.xml images sources.path = $$[QT_INSTALL_EXAMPLES]/sql/masterdetail INSTALLS += target sources -symbian: include($$QT_SOURCE_TREE/examples/symbianpkgrules.pri) +symbian { + TARGET.UID3 = 0xA000D7CF + include($$QT_SOURCE_TREE/examples/symbianpkgrules.pri) +} diff --git a/examples/sql/sql.pro b/examples/sql/sql.pro index 644e2c7..331a210 100644 --- a/examples/sql/sql.pro +++ b/examples/sql/sql.pro @@ -5,10 +5,12 @@ SUBDIRS = drilldown relationaltablemodel \ sqlwidgetmapper +!wince*: SUBDIRS += masterdetail + !wince*:!symbian: SUBDIRS += \ querymodel \ - tablemodel \ - masterdetail + tablemodel + # install sources.files = connection.h sql.pro README |