From 4061d0ff3e8ed72ecb83ef1026492511a0afb9fa Mon Sep 17 00:00:00 2001 From: Tom Cooksey Date: Wed, 7 Apr 2010 17:18:04 +0200 Subject: Fix EGLImage & re-enable its use in QtOpenGL Make sure we set the EGL_KHR_image_base define when we define the reset of the extension defines. This also makes eglCreateImageKHR get defined when previously it wasn't. Reviewed-By: TrustMe (cherry picked from commit 99c17c0efb1331f5d11260b08614c9dff9bbf2e1) --- src/gui/egl/qegl_p.h | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/src/gui/egl/qegl_p.h b/src/gui/egl/qegl_p.h index 540cd3d..f81add6 100644 --- a/src/gui/egl/qegl_p.h +++ b/src/gui/egl/qegl_p.h @@ -139,6 +139,12 @@ QT_BEGIN_NAMESPACE typedef void *EGLImageKHR; #define EGL_NO_IMAGE_KHR ((EGLImageKHR)0) #define EGL_IMAGE_PRESERVED_KHR 0x30D2 +#define EGL_KHR_image_base +#endif + +#if !defined(EGL_KHR_image) && !defined(EGL_KHR_image_pixmap) +#define EGL_NATIVE_PIXMAP_KHR 0x30B0 +#define EGL_KHR_image_pixmap #endif // It is possible that something has included eglext.h (like Symbian 10.1's broken egl.h), in @@ -154,9 +160,6 @@ extern Q_GUI_EXPORT _eglCreateImageKHR eglCreateImageKHR; extern Q_GUI_EXPORT _eglDestroyImageKHR eglDestroyImageKHR; #endif // (defined(EGL_KHR_image) || defined(EGL_KHR_image_base)) && !defined(EGL_EGLEXT_PROTOTYPES) -#if !defined(EGL_KHR_image) && !defined(EGL_KHR_image_pixmap) -#define EGL_NATIVE_PIXMAP_KHR 0x30B0 -#endif class QEglProperties; -- cgit v0.12 From 1c9cde4d2b9cc588890be7445ab4248cbd8f58aa Mon Sep 17 00:00:00 2001 From: Martin Jones Date: Wed, 14 Apr 2010 09:30:03 +1000 Subject: Ensure view position is correct for highlight range modes that have a static highlight Task-number: QTBUG-9791 (cherry picked from commit 9416f29a3ee7511c182eaa68f5523132ff64921d) --- .../graphicsitems/qdeclarativegridview.cpp | 4 +-- .../graphicsitems/qdeclarativelistview.cpp | 4 +-- .../data/strictlyenforcerange.qml | 29 ++++++++++++++++ .../tst_qdeclarativelistview.cpp | 39 ++++++++++++++++++++++ 4 files changed, 70 insertions(+), 6 deletions(-) create mode 100644 tests/auto/declarative/qdeclarativelistview/data/strictlyenforcerange.qml diff --git a/src/declarative/graphicsitems/qdeclarativegridview.cpp b/src/declarative/graphicsitems/qdeclarativegridview.cpp index 9be025a..5cd6de4 100644 --- a/src/declarative/graphicsitems/qdeclarativegridview.cpp +++ b/src/declarative/graphicsitems/qdeclarativegridview.cpp @@ -613,8 +613,6 @@ void QDeclarativeGridViewPrivate::updateTrackedItem() if (highlight) item = highlight; - FxGridItem *oldTracked = trackedItem; - if (trackedItem && item != trackedItem) { QObject::disconnect(trackedItem->item, SIGNAL(yChanged()), q, SLOT(trackedPositionChanged())); QObject::disconnect(trackedItem->item, SIGNAL(xChanged()), q, SLOT(trackedPositionChanged())); @@ -626,7 +624,7 @@ void QDeclarativeGridViewPrivate::updateTrackedItem() QObject::connect(trackedItem->item, SIGNAL(yChanged()), q, SLOT(trackedPositionChanged())); QObject::connect(trackedItem->item, SIGNAL(xChanged()), q, SLOT(trackedPositionChanged())); } - if (trackedItem && trackedItem != oldTracked) + if (trackedItem) q->trackedPositionChanged(); } diff --git a/src/declarative/graphicsitems/qdeclarativelistview.cpp b/src/declarative/graphicsitems/qdeclarativelistview.cpp index b4506ef..622da5b 100644 --- a/src/declarative/graphicsitems/qdeclarativelistview.cpp +++ b/src/declarative/graphicsitems/qdeclarativelistview.cpp @@ -770,8 +770,6 @@ void QDeclarativeListViewPrivate::updateTrackedItem() if (highlight) item = highlight; - FxListItem *oldTracked = trackedItem; - const char *notifier1 = orient == QDeclarativeListView::Vertical ? SIGNAL(yChanged()) : SIGNAL(xChanged()); const char *notifier2 = orient == QDeclarativeListView::Vertical ? SIGNAL(heightChanged()) : SIGNAL(widthChanged()); @@ -786,7 +784,7 @@ void QDeclarativeListViewPrivate::updateTrackedItem() QObject::connect(trackedItem->item, notifier1, q, SLOT(trackedPositionChanged())); QObject::connect(trackedItem->item, notifier2, q, SLOT(trackedPositionChanged())); } - if (trackedItem && trackedItem != oldTracked) + if (trackedItem) q->trackedPositionChanged(); } diff --git a/tests/auto/declarative/qdeclarativelistview/data/strictlyenforcerange.qml b/tests/auto/declarative/qdeclarativelistview/data/strictlyenforcerange.qml new file mode 100644 index 0000000..6fc41fa --- /dev/null +++ b/tests/auto/declarative/qdeclarativelistview/data/strictlyenforcerange.qml @@ -0,0 +1,29 @@ +import Qt 4.7 + +ListView { + id: list + objectName: "list" + width: 320 + height: 480 + + function fillModel() { + list.model.append({"col": "red"}); + list.currentIndex = list.count-1 + list.model.append({"col": "blue"}); + list.currentIndex = list.count-1 + list.model.append({"col": "green"}); + list.currentIndex = list.count-1 + } + + model: ListModel { id: listModel } // empty model + delegate: Rectangle { id: wrapper; objectName: "wrapper"; color: col; width: 300; height: 400 } + orientation: "Horizontal" + snapMode: "SnapToItem" + cacheBuffer: 1000 + + preferredHighlightBegin: 10 + preferredHighlightEnd: 10 + + highlightRangeMode: "StrictlyEnforceRange" + focus: true +} diff --git a/tests/auto/declarative/qdeclarativelistview/tst_qdeclarativelistview.cpp b/tests/auto/declarative/qdeclarativelistview/tst_qdeclarativelistview.cpp index 8d94804..5b81d75 100644 --- a/tests/auto/declarative/qdeclarativelistview/tst_qdeclarativelistview.cpp +++ b/tests/auto/declarative/qdeclarativelistview/tst_qdeclarativelistview.cpp @@ -88,6 +88,7 @@ private slots: void propertyChanges(); void componentChanges(); void modelChanges(); + void QTBUG_9791(); private: template void items(); @@ -1472,6 +1473,44 @@ void tst_QDeclarativeListView::modelChanges() delete canvas; } +void tst_QDeclarativeListView::QTBUG_9791() +{ + QDeclarativeView *canvas = createView(); + + QDeclarativeContext *ctxt = canvas->rootContext(); + + canvas->setSource(QUrl::fromLocalFile(SRCDIR "/data/strictlyenforcerange.qml")); + qApp->processEvents(); + + QDeclarativeListView *listview = qobject_cast(canvas->rootObject()); + QTRY_VERIFY(listview != 0); + + QDeclarativeItem *viewport = listview->viewport(); + QTRY_VERIFY(viewport != 0); + QTRY_VERIFY(listview->delegate() != 0); + QTRY_VERIFY(listview->model() != 0); + + QMetaObject::invokeMethod(listview, "fillModel"); + qApp->processEvents(); + + // Confirm items positioned correctly + int itemCount = findItems(viewport, "wrapper").count(); + QVERIFY(itemCount == 3); + + for (int i = 0; i < itemCount; ++i) { + QDeclarativeItem *item = findItem(viewport, "wrapper", i); + if (!item) qWarning() << "Item" << i << "not found"; + QTRY_VERIFY(item); + QTRY_COMPARE(item->x(), i*300.0); + } + + // check that view is positioned correctly + QTRY_COMPARE(listview->contentX(), 590.0); + + delete canvas; +} + + void tst_QDeclarativeListView::qListModelInterface_items() { items(); -- cgit v0.12 From 7d9621652528fe292b2b3599ba389be61d916db4 Mon Sep 17 00:00:00 2001 From: Martin Jones Date: Wed, 14 Apr 2010 11:06:49 +1000 Subject: Complete item creation after its initial properties have been initialized. Task-number: QTBUG-9800 (cherry picked from commit 955daf47a350ad9eb84b30f50431482b16ecf22f) --- src/declarative/graphicsitems/qdeclarativepathview.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/declarative/graphicsitems/qdeclarativepathview.cpp b/src/declarative/graphicsitems/qdeclarativepathview.cpp index 06e3540..4aaa28d 100644 --- a/src/declarative/graphicsitems/qdeclarativepathview.cpp +++ b/src/declarative/graphicsitems/qdeclarativepathview.cpp @@ -1102,7 +1102,6 @@ void QDeclarativePathView::refill() // qDebug() << "append" << idx; QDeclarativeItem *item = d->getItem(idx); item->setZValue(idx+1); - d->model->completeItem(); if (d->currentIndex == idx) { item->setFocus(true); if (QDeclarativePathViewAttached *att = d->attached(item)) @@ -1115,6 +1114,7 @@ void QDeclarativePathView::refill() d->firstIndex = idx; d->items.append(item); d->updateItem(item, pos); + d->model->completeItem(); ++idx; if (idx >= d->model->count()) idx = 0; @@ -1129,7 +1129,6 @@ void QDeclarativePathView::refill() // qDebug() << "prepend" << idx; QDeclarativeItem *item = d->getItem(idx); item->setZValue(idx+1); - d->model->completeItem(); if (d->currentIndex == idx) { item->setFocus(true); if (QDeclarativePathViewAttached *att = d->attached(item)) @@ -1140,6 +1139,7 @@ void QDeclarativePathView::refill() } d->items.prepend(item); d->updateItem(item, pos); + d->model->completeItem(); d->firstIndex = idx; idx = d->firstIndex - 1; if (idx < 0) -- cgit v0.12 From 0ff9f2480e7337f5a9685f602c786614973ab7e9 Mon Sep 17 00:00:00 2001 From: Martin Jones Date: Wed, 14 Apr 2010 11:29:35 +1000 Subject: emit onMovementStarted/Ended/Changed on wheel events Task-number: QTBUG-9804 (cherry picked from commit d44b7f2faa8cdc3832eac40bc45102acc3e3146a) --- src/declarative/graphicsitems/qdeclarativeflickable.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/declarative/graphicsitems/qdeclarativeflickable.cpp b/src/declarative/graphicsitems/qdeclarativeflickable.cpp index fc7a87b..951b171 100644 --- a/src/declarative/graphicsitems/qdeclarativeflickable.cpp +++ b/src/declarative/graphicsitems/qdeclarativeflickable.cpp @@ -816,6 +816,8 @@ void QDeclarativeFlickable::wheelEvent(QGraphicsSceneWheelEvent *event) d->vData.velocity = qMin(event->delta() - d->vData.smoothVelocity.value(), qreal(-250.0)); d->flicked = false; d->flickY(d->vData.velocity); + if (d->flicked) + movementStarting(); event->accept(); } else if (xflick()) { if (event->delta() > 0) @@ -824,6 +826,8 @@ void QDeclarativeFlickable::wheelEvent(QGraphicsSceneWheelEvent *event) d->hData.velocity = qMin(event->delta() - d->hData.smoothVelocity.value(), qreal(-250.0)); d->flicked = false; d->flickX(d->hData.velocity); + if (d->flicked) + movementStarting(); event->accept(); } else { QDeclarativeItem::wheelEvent(event); -- cgit v0.12 From b3d9d6e81cfafcc01a23ec0c524f91ba6db4536b Mon Sep 17 00:00:00 2001 From: Martin Jones Date: Wed, 14 Apr 2010 10:16:41 +1000 Subject: Don't crash when columns == 0 Task-number: QTBUG-9805 (cherry picked from commit 3469fe05e4b04567598202fecc16c1decfb3ab63) --- .../graphicsitems/qdeclarativepositioners.cpp | 9 ++--- .../data/gridzerocolumns.qml | 40 ++++++++++++++++++++++ .../tst_qdeclarativepositioners.cpp | 33 ++++++++++++++++++ 3 files changed, 78 insertions(+), 4 deletions(-) create mode 100644 tests/auto/declarative/qdeclarativepositioners/data/gridzerocolumns.qml diff --git a/src/declarative/graphicsitems/qdeclarativepositioners.cpp b/src/declarative/graphicsitems/qdeclarativepositioners.cpp index d33a8be..f436471 100644 --- a/src/declarative/graphicsitems/qdeclarativepositioners.cpp +++ b/src/declarative/graphicsitems/qdeclarativepositioners.cpp @@ -700,14 +700,15 @@ void QDeclarativeGrid::setRows(const int rows) void QDeclarativeGrid::doPositioning(QSizeF *contentSize) { - int c=_columns,r=_rows;//Actual number of rows/columns + int c = _columns; + int r = _rows; int numVisible = positionedItems.count(); - if (_columns==-1 && _rows==-1){ + if (_columns <= 0 && _rows <= 0){ c = 4; r = (numVisible+3)/4; - }else if (_rows==-1){ + } else if (_rows <= 0){ r = (numVisible+(_columns-1))/_columns; - }else if (_columns==-1){ + } else if (_columns <= 0){ c = (numVisible+(_rows-1))/_rows; } diff --git a/tests/auto/declarative/qdeclarativepositioners/data/gridzerocolumns.qml b/tests/auto/declarative/qdeclarativepositioners/data/gridzerocolumns.qml new file mode 100644 index 0000000..052d96b --- /dev/null +++ b/tests/auto/declarative/qdeclarativepositioners/data/gridzerocolumns.qml @@ -0,0 +1,40 @@ +import Qt 4.6 + +Item { + width: 640 + height: 480 + Grid { + objectName: "grid" + columns: 0 + Rectangle { + objectName: "one" + color: "red" + width: 50 + height: 50 + } + Rectangle { + objectName: "two" + color: "green" + width: 20 + height: 50 + } + Rectangle { + objectName: "three" + color: "blue" + width: 50 + height: 20 + } + Rectangle { + objectName: "four" + color: "cyan" + width: 50 + height: 50 + } + Rectangle { + objectName: "five" + color: "magenta" + width: 10 + height: 10 + } + } +} diff --git a/tests/auto/declarative/qdeclarativepositioners/tst_qdeclarativepositioners.cpp b/tests/auto/declarative/qdeclarativepositioners/tst_qdeclarativepositioners.cpp index 08eac0a..8692596 100644 --- a/tests/auto/declarative/qdeclarativepositioners/tst_qdeclarativepositioners.cpp +++ b/tests/auto/declarative/qdeclarativepositioners/tst_qdeclarativepositioners.cpp @@ -63,6 +63,7 @@ private slots: void test_grid(); void test_grid_spacing(); void test_grid_animated(); + void test_grid_zero_columns(); void test_propertychanges(); void test_repeater(); void test_flow(); @@ -414,6 +415,38 @@ void tst_QDeclarativePositioners::test_grid_animated() QTRY_COMPARE(five->y(), 50.0); } + +void tst_QDeclarativePositioners::test_grid_zero_columns() +{ + QDeclarativeView *canvas = createView(SRCDIR "/data/gridzerocolumns.qml"); + + QDeclarativeRectangle *one = canvas->rootObject()->findChild("one"); + QVERIFY(one != 0); + QDeclarativeRectangle *two = canvas->rootObject()->findChild("two"); + QVERIFY(two != 0); + QDeclarativeRectangle *three = canvas->rootObject()->findChild("three"); + QVERIFY(three != 0); + QDeclarativeRectangle *four = canvas->rootObject()->findChild("four"); + QVERIFY(four != 0); + QDeclarativeRectangle *five = canvas->rootObject()->findChild("five"); + QVERIFY(five != 0); + + QCOMPARE(one->x(), 0.0); + QCOMPARE(one->y(), 0.0); + QCOMPARE(two->x(), 50.0); + QCOMPARE(two->y(), 0.0); + QCOMPARE(three->x(), 70.0); + QCOMPARE(three->y(), 0.0); + QCOMPARE(four->x(), 120.0); + QCOMPARE(four->y(), 0.0); + QCOMPARE(five->x(), 0.0); + QCOMPARE(five->y(), 50.0); + + QDeclarativeItem *grid = canvas->rootObject()->findChild("grid"); + QCOMPARE(grid->width(), 170.0); + QCOMPARE(grid->height(), 60.0); +} + void tst_QDeclarativePositioners::test_propertychanges() { QDeclarativeView *canvas = createView(SRCDIR "/data/propertychangestest.qml"); -- cgit v0.12 From 8a4474d66550bddf71b5a447435d37999772079f Mon Sep 17 00:00:00 2001 From: Leonardo Sobral Cunha Date: Tue, 13 Apr 2010 17:01:54 +1000 Subject: Add 'runtime' property to the rootContext of DeclarativeViewer The 'runtime' property is a singleton object that contains various info about the execution environment for the qml application. Currently it contains just one property 'isActiveWindow', which tells if the window of the declarative viewer is active or not. Task-number: QTBUG-8902 Reviewed-by: Martin Jones (cherry picked from commit ffd45093795e9481505af0ae9bf5df7b6c704c72) --- tools/qml/qmlruntime.cpp | 44 ++++++++++++++++++++++++++++++++++++++++++++ tools/qml/qmlruntime.h | 1 + 2 files changed, 45 insertions(+) diff --git a/tools/qml/qmlruntime.cpp b/tools/qml/qmlruntime.cpp index c4ebd80..40de100 100644 --- a/tools/qml/qmlruntime.cpp +++ b/tools/qml/qmlruntime.cpp @@ -134,6 +134,38 @@ signals: void orientationChanged(); }; +class Runtime : public QObject +{ + Q_OBJECT + Q_PROPERTY(bool isActiveWindow READ isActiveWindow NOTIFY isActiveWindowChanged) + +public: + static Runtime* instance() + { + static Runtime *instance = 0; + if (!instance) + instance = new Runtime; + return instance; + } + + bool isActiveWindow() const { return activeWindow; } + void setActiveWindow(bool active) + { + if (active == activeWindow) + return; + activeWindow = active; + emit isActiveWindowChanged(); + } + +signals: + void isActiveWindowChanged(); + +private: + Runtime(QObject *parent=0) : QObject(parent), activeWindow(false) {} + + bool activeWindow; +}; + QT_END_NAMESPACE QML_DECLARE_TYPE(Screen) @@ -1048,6 +1080,8 @@ void QDeclarativeViewer::openQml(const QString& file_or_url) ctxt->setContextProperty("qmlViewerFolder", QDir::currentPath()); #endif + ctxt->setContextProperty("runtime", Runtime::instance()); + QString fileName = url.toLocalFile(); if (!fileName.isEmpty()) { QFileInfo fi(fileName); @@ -1249,6 +1283,16 @@ void QDeclarativeViewer::keyPressEvent(QKeyEvent *event) QWidget::keyPressEvent(event); } +bool QDeclarativeViewer::event(QEvent *event) +{ + if (event->type() == QEvent::WindowActivate) { + Runtime::instance()->setActiveWindow(true); + } else if (event->type() == QEvent::WindowDeactivate) { + Runtime::instance()->setActiveWindow(false); + } + return QWidget::event(event); +} + void QDeclarativeViewer::senseImageMagick() { QProcess proc; diff --git a/tools/qml/qmlruntime.h b/tools/qml/qmlruntime.h index 6f1e425..74a0f07 100644 --- a/tools/qml/qmlruntime.h +++ b/tools/qml/qmlruntime.h @@ -125,6 +125,7 @@ public slots: protected: virtual void keyPressEvent(QKeyEvent *); + virtual bool event(QEvent *); void createMenu(QMenuBar *menu, QMenu *flatmenu); -- cgit v0.12 From b85d0a69c909e65f97908d64a4a8caef55e6391a Mon Sep 17 00:00:00 2001 From: Joona Petrell Date: Wed, 14 Apr 2010 12:15:26 +1000 Subject: Reduce QML runtime capabilities to NetworkServices and ReadUserData Task-number: Reviewed-by: Martin Jones (cherry picked from commit 5a1a3ab59e96bb5b2968883160564eb24d011859) --- demos/declarative/minehunt/minehunt.pro | 2 +- tools/qml/qml.pro | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/demos/declarative/minehunt/minehunt.pro b/demos/declarative/minehunt/minehunt.pro index 8a5667d..095fa42 100644 --- a/demos/declarative/minehunt/minehunt.pro +++ b/demos/declarative/minehunt/minehunt.pro @@ -26,7 +26,7 @@ symbian:{ load(data_caging_paths) TARGET.EPOCALLOWDLLDATA = 1 include($$QT_SOURCE_TREE/demos/symbianpkgrules.pri) - + TARGET.CAPABILITY = NetworkServices ReadUserData importFiles.sources = minehunt.dll \ MinehuntCore/Explosion.qml \ MinehuntCore/pics \ diff --git a/tools/qml/qml.pro b/tools/qml/qml.pro index bc6d032..1ed8b2c 100644 --- a/tools/qml/qml.pro +++ b/tools/qml/qml.pro @@ -56,7 +56,7 @@ symbian { INCLUDEPATH += $$QT_SOURCE_TREE/examples/network/qftp/ TARGET.EPOCHEAPSIZE = 0x20000 0x2000000 LIBS += -lesock -lcommdb -lconnmon -linsock - TARGET.CAPABILITY = "All -TCB" + TARGET.CAPABILITY = NetworkServices ReadUserData } mac { QMAKE_INFO_PLIST=Info_mac.plist -- cgit v0.12 From d005553b64db9a22d143ce1f43f30b58b1e81bc5 Mon Sep 17 00:00:00 2001 From: Shane Kearns Date: Wed, 14 Apr 2010 21:45:36 +0200 Subject: Update to def files for 4.7.0-beta1 Frozen against qt-releases/4.7.0-beta1 commit 4061d0ff3e8ed72ecb83ef1026492511a0afb9fa Task-number: QTBUG-9892 Reviewed-by: Trust Me (cherry picked from commit e40fea6a052f172d3eb3c0901ee502d1747c3817) --- src/s60installs/bwins/QtCoreu.def | 7 +- src/s60installs/bwins/QtDeclarativeu.def | 129 ++++++++++++++++++++++------- src/s60installs/bwins/QtGuiu.def | 5 +- src/s60installs/bwins/QtMultimediau.def | 2 + src/s60installs/eabi/QtCoreu.def | 13 +-- src/s60installs/eabi/QtDeclarativeu.def | 135 ++++++++++++++++++++++++------- src/s60installs/eabi/QtGuiu.def | 5 +- src/s60installs/eabi/QtMultimediau.def | 3 + 8 files changed, 234 insertions(+), 65 deletions(-) diff --git a/src/s60installs/bwins/QtCoreu.def b/src/s60installs/bwins/QtCoreu.def index cf7fe6f..c2692f6 100644 --- a/src/s60installs/bwins/QtCoreu.def +++ b/src/s60installs/bwins/QtCoreu.def @@ -382,7 +382,7 @@ EXPORTS ??1QDateTime@@QAE@XZ @ 381 NONAME ; QDateTime::~QDateTime(void) ??1QDateTimeParser@@UAE@XZ @ 382 NONAME ; QDateTimeParser::~QDateTimeParser(void) ??1QDebug@@QAE@XZ @ 383 NONAME ; QDebug::~QDebug(void) - ??1QDeclarativeData@@UAE@XZ @ 384 NONAME ; QDeclarativeData::~QDeclarativeData(void) + ??1QDeclarativeData@@UAE@XZ @ 384 NONAME ABSENT ; QDeclarativeData::~QDeclarativeData(void) ??1QDir@@QAE@XZ @ 385 NONAME ; QDir::~QDir(void) ??1QDirIterator@@UAE@XZ @ 386 NONAME ; QDirIterator::~QDirIterator(void) ??1QDynamicPropertyChangeEvent@@UAE@XZ @ 387 NONAME ; QDynamicPropertyChangeEvent::~QDynamicPropertyChangeEvent(void) @@ -885,7 +885,7 @@ EXPORTS ??_EQCoreApplicationPrivate@@UAE@I@Z @ 884 NONAME ; QCoreApplicationPrivate::~QCoreApplicationPrivate(unsigned int) ??_EQDataStream@@UAE@I@Z @ 885 NONAME ; QDataStream::~QDataStream(unsigned int) ??_EQDateTimeParser@@UAE@I@Z @ 886 NONAME ; QDateTimeParser::~QDateTimeParser(unsigned int) - ??_EQDeclarativeData@@UAE@I@Z @ 887 NONAME ; QDeclarativeData::~QDeclarativeData(unsigned int) + ??_EQDeclarativeData@@UAE@I@Z @ 887 NONAME ABSENT ; QDeclarativeData::~QDeclarativeData(unsigned int) ??_EQDirIterator@@UAE@I@Z @ 888 NONAME ; QDirIterator::~QDirIterator(unsigned int) ??_EQDynamicPropertyChangeEvent@@UAE@I@Z @ 889 NONAME ; QDynamicPropertyChangeEvent::~QDynamicPropertyChangeEvent(unsigned int) ??_EQEvent@@UAE@I@Z @ 890 NONAME ; QEvent::~QEvent(unsigned int) @@ -4457,4 +4457,7 @@ EXPORTS ?toEasingCurve@QVariant@@QBE?AVQEasingCurve@@XZ @ 4456 NONAME ; class QEasingCurve QVariant::toEasingCurve(void) const ?toMSecsSinceEpoch@QDateTime@@QBE_JXZ @ 4457 NONAME ; long long QDateTime::toMSecsSinceEpoch(void) const ?transitions@QState@@QBE?AV?$QList@PAVQAbstractTransition@@@@XZ @ 4458 NONAME ; class QList QState::transitions(void) const + ?validCodecs@QTextCodec@@CA_NXZ @ 4459 NONAME ; bool QTextCodec::validCodecs(void) + ?destroyed@QDeclarativeData@@2P6AXPAV1@PAVQObject@@@ZA @ 4460 NONAME ; void (*QDeclarativeData::destroyed)(class QDeclarativeData *, class QObject *) + ?parentChanged@QDeclarativeData@@2P6AXPAV1@PAVQObject@@1@ZA @ 4461 NONAME ; void (*QDeclarativeData::parentChanged)(class QDeclarativeData *, class QObject *, class QObject *) diff --git a/src/s60installs/bwins/QtDeclarativeu.def b/src/s60installs/bwins/QtDeclarativeu.def index 89049a9..3eba5e7 100644 --- a/src/s60installs/bwins/QtDeclarativeu.def +++ b/src/s60installs/bwins/QtDeclarativeu.def @@ -98,7 +98,7 @@ EXPORTS ??0QDeclarativeFontLoader@@QAE@PAVQObject@@@Z @ 97 NONAME ; QDeclarativeFontLoader::QDeclarativeFontLoader(class QObject *) ??0QDeclarativeGradient@@QAE@PAVQObject@@@Z @ 98 NONAME ; QDeclarativeGradient::QDeclarativeGradient(class QObject *) ??0QDeclarativeGradientStop@@QAE@PAVQObject@@@Z @ 99 NONAME ; QDeclarativeGradientStop::QDeclarativeGradientStop(class QObject *) - ??0QDeclarativeGraphicsObjectContainer@@QAE@PAVQDeclarativeItem@@@Z @ 100 NONAME ; QDeclarativeGraphicsObjectContainer::QDeclarativeGraphicsObjectContainer(class QDeclarativeItem *) + ??0QDeclarativeGraphicsObjectContainer@@QAE@PAVQDeclarativeItem@@@Z @ 100 NONAME ABSENT ; QDeclarativeGraphicsObjectContainer::QDeclarativeGraphicsObjectContainer(class QDeclarativeItem *) ??0QDeclarativeGrid@@QAE@PAVQDeclarativeItem@@@Z @ 101 NONAME ; QDeclarativeGrid::QDeclarativeGrid(class QDeclarativeItem *) ??0QDeclarativeGridScaledImage@@QAE@ABV0@@Z @ 102 NONAME ; QDeclarativeGridScaledImage::QDeclarativeGridScaledImage(class QDeclarativeGridScaledImage const &) ??0QDeclarativeGridScaledImage@@QAE@PAVQIODevice@@@Z @ 103 NONAME ; QDeclarativeGridScaledImage::QDeclarativeGridScaledImage(class QIODevice *) @@ -268,7 +268,7 @@ EXPORTS ??1QDeclarativeFontLoader@@UAE@XZ @ 267 NONAME ; QDeclarativeFontLoader::~QDeclarativeFontLoader(void) ??1QDeclarativeGradient@@UAE@XZ @ 268 NONAME ; QDeclarativeGradient::~QDeclarativeGradient(void) ??1QDeclarativeGradientStop@@UAE@XZ @ 269 NONAME ; QDeclarativeGradientStop::~QDeclarativeGradientStop(void) - ??1QDeclarativeGraphicsObjectContainer@@UAE@XZ @ 270 NONAME ; QDeclarativeGraphicsObjectContainer::~QDeclarativeGraphicsObjectContainer(void) + ??1QDeclarativeGraphicsObjectContainer@@UAE@XZ @ 270 NONAME ABSENT ; QDeclarativeGraphicsObjectContainer::~QDeclarativeGraphicsObjectContainer(void) ??1QDeclarativeGrid@@UAE@XZ @ 271 NONAME ; QDeclarativeGrid::~QDeclarativeGrid(void) ??1QDeclarativeGridScaledImage@@QAE@XZ @ 272 NONAME ; QDeclarativeGridScaledImage::~QDeclarativeGridScaledImage(void) ??1QDeclarativeGridView@@UAE@XZ @ 273 NONAME ; QDeclarativeGridView::~QDeclarativeGridView(void) @@ -449,7 +449,7 @@ EXPORTS ??_EQDeclarativeFontLoader@@UAE@I@Z @ 448 NONAME ; QDeclarativeFontLoader::~QDeclarativeFontLoader(unsigned int) ??_EQDeclarativeGradient@@UAE@I@Z @ 449 NONAME ; QDeclarativeGradient::~QDeclarativeGradient(unsigned int) ??_EQDeclarativeGradientStop@@UAE@I@Z @ 450 NONAME ; QDeclarativeGradientStop::~QDeclarativeGradientStop(unsigned int) - ??_EQDeclarativeGraphicsObjectContainer@@UAE@I@Z @ 451 NONAME ; QDeclarativeGraphicsObjectContainer::~QDeclarativeGraphicsObjectContainer(unsigned int) + ??_EQDeclarativeGraphicsObjectContainer@@UAE@I@Z @ 451 NONAME ABSENT ; QDeclarativeGraphicsObjectContainer::~QDeclarativeGraphicsObjectContainer(unsigned int) ??_EQDeclarativeGrid@@UAE@I@Z @ 452 NONAME ; QDeclarativeGrid::~QDeclarativeGrid(unsigned int) ??_EQDeclarativeGridView@@UAE@I@Z @ 453 NONAME ; QDeclarativeGridView::~QDeclarativeGridView(unsigned int) ??_EQDeclarativeImage@@UAE@I@Z @ 454 NONAME ; QDeclarativeImage::~QDeclarativeImage(unsigned int) @@ -910,8 +910,8 @@ EXPORTS ?d_func@QDeclarativeFlow@@ABEPBVQDeclarativeFlowPrivate@@XZ @ 909 NONAME ; class QDeclarativeFlowPrivate const * QDeclarativeFlow::d_func(void) const ?d_func@QDeclarativeFontLoader@@AAEPAVQDeclarativeFontLoaderPrivate@@XZ @ 910 NONAME ; class QDeclarativeFontLoaderPrivate * QDeclarativeFontLoader::d_func(void) ?d_func@QDeclarativeFontLoader@@ABEPBVQDeclarativeFontLoaderPrivate@@XZ @ 911 NONAME ; class QDeclarativeFontLoaderPrivate const * QDeclarativeFontLoader::d_func(void) const - ?d_func@QDeclarativeGraphicsObjectContainer@@AAEPAVQDeclarativeGraphicsObjectContainerPrivate@@XZ @ 912 NONAME ; class QDeclarativeGraphicsObjectContainerPrivate * QDeclarativeGraphicsObjectContainer::d_func(void) - ?d_func@QDeclarativeGraphicsObjectContainer@@ABEPBVQDeclarativeGraphicsObjectContainerPrivate@@XZ @ 913 NONAME ; class QDeclarativeGraphicsObjectContainerPrivate const * QDeclarativeGraphicsObjectContainer::d_func(void) const + ?d_func@QDeclarativeGraphicsObjectContainer@@AAEPAVQDeclarativeGraphicsObjectContainerPrivate@@XZ @ 912 NONAME ABSENT ; class QDeclarativeGraphicsObjectContainerPrivate * QDeclarativeGraphicsObjectContainer::d_func(void) + ?d_func@QDeclarativeGraphicsObjectContainer@@ABEPBVQDeclarativeGraphicsObjectContainerPrivate@@XZ @ 913 NONAME ABSENT ; class QDeclarativeGraphicsObjectContainerPrivate const * QDeclarativeGraphicsObjectContainer::d_func(void) const ?d_func@QDeclarativeGridView@@AAEPAVQDeclarativeGridViewPrivate@@XZ @ 914 NONAME ; class QDeclarativeGridViewPrivate * QDeclarativeGridView::d_func(void) ?d_func@QDeclarativeGridView@@ABEPBVQDeclarativeGridViewPrivate@@XZ @ 915 NONAME ; class QDeclarativeGridViewPrivate const * QDeclarativeGridView::d_func(void) const ?d_func@QDeclarativeImage@@AAEPAVQDeclarativeImagePrivate@@XZ @ 916 NONAME ; class QDeclarativeImagePrivate * QDeclarativeImage::d_func(void) @@ -1096,7 +1096,7 @@ EXPORTS ?event@QDeclarativeSystemPalette@@EAE_NPAVQEvent@@@Z @ 1095 NONAME ; bool QDeclarativeSystemPalette::event(class QEvent *) ?event@QDeclarativeTextEdit@@MAE_NPAVQEvent@@@Z @ 1096 NONAME ; bool QDeclarativeTextEdit::event(class QEvent *) ?event@QDeclarativeTextInput@@MAE_NPAVQEvent@@@Z @ 1097 NONAME ; bool QDeclarativeTextInput::event(class QEvent *) - ?eventFilter@QDeclarativeGraphicsObjectContainer@@MAE_NPAVQObject@@PAVQEvent@@@Z @ 1098 NONAME ; bool QDeclarativeGraphicsObjectContainer::eventFilter(class QObject *, class QEvent *) + ?eventFilter@QDeclarativeGraphicsObjectContainer@@MAE_NPAVQObject@@PAVQEvent@@@Z @ 1098 NONAME ABSENT ; bool QDeclarativeGraphicsObjectContainer::eventFilter(class QObject *, class QEvent *) ?eventFilter@QDeclarativeLoader@@MAE_NPAVQObject@@PAVQEvent@@@Z @ 1099 NONAME ; bool QDeclarativeLoader::eventFilter(class QObject *, class QEvent *) ?eventFilter@QDeclarativeSystemPalette@@EAE_NPAVQObject@@PAVQEvent@@@Z @ 1100 NONAME ; bool QDeclarativeSystemPalette::eventFilter(class QObject *, class QEvent *) ?execute@QDeclarativeAnchorChanges@@UAEXXZ @ 1101 NONAME ; void QDeclarativeAnchorChanges::execute(void) @@ -1223,7 +1223,7 @@ EXPORTS ?getStaticMetaObject@QDeclarativeFontLoader@@SAABUQMetaObject@@XZ @ 1222 NONAME ; struct QMetaObject const & QDeclarativeFontLoader::getStaticMetaObject(void) ?getStaticMetaObject@QDeclarativeGradient@@SAABUQMetaObject@@XZ @ 1223 NONAME ; struct QMetaObject const & QDeclarativeGradient::getStaticMetaObject(void) ?getStaticMetaObject@QDeclarativeGradientStop@@SAABUQMetaObject@@XZ @ 1224 NONAME ; struct QMetaObject const & QDeclarativeGradientStop::getStaticMetaObject(void) - ?getStaticMetaObject@QDeclarativeGraphicsObjectContainer@@SAABUQMetaObject@@XZ @ 1225 NONAME ; struct QMetaObject const & QDeclarativeGraphicsObjectContainer::getStaticMetaObject(void) + ?getStaticMetaObject@QDeclarativeGraphicsObjectContainer@@SAABUQMetaObject@@XZ @ 1225 NONAME ABSENT ; struct QMetaObject const & QDeclarativeGraphicsObjectContainer::getStaticMetaObject(void) ?getStaticMetaObject@QDeclarativeGrid@@SAABUQMetaObject@@XZ @ 1226 NONAME ; struct QMetaObject const & QDeclarativeGrid::getStaticMetaObject(void) ?getStaticMetaObject@QDeclarativeGridView@@SAABUQMetaObject@@XZ @ 1227 NONAME ; struct QMetaObject const & QDeclarativeGridView::getStaticMetaObject(void) ?getStaticMetaObject@QDeclarativeImage@@SAABUQMetaObject@@XZ @ 1228 NONAME ; struct QMetaObject const & QDeclarativeImage::getStaticMetaObject(void) @@ -1282,7 +1282,7 @@ EXPORTS ?getStaticMetaObject@QPacketProtocol@@SAABUQMetaObject@@XZ @ 1281 NONAME ; struct QMetaObject const & QPacketProtocol::getStaticMetaObject(void) ?gradient@QDeclarativeGradient@@QBEPBVQGradient@@XZ @ 1282 NONAME ; class QGradient const * QDeclarativeGradient::gradient(void) const ?gradient@QDeclarativeRectangle@@QBEPAVQDeclarativeGradient@@XZ @ 1283 NONAME ; class QDeclarativeGradient * QDeclarativeRectangle::gradient(void) const - ?graphicsObject@QDeclarativeGraphicsObjectContainer@@QBEPAVQGraphicsObject@@XZ @ 1284 NONAME ; class QGraphicsObject * QDeclarativeGraphicsObjectContainer::graphicsObject(void) const + ?graphicsObject@QDeclarativeGraphicsObjectContainer@@QBEPAVQGraphicsObject@@XZ @ 1284 NONAME ABSENT ; class QGraphicsObject * QDeclarativeGraphicsObjectContainer::graphicsObject(void) const ?gridBottom@QDeclarativeGridScaledImage@@QBEHXZ @ 1285 NONAME ; int QDeclarativeGridScaledImage::gridBottom(void) const ?gridLeft@QDeclarativeGridScaledImage@@QBEHXZ @ 1286 NONAME ; int QDeclarativeGridScaledImage::gridLeft(void) const ?gridRight@QDeclarativeGridScaledImage@@QBEHXZ @ 1287 NONAME ; int QDeclarativeGridScaledImage::gridRight(void) const @@ -1350,7 +1350,7 @@ EXPORTS ?imageProvider@QDeclarativeEngine@@QBEPAVQDeclarativeImageProvider@@ABVQString@@@Z @ 1349 NONAME ; class QDeclarativeImageProvider * QDeclarativeEngine::imageProvider(class QString const &) const ?implicitHeight@QDeclarativeItem@@QBEMXZ @ 1350 NONAME ; float QDeclarativeItem::implicitHeight(void) const ?implicitWidth@QDeclarativeItem@@QBEMXZ @ 1351 NONAME ; float QDeclarativeItem::implicitWidth(void) const - ?importExtension@QDeclarativeEngine@@QAE_NABVQString@@0@Z @ 1352 NONAME ; bool QDeclarativeEngine::importExtension(class QString const &, class QString const &) + ?importExtension@QDeclarativeEngine@@QAE_NABVQString@@0@Z @ 1352 NONAME ABSENT ; bool QDeclarativeEngine::importExtension(class QString const &, class QString const &) ?imports@QDeclarativeDomDocument@@QBE?AV?$QList@VQDeclarativeDomImport@@@@XZ @ 1353 NONAME ; class QList QDeclarativeDomDocument::imports(void) const ?inSync@QDeclarativeSpringFollow@@QBE_NXZ @ 1354 NONAME ; bool QDeclarativeSpringFollow::inSync(void) const ?incrementCurrentIndex@QDeclarativeListView@@QAEXXZ @ 1355 NONAME ; void QDeclarativeListView::incrementCurrentIndex(void) @@ -1484,7 +1484,7 @@ EXPORTS ?item@QDeclarativeVisualDataModel@@UAEPAVQDeclarativeItem@@H_N@Z @ 1483 NONAME ; class QDeclarativeItem * QDeclarativeVisualDataModel::item(int, bool) ?item@QDeclarativeVisualItemModel@@UAEPAVQDeclarativeItem@@H_N@Z @ 1484 NONAME ; class QDeclarativeItem * QDeclarativeVisualItemModel::item(int, bool) ?itemChange@QDeclarativeBasePositioner@@MAE?AVQVariant@@W4GraphicsItemChange@QGraphicsItem@@ABV2@@Z @ 1485 NONAME ; class QVariant QDeclarativeBasePositioner::itemChange(enum QGraphicsItem::GraphicsItemChange, class QVariant const &) - ?itemChange@QDeclarativeGraphicsObjectContainer@@MAE?AVQVariant@@W4GraphicsItemChange@QGraphicsItem@@ABV2@@Z @ 1486 NONAME ; class QVariant QDeclarativeGraphicsObjectContainer::itemChange(enum QGraphicsItem::GraphicsItemChange, class QVariant const &) + ?itemChange@QDeclarativeGraphicsObjectContainer@@MAE?AVQVariant@@W4GraphicsItemChange@QGraphicsItem@@ABV2@@Z @ 1486 NONAME ABSENT ; class QVariant QDeclarativeGraphicsObjectContainer::itemChange(enum QGraphicsItem::GraphicsItemChange, class QVariant const &) ?itemChange@QDeclarativeItem@@MAE?AVQVariant@@W4GraphicsItemChange@QGraphicsItem@@ABV2@@Z @ 1487 NONAME ; class QVariant QDeclarativeItem::itemChange(enum QGraphicsItem::GraphicsItemChange, class QVariant const &) ?itemChange@QDeclarativeLoader@@MAE?AVQVariant@@W4GraphicsItemChange@QGraphicsItem@@ABV2@@Z @ 1488 NONAME ; class QVariant QDeclarativeLoader::itemChange(enum QGraphicsItem::GraphicsItemChange, class QVariant const &) ?itemChange@QDeclarativeRepeater@@MAE?AVQVariant@@W4GraphicsItemChange@QGraphicsItem@@ABV2@@Z @ 1489 NONAME ; class QVariant QDeclarativeRepeater::itemChange(enum QGraphicsItem::GraphicsItemChange, class QVariant const &) @@ -1625,7 +1625,7 @@ EXPORTS ?metaObject@QDeclarativeFontLoader@@UBEPBUQMetaObject@@XZ @ 1624 NONAME ; struct QMetaObject const * QDeclarativeFontLoader::metaObject(void) const ?metaObject@QDeclarativeGradient@@UBEPBUQMetaObject@@XZ @ 1625 NONAME ; struct QMetaObject const * QDeclarativeGradient::metaObject(void) const ?metaObject@QDeclarativeGradientStop@@UBEPBUQMetaObject@@XZ @ 1626 NONAME ; struct QMetaObject const * QDeclarativeGradientStop::metaObject(void) const - ?metaObject@QDeclarativeGraphicsObjectContainer@@UBEPBUQMetaObject@@XZ @ 1627 NONAME ; struct QMetaObject const * QDeclarativeGraphicsObjectContainer::metaObject(void) const + ?metaObject@QDeclarativeGraphicsObjectContainer@@UBEPBUQMetaObject@@XZ @ 1627 NONAME ABSENT ; struct QMetaObject const * QDeclarativeGraphicsObjectContainer::metaObject(void) const ?metaObject@QDeclarativeGrid@@UBEPBUQMetaObject@@XZ @ 1628 NONAME ; struct QMetaObject const * QDeclarativeGrid::metaObject(void) const ?metaObject@QDeclarativeGridView@@UBEPBUQMetaObject@@XZ @ 1629 NONAME ; struct QMetaObject const * QDeclarativeGridView::metaObject(void) const ?metaObject@QDeclarativeImage@@UBEPBUQMetaObject@@XZ @ 1630 NONAME ; struct QMetaObject const * QDeclarativeImage::metaObject(void) const @@ -1988,7 +1988,7 @@ EXPORTS ?qt_metacall@QDeclarativeFontLoader@@UAEHW4Call@QMetaObject@@HPAPAX@Z @ 1987 NONAME ; int QDeclarativeFontLoader::qt_metacall(enum QMetaObject::Call, int, void * *) ?qt_metacall@QDeclarativeGradient@@UAEHW4Call@QMetaObject@@HPAPAX@Z @ 1988 NONAME ; int QDeclarativeGradient::qt_metacall(enum QMetaObject::Call, int, void * *) ?qt_metacall@QDeclarativeGradientStop@@UAEHW4Call@QMetaObject@@HPAPAX@Z @ 1989 NONAME ; int QDeclarativeGradientStop::qt_metacall(enum QMetaObject::Call, int, void * *) - ?qt_metacall@QDeclarativeGraphicsObjectContainer@@UAEHW4Call@QMetaObject@@HPAPAX@Z @ 1990 NONAME ; int QDeclarativeGraphicsObjectContainer::qt_metacall(enum QMetaObject::Call, int, void * *) + ?qt_metacall@QDeclarativeGraphicsObjectContainer@@UAEHW4Call@QMetaObject@@HPAPAX@Z @ 1990 NONAME ABSENT ; int QDeclarativeGraphicsObjectContainer::qt_metacall(enum QMetaObject::Call, int, void * *) ?qt_metacall@QDeclarativeGrid@@UAEHW4Call@QMetaObject@@HPAPAX@Z @ 1991 NONAME ; int QDeclarativeGrid::qt_metacall(enum QMetaObject::Call, int, void * *) ?qt_metacall@QDeclarativeGridView@@UAEHW4Call@QMetaObject@@HPAPAX@Z @ 1992 NONAME ; int QDeclarativeGridView::qt_metacall(enum QMetaObject::Call, int, void * *) ?qt_metacall@QDeclarativeImage@@UAEHW4Call@QMetaObject@@HPAPAX@Z @ 1993 NONAME ; int QDeclarativeImage::qt_metacall(enum QMetaObject::Call, int, void * *) @@ -2083,7 +2083,7 @@ EXPORTS ?qt_metacast@QDeclarativeFontLoader@@UAEPAXPBD@Z @ 2082 NONAME ; void * QDeclarativeFontLoader::qt_metacast(char const *) ?qt_metacast@QDeclarativeGradient@@UAEPAXPBD@Z @ 2083 NONAME ; void * QDeclarativeGradient::qt_metacast(char const *) ?qt_metacast@QDeclarativeGradientStop@@UAEPAXPBD@Z @ 2084 NONAME ; void * QDeclarativeGradientStop::qt_metacast(char const *) - ?qt_metacast@QDeclarativeGraphicsObjectContainer@@UAEPAXPBD@Z @ 2085 NONAME ; void * QDeclarativeGraphicsObjectContainer::qt_metacast(char const *) + ?qt_metacast@QDeclarativeGraphicsObjectContainer@@UAEPAXPBD@Z @ 2085 NONAME ABSENT ; void * QDeclarativeGraphicsObjectContainer::qt_metacast(char const *) ?qt_metacast@QDeclarativeGrid@@UAEPAXPBD@Z @ 2086 NONAME ; void * QDeclarativeGrid::qt_metacast(char const *) ?qt_metacast@QDeclarativeGridView@@UAEPAXPBD@Z @ 2087 NONAME ; void * QDeclarativeGridView::qt_metacast(char const *) ?qt_metacast@QDeclarativeImage@@UAEPAXPBD@Z @ 2088 NONAME ; void * QDeclarativeImage::qt_metacast(char const *) @@ -2430,7 +2430,7 @@ EXPORTS ?setFromState@QDeclarativeTransition@@QAEXABVQString@@@Z @ 2429 NONAME ; void QDeclarativeTransition::setFromState(class QString const &) ?setFront@QDeclarativeFlipable@@QAEXPAVQDeclarativeItem@@@Z @ 2430 NONAME ABSENT ; void QDeclarativeFlipable::setFront(class QDeclarativeItem *) ?setGradient@QDeclarativeRectangle@@QAEXPAVQDeclarativeGradient@@@Z @ 2431 NONAME ; void QDeclarativeRectangle::setGradient(class QDeclarativeGradient *) - ?setGraphicsObject@QDeclarativeGraphicsObjectContainer@@QAEXPAVQGraphicsObject@@@Z @ 2432 NONAME ; void QDeclarativeGraphicsObjectContainer::setGraphicsObject(class QGraphicsObject *) + ?setGraphicsObject@QDeclarativeGraphicsObjectContainer@@QAEXPAVQGraphicsObject@@@Z @ 2432 NONAME ABSENT ; void QDeclarativeGraphicsObjectContainer::setGraphicsObject(class QGraphicsObject *) ?setGridScaledImage@QDeclarativeBorderImage@@AAEXABVQDeclarativeGridScaledImage@@@Z @ 2433 NONAME ; void QDeclarativeBorderImage::setGridScaledImage(class QDeclarativeGridScaledImage const &) ?setHAlign@QDeclarativeText@@QAEXW4HAlignment@1@@Z @ 2434 NONAME ; void QDeclarativeText::setHAlign(enum QDeclarativeText::HAlignment) ?setHAlign@QDeclarativeTextEdit@@QAEXW4HAlignment@1@@Z @ 2435 NONAME ; void QDeclarativeTextEdit::setHAlign(enum QDeclarativeTextEdit::HAlignment) @@ -2587,7 +2587,7 @@ EXPORTS ?setSourceComponent@QDeclarativeLoader@@QAEXPAVQDeclarativeComponent@@@Z @ 2586 NONAME ; void QDeclarativeLoader::setSourceComponent(class QDeclarativeComponent *) ?setSourceLocation@QDeclarativeExpression@@QAEXABVQString@@H@Z @ 2587 NONAME ; void QDeclarativeExpression::setSourceLocation(class QString const &, int) ?setSourceValue@QDeclarativeEaseFollow@@QAEXM@Z @ 2588 NONAME ABSENT ; void QDeclarativeEaseFollow::setSourceValue(float) - ?setSourceValue@QDeclarativeSpringFollow@@QAEXM@Z @ 2589 NONAME ; void QDeclarativeSpringFollow::setSourceValue(float) + ?setSourceValue@QDeclarativeSpringFollow@@QAEXM@Z @ 2589 NONAME ABSENT ; void QDeclarativeSpringFollow::setSourceValue(float) ?setSpacing@QDeclarativeBasePositioner@@QAEXH@Z @ 2590 NONAME ; void QDeclarativeBasePositioner::setSpacing(int) ?setSpacing@QDeclarativeListView@@QAEXM@Z @ 2591 NONAME ; void QDeclarativeListView::setSpacing(float) ?setSpring@QDeclarativeSpringFollow@@QAEXM@Z @ 2592 NONAME ; void QDeclarativeSpringFollow::setSpring(float) @@ -2605,7 +2605,7 @@ EXPORTS ?setStyle@QDeclarativeText@@QAEXW4TextStyle@1@@Z @ 2604 NONAME ; void QDeclarativeText::setStyle(enum QDeclarativeText::TextStyle) ?setStyleColor@QDeclarativeText@@QAEXABVQColor@@@Z @ 2605 NONAME ; void QDeclarativeText::setStyleColor(class QColor const &) ?setSuperClass@QMetaObjectBuilder@@QAEXPBUQMetaObject@@@Z @ 2606 NONAME ; void QMetaObjectBuilder::setSuperClass(struct QMetaObject const *) - ?setSynchronizedResizing@QDeclarativeGraphicsObjectContainer@@QAEX_N@Z @ 2607 NONAME ; void QDeclarativeGraphicsObjectContainer::setSynchronizedResizing(bool) + ?setSynchronizedResizing@QDeclarativeGraphicsObjectContainer@@QAEX_N@Z @ 2607 NONAME ABSENT ; void QDeclarativeGraphicsObjectContainer::setSynchronizedResizing(bool) ?setTag@QMetaMethodBuilder@@QAEXABVQByteArray@@@Z @ 2608 NONAME ; void QMetaMethodBuilder::setTag(class QByteArray const &) ?setTarget@QDeclarativeBehavior@@UAEXABVQDeclarativeProperty@@@Z @ 2609 NONAME ; void QDeclarativeBehavior::setTarget(class QDeclarativeProperty const &) ?setTarget@QDeclarativeConnections@@QAEXPAVQObject@@@Z @ 2610 NONAME ; void QDeclarativeConnections::setTarget(class QObject *) @@ -2703,7 +2703,7 @@ EXPORTS ?sourceComponent@QDeclarativeLoader@@QBEPAVQDeclarativeComponent@@XZ @ 2702 NONAME ; class QDeclarativeComponent * QDeclarativeLoader::sourceComponent(void) const ?sourceFile@QDeclarativeExpression@@QBE?AVQString@@XZ @ 2703 NONAME ; class QString QDeclarativeExpression::sourceFile(void) const ?sourceValue@QDeclarativeEaseFollow@@QBEMXZ @ 2704 NONAME ABSENT ; float QDeclarativeEaseFollow::sourceValue(void) const - ?sourceValue@QDeclarativeSpringFollow@@QBEMXZ @ 2705 NONAME ; float QDeclarativeSpringFollow::sourceValue(void) const + ?sourceValue@QDeclarativeSpringFollow@@QBEMXZ @ 2705 NONAME ABSENT ; float QDeclarativeSpringFollow::sourceValue(void) const ?spacing@QDeclarativeBasePositioner@@QBEHXZ @ 2706 NONAME ; int QDeclarativeBasePositioner::spacing(void) const ?spacing@QDeclarativeListView@@QBEMXZ @ 2707 NONAME ; float QDeclarativeListView::spacing(void) const ?spacingChanged@QDeclarativeBasePositioner@@IAEXXZ @ 2708 NONAME ; void QDeclarativeBasePositioner::spacingChanged(void) @@ -2756,7 +2756,7 @@ EXPORTS ?styleColorChanged@QDeclarativeText@@IAEXABVQColor@@@Z @ 2755 NONAME ; void QDeclarativeText::styleColorChanged(class QColor const &) ?superClass@QMetaObjectBuilder@@QBEPBUQMetaObject@@XZ @ 2756 NONAME ; struct QMetaObject const * QMetaObjectBuilder::superClass(void) const ?syncChanged@QDeclarativeSpringFollow@@IAEXXZ @ 2757 NONAME ; void QDeclarativeSpringFollow::syncChanged(void) - ?synchronizedResizing@QDeclarativeGraphicsObjectContainer@@QBE_NXZ @ 2758 NONAME ; bool QDeclarativeGraphicsObjectContainer::synchronizedResizing(void) const + ?synchronizedResizing@QDeclarativeGraphicsObjectContainer@@QBE_NXZ @ 2758 NONAME ABSENT ; bool QDeclarativeGraphicsObjectContainer::synchronizedResizing(void) const ?tag@QMetaMethodBuilder@@QBE?AVQByteArray@@XZ @ 2759 NONAME ; class QByteArray QMetaMethodBuilder::tag(void) const ?target@QDeclarativeConnections@@QBEPAVQObject@@XZ @ 2760 NONAME ; class QObject * QDeclarativeConnections::target(void) const ?target@QDeclarativeDrag@@QBEPAVQDeclarativeItem@@XZ @ 2761 NONAME ABSENT ; class QDeclarativeItem * QDeclarativeDrag::target(void) const @@ -2892,8 +2892,8 @@ EXPORTS ?tr@QDeclarativeGradient@@SA?AVQString@@PBD0H@Z @ 2891 NONAME ; class QString QDeclarativeGradient::tr(char const *, char const *, int) ?tr@QDeclarativeGradientStop@@SA?AVQString@@PBD0@Z @ 2892 NONAME ; class QString QDeclarativeGradientStop::tr(char const *, char const *) ?tr@QDeclarativeGradientStop@@SA?AVQString@@PBD0H@Z @ 2893 NONAME ; class QString QDeclarativeGradientStop::tr(char const *, char const *, int) - ?tr@QDeclarativeGraphicsObjectContainer@@SA?AVQString@@PBD0@Z @ 2894 NONAME ; class QString QDeclarativeGraphicsObjectContainer::tr(char const *, char const *) - ?tr@QDeclarativeGraphicsObjectContainer@@SA?AVQString@@PBD0H@Z @ 2895 NONAME ; class QString QDeclarativeGraphicsObjectContainer::tr(char const *, char const *, int) + ?tr@QDeclarativeGraphicsObjectContainer@@SA?AVQString@@PBD0@Z @ 2894 NONAME ABSENT ; class QString QDeclarativeGraphicsObjectContainer::tr(char const *, char const *) + ?tr@QDeclarativeGraphicsObjectContainer@@SA?AVQString@@PBD0H@Z @ 2895 NONAME ABSENT ; class QString QDeclarativeGraphicsObjectContainer::tr(char const *, char const *, int) ?tr@QDeclarativeGrid@@SA?AVQString@@PBD0@Z @ 2896 NONAME ; class QString QDeclarativeGrid::tr(char const *, char const *) ?tr@QDeclarativeGrid@@SA?AVQString@@PBD0H@Z @ 2897 NONAME ; class QString QDeclarativeGrid::tr(char const *, char const *, int) ?tr@QDeclarativeGridView@@SA?AVQString@@PBD0@Z @ 2898 NONAME ; class QString QDeclarativeGridView::tr(char const *, char const *) @@ -3082,8 +3082,8 @@ EXPORTS ?trUtf8@QDeclarativeGradient@@SA?AVQString@@PBD0H@Z @ 3081 NONAME ; class QString QDeclarativeGradient::trUtf8(char const *, char const *, int) ?trUtf8@QDeclarativeGradientStop@@SA?AVQString@@PBD0@Z @ 3082 NONAME ; class QString QDeclarativeGradientStop::trUtf8(char const *, char const *) ?trUtf8@QDeclarativeGradientStop@@SA?AVQString@@PBD0H@Z @ 3083 NONAME ; class QString QDeclarativeGradientStop::trUtf8(char const *, char const *, int) - ?trUtf8@QDeclarativeGraphicsObjectContainer@@SA?AVQString@@PBD0@Z @ 3084 NONAME ; class QString QDeclarativeGraphicsObjectContainer::trUtf8(char const *, char const *) - ?trUtf8@QDeclarativeGraphicsObjectContainer@@SA?AVQString@@PBD0H@Z @ 3085 NONAME ; class QString QDeclarativeGraphicsObjectContainer::trUtf8(char const *, char const *, int) + ?trUtf8@QDeclarativeGraphicsObjectContainer@@SA?AVQString@@PBD0@Z @ 3084 NONAME ABSENT ; class QString QDeclarativeGraphicsObjectContainer::trUtf8(char const *, char const *) + ?trUtf8@QDeclarativeGraphicsObjectContainer@@SA?AVQString@@PBD0H@Z @ 3085 NONAME ABSENT ; class QString QDeclarativeGraphicsObjectContainer::trUtf8(char const *, char const *, int) ?trUtf8@QDeclarativeGrid@@SA?AVQString@@PBD0@Z @ 3086 NONAME ; class QString QDeclarativeGrid::trUtf8(char const *, char const *) ?trUtf8@QDeclarativeGrid@@SA?AVQString@@PBD0H@Z @ 3087 NONAME ; class QString QDeclarativeGrid::trUtf8(char const *, char const *, int) ?trUtf8@QDeclarativeGridView@@SA?AVQString@@PBD0@Z @ 3088 NONAME ; class QString QDeclarativeGridView::trUtf8(char const *, char const *) @@ -3309,8 +3309,8 @@ EXPORTS ?windowText@QDeclarativeSystemPalette@@QBE?AVQColor@@XZ @ 3308 NONAME ; class QColor QDeclarativeSystemPalette::windowText(void) const ?wrap@QDeclarativeText@@QBE_NXZ @ 3309 NONAME ; bool QDeclarativeText::wrap(void) const ?wrap@QDeclarativeTextEdit@@QBE_NXZ @ 3310 NONAME ; bool QDeclarativeTextEdit::wrap(void) const - ?wrapChanged@QDeclarativeText@@IAEX_N@Z @ 3311 NONAME ; void QDeclarativeText::wrapChanged(bool) - ?wrapChanged@QDeclarativeTextEdit@@IAEX_N@Z @ 3312 NONAME ; void QDeclarativeTextEdit::wrapChanged(bool) + ?wrapChanged@QDeclarativeText@@IAEX_N@Z @ 3311 NONAME ABSENT ; void QDeclarativeText::wrapChanged(bool) + ?wrapChanged@QDeclarativeTextEdit@@IAEX_N@Z @ 3312 NONAME ABSENT ; void QDeclarativeTextEdit::wrapChanged(bool) ?write@QDeclarativeBehavior@@UAEXABVQVariant@@@Z @ 3313 NONAME ; void QDeclarativeBehavior::write(class QVariant const &) ?write@QDeclarativeProperty@@QBE_NABVQVariant@@@Z @ 3314 NONAME ; bool QDeclarativeProperty::write(class QVariant const &) const ?write@QDeclarativeProperty@@SA_NPAVQObject@@ABVQString@@ABVQVariant@@@Z @ 3315 NONAME ; bool QDeclarativeProperty::write(class QObject *, class QString const &, class QVariant const &) @@ -3320,7 +3320,7 @@ EXPORTS ?x@QDeclarativeParentChange@@QBEMXZ @ 3319 NONAME ; float QDeclarativeParentChange::x(void) const ?xAttractor@QDeclarativeParticleMotionGravity@@QBEMXZ @ 3320 NONAME ABSENT ; float QDeclarativeParticleMotionGravity::xAttractor(void) const ?xIsSet@QDeclarativeParentChange@@QBE_NXZ @ 3321 NONAME ; bool QDeclarativeParentChange::xIsSet(void) const - ?xToPos@QDeclarativeTextInput@@QAEHH@Z @ 3322 NONAME ; int QDeclarativeTextInput::xToPos(int) + ?xToPos@QDeclarativeTextInput@@QAEHH@Z @ 3322 NONAME ABSENT ; int QDeclarativeTextInput::xToPos(int) ?xVariance@QDeclarativeParticleMotionWander@@QBEMXZ @ 3323 NONAME ABSENT ; float QDeclarativeParticleMotionWander::xVariance(void) const ?xattractorChanged@QDeclarativeParticleMotionGravity@@IAEXXZ @ 3324 NONAME ABSENT ; void QDeclarativeParticleMotionGravity::xattractorChanged(void) ?xflick@QDeclarativeFlickable@@IBE_NXZ @ 3325 NONAME ; bool QDeclarativeFlickable::xflick(void) const @@ -3351,7 +3351,7 @@ EXPORTS ?staticMetaObject@QDeclarativeItem@@2UQMetaObject@@B @ 3350 NONAME ; struct QMetaObject const QDeclarativeItem::staticMetaObject ?staticMetaObject@QDeclarativeColumn@@2UQMetaObject@@B @ 3351 NONAME ; struct QMetaObject const QDeclarativeColumn::staticMetaObject ?staticMetaObject@QDeclarativeGradient@@2UQMetaObject@@B @ 3352 NONAME ; struct QMetaObject const QDeclarativeGradient::staticMetaObject - ?staticMetaObject@QDeclarativeGraphicsObjectContainer@@2UQMetaObject@@B @ 3353 NONAME ; struct QMetaObject const QDeclarativeGraphicsObjectContainer::staticMetaObject + ?staticMetaObject@QDeclarativeGraphicsObjectContainer@@2UQMetaObject@@B @ 3353 NONAME ABSENT ; struct QMetaObject const QDeclarativeGraphicsObjectContainer::staticMetaObject ?staticMetaObject@QDeclarativeDebugWatch@@2UQMetaObject@@B @ 3354 NONAME ; struct QMetaObject const QDeclarativeDebugWatch::staticMetaObject ?staticMetaObject@QDeclarativeStateGroup@@2UQMetaObject@@B @ 3355 NONAME ; struct QMetaObject const QDeclarativeStateGroup::staticMetaObject ?staticMetaObject@QPacketProtocol@@2UQMetaObject@@B @ 3356 NONAME ; struct QMetaObject const QPacketProtocol::staticMetaObject @@ -3749,7 +3749,7 @@ EXPORTS ?setSize@QDeclarativeItem@@QAEXABVQSizeF@@@Z @ 3748 NONAME ; void QDeclarativeItem::setSize(class QSizeF const &) ?setSnapMode@QDeclarativeGridView@@QAEXW4SnapMode@1@@Z @ 3749 NONAME ; void QDeclarativeGridView::setSnapMode(enum QDeclarativeGridView::SnapMode) ?setSource@QDeclarativeWorkerScript@@QAEXABVQUrl@@@Z @ 3750 NONAME ; void QDeclarativeWorkerScript::setSource(class QUrl const &) - ?setSourceSize@QDeclarativeImageBase@@QAEXABVQSize@@@Z @ 3751 NONAME ; void QDeclarativeImageBase::setSourceSize(class QSize const &) + ?setSourceSize@QDeclarativeImageBase@@QAEXABVQSize@@@Z @ 3751 NONAME ABSENT ; void QDeclarativeImageBase::setSourceSize(class QSize const &) ?setTarget@QDeclarativeDrag@@QAEXPAVQGraphicsObject@@@Z @ 3752 NONAME ; void QDeclarativeDrag::setTarget(class QGraphicsObject *) ?setTop@QDeclarativeAnchors@@QAEXABUQDeclarativeAnchorLine@@@Z @ 3753 NONAME ; void QDeclarativeAnchors::setTop(struct QDeclarativeAnchorLine const &) ?setVelocity@QDeclarativeSmoothedAnimation@@QAEXM@Z @ 3754 NONAME ; void QDeclarativeSmoothedAnimation::setVelocity(float) @@ -3818,4 +3818,79 @@ EXPORTS ?staticMetaObject@QDeclarativeSmoothedAnimation@@2UQMetaObject@@B @ 3817 NONAME ; struct QMetaObject const QDeclarativeSmoothedAnimation::staticMetaObject ?staticMetaObject@QDeclarativeTranslate@@2UQMetaObject@@B @ 3818 NONAME ; struct QMetaObject const QDeclarativeTranslate::staticMetaObject ?consistentTime@QDeclarativeItemPrivate@@2HA @ 3819 NONAME ; int QDeclarativeItemPrivate::consistentTime + ??0QDeclarativeAction@@QAE@PAVQObject@@ABVQString@@PAVQDeclarativeContext@@ABVQVariant@@@Z @ 3820 NONAME ; QDeclarativeAction::QDeclarativeAction(class QObject *, class QString const &, class QDeclarativeContext *, class QVariant const &) + ??0QDeclarativeSmoothedFollow@@QAE@PAVQObject@@@Z @ 3821 NONAME ; QDeclarativeSmoothedFollow::QDeclarativeSmoothedFollow(class QObject *) + ??1QDeclarativeSmoothedFollow@@UAE@XZ @ 3822 NONAME ; QDeclarativeSmoothedFollow::~QDeclarativeSmoothedFollow(void) + ??_EQDeclarativeSmoothedFollow@@UAE@I@Z @ 3823 NONAME ; QDeclarativeSmoothedFollow::~QDeclarativeSmoothedFollow(unsigned int) + ?addPluginPath@QDeclarativeEngine@@QAEXABVQString@@@Z @ 3824 NONAME ; void QDeclarativeEngine::addPluginPath(class QString const &) + ?autoScroll@QDeclarativeTextInput@@QBE_NXZ @ 3825 NONAME ; bool QDeclarativeTextInput::autoScroll(void) const + ?autoScrollChanged@QDeclarativeTextInput@@IAEX_N@Z @ 3826 NONAME ; void QDeclarativeTextInput::autoScrollChanged(bool) + ?createFunction@QDeclarativeType@@QBEP6AXPAX@ZXZ @ 3827 NONAME ; void (*)(void *) QDeclarativeType::createFunction(void) const + ?createSize@QDeclarativeType@@QBEHXZ @ 3828 NONAME ; int QDeclarativeType::createSize(void) const + ?d_func@QDeclarativeSmoothedFollow@@AAEPAVQDeclarativeSmoothedFollowPrivate@@XZ @ 3829 NONAME ; class QDeclarativeSmoothedFollowPrivate * QDeclarativeSmoothedFollow::d_func(void) + ?d_func@QDeclarativeSmoothedFollow@@ABEPBVQDeclarativeSmoothedFollowPrivate@@XZ @ 3830 NONAME ; class QDeclarativeSmoothedFollowPrivate const * QDeclarativeSmoothedFollow::d_func(void) const + ?displayText@QDeclarativeTextInput@@QBE?AVQString@@XZ @ 3831 NONAME ; class QString QDeclarativeTextInput::displayText(void) const + ?displayTextChanged@QDeclarativeTextInput@@IAEXABVQString@@@Z @ 3832 NONAME ; void QDeclarativeTextInput::displayTextChanged(class QString const &) + ?duration@QDeclarativeSmoothedFollow@@QBEHXZ @ 3833 NONAME ; int QDeclarativeSmoothedFollow::duration(void) const + ?durationChanged@QDeclarativeSmoothedFollow@@IAEXXZ @ 3834 NONAME ; void QDeclarativeSmoothedFollow::durationChanged(void) + ?enabled@QDeclarativeSmoothedFollow@@QBE_NXZ @ 3835 NONAME ; bool QDeclarativeSmoothedFollow::enabled(void) const + ?enabledChanged@QDeclarativeSmoothedFollow@@IAEXXZ @ 3836 NONAME ; void QDeclarativeSmoothedFollow::enabledChanged(void) + ?getStaticMetaObject@QDeclarativeSmoothedFollow@@SAABUQMetaObject@@XZ @ 3837 NONAME ; struct QMetaObject const & QDeclarativeSmoothedFollow::getStaticMetaObject(void) + ?highlightMoveDuration@QDeclarativeGridView@@QBEHXZ @ 3838 NONAME ; int QDeclarativeGridView::highlightMoveDuration(void) const + ?highlightMoveDuration@QDeclarativeListView@@QBEHXZ @ 3839 NONAME ; int QDeclarativeListView::highlightMoveDuration(void) const + ?highlightMoveDuration@QDeclarativePathView@@QBEHXZ @ 3840 NONAME ; int QDeclarativePathView::highlightMoveDuration(void) const + ?highlightMoveDurationChanged@QDeclarativeGridView@@IAEXXZ @ 3841 NONAME ; void QDeclarativeGridView::highlightMoveDurationChanged(void) + ?highlightMoveDurationChanged@QDeclarativeListView@@IAEXXZ @ 3842 NONAME ; void QDeclarativeListView::highlightMoveDurationChanged(void) + ?highlightMoveDurationChanged@QDeclarativePathView@@IAEXXZ @ 3843 NONAME ; void QDeclarativePathView::highlightMoveDurationChanged(void) + ?highlightResizeDuration@QDeclarativeListView@@QBEHXZ @ 3844 NONAME ; int QDeclarativeListView::highlightResizeDuration(void) const + ?highlightResizeDurationChanged@QDeclarativeListView@@IAEXXZ @ 3845 NONAME ; void QDeclarativeListView::highlightResizeDurationChanged(void) + ?importPlugin@QDeclarativeEngine@@QAE_NABVQString@@0@Z @ 3846 NONAME ; bool QDeclarativeEngine::importPlugin(class QString const &, class QString const &) + ?isExtendedType@QDeclarativeType@@QBE_NXZ @ 3847 NONAME ; bool QDeclarativeType::isExtendedType(void) const + ?maximumEasingTime@QDeclarativeSmoothedFollow@@QBEHXZ @ 3848 NONAME ; int QDeclarativeSmoothedFollow::maximumEasingTime(void) const + ?maximumEasingTimeChanged@QDeclarativeSmoothedFollow@@IAEXXZ @ 3849 NONAME ; void QDeclarativeSmoothedFollow::maximumEasingTimeChanged(void) + ?metaObject@QDeclarativeSmoothedFollow@@UBEPBUQMetaObject@@XZ @ 3850 NONAME ; struct QMetaObject const * QDeclarativeSmoothedFollow::metaObject(void) const + ?mouseMoveEvent@QDeclarativeTextInput@@MAEXPAVQGraphicsSceneMouseEvent@@@Z @ 3851 NONAME ; void QDeclarativeTextInput::mouseMoveEvent(class QGraphicsSceneMouseEvent *) + ?moveCursorSelection@QDeclarativeTextInput@@QAEXH@Z @ 3852 NONAME ; void QDeclarativeTextInput::moveCursorSelection(int) + ?passwordCharacter@QDeclarativeTextInput@@QBE?AVQString@@XZ @ 3853 NONAME ; class QString QDeclarativeTextInput::passwordCharacter(void) const + ?passwordCharacterChanged@QDeclarativeTextInput@@IAEXXZ @ 3854 NONAME ; void QDeclarativeTextInput::passwordCharacterChanged(void) + ?pluginPathList@QDeclarativeEngine@@QBE?AVQStringList@@XZ @ 3855 NONAME ; class QStringList QDeclarativeEngine::pluginPathList(void) const + ?qt_metacall@QDeclarativeSmoothedFollow@@UAEHW4Call@QMetaObject@@HPAPAX@Z @ 3856 NONAME ; int QDeclarativeSmoothedFollow::qt_metacall(enum QMetaObject::Call, int, void * *) + ?qt_metacast@QDeclarativeSmoothedFollow@@UAEPAXPBD@Z @ 3857 NONAME ; void * QDeclarativeSmoothedFollow::qt_metacast(char const *) + ?resetTarget@QDeclarativeDrag@@QAEXXZ @ 3858 NONAME ; void QDeclarativeDrag::resetTarget(void) + ?reversingMode@QDeclarativeSmoothedFollow@@QBE?AW4ReversingMode@1@XZ @ 3859 NONAME ; enum QDeclarativeSmoothedFollow::ReversingMode QDeclarativeSmoothedFollow::reversingMode(void) const + ?reversingModeChanged@QDeclarativeSmoothedFollow@@IAEXXZ @ 3860 NONAME ; void QDeclarativeSmoothedFollow::reversingModeChanged(void) + ?setAutoScroll@QDeclarativeTextInput@@QAEX_N@Z @ 3861 NONAME ; void QDeclarativeTextInput::setAutoScroll(bool) + ?setDuration@QDeclarativeSmoothedFollow@@QAEXH@Z @ 3862 NONAME ; void QDeclarativeSmoothedFollow::setDuration(int) + ?setEnabled@QDeclarativeSmoothedFollow@@QAEX_N@Z @ 3863 NONAME ; void QDeclarativeSmoothedFollow::setEnabled(bool) + ?setHighlightMoveDuration@QDeclarativeGridView@@QAEXH@Z @ 3864 NONAME ; void QDeclarativeGridView::setHighlightMoveDuration(int) + ?setHighlightMoveDuration@QDeclarativeListView@@QAEXH@Z @ 3865 NONAME ; void QDeclarativeListView::setHighlightMoveDuration(int) + ?setHighlightMoveDuration@QDeclarativePathView@@QAEXH@Z @ 3866 NONAME ; void QDeclarativePathView::setHighlightMoveDuration(int) + ?setHighlightResizeDuration@QDeclarativeListView@@QAEXH@Z @ 3867 NONAME ; void QDeclarativeListView::setHighlightResizeDuration(int) + ?setMaximumEasingTime@QDeclarativeSmoothedFollow@@QAEXH@Z @ 3868 NONAME ; void QDeclarativeSmoothedFollow::setMaximumEasingTime(int) + ?setPasswordCharacter@QDeclarativeTextInput@@QAEXABVQString@@@Z @ 3869 NONAME ; void QDeclarativeTextInput::setPasswordCharacter(class QString const &) + ?setPluginPathList@QDeclarativeEngine@@QAEXABVQStringList@@@Z @ 3870 NONAME ; void QDeclarativeEngine::setPluginPathList(class QStringList const &) + ?setReversingMode@QDeclarativeSmoothedFollow@@QAEXW4ReversingMode@1@@Z @ 3871 NONAME ; void QDeclarativeSmoothedFollow::setReversingMode(enum QDeclarativeSmoothedFollow::ReversingMode) + ?setSourceSize@QDeclarativeImageBase@@UAEXABVQSize@@@Z @ 3872 NONAME ; void QDeclarativeImageBase::setSourceSize(class QSize const &) + ?setTarget@QDeclarativeSmoothedFollow@@UAEXABVQDeclarativeProperty@@@Z @ 3873 NONAME ; void QDeclarativeSmoothedFollow::setTarget(class QDeclarativeProperty const &) + ?setTo@QDeclarativeSmoothedFollow@@QAEXM@Z @ 3874 NONAME ; void QDeclarativeSmoothedFollow::setTo(float) + ?setTo@QDeclarativeSpringFollow@@QAEXM@Z @ 3875 NONAME ; void QDeclarativeSpringFollow::setTo(float) + ?setVelocity@QDeclarativeSmoothedFollow@@QAEXM@Z @ 3876 NONAME ; void QDeclarativeSmoothedFollow::setVelocity(float) + ?setWrapMode@QDeclarativeText@@QAEXW4WrapMode@1@@Z @ 3877 NONAME ; void QDeclarativeText::setWrapMode(enum QDeclarativeText::WrapMode) + ?setWrapMode@QDeclarativeTextEdit@@QAEXW4WrapMode@1@@Z @ 3878 NONAME ; void QDeclarativeTextEdit::setWrapMode(enum QDeclarativeTextEdit::WrapMode) + ?sourceSizeChanged@QDeclarativeAnimatedImage@@IAEXXZ @ 3879 NONAME ; void QDeclarativeAnimatedImage::sourceSizeChanged(void) + ?to@QDeclarativeSmoothedFollow@@QBEMXZ @ 3880 NONAME ; float QDeclarativeSmoothedFollow::to(void) const + ?to@QDeclarativeSpringFollow@@QBEMXZ @ 3881 NONAME ; float QDeclarativeSpringFollow::to(void) const + ?tr@QDeclarativeCompiler@@AAE?AVQString@@PBD@Z @ 3882 NONAME ; class QString QDeclarativeCompiler::tr(char const *) + ?tr@QDeclarativeSmoothedFollow@@SA?AVQString@@PBD0@Z @ 3883 NONAME ; class QString QDeclarativeSmoothedFollow::tr(char const *, char const *) + ?tr@QDeclarativeSmoothedFollow@@SA?AVQString@@PBD0H@Z @ 3884 NONAME ; class QString QDeclarativeSmoothedFollow::tr(char const *, char const *, int) + ?trUtf8@QDeclarativeSmoothedFollow@@SA?AVQString@@PBD0@Z @ 3885 NONAME ; class QString QDeclarativeSmoothedFollow::trUtf8(char const *, char const *) + ?trUtf8@QDeclarativeSmoothedFollow@@SA?AVQString@@PBD0H@Z @ 3886 NONAME ; class QString QDeclarativeSmoothedFollow::trUtf8(char const *, char const *, int) + ?velocity@QDeclarativeSmoothedFollow@@QBEMXZ @ 3887 NONAME ; float QDeclarativeSmoothedFollow::velocity(void) const + ?velocityChanged@QDeclarativeSmoothedFollow@@IAEXXZ @ 3888 NONAME ; void QDeclarativeSmoothedFollow::velocityChanged(void) + ?wrapMode@QDeclarativeText@@QBE?AW4WrapMode@1@XZ @ 3889 NONAME ; enum QDeclarativeText::WrapMode QDeclarativeText::wrapMode(void) const + ?wrapMode@QDeclarativeTextEdit@@QBE?AW4WrapMode@1@XZ @ 3890 NONAME ; enum QDeclarativeTextEdit::WrapMode QDeclarativeTextEdit::wrapMode(void) const + ?wrapModeChanged@QDeclarativeText@@IAEXXZ @ 3891 NONAME ; void QDeclarativeText::wrapModeChanged(void) + ?wrapModeChanged@QDeclarativeTextEdit@@IAEXXZ @ 3892 NONAME ; void QDeclarativeTextEdit::wrapModeChanged(void) + ?xToPosition@QDeclarativeTextInput@@QAEHH@Z @ 3893 NONAME ; int QDeclarativeTextInput::xToPosition(int) + ?staticMetaObject@QDeclarativeSmoothedFollow@@2UQMetaObject@@B @ 3894 NONAME ; struct QMetaObject const QDeclarativeSmoothedFollow::staticMetaObject diff --git a/src/s60installs/bwins/QtGuiu.def b/src/s60installs/bwins/QtGuiu.def index 1c33477..c34690e 100644 --- a/src/s60installs/bwins/QtGuiu.def +++ b/src/s60installs/bwins/QtGuiu.def @@ -12724,7 +12724,7 @@ EXPORTS ?visibilityChanged@QToolBar@@IAEX_N@Z @ 12723 NONAME ; void QToolBar::visibilityChanged(bool) ??0FileInfo@QZipReader@@QAE@ABU01@@Z @ 12724 NONAME ; QZipReader::FileInfo::FileInfo(struct QZipReader::FileInfo const &) ??0QStaticText@@QAE@ABVQString@@@Z @ 12725 NONAME ; QStaticText::QStaticText(class QString const &) - ?append@QGraphicsItemPrivate@@SAXPAV?$QDeclarativeListProperty@VQGraphicsObject@@@@PAVQGraphicsObject@@@Z @ 12726 NONAME ; void QGraphicsItemPrivate::append(class QDeclarativeListProperty *, class QGraphicsObject *) + ?append@QGraphicsItemPrivate@@SAXPAV?$QDeclarativeListProperty@VQGraphicsObject@@@@PAVQGraphicsObject@@@Z @ 12726 NONAME ABSENT ; void QGraphicsItemPrivate::append(class QDeclarativeListProperty *, class QGraphicsObject *) ?bitPlaneCount@QImage@@QBEHXZ @ 12727 NONAME ; int QImage::bitPlaneCount(void) const ?childrenChanged@QGraphicsObject@@IAEXXZ @ 12728 NONAME ; void QGraphicsObject::childrenChanged(void) ?childrenList@QGraphicsItemPrivate@@QAE?AV?$QDeclarativeListProperty@VQGraphicsObject@@@@XZ @ 12729 NONAME ; class QDeclarativeListProperty QGraphicsItemPrivate::childrenList(void) @@ -12767,4 +12767,7 @@ EXPORTS ?updateMicroFocus@QGraphicsObject@@IAEXXZ @ 12766 NONAME ; void QGraphicsObject::updateMicroFocus(void) ?width@QGraphicsItemPrivate@@UBEMXZ @ 12767 NONAME ; float QGraphicsItemPrivate::width(void) const ?widthChanged@QGraphicsObject@@IAEXXZ @ 12768 NONAME ; void QGraphicsObject::widthChanged(void) + ?children_append@QGraphicsItemPrivate@@SAXPAV?$QDeclarativeListProperty@VQGraphicsObject@@@@PAVQGraphicsObject@@@Z @ 12769 NONAME ; void QGraphicsItemPrivate::children_append(class QDeclarativeListProperty *, class QGraphicsObject *) + ?children_at@QGraphicsItemPrivate@@SAPAVQGraphicsObject@@PAV?$QDeclarativeListProperty@VQGraphicsObject@@@@H@Z @ 12770 NONAME ; class QGraphicsObject * QGraphicsItemPrivate::children_at(class QDeclarativeListProperty *, int) + ?children_count@QGraphicsItemPrivate@@SAHPAV?$QDeclarativeListProperty@VQGraphicsObject@@@@@Z @ 12771 NONAME ; int QGraphicsItemPrivate::children_count(class QDeclarativeListProperty *) diff --git a/src/s60installs/bwins/QtMultimediau.def b/src/s60installs/bwins/QtMultimediau.def index 6c98fdf..ad33993 100644 --- a/src/s60installs/bwins/QtMultimediau.def +++ b/src/s60installs/bwins/QtMultimediau.def @@ -946,4 +946,6 @@ EXPORTS ?volume@QSoundEffect@@QBEHXZ @ 945 NONAME ; int QSoundEffect::volume(void) const ?volumeChanged@QSoundEffect@@IAEXXZ @ 946 NONAME ; void QSoundEffect::volumeChanged(void) ?staticMetaObject@QSoundEffect@@2UQMetaObject@@B @ 947 NONAME ; struct QMetaObject const QSoundEffect::staticMetaObject + ?event@QGraphicsVideoItem@@MAE_NPAVQEvent@@@Z @ 948 NONAME ; bool QGraphicsVideoItem::event(class QEvent *) + ?sceneEvent@QGraphicsVideoItem@@MAE_NPAVQEvent@@@Z @ 949 NONAME ; bool QGraphicsVideoItem::sceneEvent(class QEvent *) diff --git a/src/s60installs/eabi/QtCoreu.def b/src/s60installs/eabi/QtCoreu.def index 79fd0ce..e54e03f 100644 --- a/src/s60installs/eabi/QtCoreu.def +++ b/src/s60installs/eabi/QtCoreu.def @@ -803,9 +803,9 @@ EXPORTS _ZN16QCoreApplicationD0Ev @ 802 NONAME _ZN16QCoreApplicationD1Ev @ 803 NONAME _ZN16QCoreApplicationD2Ev @ 804 NONAME - _ZN16QDeclarativeDataD0Ev @ 805 NONAME - _ZN16QDeclarativeDataD1Ev @ 806 NONAME - _ZN16QDeclarativeDataD2Ev @ 807 NONAME + _ZN16QDeclarativeDataD0Ev @ 805 NONAME ABSENT + _ZN16QDeclarativeDataD1Ev @ 806 NONAME ABSENT + _ZN16QDeclarativeDataD2Ev @ 807 NONAME ABSENT _ZN16QEventTransition11qt_metacallEN11QMetaObject4CallEiPPv @ 808 NONAME _ZN16QEventTransition11qt_metacastEPKc @ 809 NONAME _ZN16QEventTransition12onTransitionEP6QEvent @ 810 NONAME @@ -3332,7 +3332,7 @@ EXPORTS _ZTI15QPauseAnimation @ 3331 NONAME _ZTI15QSocketNotifier @ 3332 NONAME _ZTI16QCoreApplication @ 3333 NONAME - _ZTI16QDeclarativeData @ 3334 NONAME + _ZTI16QDeclarativeData @ 3334 NONAME ABSENT _ZTI16QEventTransition @ 3335 NONAME _ZTI16QIODevicePrivate @ 3336 NONAME _ZTI16QTextCodecPlugin @ 3337 NONAME @@ -3407,7 +3407,7 @@ EXPORTS _ZTV15QPauseAnimation @ 3406 NONAME _ZTV15QSocketNotifier @ 3407 NONAME _ZTV16QCoreApplication @ 3408 NONAME - _ZTV16QDeclarativeData @ 3409 NONAME + _ZTV16QDeclarativeData @ 3409 NONAME ABSENT _ZTV16QEventTransition @ 3410 NONAME _ZTV16QIODevicePrivate @ 3411 NONAME _ZTV16QTextCodecPlugin @ 3412 NONAME @@ -3692,4 +3692,7 @@ EXPORTS _ZN9QDateTime18setMSecsSinceEpochEx @ 3691 NONAME _ZN9QDateTime19fromMSecsSinceEpochEx @ 3692 NONAME _ZNK9QDateTime17toMSecsSinceEpochEv @ 3693 NONAME + _ZN10QTextCodec11validCodecsEv @ 3694 NONAME + _ZN16QDeclarativeData13parentChangedE @ 3695 NONAME DATA 4 + _ZN16QDeclarativeData9destroyedE @ 3696 NONAME DATA 4 diff --git a/src/s60installs/eabi/QtDeclarativeu.def b/src/s60installs/eabi/QtDeclarativeu.def index 17a57d0..0f0e886 100644 --- a/src/s60installs/eabi/QtDeclarativeu.def +++ b/src/s60installs/eabi/QtDeclarativeu.def @@ -179,7 +179,7 @@ EXPORTS _ZN16QDeclarativeText11qt_metacallEN11QMetaObject4CallEiPPv @ 178 NONAME _ZN16QDeclarativeText11qt_metacastEPKc @ 179 NONAME _ZN16QDeclarativeText11textChangedERK7QString @ 180 NONAME - _ZN16QDeclarativeText11wrapChangedEb @ 181 NONAME + _ZN16QDeclarativeText11wrapChangedEb @ 181 NONAME ABSENT _ZN16QDeclarativeText12colorChangedERK6QColor @ 182 NONAME _ZN16QDeclarativeText12setElideModeENS_13TextElideModeE @ 183 NONAME _ZN16QDeclarativeText12styleChangedENS_9TextStyleE @ 184 NONAME @@ -337,7 +337,7 @@ EXPORTS _ZN18QDeclarativeEngine11qt_metacastEPKc @ 336 NONAME _ZN18QDeclarativeEngine11rootContextEv @ 337 NONAME _ZN18QDeclarativeEngine13addImportPathERK7QString @ 338 NONAME - _ZN18QDeclarativeEngine15importExtensionERK7QStringS2_ @ 339 NONAME + _ZN18QDeclarativeEngine15importExtensionERK7QStringS2_ @ 339 NONAME ABSENT _ZN18QDeclarativeEngine15objectOwnershipEP7QObject @ 340 NONAME _ZN18QDeclarativeEngine16addImageProviderERK7QStringP25QDeclarativeImageProvider @ 341 NONAME _ZN18QDeclarativeEngine16contextForObjectEPK7QObject @ 342 NONAME @@ -897,7 +897,7 @@ EXPORTS _ZN20QDeclarativeTextEdit11qt_metacastEPKc @ 896 NONAME _ZN20QDeclarativeTextEdit11setReadOnlyEb @ 897 NONAME _ZN20QDeclarativeTextEdit11textChangedERK7QString @ 898 NONAME - _ZN20QDeclarativeTextEdit11wrapChangedEb @ 899 NONAME + _ZN20QDeclarativeTextEdit11wrapChangedEb @ 899 NONAME ABSENT _ZN20QDeclarativeTextEdit12colorChangedERK6QColor @ 900 NONAME _ZN20QDeclarativeTextEdit12drawContentsEP8QPainterRK5QRect @ 901 NONAME _ZN20QDeclarativeTextEdit13keyPressEventEP9QKeyEvent @ 902 NONAME @@ -1234,7 +1234,7 @@ EXPORTS _ZN21QDeclarativeTextInput24selectedTextColorChangedERK6QColor @ 1233 NONAME _ZN21QDeclarativeTextInput26horizontalAlignmentChangedENS_10HAlignmentE @ 1234 NONAME _ZN21QDeclarativeTextInput5eventEP6QEvent @ 1235 NONAME - _ZN21QDeclarativeTextInput6xToPosEi @ 1236 NONAME + _ZN21QDeclarativeTextInput6xToPosEi @ 1236 NONAME ABSENT _ZN21QDeclarativeTextInput7setFontERK5QFont @ 1237 NONAME _ZN21QDeclarativeTextInput7setTextERK7QString @ 1238 NONAME _ZN21QDeclarativeTextInput8acceptedEv @ 1239 NONAME @@ -1652,7 +1652,7 @@ EXPORTS _ZN24QDeclarativeSpringFollow11syncChangedEv @ 1651 NONAME _ZN24QDeclarativeSpringFollow12valueChangedEf @ 1652 NONAME _ZN24QDeclarativeSpringFollow14modulusChangedEv @ 1653 NONAME - _ZN24QDeclarativeSpringFollow14setSourceValueEf @ 1654 NONAME + _ZN24QDeclarativeSpringFollow14setSourceValueEf @ 1654 NONAME ABSENT _ZN24QDeclarativeSpringFollow16staticMetaObjectE @ 1655 NONAME DATA 16 _ZN24QDeclarativeSpringFollow19getStaticMetaObjectEv @ 1656 NONAME _ZN24QDeclarativeSpringFollow7setMassEf @ 1657 NONAME @@ -2130,19 +2130,19 @@ EXPORTS _ZN34QDeclarativeDebugPropertyReferenceC2ERKS_ @ 2129 NONAME _ZN34QDeclarativeDebugPropertyReferenceC2Ev @ 2130 NONAME _ZN34QDeclarativeDebugPropertyReferenceaSERKS_ @ 2131 NONAME - _ZN35QDeclarativeGraphicsObjectContainer10itemChangeEN13QGraphicsItem18GraphicsItemChangeERK8QVariant @ 2132 NONAME - _ZN35QDeclarativeGraphicsObjectContainer11eventFilterEP7QObjectP6QEvent @ 2133 NONAME - _ZN35QDeclarativeGraphicsObjectContainer11qt_metacallEN11QMetaObject4CallEiPPv @ 2134 NONAME - _ZN35QDeclarativeGraphicsObjectContainer11qt_metacastEPKc @ 2135 NONAME - _ZN35QDeclarativeGraphicsObjectContainer16staticMetaObjectE @ 2136 NONAME DATA 16 - _ZN35QDeclarativeGraphicsObjectContainer17setGraphicsObjectEP15QGraphicsObject @ 2137 NONAME - _ZN35QDeclarativeGraphicsObjectContainer19getStaticMetaObjectEv @ 2138 NONAME - _ZN35QDeclarativeGraphicsObjectContainer23setSynchronizedResizingEb @ 2139 NONAME - _ZN35QDeclarativeGraphicsObjectContainerC1EP16QDeclarativeItem @ 2140 NONAME - _ZN35QDeclarativeGraphicsObjectContainerC2EP16QDeclarativeItem @ 2141 NONAME - _ZN35QDeclarativeGraphicsObjectContainerD0Ev @ 2142 NONAME - _ZN35QDeclarativeGraphicsObjectContainerD1Ev @ 2143 NONAME - _ZN35QDeclarativeGraphicsObjectContainerD2Ev @ 2144 NONAME + _ZN35QDeclarativeGraphicsObjectContainer10itemChangeEN13QGraphicsItem18GraphicsItemChangeERK8QVariant @ 2132 NONAME ABSENT + _ZN35QDeclarativeGraphicsObjectContainer11eventFilterEP7QObjectP6QEvent @ 2133 NONAME ABSENT + _ZN35QDeclarativeGraphicsObjectContainer11qt_metacallEN11QMetaObject4CallEiPPv @ 2134 NONAME ABSENT + _ZN35QDeclarativeGraphicsObjectContainer11qt_metacastEPKc @ 2135 NONAME ABSENT + _ZN35QDeclarativeGraphicsObjectContainer16staticMetaObjectE @ 2136 NONAME DATA 16 ABSENT + _ZN35QDeclarativeGraphicsObjectContainer17setGraphicsObjectEP15QGraphicsObject @ 2137 NONAME ABSENT + _ZN35QDeclarativeGraphicsObjectContainer19getStaticMetaObjectEv @ 2138 NONAME ABSENT + _ZN35QDeclarativeGraphicsObjectContainer23setSynchronizedResizingEb @ 2139 NONAME ABSENT + _ZN35QDeclarativeGraphicsObjectContainerC1EP16QDeclarativeItem @ 2140 NONAME ABSENT + _ZN35QDeclarativeGraphicsObjectContainerC2EP16QDeclarativeItem @ 2141 NONAME ABSENT + _ZN35QDeclarativeGraphicsObjectContainerD0Ev @ 2142 NONAME ABSENT + _ZN35QDeclarativeGraphicsObjectContainerD1Ev @ 2143 NONAME ABSENT + _ZN35QDeclarativeGraphicsObjectContainerD2Ev @ 2144 NONAME ABSENT _ZN36QDeclarativeDomValueValueInterceptorC1ERKS_ @ 2145 NONAME _ZN36QDeclarativeDomValueValueInterceptorC1Ev @ 2146 NONAME _ZN36QDeclarativeDomValueValueInterceptorC2ERKS_ @ 2147 NONAME @@ -2765,7 +2765,7 @@ EXPORTS _ZNK24QDeclarativeScriptString6scriptEv @ 2764 NONAME _ZNK24QDeclarativeScriptString7contextEv @ 2765 NONAME _ZNK24QDeclarativeSpringFollow10metaObjectEv @ 2766 NONAME - _ZNK24QDeclarativeSpringFollow11sourceValueEv @ 2767 NONAME + _ZNK24QDeclarativeSpringFollow11sourceValueEv @ 2767 NONAME ABSENT _ZNK24QDeclarativeSpringFollow4massEv @ 2768 NONAME _ZNK24QDeclarativeSpringFollow5valueEv @ 2769 NONAME _ZNK24QDeclarativeSpringFollow6inSyncEv @ 2770 NONAME @@ -2933,9 +2933,9 @@ EXPORTS _ZNK34QDeclarativeDebugPropertyReference4nameEv @ 2932 NONAME _ZNK34QDeclarativeDebugPropertyReference5valueEv @ 2933 NONAME _ZNK34QDeclarativeDebugPropertyReference7bindingEv @ 2934 NONAME - _ZNK35QDeclarativeGraphicsObjectContainer10metaObjectEv @ 2935 NONAME - _ZNK35QDeclarativeGraphicsObjectContainer14graphicsObjectEv @ 2936 NONAME - _ZNK35QDeclarativeGraphicsObjectContainer20synchronizedResizingEv @ 2937 NONAME + _ZNK35QDeclarativeGraphicsObjectContainer10metaObjectEv @ 2935 NONAME ABSENT + _ZNK35QDeclarativeGraphicsObjectContainer14graphicsObjectEv @ 2936 NONAME ABSENT + _ZNK35QDeclarativeGraphicsObjectContainer20synchronizedResizingEv @ 2937 NONAME ABSENT _ZNK36QDeclarativeDomValueValueInterceptor6objectEv @ 2938 NONAME _ZNK38QDeclarativeDebugObjectExpressionWatch10expressionEv @ 2939 NONAME _ZNK38QDeclarativeDebugObjectExpressionWatch10metaObjectEv @ 2940 NONAME @@ -3039,7 +3039,7 @@ EXPORTS _ZTI31QDeclarativePropertyValueSource @ 3038 NONAME _ZTI32QDeclarativeDebugExpressionQuery @ 3039 NONAME _ZTI33QDeclarativeDebugRootContextQuery @ 3040 NONAME - _ZTI35QDeclarativeGraphicsObjectContainer @ 3041 NONAME + _ZTI35QDeclarativeGraphicsObjectContainer @ 3041 NONAME ABSENT _ZTI36QDeclarativePropertyValueInterceptor @ 3042 NONAME _ZTI38QDeclarativeDebugObjectExpressionWatch @ 3043 NONAME _ZTI39QDeclarativeNetworkAccessManagerFactory @ 3044 NONAME @@ -3142,7 +3142,7 @@ EXPORTS _ZTV31QDeclarativePropertyValueSource @ 3141 NONAME _ZTV32QDeclarativeDebugExpressionQuery @ 3142 NONAME _ZTV33QDeclarativeDebugRootContextQuery @ 3143 NONAME - _ZTV35QDeclarativeGraphicsObjectContainer @ 3144 NONAME + _ZTV35QDeclarativeGraphicsObjectContainer @ 3144 NONAME ABSENT _ZTV36QDeclarativePropertyValueInterceptor @ 3145 NONAME _ZTV38QDeclarativeDebugObjectExpressionWatch @ 3146 NONAME _ZTV39QDeclarativeNetworkAccessManagerFactory @ 3147 NONAME @@ -3198,8 +3198,8 @@ EXPORTS _ZThn16_N26QDeclarativeBasePositioner17componentCompleteEv @ 3197 NONAME _ZThn16_N26QDeclarativeBasePositionerD0Ev @ 3198 NONAME _ZThn16_N26QDeclarativeBasePositionerD1Ev @ 3199 NONAME - _ZThn16_N35QDeclarativeGraphicsObjectContainerD0Ev @ 3200 NONAME - _ZThn16_N35QDeclarativeGraphicsObjectContainerD1Ev @ 3201 NONAME + _ZThn16_N35QDeclarativeGraphicsObjectContainerD0Ev @ 3200 NONAME ABSENT + _ZThn16_N35QDeclarativeGraphicsObjectContainerD1Ev @ 3201 NONAME ABSENT _ZThn8_N16QDeclarativeBind17componentCompleteEv @ 3202 NONAME _ZThn8_N16QDeclarativeBindD0Ev @ 3203 NONAME _ZThn8_N16QDeclarativeBindD1Ev @ 3204 NONAME @@ -3351,9 +3351,9 @@ EXPORTS _ZThn8_N29QDeclarativeStateChangeScript7executeEv @ 3350 NONAME _ZThn8_N29QDeclarativeStateChangeScriptD0Ev @ 3351 NONAME _ZThn8_N29QDeclarativeStateChangeScriptD1Ev @ 3352 NONAME - _ZThn8_N35QDeclarativeGraphicsObjectContainer10itemChangeEN13QGraphicsItem18GraphicsItemChangeERK8QVariant @ 3353 NONAME - _ZThn8_N35QDeclarativeGraphicsObjectContainerD0Ev @ 3354 NONAME - _ZThn8_N35QDeclarativeGraphicsObjectContainerD1Ev @ 3355 NONAME + _ZThn8_N35QDeclarativeGraphicsObjectContainer10itemChangeEN13QGraphicsItem18GraphicsItemChangeERK8QVariant @ 3353 NONAME ABSENT + _ZThn8_N35QDeclarativeGraphicsObjectContainerD0Ev @ 3354 NONAME ABSENT + _ZThn8_N35QDeclarativeGraphicsObjectContainerD1Ev @ 3355 NONAME ABSENT _ZThn8_NK16QDeclarativeItem12boundingRectEv @ 3356 NONAME _ZThn8_NK16QDeclarativeItem16inputMethodQueryEN2Qt16InputMethodQueryE @ 3357 NONAME _ZThn8_NK19QDeclarativeBinding10expressionEv @ 3358 NONAME @@ -3394,4 +3394,81 @@ EXPORTS _ZNK18QDeclarativeParser7Variant8asScriptEv @ 3393 NONAME _ZNK18QDeclarativeParser7Variant8asStringEv @ 3394 NONAME _ZNK18QDeclarativeParser7Variant9asBooleanEv @ 3395 NONAME + _ZN16QDeclarativeDrag11resetTargetEv @ 3396 NONAME + _ZN16QDeclarativeText11setWrapModeENS_8WrapModeE @ 3397 NONAME + _ZN16QDeclarativeText15wrapModeChangedEv @ 3398 NONAME + _ZN18QDeclarativeActionC1EP7QObjectRK7QStringP19QDeclarativeContextRK8QVariant @ 3399 NONAME + _ZN18QDeclarativeActionC2EP7QObjectRK7QStringP19QDeclarativeContextRK8QVariant @ 3400 NONAME + _ZN18QDeclarativeEngine12importPluginERK7QStringS2_ @ 3401 NONAME + _ZN18QDeclarativeEngine13addPluginPathERK7QString @ 3402 NONAME + _ZN18QDeclarativeEngine17setPluginPathListERK11QStringList @ 3403 NONAME + _ZN20QDeclarativeCompiler2trEPKc @ 3404 NONAME + _ZN20QDeclarativeGridView24setHighlightMoveDurationEi @ 3405 NONAME + _ZN20QDeclarativeGridView28highlightMoveDurationChangedEv @ 3406 NONAME + _ZN20QDeclarativeListView24setHighlightMoveDurationEi @ 3407 NONAME + _ZN20QDeclarativeListView26setHighlightResizeDurationEi @ 3408 NONAME + _ZN20QDeclarativeListView28highlightMoveDurationChangedEv @ 3409 NONAME + _ZN20QDeclarativeListView30highlightResizeDurationChangedEv @ 3410 NONAME + _ZN20QDeclarativePathView24setHighlightMoveDurationEi @ 3411 NONAME + _ZN20QDeclarativePathView28highlightMoveDurationChangedEv @ 3412 NONAME + _ZN20QDeclarativeTextEdit11setWrapModeENS_8WrapModeE @ 3413 NONAME + _ZN20QDeclarativeTextEdit15wrapModeChangedEv @ 3414 NONAME + _ZN21QDeclarativeTextInput11xToPositionEi @ 3415 NONAME + _ZN21QDeclarativeTextInput13setAutoScrollEb @ 3416 NONAME + _ZN21QDeclarativeTextInput14mouseMoveEventEP24QGraphicsSceneMouseEvent @ 3417 NONAME + _ZN21QDeclarativeTextInput17autoScrollChangedEb @ 3418 NONAME + _ZN21QDeclarativeTextInput18displayTextChangedERK7QString @ 3419 NONAME + _ZN21QDeclarativeTextInput19moveCursorSelectionEi @ 3420 NONAME + _ZN21QDeclarativeTextInput20setPasswordCharacterERK7QString @ 3421 NONAME + _ZN21QDeclarativeTextInput24passwordCharacterChangedEv @ 3422 NONAME + _ZN24QDeclarativeSpringFollow5setToEf @ 3423 NONAME + _ZN25QDeclarativeAnimatedImage17sourceSizeChangedEv @ 3424 NONAME + _ZN26QDeclarativeSmoothedFollow10setEnabledEb @ 3425 NONAME + _ZN26QDeclarativeSmoothedFollow11qt_metacallEN11QMetaObject4CallEiPPv @ 3426 NONAME + _ZN26QDeclarativeSmoothedFollow11qt_metacastEPKc @ 3427 NONAME + _ZN26QDeclarativeSmoothedFollow11setDurationEi @ 3428 NONAME + _ZN26QDeclarativeSmoothedFollow11setVelocityEf @ 3429 NONAME + _ZN26QDeclarativeSmoothedFollow14enabledChangedEv @ 3430 NONAME + _ZN26QDeclarativeSmoothedFollow15durationChangedEv @ 3431 NONAME + _ZN26QDeclarativeSmoothedFollow15velocityChangedEv @ 3432 NONAME + _ZN26QDeclarativeSmoothedFollow16setReversingModeENS_13ReversingModeE @ 3433 NONAME + _ZN26QDeclarativeSmoothedFollow16staticMetaObjectE @ 3434 NONAME DATA 16 + _ZN26QDeclarativeSmoothedFollow19getStaticMetaObjectEv @ 3435 NONAME + _ZN26QDeclarativeSmoothedFollow20reversingModeChangedEv @ 3436 NONAME + _ZN26QDeclarativeSmoothedFollow20setMaximumEasingTimeEi @ 3437 NONAME + _ZN26QDeclarativeSmoothedFollow24maximumEasingTimeChangedEv @ 3438 NONAME + _ZN26QDeclarativeSmoothedFollow5setToEf @ 3439 NONAME + _ZN26QDeclarativeSmoothedFollow9setTargetERK20QDeclarativeProperty @ 3440 NONAME + _ZN26QDeclarativeSmoothedFollowC1EP7QObject @ 3441 NONAME + _ZN26QDeclarativeSmoothedFollowC2EP7QObject @ 3442 NONAME + _ZN26QDeclarativeSmoothedFollowD0Ev @ 3443 NONAME + _ZN26QDeclarativeSmoothedFollowD1Ev @ 3444 NONAME + _ZN26QDeclarativeSmoothedFollowD2Ev @ 3445 NONAME + _ZNK16QDeclarativeText8wrapModeEv @ 3446 NONAME + _ZNK16QDeclarativeType10createSizeEv @ 3447 NONAME + _ZNK16QDeclarativeType14createFunctionEv @ 3448 NONAME + _ZNK16QDeclarativeType14isExtendedTypeEv @ 3449 NONAME + _ZNK18QDeclarativeEngine14pluginPathListEv @ 3450 NONAME + _ZNK20QDeclarativeGridView21highlightMoveDurationEv @ 3451 NONAME + _ZNK20QDeclarativeListView21highlightMoveDurationEv @ 3452 NONAME + _ZNK20QDeclarativeListView23highlightResizeDurationEv @ 3453 NONAME + _ZNK20QDeclarativePathView21highlightMoveDurationEv @ 3454 NONAME + _ZNK20QDeclarativeTextEdit8wrapModeEv @ 3455 NONAME + _ZNK21QDeclarativeTextInput10autoScrollEv @ 3456 NONAME + _ZNK21QDeclarativeTextInput11displayTextEv @ 3457 NONAME + _ZNK21QDeclarativeTextInput17passwordCharacterEv @ 3458 NONAME + _ZNK24QDeclarativeSpringFollow2toEv @ 3459 NONAME + _ZNK26QDeclarativeSmoothedFollow10metaObjectEv @ 3460 NONAME + _ZNK26QDeclarativeSmoothedFollow13reversingModeEv @ 3461 NONAME + _ZNK26QDeclarativeSmoothedFollow17maximumEasingTimeEv @ 3462 NONAME + _ZNK26QDeclarativeSmoothedFollow2toEv @ 3463 NONAME + _ZNK26QDeclarativeSmoothedFollow7enabledEv @ 3464 NONAME + _ZNK26QDeclarativeSmoothedFollow8durationEv @ 3465 NONAME + _ZNK26QDeclarativeSmoothedFollow8velocityEv @ 3466 NONAME + _ZTI26QDeclarativeSmoothedFollow @ 3467 NONAME + _ZTV26QDeclarativeSmoothedFollow @ 3468 NONAME + _ZThn8_N21QDeclarativeTextInput14mouseMoveEventEP24QGraphicsSceneMouseEvent @ 3469 NONAME + _ZThn8_N26QDeclarativeSmoothedFollow9setTargetERK20QDeclarativeProperty @ 3470 NONAME + _ZThn8_N26QDeclarativeSmoothedFollowD0Ev @ 3471 NONAME + _ZThn8_N26QDeclarativeSmoothedFollowD1Ev @ 3472 NONAME diff --git a/src/s60installs/eabi/QtGuiu.def b/src/s60installs/eabi/QtGuiu.def index 59e63ea..353603e 100644 --- a/src/s60installs/eabi/QtGuiu.def +++ b/src/s60installs/eabi/QtGuiu.def @@ -11943,7 +11943,7 @@ EXPORTS _ZN20QGraphicsItemPrivate14setFocusHelperEN2Qt11FocusReasonEbb @ 11942 NONAME _ZN20QGraphicsItemPrivate16clearFocusHelperEb @ 11943 NONAME _ZN20QGraphicsItemPrivate24prependGraphicsTransformEP18QGraphicsTransform @ 11944 NONAME - _ZN20QGraphicsItemPrivate6appendEP24QDeclarativeListPropertyI15QGraphicsObjectEPS1_ @ 11945 NONAME + _ZN20QGraphicsItemPrivate6appendEP24QDeclarativeListPropertyI15QGraphicsObjectEPS1_ @ 11945 NONAME ABSENT _ZN20QGraphicsItemPrivate8setWidthEf @ 11946 NONAME _ZN20QGraphicsItemPrivate9setHeightEf @ 11947 NONAME _ZN7QWizard11pageRemovedEi @ 11948 NONAME @@ -11970,4 +11970,7 @@ EXPORTS _ZNK12QPaintBuffer15frameStartIndexEi @ 11969 NONAME _ZNK12QPaintBuffer15processCommandsEP8QPainterii @ 11970 NONAME _ZNK12QPaintBuffer18commandDescriptionEi @ 11971 NONAME + _ZN20QGraphicsItemPrivate11children_atEP24QDeclarativeListPropertyI15QGraphicsObjectEi @ 11972 NONAME + _ZN20QGraphicsItemPrivate14children_countEP24QDeclarativeListPropertyI15QGraphicsObjectE @ 11973 NONAME + _ZN20QGraphicsItemPrivate15children_appendEP24QDeclarativeListPropertyI15QGraphicsObjectEPS1_ @ 11974 NONAME diff --git a/src/s60installs/eabi/QtMultimediau.def b/src/s60installs/eabi/QtMultimediau.def index 384796d..64a6dc6 100644 --- a/src/s60installs/eabi/QtMultimediau.def +++ b/src/s60installs/eabi/QtMultimediau.def @@ -972,4 +972,7 @@ EXPORTS _ZNK12QSoundEffect7isMutedEv @ 971 NONAME _ZTI12QSoundEffect @ 972 NONAME _ZTV12QSoundEffect @ 973 NONAME + _ZN18QGraphicsVideoItem10sceneEventEP6QEvent @ 974 NONAME + _ZN18QGraphicsVideoItem5eventEP6QEvent @ 975 NONAME + _ZThn8_N18QGraphicsVideoItem10sceneEventEP6QEvent @ 976 NONAME -- cgit v0.12 From 1d267f33d179abbac753a72c2235e7fb07c4def7 Mon Sep 17 00:00:00 2001 From: Jason McDonald Date: Thu, 15 Apr 2010 20:31:07 +1000 Subject: Revert "Update Phonon ds9 backend to 4.4.0." This reverts commit 19a3fc3bd817628070e5637caf158b0be79eee82. The phonon backend in 4.4.0 is outdated. Qt has the most recent one. Conflicts: src/3rdparty/phonon/ds9/iodevicereader.cpp (cherry picked from commit 6253ced81bcd60c04803f1a52bc59a239022b9c4) Conflicts: src/3rdparty/phonon/ds9/mediaobject.cpp --- src/3rdparty/phonon/ds9/abstractvideorenderer.cpp | 4 +- src/3rdparty/phonon/ds9/backend.cpp | 14 +- src/3rdparty/phonon/ds9/backend.h | 4 + src/3rdparty/phonon/ds9/backendnode.cpp | 19 ++ src/3rdparty/phonon/ds9/ds9.desktop | 17 +- src/3rdparty/phonon/ds9/effect.cpp | 4 +- src/3rdparty/phonon/ds9/fakesource.cpp | 34 +--- src/3rdparty/phonon/ds9/iodevicereader.cpp | 94 +++------- src/3rdparty/phonon/ds9/iodevicereader.h | 1 - src/3rdparty/phonon/ds9/mediagraph.cpp | 38 ++-- src/3rdparty/phonon/ds9/mediaobject.cpp | 205 +++++++++------------ src/3rdparty/phonon/ds9/mediaobject.h | 8 +- src/3rdparty/phonon/ds9/qasyncreader.cpp | 72 +++----- src/3rdparty/phonon/ds9/qasyncreader.h | 6 +- src/3rdparty/phonon/ds9/qaudiocdreader.cpp | 54 ++---- src/3rdparty/phonon/ds9/qaudiocdreader.h | 2 +- src/3rdparty/phonon/ds9/qbasefilter.cpp | 33 ++-- src/3rdparty/phonon/ds9/qbasefilter.h | 4 +- src/3rdparty/phonon/ds9/qevr9.h | 143 ++++++++++++++ src/3rdparty/phonon/ds9/qmeminputpin.cpp | 113 ++++-------- src/3rdparty/phonon/ds9/qmeminputpin.h | 9 +- src/3rdparty/phonon/ds9/qpin.cpp | 73 +++----- src/3rdparty/phonon/ds9/qpin.h | 7 +- src/3rdparty/phonon/ds9/videorenderer_default.cpp | 153 +++++++++++++++ src/3rdparty/phonon/ds9/videorenderer_default.h | 55 ++++++ src/3rdparty/phonon/ds9/videorenderer_evr.cpp | 215 ++++++++++++++++++++++ src/3rdparty/phonon/ds9/videorenderer_evr.h | 56 ++++++ src/3rdparty/phonon/ds9/videorenderer_soft.cpp | 15 +- src/3rdparty/phonon/ds9/videorenderer_vmr9.cpp | 113 +----------- src/3rdparty/phonon/ds9/videorenderer_vmr9.h | 1 - src/3rdparty/phonon/ds9/videowidget.cpp | 50 ++++- src/3rdparty/phonon/ds9/volumeeffect.cpp | 5 +- src/3rdparty/phonon/ds9/volumeeffect.h | 2 +- src/plugins/phonon/ds9/ds9.pro | 2 + 34 files changed, 1001 insertions(+), 624 deletions(-) create mode 100644 src/3rdparty/phonon/ds9/qevr9.h create mode 100644 src/3rdparty/phonon/ds9/videorenderer_default.cpp create mode 100644 src/3rdparty/phonon/ds9/videorenderer_default.h create mode 100644 src/3rdparty/phonon/ds9/videorenderer_evr.cpp create mode 100644 src/3rdparty/phonon/ds9/videorenderer_evr.h diff --git a/src/3rdparty/phonon/ds9/abstractvideorenderer.cpp b/src/3rdparty/phonon/ds9/abstractvideorenderer.cpp index e932e70..a9d0694 100644 --- a/src/3rdparty/phonon/ds9/abstractvideorenderer.cpp +++ b/src/3rdparty/phonon/ds9/abstractvideorenderer.cpp @@ -99,8 +99,8 @@ namespace Phonon m_dstX = m_dstY = 0; if (ratio > 0) { - if (realWidth / realHeight > ratio && scaleMode == Phonon::VideoWidget::FitInView - || realWidth / realHeight < ratio && scaleMode == Phonon::VideoWidget::ScaleAndCrop) { + if ((realWidth / realHeight > ratio && scaleMode == Phonon::VideoWidget::FitInView) + || (realWidth / realHeight < ratio && scaleMode == Phonon::VideoWidget::ScaleAndCrop)) { //the height is correct, let's change the width m_dstWidth = qRound(realHeight * ratio); m_dstX = qRound((realWidth - realHeight * ratio) / 2.); diff --git a/src/3rdparty/phonon/ds9/backend.cpp b/src/3rdparty/phonon/ds9/backend.cpp index 2c56af7..fbc4bdc 100644 --- a/src/3rdparty/phonon/ds9/backend.cpp +++ b/src/3rdparty/phonon/ds9/backend.cpp @@ -41,6 +41,8 @@ namespace Phonon { namespace DS9 { + QMutex *Backend::directShowMutex = 0; + bool Backend::AudioMoniker::operator==(const AudioMoniker &other) { return other->IsEqual(*this) == S_OK; @@ -50,6 +52,8 @@ namespace Phonon Backend::Backend(QObject *parent, const QVariantList &) : QObject(parent) { + directShowMutex = &m_directShowMutex; + ::CoInitialize(0); //registering meta types @@ -62,6 +66,8 @@ namespace Phonon m_audioOutputs.clear(); m_audioEffects.clear(); ::CoUninitialize(); + + directShowMutex = 0; } QObject *Backend::createObject(BackendInterface::Class c, QObject *parent, const QList &args) @@ -131,6 +137,7 @@ namespace Phonon QList Backend::objectDescriptionIndexes(Phonon::ObjectDescriptionType type) const { + QMutexLocker locker(&m_directShowMutex); QList ret; switch(type) @@ -157,7 +164,7 @@ namespace Phonon while (S_OK == enumMon->Next(1, mon.pparam(), 0)) { LPOLESTR str = 0; mon->GetDisplayName(0,0,&str); - const QString name = QString::fromUtf16((unsigned short*)str); + const QString name = QString::fromWCharArray(str); ComPointer alloc; ::CoGetMalloc(1, alloc.pparam()); alloc->Free(str); @@ -204,6 +211,7 @@ namespace Phonon QHash Backend::objectDescriptionProperties(Phonon::ObjectDescriptionType type, int index) const { + QMutexLocker locker(&m_directShowMutex); QHash ret; switch (type) { @@ -216,7 +224,7 @@ namespace Phonon LPOLESTR str = 0; HRESULT hr = mon->GetDisplayName(0,0, &str); if (SUCCEEDED(hr)) { - QString name = QString::fromUtf16((unsigned short*)str); + QString name = QString::fromWCharArray(str); ComPointer alloc; ::CoGetMalloc(1, alloc.pparam()); alloc->Free(str); @@ -231,7 +239,7 @@ namespace Phonon WCHAR name[80]; // 80 is clearly stated in the MSDN doc HRESULT hr = ::DMOGetName(m_audioEffects[index], name); if (SUCCEEDED(hr)) { - ret["name"] = QString::fromUtf16((unsigned short*)name); + ret["name"] = QString::fromWCharArray(name); } } break; diff --git a/src/3rdparty/phonon/ds9/backend.h b/src/3rdparty/phonon/ds9/backend.h index ad638f2..7c3c109 100644 --- a/src/3rdparty/phonon/ds9/backend.h +++ b/src/3rdparty/phonon/ds9/backend.h @@ -23,6 +23,7 @@ along with this library. If not, see . #include #include +#include #include "compointer.h" #include "backendnode.h" @@ -63,6 +64,8 @@ namespace Phonon Filter getAudioOutputFilter(int index) const; + static QMutex *directShowMutex; + Q_SIGNALS: void objectDescriptionChanged(ObjectDescriptionType); @@ -74,6 +77,7 @@ namespace Phonon }; mutable QVector m_audioOutputs; mutable QVector m_audioEffects; + mutable QMutex m_directShowMutex; }; } } diff --git a/src/3rdparty/phonon/ds9/backendnode.cpp b/src/3rdparty/phonon/ds9/backendnode.cpp index 7e0b3cd..737ab7b 100644 --- a/src/3rdparty/phonon/ds9/backendnode.cpp +++ b/src/3rdparty/phonon/ds9/backendnode.cpp @@ -57,6 +57,25 @@ namespace Phonon BackendNode::~BackendNode() { + //this will remove the filter from the graph + FILTER_INFO info; + for(int i = 0; i < FILTER_COUNT; ++i) { + const Filter &filter = m_filters[i]; + if (!filter) + continue; + filter->QueryFilterInfo(&info); + if (info.pGraph) { + HRESULT hr = info.pGraph->RemoveFilter(filter); + + if (FAILED(hr) && m_mediaObject) { + m_mediaObject->ensureStopped(); + + hr = info.pGraph->RemoveFilter(filter); + } + Q_ASSERT(SUCCEEDED(hr)); + info.pGraph->Release(); + } + } } void BackendNode::setMediaObject(MediaObject *mo) diff --git a/src/3rdparty/phonon/ds9/ds9.desktop b/src/3rdparty/phonon/ds9/ds9.desktop index 1bc3451..764390e 100644 --- a/src/3rdparty/phonon/ds9/ds9.desktop +++ b/src/3rdparty/phonon/ds9/ds9.desktop @@ -5,13 +5,12 @@ MimeType=application/x-annodex;video/quicktime;video/x-quicktime;audio/x-m4a;app X-KDE-Library=phonon_ds9 X-KDE-PhononBackendInfo-InterfaceVersion=1 X-KDE-PhononBackendInfo-Version=0.1 -X-KDE-PhononBackendInfo-Website=http://www.trolltech.com/ +X-KDE-PhononBackendInfo-Website=http://qt.nokia.com/ InitialPreference=15 Name=DirectShow9 Name[bg]=DirectShow9 Name[ca]=DirectShow9 -Name[ca@valencia]=DirectShow9 Name[cs]=DirectShow9 Name[da]=DirectShow9 Name[de]=DirectShow9 @@ -20,14 +19,11 @@ Name[en_GB]=DirectShow9 Name[es]=DirectShow9 Name[et]=DirectShow9 Name[eu]=DirectShow9 -Name[fi]=DirectShow9 Name[fr]=DirectShow9 Name[ga]=DirectShow9 Name[gl]=DirectShow9 -Name[hr]=DirectShow9 Name[hsb]=DirectShow9 Name[hu]=DirectShow9 -Name[id]=DirectShow9 Name[is]=DirectShow9 Name[it]=DirectShow9 Name[ja]=DirectShow9 @@ -35,7 +31,6 @@ Name[ko]=DirectShow9 Name[ku]=DirectShow9 Name[lt]=DirectShow9 Name[lv]=DirectShow9 -Name[nb]=DirectShow9 Name[nds]=DirectShow9 Name[nl]=DirectShow9 Name[nn]=DirectShow9 @@ -43,13 +38,10 @@ Name[pa]=ਡਾਇਰੈਕਸ਼ੋ9 Name[pl]=DirectShow9 Name[pt]=DirectShow9 Name[pt_BR]=DirectShow9 -Name[ru]=DirectShow9 Name[se]=DirectShow9 Name[sk]=DirectShow 9 Name[sl]=DirectShow 9 Name[sr]=Директшоу‑9 -Name[sr@ijekavian]=Директшоу‑9 -Name[sr@ijekavianlatin]=DirectShow‑9 Name[sr@latin]=DirectShow‑9 Name[sv]=Directshow 9 Name[tr]=DirectShow9 @@ -61,7 +53,6 @@ Name[zh_TW]=DirectShow9 Comment=Phonon DirectShow9 backend Comment[bg]=Phonon DirectShow9 Comment[ca]=Dorsal DirectShow9 del Phonon -Comment[ca@valencia]=Dorsal DirectShow9 del Phonon Comment[cs]=Phonon DirectShow9 backend Comment[da]=DirectShow9-backend til Phonon Comment[de]=Phonon-Treiber für DirectShow9 @@ -70,13 +61,11 @@ Comment[en_GB]=Phonon DirectShow9 backend Comment[es]=Motor DirectShow9 para Phonon Comment[et]=Phononi DirectShow9 taustaprogramm Comment[eu]=Phonon DirectShow9 backend -Comment[fi]=Phonon DirectShow9-taustaohjelma Comment[fr]=Système de gestion DirectShow9 pour Phonon Comment[ga]=Inneall DirectShow9 le haghaidh Phonon Comment[gl]=Infraestrutura de DirectShow9 para Phonon Comment[hsb]=Phonon DirectShow9 backend Comment[hu]=Phonon DirectShow9 modul -Comment[id]=Phonon DirectShow9 backend Comment[is]=Phonon DirectShow9 bakendi Comment[it]=Motore DirectShow9 di Phonon Comment[ja]=Phonon DirectShow9 ãƒãƒƒã‚¯ã‚¨ãƒ³ãƒ‰ @@ -84,7 +73,6 @@ Comment[ko]=Phonon DirectShow9 백엔드 Comment[ku]=Binesaza Phonon DirectShow9 Comment[lt]=Phonon DirectShow9 galinÄ— sÄ…saja Comment[lv]=Phonon DirectShow9 aizmugure -Comment[nb]=Phonon-motor for DirectShow9 Comment[nds]=Phonon-Hülpprogrmm DirectShow9 Comment[nl]=DirectShow9-backend (Phonon) Comment[nn]=Phonon-motor for DirectShow9 @@ -92,13 +80,10 @@ Comment[pa]=ਫੋਨੋਨ ਡਾਇਰੈਕਟਸ਼ੋ9 ਬੈਕà¨à¨‚ਡ Comment[pl]=ObsÅ‚uga DirectShow9 przez Phonon Comment[pt]=Infra-estrutura do DirectShow9 para o Phonon Comment[pt_BR]=Infraestrutura Phonon DirectShow9 -Comment[ru]=Механизм DirectShow9 Ð´Ð»Ñ Phonon Comment[se]=Phonon DirectShow9 duogášmohtor Comment[sk]=Phonon DirectShow 9 podsystém Comment[sl]=Phononova Hrbtenica DirectShow 9 Comment[sr]=Директшоу‑9 као позадина Фонона -Comment[sr@ijekavian]=Директшоу‑9 као позадина Фонона -Comment[sr@ijekavianlatin]=DirectShow‑9 kao pozadina Phonona Comment[sr@latin]=DirectShow‑9 kao pozadina Phonona Comment[sv]=Phonon Directshow 9-gränssnitt Comment[tr]=Phonon DirectShow9 arka ucu diff --git a/src/3rdparty/phonon/ds9/effect.cpp b/src/3rdparty/phonon/ds9/effect.cpp index 104a3c1..ebe976b 100644 --- a/src/3rdparty/phonon/ds9/effect.cpp +++ b/src/3rdparty/phonon/ds9/effect.cpp @@ -82,7 +82,7 @@ namespace Phonon current += wcslen(current) + 1; //skip the name current += wcslen(current) + 1; //skip the unit for(; *current; current += wcslen(current) + 1) { - values.append( QString::fromUtf16((unsigned short*)current) ); + values.append( QString::fromWCharArray(current) ); } } //FALLTHROUGH @@ -107,7 +107,7 @@ namespace Phonon Phonon::EffectParameter::Hints hint = info.mopCaps == MP_CAPS_CURVE_INVSQUARE ? Phonon::EffectParameter::LogarithmicHint : Phonon::EffectParameter::Hints(0); - const QString n = QString::fromUtf16((unsigned short*)name); + const QString n = QString::fromWCharArray(name); ret.append(Phonon::EffectParameter(i, n, hint, def, min, max, values)); ::CoTaskMemFree(name); //let's free the memory } diff --git a/src/3rdparty/phonon/ds9/fakesource.cpp b/src/3rdparty/phonon/ds9/fakesource.cpp index 9a61a2e..4dce138 100644 --- a/src/3rdparty/phonon/ds9/fakesource.cpp +++ b/src/3rdparty/phonon/ds9/fakesource.cpp @@ -29,8 +29,10 @@ namespace Phonon namespace DS9 { static WAVEFORMATEX g_defaultWaveFormat = {WAVE_FORMAT_PCM, 2, 44100, 176400, 4, 16, 0}; - static BITMAPINFOHEADER g_defautBitmapHeader = { sizeof(BITMAPINFOHEADER), 1, 1, 1, 0, 0, 0, 0, 0, 0, 0}; - static VIDEOINFOHEADER2 g_defaultVideoInfo = { { 0, 0, 0, 0 }, { 0, 0, 0, 0 }, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}; + static VIDEOINFOHEADER2 g_defaultVideoInfo = { { 0, 0, 0, 0 }, { 0, 0, 0, 0 }, 0, 0, 0, 0, 0, 0, 0, {0}, 0, {sizeof(BITMAPINFOHEADER), 1, 1, 1, 0, 0, 0, 0, 0, 0, 0} }; + + static const AM_MEDIA_TYPE g_fakeAudioType = {MEDIATYPE_Audio, MEDIASUBTYPE_PCM, 0, 0, 2, FORMAT_WaveFormatEx, 0, sizeof(WAVEFORMATEX), reinterpret_cast(&g_defaultWaveFormat)}; + static const AM_MEDIA_TYPE g_fakeVideoType = {MEDIATYPE_Video, MEDIASUBTYPE_RGB32, TRUE, FALSE, 0, FORMAT_VideoInfo2, 0, sizeof(VIDEOINFOHEADER2), reinterpret_cast(&g_defaultVideoInfo)}; class FakePin : public QPin { @@ -128,36 +130,12 @@ namespace Phonon void FakeSource::createFakeAudioPin() { - AM_MEDIA_TYPE mt; - qMemSet(&mt, 0, sizeof(AM_MEDIA_TYPE)); - mt.majortype = MEDIATYPE_Audio; - mt.subtype = MEDIASUBTYPE_PCM; - mt.formattype = FORMAT_WaveFormatEx; - mt.lSampleSize = 2; - - //fake the format (stereo 44.1 khz stereo 16 bits) - mt.cbFormat = sizeof(WAVEFORMATEX); - mt.pbFormat = reinterpret_cast(&g_defaultWaveFormat); - - new FakePin(this, mt); + new FakePin(this, g_fakeAudioType); } void FakeSource::createFakeVideoPin() { - AM_MEDIA_TYPE mt; - qMemSet(&mt, 0, sizeof(AM_MEDIA_TYPE)); - mt.majortype = MEDIATYPE_Video; - mt.subtype = MEDIASUBTYPE_RGB32; - mt.formattype = FORMAT_VideoInfo2; - mt.bFixedSizeSamples = 1; - - g_defaultVideoInfo.bmiHeader = g_defautBitmapHeader; - - //fake the format - mt.cbFormat = sizeof(VIDEOINFOHEADER2); - mt.pbFormat = reinterpret_cast(&g_defaultVideoInfo); - - new FakePin(this, mt); + new FakePin(this, g_fakeVideoType); } } diff --git a/src/3rdparty/phonon/ds9/iodevicereader.cpp b/src/3rdparty/phonon/ds9/iodevicereader.cpp index 9152712..ba4ae5c 100644 --- a/src/3rdparty/phonon/ds9/iodevicereader.cpp +++ b/src/3rdparty/phonon/ds9/iodevicereader.cpp @@ -36,18 +36,20 @@ namespace Phonon //these mediatypes define a stream, its type will be autodetected by DirectShow static QVector getMediaTypes() { - AM_MEDIA_TYPE mt = { MEDIATYPE_Stream, MEDIASUBTYPE_NULL, TRUE, FALSE, 1, GUID_NULL, 0, 0, 0}; + //the order here is important because otherwise, + //directshow might not be able to detect the stream type correctly + + AM_MEDIA_TYPE mt = { MEDIATYPE_Stream, MEDIASUBTYPE_Avi, TRUE, FALSE, 1, GUID_NULL, 0, 0, 0}; QVector ret; - //normal auto-detect stream - mt.subtype = MEDIASUBTYPE_NULL; - ret << mt; //AVI stream - mt.subtype = MEDIASUBTYPE_Avi; ret << mt; //WAVE stream mt.subtype = MEDIASUBTYPE_WAVE; ret << mt; + //normal auto-detect stream (must be at the end!) + mt.subtype = MEDIASUBTYPE_NULL; + ret << mt; return ret; } @@ -64,7 +66,6 @@ namespace Phonon //for Phonon::StreamInterface void writeData(const QByteArray &data) { - QWriteLocker locker(&m_lock); m_pos += data.size(); m_buffer += data; } @@ -75,54 +76,22 @@ namespace Phonon void setStreamSize(qint64 newSize) { - QWriteLocker locker(&m_lock); + QMutexLocker locker(&m_mutex); m_size = newSize; } - qint64 streamSize() const - { - QReadLocker locker(&m_lock); - return m_size; - } - void setStreamSeekable(bool s) { - QWriteLocker locker(&m_lock); + QMutexLocker locker(&m_mutex); m_seekable = s; } - bool streamSeekable() const - { - QReadLocker locker(&m_lock); - return m_seekable; - } - - void setCurrentPos(qint64 pos) - { - QWriteLocker locker(&m_lock); - m_pos = pos; - seekStream(pos); - m_buffer.clear(); - } - - qint64 currentPos() const - { - QReadLocker locker(&m_lock); - return m_pos; - } - - int currentBufferSize() const - { - QReadLocker locker(&m_lock); - return m_buffer.size(); - } - //virtual pure members //implementation from IAsyncReader STDMETHODIMP Length(LONGLONG *total, LONGLONG *available) { - QReadLocker locker(&m_lock); + QMutexLocker locker(&m_mutex); if (total) { *total = m_size; } @@ -137,37 +106,39 @@ namespace Phonon HRESULT read(LONGLONG pos, LONG length, BYTE *buffer, LONG *actual) { - QMutexLocker locker(&m_mutexRead); + Q_ASSERT(!m_mutex.tryLock()); + if (m_mediaGraph->isStopping()) { + return VFW_E_WRONG_STATE; + } - if(streamSize() != 1 && pos + length > streamSize()) { + if(m_size != 1 && pos + length > m_size) { //it tries to read outside of the boundaries return E_FAIL; } - if (currentPos() - currentBufferSize() != pos) { - if (!streamSeekable()) { + if (m_pos - m_buffer.size() != pos) { + if (!m_seekable) { return S_FALSE; } - setCurrentPos(pos); + m_pos = pos; + seekStream(pos); + m_buffer.clear(); } - int oldSize = currentBufferSize(); - while (currentBufferSize() < int(length)) { + int oldSize = m_buffer.size(); + while (m_buffer.size() < int(length)) { needData(); - if (oldSize == currentBufferSize()) { + if (oldSize == m_buffer.size()) { break; //we didn't get any data } - oldSize = currentBufferSize(); + oldSize = m_buffer.size(); } - DWORD bytesRead = qMin(currentBufferSize(), int(length)); - { - QWriteLocker locker(&m_lock); - qMemCopy(buffer, m_buffer.data(), bytesRead); - //truncate the buffer - m_buffer = m_buffer.mid(bytesRead); - } + int bytesRead = qMin(m_buffer.size(), int(length)); + qMemCopy(buffer, m_buffer.data(), bytesRead); + //truncate the buffer + m_buffer = m_buffer.mid(bytesRead); if (actual) { *actual = bytesRead; //initialization @@ -183,7 +154,6 @@ namespace Phonon qint64 m_pos; qint64 m_size; - QMutex m_mutexRead; const MediaGraph *m_mediaGraph; }; @@ -197,14 +167,6 @@ namespace Phonon IODeviceReader::~IODeviceReader() { } - - STDMETHODIMP IODeviceReader::Stop() - { - HRESULT hr = QBaseFilter::Stop(); - m_streamReader->enoughData(); //this asks to cancel any blocked call to needData - return hr; - } - } } diff --git a/src/3rdparty/phonon/ds9/iodevicereader.h b/src/3rdparty/phonon/ds9/iodevicereader.h index af4b271..c8b91c3 100644 --- a/src/3rdparty/phonon/ds9/iodevicereader.h +++ b/src/3rdparty/phonon/ds9/iodevicereader.h @@ -41,7 +41,6 @@ namespace Phonon public: IODeviceReader(const MediaSource &source, const MediaGraph *); ~IODeviceReader(); - STDMETHODIMP Stop(); private: StreamReader *m_streamReader; diff --git a/src/3rdparty/phonon/ds9/mediagraph.cpp b/src/3rdparty/phonon/ds9/mediagraph.cpp index db0ec84..3e7a68b 100644 --- a/src/3rdparty/phonon/ds9/mediagraph.cpp +++ b/src/3rdparty/phonon/ds9/mediagraph.cpp @@ -68,6 +68,8 @@ namespace Phonon return ret; } + +/* static HRESULT saveToFile(Graph graph, const QString &filepath) { const WCHAR wszStreamName[] = L"ActiveMovieGraph"; @@ -103,7 +105,7 @@ namespace Phonon return hr; } - +*/ MediaGraph::MediaGraph(MediaObject *mo, short index) : m_graph(CLSID_FilterGraph, IID_IGraphBuilder), @@ -377,11 +379,12 @@ namespace Phonon FILTER_INFO info; filter->QueryFilterInfo(&info); #ifdef GRAPH_DEBUG - qDebug() << "removeFilter" << QString::fromUtf16(info.achName); + qDebug() << "removeFilter" << QString((const QChar *)info.achName); #endif if (info.pGraph) { info.pGraph->Release(); - return m_graph->RemoveFilter(filter); + if (info.pGraph == m_graph) + return m_graph->RemoveFilter(filter); } //already removed @@ -537,11 +540,11 @@ namespace Phonon const QList outputs = BackendNode::pins(filter, PINDIR_OUTPUT); for(int i = 0; i < outputs.count(); ++i) { const OutputPin &pin = outputs.at(i); - if (VFW_E_NOT_CONNECTED == pin->ConnectedTo(inPin.pparam())) { + if (HRESULT(VFW_E_NOT_CONNECTED) == pin->ConnectedTo(inPin.pparam())) { return SUCCEEDED(pin->Connect(newIn, 0)); } } - //we should never go here + //we shoud never go here return false; } else { QAMMediaType type; @@ -679,7 +682,6 @@ namespace Phonon #ifndef QT_NO_PHONON_MEDIACONTROLLER } else if (source.discType() == Phonon::Cd) { m_realSource = Filter(new QAudioCDPlayer); - m_result = m_graph->AddFilter(m_realSource, 0); #endif //QT_NO_PHONON_MEDIACONTROLLER } else { @@ -809,7 +811,7 @@ namespace Phonon for (int i = 0; i < outputs.count(); ++i) { const OutputPin &out = outputs.at(i); InputPin pin; - if (out->ConnectedTo(pin.pparam()) == VFW_E_NOT_CONNECTED) { + if (out->ConnectedTo(pin.pparam()) == HRESULT(VFW_E_NOT_CONNECTED)) { m_decoderPins += out; //unconnected outputs can be decoded outputs } } @@ -820,7 +822,7 @@ namespace Phonon //let's reestablish the connections for (int i = 0; i < connections.count(); ++i) { const GraphConnection &connection = connections.at(i); - //check if we should transfer the sink node + //check if we shoud transfer the sink node grabFilter(connection.input); grabFilter(connection.output); @@ -873,7 +875,7 @@ namespace Phonon { FILTER_INFO info; filter->QueryFilterInfo(&info); - qDebug() << Q_FUNC_INFO << QString::fromUtf16(info.achName); + qDebug() << Q_FUNC_INFO << QString((const QChar *)info.achName); if (info.pGraph) { info.pGraph->Release(); } @@ -919,7 +921,7 @@ namespace Phonon { FILTER_INFO info; filter->QueryFilterInfo(&info); - qDebug() << "found a decoder filter" << QString::fromUtf16(info.achName); + qDebug() << "found a decoder filter" << QString((const QChar *)info.achName); if (info.pGraph) { info.pGraph->Release(); } @@ -935,7 +937,7 @@ namespace Phonon { FILTER_INFO info; filter->QueryFilterInfo(&info); - qDebug() << Q_FUNC_INFO << QString::fromUtf16(info.achName); + qDebug() << Q_FUNC_INFO << QString((const QChar *)info.achName); if (info.pGraph) { info.pGraph->Release(); } @@ -954,7 +956,7 @@ namespace Phonon { FILTER_INFO info; filter->QueryFilterInfo(&info); - qDebug() << Q_FUNC_INFO << QString::fromUtf16(info.achName); + qDebug() << Q_FUNC_INFO << QString((const QChar *)info.achName); if (info.pGraph) { info.pGraph->Release(); } @@ -988,7 +990,7 @@ namespace Phonon { FILTER_INFO info; filter->QueryFilterInfo(&info); - qDebug() << "found a demuxer filter" << QString::fromUtf16(info.achName); + qDebug() << "found a demuxer filter" << QString((const QChar *)info.achName); if (info.pGraph) { info.pGraph->Release(); } @@ -1006,27 +1008,27 @@ namespace Phonon BSTR str; HRESULT hr = mediaContent->get_AuthorName(&str); if (SUCCEEDED(hr)) { - ret.insert(QLatin1String("ARTIST"), QString::fromUtf16((const unsigned short*)str)); + ret.insert(QLatin1String("ARTIST"), QString::fromWCharArray(str)); SysFreeString(str); } hr = mediaContent->get_Title(&str); if (SUCCEEDED(hr)) { - ret.insert(QLatin1String("TITLE"), QString::fromUtf16((const unsigned short*)str)); + ret.insert(QLatin1String("TITLE"), QString::fromWCharArray(str)); SysFreeString(str); } hr = mediaContent->get_Description(&str); if (SUCCEEDED(hr)) { - ret.insert(QLatin1String("DESCRIPTION"), QString::fromUtf16((const unsigned short*)str)); + ret.insert(QLatin1String("DESCRIPTION"), QString::fromWCharArray(str)); SysFreeString(str); } hr = mediaContent->get_Copyright(&str); if (SUCCEEDED(hr)) { - ret.insert(QLatin1String("COPYRIGHT"), QString::fromUtf16((const unsigned short*)str)); + ret.insert(QLatin1String("COPYRIGHT"), QString::fromWCharArray(str)); SysFreeString(str); } hr = mediaContent->get_MoreInfoText(&str); if (SUCCEEDED(hr)) { - ret.insert(QLatin1String("MOREINFO"), QString::fromUtf16((const unsigned short*)str)); + ret.insert(QLatin1String("MOREINFO"), QString::fromWCharArray(str)); SysFreeString(str); } } diff --git a/src/3rdparty/phonon/ds9/mediaobject.cpp b/src/3rdparty/phonon/ds9/mediaobject.cpp index b9a8713..34f92c2 100644 --- a/src/3rdparty/phonon/ds9/mediaobject.cpp +++ b/src/3rdparty/phonon/ds9/mediaobject.cpp @@ -23,13 +23,10 @@ along with this library. If not, see . #ifndef Q_CC_MSVC #include -#endif //Q_CC_MSVC +#endif #include #include #include -#ifdef Q_CC_MSVC -# include -#endif #include #include "mediaobject.h" @@ -52,7 +49,7 @@ namespace Phonon //first the definition of the WorkerThread class WorkerThread::WorkerThread() - : QThread(), m_currentRenderId(0), m_finished(false), m_currentWorkId(1) + : QThread(), m_finished(false), m_currentWorkId(1) { } @@ -60,24 +57,6 @@ namespace Phonon { } - WorkerThread::Work WorkerThread::dequeueWork() - { - QMutexLocker locker(&m_mutex); - if (m_finished) { - return Work(); - } - Work ret = m_queue.dequeue(); - - //we ensure to have the wait condition in the right state - if (m_queue.isEmpty()) { - m_waitCondition.reset(); - } else { - m_waitCondition.set(); - } - - return ret; - } - void WorkerThread::run() { while (m_finished == false) { @@ -91,11 +70,6 @@ namespace Phonon } DWORD result = ::WaitForMultipleObjects(count, handles, FALSE, INFINITE); if (result == WAIT_OBJECT_0) { - if (m_finished) { - //that's the end of the thread execution - return; - } - handleTask(); } else { //this is the event management @@ -183,6 +157,7 @@ namespace Phonon //we create a new graph w.graph = Graph(CLSID_FilterGraph, IID_IGraphBuilder); w.filter = filter; + w.graph->AddFilter(filter, 0); w.id = m_currentWorkId++; m_queue.enqueue(w); m_waitCondition.set(); @@ -202,23 +177,29 @@ namespace Phonon void WorkerThread::handleTask() { - const Work w = dequeueWork(); + QMutexLocker locker(Backend::directShowMutex); + { + QMutexLocker locker(&m_mutex); + if (m_finished || m_queue.isEmpty()) { + return; + } - if (m_finished) { - return; + m_currentWork = m_queue.dequeue(); + + //we ensure to have the wait condition in the right state + if (m_queue.isEmpty()) { + m_waitCondition.reset(); + } else { + m_waitCondition.set(); + } } HRESULT hr = S_OK; - m_currentRender = w.graph; - m_currentRenderId = w.id; - if (w.task == ReplaceGraph) { - QMutexLocker locker(&m_mutex); - HANDLE h; - + if (m_currentWork.task == ReplaceGraph) { int index = -1; for(int i = 0; i < FILTER_COUNT; ++i) { - if (m_graphHandle[i].graph == w.oldGraph) { + if (m_graphHandle[i].graph == m_currentWork.oldGraph) { m_graphHandle[i].graph = Graph(); index = i; break; @@ -231,51 +212,40 @@ namespace Phonon Q_ASSERT(index != -1); //add the new graph - if (SUCCEEDED(ComPointer(w.graph, IID_IMediaEvent) + HANDLE h; + if (SUCCEEDED(ComPointer(m_currentWork.graph, IID_IMediaEvent) ->GetEventHandle(reinterpret_cast(&h)))) { - m_graphHandle[index].graph = w.graph; + m_graphHandle[index].graph = m_currentWork.graph; m_graphHandle[index].handle = h; } - } else if (w.task == Render) { - if (w.filter) { + } else if (m_currentWork.task == Render) { + if (m_currentWork.filter) { //let's render pins - w.graph->AddFilter(w.filter, 0); - const QList outputs = BackendNode::pins(w.filter, PINDIR_OUTPUT); - for (int i = 0; i < outputs.count(); ++i) { - //blocking call - hr = w.graph->Render(outputs.at(i)); - if (FAILED(hr)) { - break; - } + const QList outputs = BackendNode::pins(m_currentWork.filter, PINDIR_OUTPUT); + for (int i = 0; SUCCEEDED(hr) && i < outputs.count(); ++i) { + hr = m_currentWork.graph->Render(outputs.at(i)); } - } else if (!w.url.isEmpty()) { + } else if (!m_currentWork.url.isEmpty()) { //let's render a url (blocking call) - hr = w.graph->RenderFile(reinterpret_cast(w.url.utf16()), 0); + hr = m_currentWork.graph->RenderFile(reinterpret_cast(m_currentWork.url.utf16()), 0); } if (hr != E_ABORT) { - emit asyncRenderFinished(w.id, hr, w.graph); + emit asyncRenderFinished(m_currentWork.id, hr, m_currentWork.graph); } - } else if (w.task == Seek) { + } else if (m_currentWork.task == Seek) { //that's a seekrequest - ComPointer mediaSeeking(w.graph, IID_IMediaSeeking); - qint64 newtime = w.time * 10000; + ComPointer mediaSeeking(m_currentWork.graph, IID_IMediaSeeking); + qint64 newtime = m_currentWork.time * 10000; hr = mediaSeeking->SetPositions(&newtime, AM_SEEKING_AbsolutePositioning, 0, AM_SEEKING_NoPositioning); - qint64 currentTime = -1; - if (SUCCEEDED(hr)) { - hr = mediaSeeking->GetCurrentPosition(¤tTime); - if (SUCCEEDED(hr)) { - currentTime /= 10000; //convert to ms - } - } - emit asyncSeekingFinished(w.id, currentTime); + emit asyncSeekingFinished(m_currentWork.id, newtime / 10000); hr = E_ABORT; //to avoid emitting asyncRenderFinished - } else if (w.task == ChangeState) { + } else if (m_currentWork.task == ChangeState) { //remove useless decoders QList unused; - for (int i = 0; i < w.decoders.count(); ++i) { - const Filter &filter = w.decoders.at(i); + for (int i = 0; i < m_currentWork.decoders.count(); ++i) { + const Filter &filter = m_currentWork.decoders.at(i); bool used = false; const QList pins = BackendNode::pins(filter, PINDIR_OUTPUT); for( int i = 0; i < pins.count(); ++i) { @@ -292,15 +262,15 @@ namespace Phonon //we can get the state for (int i = 0; i < unused.count(); ++i) { //we should remove this filter from the graph - w.graph->RemoveFilter(unused.at(i)); + m_currentWork.graph->RemoveFilter(unused.at(i)); } //we can get the state - ComPointer mc(w.graph, IID_IMediaControl); + ComPointer mc(m_currentWork.graph, IID_IMediaControl); //we change the state here - switch(w.state) + switch(m_currentWork.state) { case State_Stopped: mc->Stop(); @@ -318,36 +288,38 @@ namespace Phonon if (SUCCEEDED(hr)) { if (s == State_Stopped) { - emit stateReady(w.graph, Phonon::StoppedState); + emit stateReady(m_currentWork.graph, Phonon::StoppedState); } else if (s == State_Paused) { - emit stateReady(w.graph, Phonon::PausedState); + emit stateReady(m_currentWork.graph, Phonon::PausedState); } else /*if (s == State_Running)*/ { - emit stateReady(w.graph, Phonon::PlayingState); + emit stateReady(m_currentWork.graph, Phonon::PlayingState); } } } - m_currentRender = Graph(); - m_currentRenderId = 0; - + { + QMutexLocker locker(&m_mutex); + m_currentWork = Work(); //reinitialize + } } - void WorkerThread::abortCurrentRender(qint16 renderId) - { + void WorkerThread::abortCurrentRender(qint16 renderId) + { QMutexLocker locker(&m_mutex); + if (m_currentWork.id == renderId) { + m_currentWork.graph->Abort(); + } bool found = false; - //we try to see if there is already an attempt to seek and we remove it for(int i = 0; !found && i < m_queue.size(); ++i) { const Work &w = m_queue.at(i); if (w.id == renderId) { found = true; m_queue.removeAt(i); + if (m_queue.isEmpty()) { + m_waitCondition.reset(); + } } } - - if (m_currentRender && m_currentRenderId == renderId) { - m_currentRender->Abort(); - } } //tells the thread to stop processing @@ -355,9 +327,9 @@ namespace Phonon { QMutexLocker locker(&m_mutex); m_queue.clear(); - if (m_currentRender) { + if (m_currentWork.graph) { //in case we're currently rendering something - m_currentRender->Abort(); + m_currentWork.graph->Abort(); } @@ -389,17 +361,17 @@ namespace Phonon m_graphs[i] = new MediaGraph(this, i); } - connect(&m_thread, SIGNAL(stateReady(Graph, Phonon::State)), - SLOT(slotStateReady(Graph, Phonon::State))); + connect(&m_thread, SIGNAL(stateReady(Graph,Phonon::State)), + SLOT(slotStateReady(Graph,Phonon::State))); - connect(&m_thread, SIGNAL(eventReady(Graph, long, long)), - SLOT(handleEvents(Graph, long, long))); + connect(&m_thread, SIGNAL(eventReady(Graph,long,long)), + SLOT(handleEvents(Graph,long,long))); - connect(&m_thread, SIGNAL(asyncRenderFinished(quint16, HRESULT, Graph)), - SLOT(finishLoading(quint16, HRESULT, Graph))); + connect(&m_thread, SIGNAL(asyncRenderFinished(quint16,HRESULT,Graph)), + SLOT(finishLoading(quint16,HRESULT,Graph))); - connect(&m_thread, SIGNAL(asyncSeekingFinished(quint16, qint64)), - SLOT(finishSeeking(quint16, qint64))); + connect(&m_thread, SIGNAL(asyncSeekingFinished(quint16,qint64)), + SLOT(finishSeeking(quint16,qint64))); //really special case m_mediaObject = this; m_thread.start(); @@ -522,6 +494,18 @@ namespace Phonon qSwap(m_graphs[0], m_graphs[1]); //swap the graphs + if (m_transitionTime >= 0) + m_graphs[1]->stop(); //make sure we stop the previous graph + + if (currentGraph()->mediaSource().type() != Phonon::MediaSource::Invalid && + catchComError(currentGraph()->renderResult())) { + setState(Phonon::ErrorState); + return; + } + + //we need to play the next media + play(); + //we tell the video widgets to switch now to the new source #ifndef QT_NO_PHONON_VIDEO for (int i = 0; i < m_videoWidgets.count(); ++i) { @@ -530,15 +514,6 @@ namespace Phonon #endif //QT_NO_PHONON_VIDEO emit currentSourceChanged(currentGraph()->mediaSource()); - - if (currentGraph()->isLoading()) { - //will simply tell that when loading is finished - //it should start the playback - play(); - } - - - emit metaDataChanged(currentGraph()->metadata()); if (nextGraph()->hasVideo() != currentGraph()->hasVideo()) { @@ -551,15 +526,6 @@ namespace Phonon #ifndef QT_NO_PHONON_MEDIACONTROLLER setTitles(currentGraph()->titles()); #endif //QT_NO_PHONON_MEDIACONTROLLER - - //this manages only gapless transitions - if (currentGraph()->mediaSource().type() != Phonon::MediaSource::Invalid) { - if (catchComError(currentGraph()->renderResult())) { - setState(Phonon::ErrorState); - } else { - play(); - } - } } Phonon::State MediaObject::state() const @@ -794,15 +760,16 @@ namespace Phonon case Phonon::PausedState: pause(); break; - case Phonon::StoppedState: - stop(); - break; case Phonon::PlayingState: play(); break; case Phonon::ErrorState: setState(Phonon::ErrorState); break; + case Phonon::StoppedState: + default: + stop(); + break; } } } @@ -850,13 +817,11 @@ namespace Phonon #endif LPAMGETERRORTEXT getErrorText = (LPAMGETERRORTEXT)QLibrary::resolve(QLatin1String("quartz"), "AMGetErrorTextW"); - ushort buffer[MAX_ERROR_TEXT_LEN]; - if (getErrorText && getErrorText(hr, (WCHAR*)buffer, MAX_ERROR_TEXT_LEN)) { - m_errorString = QString::fromUtf16(buffer); -#ifdef Q_CC_MSVC + WCHAR buffer[MAX_ERROR_TEXT_LEN]; + if (getErrorText && getErrorText(hr, buffer, MAX_ERROR_TEXT_LEN)) { + m_errorString = QString::fromWCharArray(buffer); } else { - m_errorString = QString::fromUtf16((ushort*)_com_error(hr).ErrorMessage()); -#endif + m_errorString = QString::fromLatin1("Unknown error"); } const QString comError = QString::number(uint(hr), 16); if (!m_errorString.toLower().contains(comError.toLower())) { diff --git a/src/3rdparty/phonon/ds9/mediaobject.h b/src/3rdparty/phonon/ds9/mediaobject.h index 2c34ffc..34aa666 100644 --- a/src/3rdparty/phonon/ds9/mediaobject.h +++ b/src/3rdparty/phonon/ds9/mediaobject.h @@ -114,6 +114,7 @@ namespace Phonon enum Task { + None, Render, Seek, ChangeState, @@ -122,6 +123,7 @@ namespace Phonon struct Work { + Work() : task(None), id(0), time(0) { } Task task; quint16 id; Graph graph; @@ -135,16 +137,14 @@ namespace Phonon }; QList decoders; //for the state change requests }; - Work dequeueWork(); void handleTask(); - Graph m_currentRender; - qint16 m_currentRenderId; + Work m_currentWork; QQueue m_queue; bool m_finished; quint16 m_currentWorkId; QWinWaitCondition m_waitCondition; - QMutex m_mutex; + QMutex m_mutex; // mutex for the m_queue, m_finished and m_currentWorkId //this is for WaitForMultipleObjects struct diff --git a/src/3rdparty/phonon/ds9/qasyncreader.cpp b/src/3rdparty/phonon/ds9/qasyncreader.cpp index 68ec1f8..a3f9cda 100644 --- a/src/3rdparty/phonon/ds9/qasyncreader.cpp +++ b/src/3rdparty/phonon/ds9/qasyncreader.cpp @@ -15,8 +15,6 @@ You should have received a copy of the GNU Lesser General Public License along with this library. If not, see . */ -#include - #include "qasyncreader.h" #include "qbasefilter.h" @@ -80,8 +78,7 @@ namespace Phonon STDMETHODIMP QAsyncReader::Request(IMediaSample *sample,DWORD_PTR user) { - QMutexLocker mutexLocker(&m_mutexWait); - QWriteLocker locker(&m_lock); + QMutexLocker locker(&m_mutex); if (m_flushing) { return VFW_E_WRONG_STATE; } @@ -93,33 +90,28 @@ namespace Phonon STDMETHODIMP QAsyncReader::WaitForNext(DWORD timeout, IMediaSample **sample, DWORD_PTR *user) { - QMutexLocker locker(&m_mutexWait); + QMutexLocker locker(&m_mutex); if (!sample ||!user) { return E_POINTER; } + //msdn says to return immediately if we're flushing but that doesn't seem to be true + //since it triggers a dead-lock somewhere inside directshow (see task 258830) + *sample = 0; *user = 0; - AsyncRequest r = getNextRequest(); - - if (r.sample == 0) { - //there is no request in the queue - if (isFlushing()) { + if (m_requestQueue.isEmpty()) { + if (m_requestWait.wait(&m_mutex, timeout) == false) { + return VFW_E_TIMEOUT; + } + if (m_requestQueue.isEmpty()) { return VFW_E_WRONG_STATE; - } else { - //First we need to lock the mutex - if (m_requestWait.wait(&m_mutexWait, timeout) == false) { - return VFW_E_TIMEOUT; - } - if (isFlushing()) { - return VFW_E_WRONG_STATE; - } - - r = getNextRequest(); } } + AsyncRequest r = m_requestQueue.dequeue(); + //at this point we're sure to have a request to proceed if (r.sample == 0) { return E_FAIL; @@ -127,14 +119,12 @@ namespace Phonon *sample = r.sample; *user = r.user; - - return SyncReadAligned(r.sample); + return syncReadAlignedUnlocked(r.sample); } STDMETHODIMP QAsyncReader::BeginFlush() { - QMutexLocker mutexLocker(&m_mutexWait); - QWriteLocker locker(&m_lock); + QMutexLocker locker(&m_mutex); m_flushing = true; m_requestWait.wakeOne(); return S_OK; @@ -142,13 +132,28 @@ namespace Phonon STDMETHODIMP QAsyncReader::EndFlush() { - QWriteLocker locker(&m_lock); + QMutexLocker locker(&m_mutex); m_flushing = false; return S_OK; } STDMETHODIMP QAsyncReader::SyncReadAligned(IMediaSample *sample) { + QMutexLocker locker(&m_mutex); + return syncReadAlignedUnlocked(sample); + } + + STDMETHODIMP QAsyncReader::SyncRead(LONGLONG pos, LONG length, BYTE *buffer) + { + QMutexLocker locker(&m_mutex); + return read(pos, length, buffer, 0); + } + + + STDMETHODIMP QAsyncReader::syncReadAlignedUnlocked(IMediaSample *sample) + { + Q_ASSERT(!m_mutex.tryLock()); + if (!sample) { return E_POINTER; } @@ -175,23 +180,6 @@ namespace Phonon return sample->SetActualDataLength(actual); } - STDMETHODIMP QAsyncReader::SyncRead(LONGLONG pos, LONG length, BYTE *buffer) - { - return read(pos, length, buffer, 0); - } - - - //addition - QAsyncReader::AsyncRequest QAsyncReader::getNextRequest() - { - QWriteLocker locker(&m_lock); - AsyncRequest ret; - if (!m_requestQueue.isEmpty()) { - ret = m_requestQueue.dequeue(); - } - - return ret; - } } } diff --git a/src/3rdparty/phonon/ds9/qasyncreader.h b/src/3rdparty/phonon/ds9/qasyncreader.h index cb789ee..95872f9 100644 --- a/src/3rdparty/phonon/ds9/qasyncreader.h +++ b/src/3rdparty/phonon/ds9/qasyncreader.h @@ -48,11 +48,12 @@ namespace Phonon STDMETHODIMP WaitForNext(DWORD,IMediaSample **,DWORD_PTR *); STDMETHODIMP SyncReadAligned(IMediaSample *); STDMETHODIMP SyncRead(LONGLONG,LONG,BYTE *); - virtual STDMETHODIMP Length(LONGLONG *,LONGLONG *) = 0; + STDMETHODIMP Length(LONGLONG *,LONGLONG *) = 0; STDMETHODIMP BeginFlush(); STDMETHODIMP EndFlush(); protected: + STDMETHODIMP syncReadAlignedUnlocked(IMediaSample *); virtual HRESULT read(LONGLONG pos, LONG length, BYTE *buffer, LONG *actual) = 0; private: @@ -62,9 +63,6 @@ namespace Phonon IMediaSample *sample; DWORD_PTR user; }; - AsyncRequest getNextRequest(); - - QMutex m_mutexWait; QQueue m_requestQueue; QWaitCondition m_requestWait; diff --git a/src/3rdparty/phonon/ds9/qaudiocdreader.cpp b/src/3rdparty/phonon/ds9/qaudiocdreader.cpp index b9f9fd6..6d0f335 100644 --- a/src/3rdparty/phonon/ds9/qaudiocdreader.cpp +++ b/src/3rdparty/phonon/ds9/qaudiocdreader.cpp @@ -103,8 +103,8 @@ namespace Phonon private: HANDLE m_cddrive; - CDROM_TOC *m_toc; - WaveStructure *m_waveHeader; + CDROM_TOC m_toc; + WaveStructure m_waveHeader; qint64 m_trackAddress; }; @@ -112,19 +112,8 @@ namespace Phonon #define SECTOR_SIZE 2352 #define NB_SECTORS_READ 20 - static AM_MEDIA_TYPE getAudioCDMediaType() - { - AM_MEDIA_TYPE mt; - qMemSet(&mt, 0, sizeof(AM_MEDIA_TYPE)); - mt.majortype = MEDIATYPE_Stream; - mt.subtype = MEDIASUBTYPE_WAVE; - mt.bFixedSizeSamples = TRUE; - mt.bTemporalCompression = FALSE; - mt.lSampleSize = 1; - mt.formattype = GUID_NULL; - return mt; - } - + static const AM_MEDIA_TYPE audioCDMediaType = { MEDIATYPE_Stream, MEDIASUBTYPE_WAVE, TRUE, FALSE, 1, GUID_NULL, 0, 0, 0}; + int addressToSectors(UCHAR address[4]) { return ((address[0] * 60 + address[1]) * 60 + address[2]) * 75 + address[3] - 150; @@ -141,11 +130,8 @@ namespace Phonon } - QAudioCDReader::QAudioCDReader(QBaseFilter *parent, QChar drive) : QAsyncReader(parent, QVector() << getAudioCDMediaType()) + QAudioCDReader::QAudioCDReader(QBaseFilter *parent, QChar drive) : QAsyncReader(parent, QVector() << audioCDMediaType) { - m_toc = new CDROM_TOC; - m_waveHeader = new WaveStructure; - //now open the cd-drive QString path; if (drive.isNull()) { @@ -154,36 +140,30 @@ namespace Phonon path = QString::fromLatin1("\\\\.\\%1:").arg(drive); } - m_cddrive = QT_WA_INLINE ( - ::CreateFile( (TCHAR*)path.utf16(), GENERIC_READ, FILE_SHARE_READ, NULL, OPEN_EXISTING, 0, NULL ), - ::CreateFileA( path.toLocal8Bit().constData(), GENERIC_READ, FILE_SHARE_READ, NULL, OPEN_EXISTING, 0, NULL ) - ); + m_cddrive = ::CreateFile((const wchar_t *)path.utf16(), GENERIC_READ, FILE_SHARE_READ, NULL, OPEN_EXISTING, 0, NULL); - qMemSet(m_toc, 0, sizeof(CDROM_TOC)); + qMemSet(&m_toc, 0, sizeof(CDROM_TOC)); //read the TOC DWORD bytesRead = 0; - bool tocRead = ::DeviceIoControl(m_cddrive, IOCTL_CDROM_READ_TOC, 0, 0, m_toc, sizeof(CDROM_TOC), &bytesRead, 0); + bool tocRead = ::DeviceIoControl(m_cddrive, IOCTL_CDROM_READ_TOC, 0, 0, &m_toc, sizeof(CDROM_TOC), &bytesRead, 0); if (!tocRead) { qWarning("unable to load the TOC from the CD"); return; } - m_trackAddress = addressToSectors(m_toc->TrackData[0].Address); - const qint32 nbSectorsToRead = (addressToSectors(m_toc->TrackData[m_toc->LastTrack + 1 - m_toc->FirstTrack].Address) + m_trackAddress = addressToSectors(m_toc.TrackData[0].Address); + const qint32 nbSectorsToRead = (addressToSectors(m_toc.TrackData[m_toc.LastTrack + 1 - m_toc.FirstTrack].Address) - m_trackAddress); const qint32 dataLength = nbSectorsToRead * SECTOR_SIZE; - m_waveHeader->chunksize = 4 + (8 + m_waveHeader->chunksize2) + (8 + dataLength); - m_waveHeader->dataLength = dataLength; + m_waveHeader.chunksize = 4 + (8 + m_waveHeader.chunksize2) + (8 + dataLength); + m_waveHeader.dataLength = dataLength; } QAudioCDReader::~QAudioCDReader() { ::CloseHandle(m_cddrive); - delete m_toc; - delete m_waveHeader; - } STDMETHODIMP_(ULONG) QAudioCDReader::AddRef() @@ -199,7 +179,7 @@ namespace Phonon STDMETHODIMP QAudioCDReader::Length(LONGLONG *total,LONGLONG *available) { - const LONGLONG length = sizeof(WaveStructure) + m_waveHeader->dataLength; + const LONGLONG length = sizeof(WaveStructure) + m_waveHeader.dataLength; if (total) { *total = length; } @@ -238,11 +218,11 @@ namespace Phonon if (pos < sizeof(WaveStructure)) { //we first copy the content of the structure nbRead = qMin(LONG(sizeof(WaveStructure) - pos), length); - qMemCopy(buffer, reinterpret_cast(m_waveHeader) + pos, nbRead); + qMemCopy(buffer, reinterpret_cast(&m_waveHeader) + pos, nbRead); } const LONGLONG posInTrack = pos - sizeof(WaveStructure) + nbRead; - const int bytesLeft = qMin(m_waveHeader->dataLength - posInTrack, LONGLONG(length - nbRead)); + const int bytesLeft = qMin(m_waveHeader.dataLength - posInTrack, LONGLONG(length - nbRead)); if (bytesLeft > 0) { @@ -297,8 +277,8 @@ namespace Phonon { QList ret; ret << 0; - for(int i = m_toc->FirstTrack; i <= m_toc->LastTrack ; ++i) { - const uchar *address = m_toc->TrackData[i].Address; + for(int i = m_toc.FirstTrack; i <= m_toc.LastTrack ; ++i) { + const uchar *address = m_toc.TrackData[i].Address; ret << ((address[0] * 60 + address[1]) * 60 + address[2]) * 1000 + address[3]*1000/75 - 2000; } diff --git a/src/3rdparty/phonon/ds9/qaudiocdreader.h b/src/3rdparty/phonon/ds9/qaudiocdreader.h index 9049b66..eff845d 100644 --- a/src/3rdparty/phonon/ds9/qaudiocdreader.h +++ b/src/3rdparty/phonon/ds9/qaudiocdreader.h @@ -31,7 +31,7 @@ namespace Phonon { struct CDROM_TOC; struct WaveStructure; - extern const IID IID_ITitleInterface; + EXTERN_C const IID IID_ITitleInterface; //interface for the Titles struct ITitleInterface : public IUnknown diff --git a/src/3rdparty/phonon/ds9/qbasefilter.cpp b/src/3rdparty/phonon/ds9/qbasefilter.cpp index 95cab92..78b8b8f 100644 --- a/src/3rdparty/phonon/ds9/qbasefilter.cpp +++ b/src/3rdparty/phonon/ds9/qbasefilter.cpp @@ -92,8 +92,8 @@ namespace Phonon return E_POINTER; } - int nbfetched = 0; - while (nbfetched < int(count) && m_index < m_pins.count()) { + uint nbfetched = 0; + while (nbfetched < count && m_index < m_pins.count()) { IPin *current = m_pins[m_index]; current->AddRef(); ret[nbfetched] = current; @@ -166,19 +166,19 @@ namespace Phonon const QList QBaseFilter::pins() const { - QReadLocker locker(&m_lock); + QMutexLocker locker(&m_mutex); return m_pins; } void QBaseFilter::addPin(QPin *pin) { - QWriteLocker locker(&m_lock); + QMutexLocker locker(&m_mutex); m_pins.append(pin); } void QBaseFilter::removePin(QPin *pin) { - QWriteLocker locker(&m_lock); + QMutexLocker locker(&m_mutex); m_pins.removeAll(pin); } @@ -211,7 +211,8 @@ namespace Phonon } else if (iid == IID_IMediaPosition || iid == IID_IMediaSeeking) { if (inputPins().isEmpty()) { - if (*out = getUpStreamInterface(iid)) { + *out = getUpStreamInterface(iid); + if (*out) { return S_OK; //we return here to avoid adding a reference } else { hr = E_NOINTERFACE; @@ -250,35 +251,35 @@ namespace Phonon STDMETHODIMP QBaseFilter::GetClassID(CLSID *clsid) { - QReadLocker locker(&m_lock); + QMutexLocker locker(&m_mutex); *clsid = m_clsid; return S_OK; } STDMETHODIMP QBaseFilter::Stop() { - QWriteLocker locker(&m_lock); + QMutexLocker locker(&m_mutex); m_state = State_Stopped; return S_OK; } STDMETHODIMP QBaseFilter::Pause() { - QWriteLocker locker(&m_lock); + QMutexLocker locker(&m_mutex); m_state = State_Paused; return S_OK; } STDMETHODIMP QBaseFilter::Run(REFERENCE_TIME) { - QWriteLocker locker(&m_lock); + QMutexLocker locker(&m_mutex); m_state = State_Running; return S_OK; } STDMETHODIMP QBaseFilter::GetState(DWORD, FILTER_STATE *state) { - QReadLocker locker(&m_lock); + QMutexLocker locker(&m_mutex); if (!state) { return E_POINTER; } @@ -289,7 +290,7 @@ namespace Phonon STDMETHODIMP QBaseFilter::SetSyncSource(IReferenceClock *clock) { - QWriteLocker locker(&m_lock); + QMutexLocker locker(&m_mutex); if (clock) { clock->AddRef(); } @@ -302,7 +303,7 @@ namespace Phonon STDMETHODIMP QBaseFilter::GetSyncSource(IReferenceClock **clock) { - QReadLocker locker(&m_lock); + QMutexLocker locker(&m_mutex); if (!clock) { return E_POINTER; } @@ -341,7 +342,7 @@ namespace Phonon STDMETHODIMP QBaseFilter::QueryFilterInfo(FILTER_INFO *info ) { - QReadLocker locker(&m_lock); + QMutexLocker locker(&m_mutex); if (!info) { return E_POINTER; } @@ -355,9 +356,9 @@ namespace Phonon STDMETHODIMP QBaseFilter::JoinFilterGraph(IFilterGraph *graph, LPCWSTR name) { - QWriteLocker locker(&m_lock); + QMutexLocker locker(&m_mutex); m_graph = graph; - m_name = QString::fromUtf16((const unsigned short*)name); + m_name = QString::fromWCharArray(name); return S_OK; } diff --git a/src/3rdparty/phonon/ds9/qbasefilter.h b/src/3rdparty/phonon/ds9/qbasefilter.h index 85f1431..a72d6fe 100644 --- a/src/3rdparty/phonon/ds9/qbasefilter.h +++ b/src/3rdparty/phonon/ds9/qbasefilter.h @@ -22,7 +22,7 @@ along with this library. If not, see . #include #include -#include +#include #include @@ -127,7 +127,7 @@ namespace Phonon IFilterGraph *m_graph; FILTER_STATE m_state; QList m_pins; - mutable QReadWriteLock m_lock; + mutable QMutex m_mutex; }; } } diff --git a/src/3rdparty/phonon/ds9/qevr9.h b/src/3rdparty/phonon/ds9/qevr9.h new file mode 100644 index 0000000..8599fce --- /dev/null +++ b/src/3rdparty/phonon/ds9/qevr9.h @@ -0,0 +1,143 @@ +/* This file is part of the KDE project. + +Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). + +This library is free software: you can redistribute it and/or modify +it under the terms of the GNU Lesser General Public License as published by +the Free Software Foundation, either version 2.1 or 3 of the License. + +This library is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU Lesser General Public License for more details. + +You should have received a copy of the GNU Lesser General Public License +along with this library. If not, see . +*/ + +#include + +#define DXVA2_ProcAmp_Brightness 1 +#define DXVA2_ProcAmp_Contrast 2 +#define DXVA2_ProcAmp_Hue 4 +#define DXVA2_ProcAmp_Saturation 8 + +typedef enum { + MFVideoARMode_None = 0x00000000, + MFVideoARMode_PreservePicture = 0x00000001, + MFVideoARMode_PreservePixel = 0x00000002, + MFVideoARMode_NonLinearStretch = 0x00000004, + MFVideoARMode_Mask = 0x00000007 +} MFVideoAspectRatioMode; + +typedef struct { + float left; + float top; + float right; + float bottom; +} MFVideoNormalizedRect; + +typedef struct { + UINT DeviceCaps; + D3DPOOL InputPool; + UINT NumForwardRefSamples; + UINT NumBackwardRefSamples; + UINT Reserved; + UINT DeinterlaceTechnology; + UINT ProcAmpControlCaps; + UINT VideoProcessorOperations; + UINT NoiseFilterTechnology; + UINT DetailFilterTechnology; +} DXVA2_VideoProcessorCaps; + +typedef struct { + union { + struct { + USHORT Fraction; + SHORT Value; + }; + LONG ll; + }; +} DXVA2_Fixed32; + +typedef struct { + DXVA2_Fixed32 MinValue; + DXVA2_Fixed32 MaxValue; + DXVA2_Fixed32 DefaultValue; + DXVA2_Fixed32 StepSize; +} DXVA2_ValueRange; + +typedef struct { + DXVA2_Fixed32 Brightness; + DXVA2_Fixed32 Contrast; + DXVA2_Fixed32 Hue; + DXVA2_Fixed32 Saturation; +} DXVA2_ProcAmpValues; + +DXVA2_Fixed32 DXVA2FloatToFixed(const float _float_) +{ + DXVA2_Fixed32 _fixed_; + _fixed_.Fraction = LOWORD(_float_ * 0x10000); + _fixed_.Value = HIWORD(_float_ * 0x10000); + return _fixed_; +} + +float DXVA2FixedToFloat(const DXVA2_Fixed32 _fixed_) +{ + return (FLOAT)_fixed_.Value + (FLOAT)_fixed_.Fraction / 0x10000; +} + +#undef INTERFACE +#define INTERFACE IMFVideoDisplayControl +DECLARE_INTERFACE_(IMFVideoDisplayControl, IUnknown) +{ + STDMETHOD(GetNativeVideoSize)(THIS_ SIZE* pszVideo, SIZE* pszARVideo) PURE; + STDMETHOD(GetIdealVideoSize)(THIS_ SIZE* pszMin, SIZE* pszMax) PURE; + STDMETHOD(SetVideoPosition)(THIS_ const MFVideoNormalizedRect* pnrcSource, const LPRECT prcDest) PURE; + STDMETHOD(GetVideoPosition)(THIS_ MFVideoNormalizedRect* pnrcSource, LPRECT prcDest) PURE; + STDMETHOD(SetAspectRatioMode)(THIS_ DWORD dwAspectRatioMode) PURE; + STDMETHOD(GetAspectRatioMode)(THIS_ DWORD* pdwAspectRatioMode) PURE; + STDMETHOD(SetVideoWindow)(THIS_ HWND hwndVideo) PURE; + STDMETHOD(GetVideoWindow)(THIS_ HWND* phwndVideo) PURE; + STDMETHOD(RepaintVideo)(THIS_) PURE; + STDMETHOD(GetCurrentImage)(THIS_ BITMAPINFOHEADER* pBih, BYTE** pDib, DWORD* pcbDib, LONGLONG* pTimeStamp) PURE; + STDMETHOD(SetBorderColor)(THIS_ COLORREF Clr) PURE; + STDMETHOD(GetBorderColor)(THIS_ COLORREF* pClr) PURE; + STDMETHOD(SetRenderingPrefs)(THIS_ DWORD dwRenderFlags) PURE; + STDMETHOD(GetRenderingPrefs)(THIS_ DWORD* pdwRenderFlags) PURE; + STDMETHOD(SetFullScreen)(THIS_ BOOL fFullscreen) PURE; + STDMETHOD(GetFullScreen)(THIS_ BOOL* pfFullscreen) PURE; +}; +#undef INTERFACE +#define INTERFACE IMFVideoMixerControl +DECLARE_INTERFACE_(IMFVideoMixerControl, IUnknown) +{ + STDMETHOD(SetStreamZOrder)(THIS_ DWORD dwStreamID, DWORD dwZ) PURE; + STDMETHOD(GetStreamZOrder)(THIS_ DWORD dwStreamID, DWORD* pdwZ) PURE; + STDMETHOD(SetStreamOutputRect)(THIS_ DWORD dwStreamID, const MFVideoNormalizedRect* pnrcOutput) PURE; + STDMETHOD(GetStreamOutputRect)(THIS_ DWORD dwStreamID, MFVideoNormalizedRect* pnrcOutput) PURE; +}; +#undef INTERFACE +#define INTERFACE IMFVideoProcessor +DECLARE_INTERFACE_(IMFVideoProcessor, IUnknown) +{ + STDMETHOD(GetAvailableVideoProcessorModes)(THIS_ UINT* lpdwNumProcessingModes, GUID** ppVideoProcessingModes) PURE; + STDMETHOD(GetVideoProcessorCaps)(THIS_ LPGUID lpVideoProcessorMode, DXVA2_VideoProcessorCaps* lpVideoProcessorCaps) PURE; + STDMETHOD(GetVideoProcessorMode)(THIS_ LPGUID lpMode) PURE; + STDMETHOD(SetVideoProcessorMode)(THIS_ LPGUID lpMode) PURE; + STDMETHOD(GetProcAmpRange)(THIS_ DWORD dwProperty, DXVA2_ValueRange* pPropRange) PURE; + STDMETHOD(GetProcAmpValues)(THIS_ DWORD dwFlags, DXVA2_ProcAmpValues* Values) PURE; + STDMETHOD(SetProcAmpValues)(THIS_ DWORD dwFlags, DXVA2_ProcAmpValues* pValues) PURE; + STDMETHOD(GetFilteringRange)(THIS_ DWORD dwProperty, DXVA2_ValueRange* pPropRange) PURE; + STDMETHOD(GetFilteringValue)(THIS_ DWORD dwProperty, DXVA2_Fixed32* pValue) PURE; + STDMETHOD(SetFilteringValue)(THIS_ DWORD dwProperty, DXVA2_Fixed32* pValue) PURE; + STDMETHOD(GetBackgroundColor)(THIS_ COLORREF* lpClrBkg) PURE; + STDMETHOD(SetBackgroundColor)(THIS_ COLORREF ClrBkg) PURE; +}; +#undef INTERFACE +#define INTERFACE IMFGetService +DECLARE_INTERFACE_(IMFGetService, IUnknown) +{ + STDMETHOD(GetService)(THIS_ REFGUID guidService, REFIID riid, LPVOID* ppvObject) PURE; +}; +#undef INTERFACE diff --git a/src/3rdparty/phonon/ds9/qmeminputpin.cpp b/src/3rdparty/phonon/ds9/qmeminputpin.cpp index dca99db..a21fbe7 100644 --- a/src/3rdparty/phonon/ds9/qmeminputpin.cpp +++ b/src/3rdparty/phonon/ds9/qmeminputpin.cpp @@ -28,8 +28,8 @@ namespace Phonon namespace DS9 { - QMemInputPin::QMemInputPin(QBaseFilter *parent, const QVector &mt, bool transform) : - QPin(parent, PINDIR_INPUT, mt), m_shouldDuplicateSamples(true), m_transform(transform) + QMemInputPin::QMemInputPin(QBaseFilter *parent, const QVector &mt, bool transform, QPin *output) : + QPin(parent, PINDIR_INPUT, mt), m_shouldDuplicateSamples(true), m_transform(transform), m_output(output) { } @@ -66,11 +66,9 @@ namespace Phonon { //this allows to serialize with Receive calls QMutexLocker locker(&m_mutexReceive); - for(int i = 0; i < m_outputs.count(); ++i) { - IPin *conn = m_outputs.at(i)->connected(); - if (conn) { - conn->EndOfStream(); - } + IPin *conn = m_output ? m_output->connected() : 0; + if (conn) { + conn->EndOfStream(); } return S_OK; } @@ -78,13 +76,11 @@ namespace Phonon STDMETHODIMP QMemInputPin::BeginFlush() { //pass downstream - for(int i = 0; i < m_outputs.count(); ++i) { - IPin *conn = m_outputs.at(i)->connected(); - if (conn) { - conn->BeginFlush(); - } + IPin *conn = m_output ? m_output->connected() : 0; + if (conn) { + conn->BeginFlush(); } - QWriteLocker locker(&m_lock); + QMutexLocker locker(&m_mutex); m_flushing = true; return S_OK; } @@ -92,22 +88,19 @@ namespace Phonon STDMETHODIMP QMemInputPin::EndFlush() { //pass downstream - for(int i = 0; i < m_outputs.count(); ++i) { - IPin *conn = m_outputs.at(i)->connected(); - if (conn) { - conn->EndFlush(); - } + IPin *conn = m_output ? m_output->connected() : 0; + if (conn) { + conn->EndFlush(); } - QWriteLocker locker(&m_lock); + QMutexLocker locker(&m_mutex); m_flushing = false; return S_OK; } STDMETHODIMP QMemInputPin::NewSegment(REFERENCE_TIME start, REFERENCE_TIME stop, double rate) { - for(int i = 0; i < m_outputs.count(); ++i) { - m_outputs.at(i)->NewSegment(start, stop, rate); - } + if (m_output) + m_output->NewSegment(start, stop, rate); return S_OK; } @@ -119,14 +112,9 @@ namespace Phonon if (hr == S_OK && mt->majortype != MEDIATYPE_NULL && mt->subtype != MEDIASUBTYPE_NULL && - mt->formattype != GUID_NULL) { - //we tell the output pins that they should connect with this type - for(int i = 0; i < m_outputs.count(); ++i) { - hr = m_outputs.at(i)->setAcceptedMediaType(connectedType()); - if (FAILED(hr)) { - break; - } - } + mt->formattype != GUID_NULL && m_output) { + //we tell the output pin that it should connect with this type + hr = m_output->setAcceptedMediaType(connectedType()); } return hr; } @@ -137,7 +125,8 @@ namespace Phonon return E_POINTER; } - if (*alloc = memoryAllocator(true)) { + *alloc = memoryAllocator(true); + if (*alloc) { return S_OK; } @@ -151,18 +140,15 @@ namespace Phonon } { - QWriteLocker locker(&m_lock); + QMutexLocker locker(&m_mutex); m_shouldDuplicateSamples = m_transform && readonly; } setMemoryAllocator(alloc); - for(int i = 0; i < m_outputs.count(); ++i) { - IPin *pin = m_outputs.at(i)->connected(); - if (pin) { - ComPointer input(pin, IID_IMemInputPin); - input->NotifyAllocator(alloc, m_shouldDuplicateSamples); - } + if (m_output) { + ComPointer input(m_output, IID_IMemInputPin); + input->NotifyAllocator(alloc, m_shouldDuplicateSamples); } return S_OK; @@ -201,22 +187,18 @@ namespace Phonon } } - for (int i = 0; i < m_outputs.count(); ++i) { - QPin *current = m_outputs.at(i); + if (m_output) { IMediaSample *outSample = m_shouldDuplicateSamples ? - duplicateSampleForOutput(sample, current->memoryAllocator()) + duplicateSampleForOutput(sample, m_output->memoryAllocator()) : sample; if (m_shouldDuplicateSamples) { m_parent->processSample(outSample); } - IPin *pin = current->connected(); - if (pin) { - ComPointer input(pin, IID_IMemInputPin); - if (input) { - input->Receive(outSample); - } + ComPointer input(m_output->connected(), IID_IMemInputPin); + if (input) { + input->Receive(outSample); } if (m_shouldDuplicateSamples) { @@ -247,39 +229,16 @@ namespace Phonon STDMETHODIMP QMemInputPin::ReceiveCanBlock() { - //we test the output to see if they can block - for(int i = 0; i < m_outputs.count(); ++i) { - IPin *input = m_outputs.at(i)->connected(); - if (input) { - ComPointer meminput(input, IID_IMemInputPin); - if (meminput && meminput->ReceiveCanBlock() != S_FALSE) { - return S_OK; - } + //we test the output to see if it can block + if (m_output) { + ComPointer meminput(m_output->connected(), IID_IMemInputPin); + if (meminput && meminput->ReceiveCanBlock() != S_FALSE) { + return S_OK; } } return S_FALSE; } - //addition - //this should be used by the filter to tell its input pins to which output they should route the samples - - void QMemInputPin::addOutput(QPin *output) - { - QWriteLocker locker(&m_lock); - m_outputs += output; - } - - void QMemInputPin::removeOutput(QPin *output) - { - QWriteLocker locker(&m_lock); - m_outputs.removeOne(output); - } - - QList QMemInputPin::outputs() const - { - QReadLocker locker(&m_lock); - return m_outputs; - } ALLOCATOR_PROPERTIES QMemInputPin::getDefaultAllocatorProperties() const { @@ -294,7 +253,7 @@ namespace Phonon LONG length = sample->GetActualDataLength(); HRESULT hr = alloc->Commit(); - if (hr == VFW_E_SIZENOTSET) { + if (hr == HRESULT(VFW_E_SIZENOTSET)) { ALLOCATOR_PROPERTIES prop = getDefaultAllocatorProperties(); prop.cbBuffer = qMax(prop.cbBuffer, length); ALLOCATOR_PROPERTIES actual; @@ -324,7 +283,7 @@ namespace Phonon { LONGLONG start, end; hr = sample->GetMediaTime(&start, &end); - if (hr != VFW_E_MEDIA_TIME_NOT_SET) { + if (hr != HRESULT(VFW_E_MEDIA_TIME_NOT_SET)) { hr = out->SetMediaTime(&start, &end); Q_ASSERT(SUCCEEDED(hr)); } diff --git a/src/3rdparty/phonon/ds9/qmeminputpin.h b/src/3rdparty/phonon/ds9/qmeminputpin.h index c449721..d74c451 100644 --- a/src/3rdparty/phonon/ds9/qmeminputpin.h +++ b/src/3rdparty/phonon/ds9/qmeminputpin.h @@ -37,7 +37,7 @@ namespace Phonon class QMemInputPin : public QPin, public IMemInputPin { public: - QMemInputPin(QBaseFilter *, const QVector &, bool transform); + QMemInputPin(QBaseFilter *, const QVector &, bool transform, QPin *output); ~QMemInputPin(); //reimplementation from IUnknown @@ -60,18 +60,13 @@ namespace Phonon STDMETHODIMP ReceiveMultiple(IMediaSample **,long,long *); STDMETHODIMP ReceiveCanBlock(); - //addition - void addOutput(QPin *output); - void removeOutput(QPin *output); - QList outputs() const; - private: IMediaSample *duplicateSampleForOutput(IMediaSample *, IMemAllocator *); ALLOCATOR_PROPERTIES getDefaultAllocatorProperties() const; bool m_shouldDuplicateSamples; const bool m_transform; //defines if the pin is transforming the samples - QList m_outputs; + QPin* const m_output; QMutex m_mutexReceive; }; } diff --git a/src/3rdparty/phonon/ds9/qpin.cpp b/src/3rdparty/phonon/ds9/qpin.cpp index 37fe48d..b4afd10 100644 --- a/src/3rdparty/phonon/ds9/qpin.cpp +++ b/src/3rdparty/phonon/ds9/qpin.cpp @@ -28,20 +28,7 @@ namespace Phonon namespace DS9 { - static const AM_MEDIA_TYPE defaultMediaType() - { - AM_MEDIA_TYPE ret; - ret.majortype = MEDIATYPE_NULL; - ret.subtype = MEDIASUBTYPE_NULL; - ret.bFixedSizeSamples = TRUE; - ret.bTemporalCompression = FALSE; - ret.lSampleSize = 1; - ret.formattype = GUID_NULL; - ret.pUnk = 0; - ret.cbFormat = 0; - ret.pbFormat = 0; - return ret; - } + static const AM_MEDIA_TYPE defaultMediaType = { MEDIATYPE_NULL, MEDIASUBTYPE_NULL, TRUE, FALSE, 1, GUID_NULL, 0, 0, 0}; class QEnumMediaTypes : public IEnumMediaTypes { @@ -104,8 +91,8 @@ namespace Phonon return E_INVALIDARG; } - int nbFetched = 0; - while (nbFetched < int(count) && m_index < m_pin->mediaTypes().count()) { + uint nbFetched = 0; + while (nbFetched < count && m_index < m_pin->mediaTypes().count()) { //the caller will deallocate the memory *out = static_cast(::CoTaskMemAlloc(sizeof(AM_MEDIA_TYPE))); const AM_MEDIA_TYPE original = m_pin->mediaTypes().at(m_index); @@ -158,9 +145,9 @@ namespace Phonon QPin::QPin(QBaseFilter *parent, PIN_DIRECTION dir, const QVector &mt) : - m_memAlloc(0), m_parent(parent), m_refCount(1), m_connected(0), - m_direction(dir), m_mediaTypes(mt), m_connectedType(defaultMediaType()), - m_flushing(false) + m_parent(parent), m_flushing(false), m_refCount(1), m_connected(0), + m_direction(dir), m_mediaTypes(mt), m_connectedType(defaultMediaType), + m_memAlloc(0) { Q_ASSERT(m_parent); m_parent->addPin(this); @@ -273,7 +260,7 @@ namespace Phonon if (FAILED(hr)) { setConnected(0); - setConnectedType(defaultMediaType()); + setConnectedType(defaultMediaType); } else { ComPointer input(pin, IID_IMemInputPin); if (input) { @@ -315,10 +302,8 @@ namespace Phonon } setConnected(0); - setConnectedType(defaultMediaType()); - if (m_direction == PINDIR_INPUT) { - setMemoryAllocator(0); - } + setConnectedType(defaultMediaType); + setMemoryAllocator(0); return S_OK; } @@ -338,7 +323,7 @@ namespace Phonon STDMETHODIMP QPin::ConnectionMediaType(AM_MEDIA_TYPE *type) { - QReadLocker locker(&m_lock); + QMutexLocker locker(&m_mutex); if (!type) { return E_POINTER; } @@ -353,7 +338,6 @@ namespace Phonon STDMETHODIMP QPin::QueryPinInfo(PIN_INFO *info) { - QReadLocker locker(&m_lock); if (!info) { return E_POINTER; } @@ -361,14 +345,12 @@ namespace Phonon info->dir = m_direction; info->pFilter = m_parent; m_parent->AddRef(); - qMemCopy(info->achName, m_name.utf16(), qMin(MAX_FILTER_NAME, m_name.length()+1) *2); - + info->achName[0] = 0; return S_OK; } STDMETHODIMP QPin::QueryDirection(PIN_DIRECTION *dir) { - QReadLocker locker(&m_lock); if (!dir) { return E_POINTER; } @@ -379,20 +361,18 @@ namespace Phonon STDMETHODIMP QPin::QueryId(LPWSTR *id) { - QReadLocker locker(&m_lock); if (!id) { return E_POINTER; } - int nbBytes = (m_name.length()+1)*2; - *id = static_cast(::CoTaskMemAlloc(nbBytes)); - qMemCopy(*id, m_name.utf16(), nbBytes); + *id = static_cast(::CoTaskMemAlloc(2)); + *id[0] = 0; return S_OK; } STDMETHODIMP QPin::QueryAccept(const AM_MEDIA_TYPE *type) { - QReadLocker locker(&m_lock); + QMutexLocker locker(&m_mutex); if (!type) { return E_POINTER; } @@ -439,7 +419,7 @@ namespace Phonon STDMETHODIMP QPin::NewSegment(REFERENCE_TIME start, REFERENCE_TIME stop, double rate) { - QReadLocker locker(&m_lock); + QMutexLocker locker(&m_mutex); if (m_direction == PINDIR_OUTPUT && m_connected) { //we deliver this downstream m_connected->NewSegment(start, stop, rate); @@ -456,8 +436,8 @@ namespace Phonon HRESULT QPin::checkOutputMediaTypesConnection(IPin *pin) { - IEnumMediaTypes *emt = 0; - HRESULT hr = pin->EnumMediaTypes(&emt); + ComPointer emt; + HRESULT hr = pin->EnumMediaTypes(emt.pparam()); if (hr != S_OK) { return hr; } @@ -470,7 +450,7 @@ namespace Phonon freeMediaType(type); return S_OK; } else { - setConnectedType(defaultMediaType()); + setConnectedType(defaultMediaType); freeMediaType(type); } } @@ -520,7 +500,7 @@ namespace Phonon void QPin::setConnectedType(const AM_MEDIA_TYPE &type) { - QWriteLocker locker(&m_lock); + QMutexLocker locker(&m_mutex); //1st we free memory freeMediaType(m_connectedType); @@ -530,13 +510,13 @@ namespace Phonon const AM_MEDIA_TYPE &QPin::connectedType() const { - QReadLocker locker(&m_lock); + QMutexLocker locker(&m_mutex); return m_connectedType; } void QPin::setConnected(IPin *pin) { - QWriteLocker locker(&m_lock); + QMutexLocker locker(&m_mutex); if (pin) { pin->AddRef(); } @@ -548,7 +528,7 @@ namespace Phonon IPin *QPin::connected(bool addref) const { - QReadLocker locker(&m_lock); + QMutexLocker locker(&m_mutex); if (addref && m_connected) { m_connected->AddRef(); } @@ -557,13 +537,12 @@ namespace Phonon bool QPin::isFlushing() const { - QReadLocker locker(&m_lock); + QMutexLocker locker(&m_mutex); return m_flushing; } FILTER_STATE QPin::filterState() const { - QReadLocker locker(&m_lock); FILTER_STATE fstate = State_Stopped; m_parent->GetState(0, &fstate); return fstate; @@ -571,7 +550,7 @@ namespace Phonon QVector QPin::mediaTypes() const { - QReadLocker locker(&m_lock); + QMutexLocker locker(&m_mutex); return m_mediaTypes; } @@ -607,7 +586,7 @@ namespace Phonon void QPin::setMemoryAllocator(IMemAllocator *alloc) { - QWriteLocker locker(&m_lock); + QMutexLocker locker(&m_mutex); if (alloc) { alloc->AddRef(); } @@ -619,7 +598,7 @@ namespace Phonon IMemAllocator *QPin::memoryAllocator(bool addref) const { - QReadLocker locker(&m_lock); + QMutexLocker locker(&m_mutex); if (addref && m_memAlloc) { m_memAlloc->AddRef(); } diff --git a/src/3rdparty/phonon/ds9/qpin.h b/src/3rdparty/phonon/ds9/qpin.h index a3287c4..280ad61 100644 --- a/src/3rdparty/phonon/ds9/qpin.h +++ b/src/3rdparty/phonon/ds9/qpin.h @@ -22,7 +22,7 @@ along with this library. If not, see . #include #include -#include +#include #include @@ -85,8 +85,8 @@ namespace Phonon protected: //this can be used by sub-classes - mutable QReadWriteLock m_lock; - QBaseFilter *m_parent; + mutable QMutex m_mutex; + QBaseFilter * const m_parent; bool m_flushing; private: @@ -98,7 +98,6 @@ namespace Phonon const PIN_DIRECTION m_direction; QVector m_mediaTypes; //accepted media types AM_MEDIA_TYPE m_connectedType; - QString m_name; IMemAllocator *m_memAlloc; }; diff --git a/src/3rdparty/phonon/ds9/videorenderer_default.cpp b/src/3rdparty/phonon/ds9/videorenderer_default.cpp new file mode 100644 index 0000000..0045a49 --- /dev/null +++ b/src/3rdparty/phonon/ds9/videorenderer_default.cpp @@ -0,0 +1,153 @@ +/* This file is part of the KDE project. + +Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). + +This library is free software: you can redistribute it and/or modify +it under the terms of the GNU Lesser General Public License as published by +the Free Software Foundation, either version 2.1 or 3 of the License. + +This library is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU Lesser General Public License for more details. + +You should have received a copy of the GNU Lesser General Public License +along with this library. If not, see . +*/ + + +#include "videorenderer_default.h" + +#ifndef QT_NO_PHONON_VIDEO + +#include +#include + +#include + +QT_BEGIN_NAMESPACE + + +namespace Phonon +{ + namespace DS9 + { + VideoRendererDefault::~VideoRendererDefault() + { + } + + bool VideoRendererDefault::isNative() const + { + return true; + } + + + VideoRendererDefault::VideoRendererDefault(QWidget *target) : m_target(target) + { + m_target->setAttribute(Qt::WA_PaintOnScreen, true); + m_filter = Filter(CLSID_VideoRenderer, IID_IBaseFilter); + } + + QSize VideoRendererDefault::videoSize() const + { + LONG w = 0, + h = 0; + ComPointer basic(m_filter, IID_IBasicVideo); + if (basic) { + basic->GetVideoSize( &w, &h); + } + return QSize(w, h); + } + + void VideoRendererDefault::repaintCurrentFrame(QWidget * /*target*/, const QRect & /*rect*/) + { + //nothing to do here: the renderer paints everything + } + + void VideoRendererDefault::notifyResize(const QSize &size, Phonon::VideoWidget::AspectRatio aspectRatio, + Phonon::VideoWidget::ScaleMode scaleMode) + { + if (!isActive()) { + ComPointer basic(m_filter, IID_IBasicVideo); + if (basic) { + basic->SetDestinationPosition(0, 0, 0, 0); + } + return; + } + + ComPointer video(m_filter, IID_IVideoWindow); + + OAHWND owner; + HRESULT hr = video->get_Owner(&owner); + if (FAILED(hr)) { + return; + } + + const OAHWND newOwner = reinterpret_cast(m_target->winId()); + if (owner != newOwner) { + video->put_Owner(newOwner); + video->put_MessageDrain(newOwner); + video->put_WindowStyle(WS_CHILD | WS_CLIPCHILDREN | WS_CLIPSIBLINGS); + } + + //make sure the widget takes the whole size of the parent + video->SetWindowPosition(0, 0, size.width(), size.height()); + + const QSize vsize = videoSize(); + internalNotifyResize(size, vsize, aspectRatio, scaleMode); + + ComPointer basic(m_filter, IID_IBasicVideo); + if (basic) { + basic->SetDestinationPosition(m_dstX, m_dstY, m_dstWidth, m_dstHeight); + } + } + + void VideoRendererDefault::applyMixerSettings(qreal /*brightness*/, qreal /*contrast*/, qreal /*m_hue*/, qreal /*saturation*/) + { + //this can't be supported for the default renderer + } + + QImage VideoRendererDefault::snapshot() const + { + ComPointer basic(m_filter, IID_IBasicVideo); + if (basic) { + LONG bufferSize = 0; + //1st we get the buffer size + basic->GetCurrentImage(&bufferSize, 0); + + QByteArray buffer; + buffer.resize(bufferSize); + HRESULT hr = basic->GetCurrentImage(&bufferSize, reinterpret_cast(buffer.data())); + + if (SUCCEEDED(hr)) { + + const BITMAPINFOHEADER *bmi = reinterpret_cast(buffer.constData()); + + const int w = qAbs(bmi->biWidth), + h = qAbs(bmi->biHeight); + + // Create image and copy data into image. + QImage ret(w, h, QImage::Format_RGB32); + + if (!ret.isNull()) { + const char *data = buffer.constData() + bmi->biSize; + const int bytes_per_line = w * sizeof(QRgb); + for (int y = h - 1; y >= 0; --y) { + qMemCopy(ret.scanLine(y), //destination + data, //source + bytes_per_line); + data += bytes_per_line; + } + } + return ret; + } + } + return QImage(); + } + + } +} + +QT_END_NAMESPACE + +#endif //QT_NO_PHONON_VIDEO diff --git a/src/3rdparty/phonon/ds9/videorenderer_default.h b/src/3rdparty/phonon/ds9/videorenderer_default.h new file mode 100644 index 0000000..43768d9 --- /dev/null +++ b/src/3rdparty/phonon/ds9/videorenderer_default.h @@ -0,0 +1,55 @@ +/* This file is part of the KDE project. + +Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). + +This library is free software: you can redistribute it and/or modify +it under the terms of the GNU Lesser General Public License as published by +the Free Software Foundation, either version 2.1 or 3 of the License. + +This library is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU Lesser General Public License for more details. + +You should have received a copy of the GNU Lesser General Public License +along with this library. If not, see . +*/ + +#ifndef PHONON_VIDEORENDERER_DEFAULT_H +#define PHONON_VIDEORENDERER_DEFAULT_H + +#include "abstractvideorenderer.h" + +QT_BEGIN_NAMESPACE + +#ifndef QT_NO_PHONON_VIDEO + +namespace Phonon +{ + namespace DS9 + { + class VideoRendererDefault : public AbstractVideoRenderer + { + public: + VideoRendererDefault(QWidget *target); + ~VideoRendererDefault(); + + //Implementation from AbstractVideoRenderer + void repaintCurrentFrame(QWidget *target, const QRect &rect); + void notifyResize(const QSize&, Phonon::VideoWidget::AspectRatio, Phonon::VideoWidget::ScaleMode); + QSize videoSize() const; + QImage snapshot() const; + void applyMixerSettings(qreal brightness, qreal contrast, qreal m_hue, qreal saturation); + bool isNative() const; + private: + QWidget *m_target; + }; + } +} + +#endif //QT_NO_PHONON_VIDEO + +QT_END_NAMESPACE + +#endif + diff --git a/src/3rdparty/phonon/ds9/videorenderer_evr.cpp b/src/3rdparty/phonon/ds9/videorenderer_evr.cpp new file mode 100644 index 0000000..d23d9ce --- /dev/null +++ b/src/3rdparty/phonon/ds9/videorenderer_evr.cpp @@ -0,0 +1,215 @@ +/* This file is part of the KDE project. + +Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). + +This library is free software: you can redistribute it and/or modify +it under the terms of the GNU Lesser General Public License as published by +the Free Software Foundation, either version 2.1 or 3 of the License. + +This library is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU Lesser General Public License for more details. + +You should have received a copy of the GNU Lesser General Public License +along with this library. If not, see . +*/ + + +#include "videorenderer_evr.h" +#include "qevr9.h" + +#ifndef QT_NO_PHONON_VIDEO + +#include +#include + +QT_BEGIN_NAMESPACE + +namespace Phonon +{ + namespace DS9 + { + //we have to define them here because not all compilers/sdk have them + static const GUID MR_VIDEO_RENDER_SERVICE = {0x1092a86c, 0xab1a, 0x459a, {0xa3, 0x36, 0x83, 0x1f, 0xbc, 0x4d, 0x11, 0xff} }; + static const GUID MR_VIDEO_MIXER_SERVICE = { 0x73cd2fc, 0x6cf4, 0x40b7, {0x88, 0x59, 0xe8, 0x95, 0x52, 0xc8, 0x41, 0xf8} }; + static const IID IID_IMFVideoDisplayControl = {0xa490b1e4, 0xab84, 0x4d31, {0xa1, 0xb2, 0x18, 0x1e, 0x03, 0xb1, 0x07, 0x7a} }; + static const IID IID_IMFVideoMixerControl = {0xA5C6C53F, 0xC202, 0x4aa5, {0x96, 0x95, 0x17, 0x5B, 0xA8, 0xC5, 0x08, 0xA5} }; + static const IID IID_IMFVideoProcessor = {0x6AB0000C, 0xFECE, 0x4d1f, {0xA2, 0xAC, 0xA9, 0x57, 0x35, 0x30, 0x65, 0x6E} }; + static const IID IID_IMFGetService = {0xFA993888, 0x4383, 0x415A, {0xA9, 0x30, 0xDD, 0x47, 0x2A, 0x8C, 0xF6, 0xF7} }; + static const GUID CLSID_EnhancedVideoRenderer = {0xfa10746c, 0x9b63, 0x4b6c, {0xbc, 0x49, 0xfc, 0x30, 0xe, 0xa5, 0xf2, 0x56} }; + + template ComPointer getService(const Filter &filter, REFGUID guidService, REFIID riid) + { + //normally we should use IID_IMFGetService but this introduces another dependency + //so here we simply define our own IId with the same value + ComPointer getService(filter, IID_IMFGetService); + Q_ASSERT(getService); + T *ptr = 0; + HRESULT hr = getService->GetService(guidService, riid, reinterpret_cast(&ptr)); + if (!SUCCEEDED(hr) || ptr == 0) + Q_ASSERT(!SUCCEEDED(hr) && ptr != 0); + ComPointer service(ptr); + return service; + } + + VideoRendererEVR::~VideoRendererEVR() + { + } + + bool VideoRendererEVR::isNative() const + { + return true; + } + + VideoRendererEVR::VideoRendererEVR(QWidget *target) : m_target(target) + { + m_filter = Filter(CLSID_EnhancedVideoRenderer, IID_IBaseFilter); + if (!m_filter) { + return; + } + + ComPointer filterControl = getService(m_filter, MR_VIDEO_RENDER_SERVICE, IID_IMFVideoDisplayControl); + + filterControl->SetVideoWindow(reinterpret_cast(target->winId())); + filterControl->SetAspectRatioMode(MFVideoARMode_None); // We're in control of the size + } + + QImage VideoRendererEVR::snapshot() const + { + // This will always capture black areas where no video is drawn, if any are present. + // Due to the hack in notifyResize() + ComPointer filterControl = getService(m_filter, MR_VIDEO_RENDER_SERVICE, IID_IMFVideoDisplayControl); + if (filterControl) { + BITMAPINFOHEADER bmi; + BYTE *buffer = 0; + DWORD bufferSize; + LONGLONG timeStamp; + + bmi.biSize = sizeof(BITMAPINFOHEADER); + + HRESULT hr = filterControl->GetCurrentImage(&bmi, &buffer, &bufferSize, &timeStamp); + if (SUCCEEDED(hr)) { + + const int w = qAbs(bmi.biWidth), + h = qAbs(bmi.biHeight); + + // Create image and copy data into image. + QImage ret(w, h, QImage::Format_RGB32); + + if (!ret.isNull()) { + uchar *data = buffer; + const int bytes_per_line = w * sizeof(QRgb); + for (int y = h - 1; y >= 0; --y) { + qMemCopy(ret.scanLine(y), //destination + data, //source + bytes_per_line); + data += bytes_per_line; + } + } + ::CoTaskMemFree(buffer); + return ret; + } + } + return QImage(); + } + + QSize VideoRendererEVR::videoSize() const + { + SIZE nativeSize; + SIZE aspectRatioSize; + + ComPointer filterControl = getService(m_filter, MR_VIDEO_RENDER_SERVICE, IID_IMFVideoDisplayControl); + + filterControl->GetNativeVideoSize(&nativeSize, &aspectRatioSize); + + return QSize(nativeSize.cx, nativeSize.cy); + } + + void VideoRendererEVR::repaintCurrentFrame(QWidget *target, const QRect &rect) + { + // repaint the video + ComPointer filterControl = getService(m_filter, MR_VIDEO_RENDER_SERVICE, IID_IMFVideoDisplayControl); + // All failed results can be safely ignored + filterControl->RepaintVideo(); + } + + void VideoRendererEVR::notifyResize(const QSize &size, Phonon::VideoWidget::AspectRatio aspectRatio, + Phonon::VideoWidget::ScaleMode scaleMode) + { + if (!isActive()) { + RECT dummyRect = { 0, 0, 0, 0}; + ComPointer filterControl = getService(m_filter, MR_VIDEO_RENDER_SERVICE, IID_IMFVideoDisplayControl); + filterControl->SetVideoPosition(0, &dummyRect); + return; + } + + const QSize vsize = videoSize(); + internalNotifyResize(size, vsize, aspectRatio, scaleMode); + + RECT dstRectWin = { 0, 0, size.width(), size.height()}; + + // Resize the Stream output rect instead of the destination rect. + // Hacky workaround for flicker in the areas outside of the destination rect + // This way these areas don't exist + MFVideoNormalizedRect streamOutputRect = { float(m_dstX) / float(size.width()), float(m_dstY) / float(size.height()), + float(m_dstWidth + m_dstX) / float(size.width()), float(m_dstHeight + m_dstY) / float(size.height())}; + + ComPointer filterMixer = getService(m_filter, MR_VIDEO_MIXER_SERVICE, IID_IMFVideoMixerControl); + ComPointer filterControl = getService(m_filter, MR_VIDEO_RENDER_SERVICE, IID_IMFVideoDisplayControl); + + filterMixer->SetStreamOutputRect(0, &streamOutputRect); + filterControl->SetVideoPosition(0, &dstRectWin); + } + + void VideoRendererEVR::applyMixerSettings(qreal brightness, qreal contrast, qreal hue, qreal saturation) + { + InputPin sink = BackendNode::pins(m_filter, PINDIR_INPUT).first(); + OutputPin source; + if (FAILED(sink->ConnectedTo(source.pparam()))) { + return; //it must be connected to work + } + + // Get the "Video Processor" (used for brightness/contrast/saturation/hue) + ComPointer processor = getService(m_filter, MR_VIDEO_MIXER_SERVICE, IID_IMFVideoProcessor); + Q_ASSERT(processor); + + DXVA2_ValueRange contrastRange; + DXVA2_ValueRange brightnessRange; + DXVA2_ValueRange saturationRange; + DXVA2_ValueRange hueRange; + + if (FAILED(processor->GetProcAmpRange(DXVA2_ProcAmp_Contrast, &contrastRange))) + return; + if (FAILED(processor->GetProcAmpRange(DXVA2_ProcAmp_Brightness, &brightnessRange))) + return; + if (FAILED(processor->GetProcAmpRange(DXVA2_ProcAmp_Saturation, &saturationRange))) + return; + if (FAILED(processor->GetProcAmpRange(DXVA2_ProcAmp_Hue, &hueRange))) + return; + + DXVA2_ProcAmpValues values; + + values.Contrast = DXVA2FloatToFixed(((contrast < 0 + ? DXVA2FixedToFloat(contrastRange.MinValue) : DXVA2FixedToFloat(contrastRange.MaxValue)) + - DXVA2FixedToFloat(contrastRange.DefaultValue)) * qAbs(contrast) + DXVA2FixedToFloat(contrastRange.DefaultValue)); + values.Brightness = DXVA2FloatToFixed(((brightness < 0 + ? DXVA2FixedToFloat(brightnessRange.MinValue) : DXVA2FixedToFloat(brightnessRange.MaxValue)) + - DXVA2FixedToFloat(brightnessRange.DefaultValue)) * qAbs(brightness) + DXVA2FixedToFloat(brightnessRange.DefaultValue)); + values.Saturation = DXVA2FloatToFixed(((saturation < 0 + ? DXVA2FixedToFloat(saturationRange.MinValue) : DXVA2FixedToFloat(saturationRange.MaxValue)) + - DXVA2FixedToFloat(saturationRange.DefaultValue)) * qAbs(saturation) + DXVA2FixedToFloat(saturationRange.DefaultValue)); + values.Hue = DXVA2FloatToFixed(((hue < 0 + ? DXVA2FixedToFloat(hueRange.MinValue) : DXVA2FixedToFloat(hueRange.MaxValue)) + - DXVA2FixedToFloat(hueRange.DefaultValue)) * qAbs(hue) + DXVA2FixedToFloat(hueRange.DefaultValue)); + + //finally set the settings + processor->SetProcAmpValues(DXVA2_ProcAmp_Contrast | DXVA2_ProcAmp_Brightness | DXVA2_ProcAmp_Saturation | DXVA2_ProcAmp_Hue, &values); + + } + } +} + +QT_END_NAMESPACE + +#endif //QT_NO_PHONON_VIDEO diff --git a/src/3rdparty/phonon/ds9/videorenderer_evr.h b/src/3rdparty/phonon/ds9/videorenderer_evr.h new file mode 100644 index 0000000..229c36d --- /dev/null +++ b/src/3rdparty/phonon/ds9/videorenderer_evr.h @@ -0,0 +1,56 @@ +/* This file is part of the KDE project. + +Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). + +This library is free software: you can redistribute it and/or modify +it under the terms of the GNU Lesser General Public License as published by +the Free Software Foundation, either version 2.1 or 3 of the License. + +This library is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU Lesser General Public License for more details. + +You should have received a copy of the GNU Lesser General Public License +along with this library. If not, see . +*/ + +#ifndef PHONON_VIDEORENDERER_EVR_H +#define PHONON_VIDEORENDERER_EVR_H + +#include "abstractvideorenderer.h" +#include "compointer.h" + +QT_BEGIN_NAMESPACE + +#ifndef QT_NO_PHONON_VIDEO + +namespace Phonon +{ + namespace DS9 + { + class VideoRendererEVR : public AbstractVideoRenderer + { + public: + VideoRendererEVR(QWidget *target); + ~VideoRendererEVR(); + + //Implementation from AbstractVideoRenderer + void repaintCurrentFrame(QWidget *target, const QRect &rect); + void notifyResize(const QSize&, Phonon::VideoWidget::AspectRatio, Phonon::VideoWidget::ScaleMode); + QSize videoSize() const; + QImage snapshot() const; + void applyMixerSettings(qreal brightness, qreal contrast, qreal m_hue, qreal saturation); + bool isNative() const; + private: + QWidget *m_target; + }; + } +} + +#endif //QT_NO_PHONON_VIDEO + +QT_END_NAMESPACE + +#endif + diff --git a/src/3rdparty/phonon/ds9/videorenderer_soft.cpp b/src/3rdparty/phonon/ds9/videorenderer_soft.cpp index 491d1bd..9c7993c 100644 --- a/src/3rdparty/phonon/ds9/videorenderer_soft.cpp +++ b/src/3rdparty/phonon/ds9/videorenderer_soft.cpp @@ -194,8 +194,8 @@ namespace Phonon m_sampleBuffer = ComPointer(); #ifndef QT_NO_OPENGL freeGLResources(); -#endif // QT_NO_OPENGL m_textureUploaded = false; +#endif // QT_NO_OPENGL } void endOfStream() @@ -314,7 +314,6 @@ namespace Phonon REFERENCE_TIME m_start; HANDLE m_renderEvent, m_receiveCanWait; // Signals sample to render QSize m_size; - bool m_textureUploaded; //mixer settings qreal m_brightness, @@ -356,6 +355,7 @@ namespace Phonon bool m_checkedPrograms; bool m_usingOpenGL; + bool m_textureUploaded; GLuint m_program[2]; GLuint m_texture[3]; #endif @@ -365,7 +365,7 @@ namespace Phonon { public: VideoRendererSoftPin(VideoRendererSoftFilter *parent) : - QMemInputPin(parent, videoMediaTypes(), false /*no transformation of the samples*/), + QMemInputPin(parent, videoMediaTypes(), false /*no transformation of the samples*/, 0), m_renderer(parent) { } @@ -436,7 +436,7 @@ namespace Phonon QBaseFilter(CLSID_NULL), m_inputPin(new VideoRendererSoftPin(this)), m_renderer(renderer), m_start(0) #ifndef QT_NO_OPENGL - ,m_usingOpenGL(false), m_checkedPrograms(false), m_textureUploaded(false) + , m_checkedPrograms(false), m_usingOpenGL(false), m_textureUploaded(false) #endif { m_renderEvent = ::CreateEvent(0, 0, 0, 0); @@ -661,7 +661,10 @@ namespace Phonon #ifndef QT_NO_OPENGL - if (painter.paintEngine() && painter.paintEngine()->type() == QPaintEngine::OpenGL && checkGLPrograms()) { + if (painter.paintEngine() && + (painter.paintEngine()->type() == QPaintEngine::OpenGL || painter.paintEngine()->type() == QPaintEngine::OpenGL2) + && checkGLPrograms()) { + //for now we only support YUV (both YV12 and YUY2) updateTexture(); @@ -673,6 +676,7 @@ namespace Phonon } //let's draw the texture + painter.beginNativePainting(); //Let's pass the other arguments const Program prog = (m_inputPin->connectedType().subtype == MEDIASUBTYPE_YV12) ? YV12toRGB : YUY2toRGB; @@ -722,6 +726,7 @@ namespace Phonon glDisableClientState(GL_VERTEX_ARRAY); glDisable(GL_FRAGMENT_PROGRAM_ARB); + painter.endNativePainting(); return; } else #endif diff --git a/src/3rdparty/phonon/ds9/videorenderer_vmr9.cpp b/src/3rdparty/phonon/ds9/videorenderer_vmr9.cpp index 298e9fa..545b31e 100644 --- a/src/3rdparty/phonon/ds9/videorenderer_vmr9.cpp +++ b/src/3rdparty/phonon/ds9/videorenderer_vmr9.cpp @@ -22,14 +22,9 @@ along with this library. If not, see . #include #include -#include -#ifndef Q_OS_WINCE #include #include -#else -#include -#endif QT_BEGIN_NAMESPACE @@ -48,116 +43,10 @@ namespace Phonon } -#ifdef Q_OS_WINCE - VideoRendererVMR9::VideoRendererVMR9(QWidget *target) : m_target(target) - { - m_target->setAttribute(Qt::WA_PaintOnScreen, true); - m_filter = Filter(CLSID_VideoRenderer, IID_IBaseFilter); - } - - QSize VideoRendererVMR9::videoSize() const - { - LONG w = 0, - h = 0; - ComPointer basic(m_filter, IID_IBasicVideo); - if (basic) { - basic->GetVideoSize( &w, &h); - } - return QSize(w, h); - } - - void VideoRendererVMR9::repaintCurrentFrame(QWidget * /*target*/, const QRect & /*rect*/) - { - //nothing to do here: the renderer paints everything - } - - void VideoRendererVMR9::notifyResize(const QSize &size, Phonon::VideoWidget::AspectRatio aspectRatio, - Phonon::VideoWidget::ScaleMode scaleMode) - { - if (!isActive()) { - ComPointer basic(m_filter, IID_IBasicVideo); - if (basic) { - basic->SetDestinationPosition(0, 0, 0, 0); - } - return; - } - - ComPointer video(m_filter, IID_IVideoWindow); - - OAHWND owner; - HRESULT hr = video->get_Owner(&owner); - if (FAILED(hr)) { - return; - } - - const OAHWND newOwner = reinterpret_cast(m_target->winId()); - if (owner != newOwner) { - video->put_Owner(newOwner); - video->put_MessageDrain(newOwner); - video->put_WindowStyle(WS_CHILD | WS_CLIPCHILDREN | WS_CLIPSIBLINGS); - } - - //make sure the widget takes the whole size of the parent - video->SetWindowPosition(0, 0, size.width(), size.height()); - - const QSize vsize = videoSize(); - internalNotifyResize(size, vsize, aspectRatio, scaleMode); - - ComPointer basic(m_filter, IID_IBasicVideo); - if (basic) { - basic->SetDestinationPosition(m_dstX, m_dstY, m_dstWidth, m_dstHeight); - } - } - - void VideoRendererVMR9::applyMixerSettings(qreal /*brightness*/, qreal /*contrast*/, qreal /*m_hue*/, qreal /*saturation*/) - { - //this can't be supported for WinCE - } - - QImage VideoRendererVMR9::snapshot() const - { - ComPointer basic(m_filter, IID_IBasicVideo); - if (basic) { - LONG bufferSize = 0; - //1st we get the buffer size - basic->GetCurrentImage(&bufferSize, 0); - - QByteArray buffer; - buffer.resize(bufferSize); - HRESULT hr = basic->GetCurrentImage(&bufferSize, reinterpret_cast(buffer.data())); - - if (SUCCEEDED(hr)) { - - const BITMAPINFOHEADER *bmi = reinterpret_cast(buffer.constData()); - - const int w = qAbs(bmi->biWidth), - h = qAbs(bmi->biHeight); - - // Create image and copy data into image. - QImage ret(w, h, QImage::Format_RGB32); - - if (!ret.isNull()) { - const char *data = buffer.constData() + bmi->biSize; - const int bytes_per_line = w * sizeof(QRgb); - for (int y = h - 1; y >= 0; --y) { - qMemCopy(ret.scanLine(y), //destination - data, //source - bytes_per_line); - data += bytes_per_line; - } - } - return ret; - } - } - return QImage(); - } - -#else VideoRendererVMR9::VideoRendererVMR9(QWidget *target) : m_target(target) { m_filter = Filter(CLSID_VideoMixingRenderer9, IID_IBaseFilter); if (!m_filter) { - qWarning("the video widget could not be initialized correctly"); return; } @@ -169,6 +58,7 @@ namespace Phonon Q_ASSERT(SUCCEEDED(hr)); ComPointer windowlessControl(m_filter, IID_IVMRWindowlessControl9); windowlessControl->SetVideoClippingWindow(reinterpret_cast(target->winId())); + windowlessControl->SetAspectRatioMode(VMR9ARMode_None); //we're in control of the size } QImage VideoRendererVMR9::snapshot() const @@ -324,7 +214,6 @@ namespace Phonon //finally set the settings mixer->SetProcAmpControl(0, &ctrl); } -#endif } } diff --git a/src/3rdparty/phonon/ds9/videorenderer_vmr9.h b/src/3rdparty/phonon/ds9/videorenderer_vmr9.h index 4eb237e..516d79d 100644 --- a/src/3rdparty/phonon/ds9/videorenderer_vmr9.h +++ b/src/3rdparty/phonon/ds9/videorenderer_vmr9.h @@ -19,7 +19,6 @@ along with this library. If not, see . #define PHONON_VIDEORENDERER_VMR9_H #include "abstractvideorenderer.h" -#include "compointer.h" QT_BEGIN_NAMESPACE diff --git a/src/3rdparty/phonon/ds9/videowidget.cpp b/src/3rdparty/phonon/ds9/videowidget.cpp index de7ce5f..09d42a4 100644 --- a/src/3rdparty/phonon/ds9/videowidget.cpp +++ b/src/3rdparty/phonon/ds9/videowidget.cpp @@ -24,7 +24,12 @@ along with this library. If not, see . #include "mediaobject.h" +#ifndef Q_OS_WINCE +#include "videorenderer_evr.h" #include "videorenderer_vmr9.h" +#else +#include "videorenderer_default.h" +#endif #include "videorenderer_soft.h" QT_BEGIN_NAMESPACE @@ -84,7 +89,19 @@ namespace Phonon void setCurrentRenderer(AbstractVideoRenderer *renderer) { m_currentRenderer = renderer; - update(); + //we disallow repaint on that widget for just a fraction of second + //this allows better transition between videos + setUpdatesEnabled(false); + m_flickerFreeTimer.start(20, this); + } + + void timerEvent(QTimerEvent *e) + { + if (e->timerId() == m_flickerFreeTimer.timerId()) { + m_flickerFreeTimer.stop(); + setUpdatesEnabled(true); + } + QWidget::timerEvent(e); } QSize sizeHint() const @@ -106,6 +123,8 @@ namespace Phonon void paintEvent(QPaintEvent *e) { + if (!updatesEnabled()) + return; //this avoids repaint from native events checkCurrentRenderingMode(); m_currentRenderer->repaintCurrentFrame(this, e->rect()); } @@ -153,13 +172,14 @@ namespace Phonon } } else if (!isEmbedded()) { m_currentRenderer = m_node->switchRendering(m_currentRenderer); - setAttribute(Qt::WA_PaintOnScreen, true); + setAttribute(Qt::WA_PaintOnScreen, false); } } VideoWidget *m_node; AbstractVideoRenderer *m_currentRenderer; QVariant m_restoreScreenSaverActive; + QBasicTimer m_flickerFreeTimer; }; VideoWidget::VideoWidget(QWidget *parent) @@ -203,6 +223,9 @@ namespace Phonon if (toNative && m_noNativeRendererSupported) return current; //no switch here + if (!mediaObject()) + return current; + //firt we delete the renderer //initialization of the widgets for(int i = 0; i < FILTER_COUNT; ++i) { @@ -261,6 +284,7 @@ namespace Phonon { m_aspectRatio = aspectRatio; updateVideoSize(); + m_widget->update(); } Phonon::VideoWidget::ScaleMode VideoWidget::scaleMode() const @@ -279,6 +303,7 @@ namespace Phonon { m_scaleMode = scaleMode; updateVideoSize(); + m_widget->update(); } void VideoWidget::setBrightness(qreal b) @@ -332,14 +357,29 @@ namespace Phonon int index = graphIndex * 2 + type; if (m_renderers[index] == 0 && autoCreate) { AbstractVideoRenderer *renderer = 0; - if (type == Native) { - renderer = new VideoRendererVMR9(m_widget); + if (type == Native) { +#ifndef Q_OS_WINCE + renderer = new VideoRendererEVR(m_widget); + if (renderer->getFilter() == 0) { + delete renderer; + //EVR not present, let's try VMR + renderer = new VideoRendererVMR9(m_widget); + if (renderer->getFilter() == 0) { + //instanciating the renderer might fail + m_noNativeRendererSupported = true; + delete renderer; + renderer = 0; + } + } +#else + renderer = new VideoRendererDefault(m_widget); if (renderer->getFilter() == 0) { - //instanciating the renderer might fail with error VFW_E_DDRAW_CAPS_NOT_SUITABLE (0x80040273) + //instanciating the renderer might fail m_noNativeRendererSupported = true; delete renderer; renderer = 0; } +#endif } if (renderer == 0) { diff --git a/src/3rdparty/phonon/ds9/volumeeffect.cpp b/src/3rdparty/phonon/ds9/volumeeffect.cpp index b9a5fce..a93b074 100644 --- a/src/3rdparty/phonon/ds9/volumeeffect.cpp +++ b/src/3rdparty/phonon/ds9/volumeeffect.cpp @@ -76,7 +76,7 @@ namespace Phonon class VolumeMemInputPin : public QMemInputPin { public: - VolumeMemInputPin(QBaseFilter *parent, const QVector &mt) : QMemInputPin(parent, mt, true /*transform*/) + VolumeMemInputPin(QBaseFilter *parent, const QVector &mt, QPin *output) : QMemInputPin(parent, mt, true /*transform*/, output) { } @@ -139,8 +139,7 @@ namespace Phonon //then creating the input mt << audioMediaType(); - m_input = new VolumeMemInputPin(this, mt); - m_input->addOutput(m_output); //make the connection here + m_input = new VolumeMemInputPin(this, mt, m_output); } void VolumeEffectFilter::treatOneSamplePerChannel(BYTE **buffer, int sampleSize, int channelCount, int frequency) diff --git a/src/3rdparty/phonon/ds9/volumeeffect.h b/src/3rdparty/phonon/ds9/volumeeffect.h index 39b20d0..d1b0186 100644 --- a/src/3rdparty/phonon/ds9/volumeeffect.h +++ b/src/3rdparty/phonon/ds9/volumeeffect.h @@ -47,7 +47,7 @@ namespace Phonon private: float m_volume; - //parameters used to fade + //paramaters used to fade Phonon::VolumeFaderEffect::FadeCurve m_fadeCurve; bool m_fading; //determines if we should be fading. diff --git a/src/plugins/phonon/ds9/ds9.pro b/src/plugins/phonon/ds9/ds9.pro index f40c561..dab5116 100644 --- a/src/plugins/phonon/ds9/ds9.pro +++ b/src/plugins/phonon/ds9/ds9.pro @@ -23,6 +23,7 @@ HEADERS += \ $$PHONON_DS9_DIR/videowidget.h \ $$PHONON_DS9_DIR/videorenderer_soft.h \ $$PHONON_DS9_DIR/videorenderer_vmr9.h \ + $$PHONON_DS9_DIR/videorenderer_evr.h \ $$PHONON_DS9_DIR/volumeeffect.h \ $$PHONON_DS9_DIR/qbasefilter.h \ $$PHONON_DS9_DIR/qpin.h \ @@ -46,6 +47,7 @@ SOURCES += \ $$PHONON_DS9_DIR/videowidget.cpp \ $$PHONON_DS9_DIR/videorenderer_soft.cpp \ $$PHONON_DS9_DIR/videorenderer_vmr9.cpp \ + $$PHONON_DS9_DIR/videorenderer_evr.cpp \ $$PHONON_DS9_DIR/volumeeffect.cpp \ $$PHONON_DS9_DIR/qbasefilter.cpp \ $$PHONON_DS9_DIR/qpin.cpp \ -- cgit v0.12 From ab31654127d7a6e9a06a2c75bc8b2832d68cdfc0 Mon Sep 17 00:00:00 2001 From: Jason McDonald Date: Thu, 15 Apr 2010 20:32:27 +1000 Subject: Fix previous merge commit. --- src/3rdparty/phonon/ds9/mediaobject.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/3rdparty/phonon/ds9/mediaobject.cpp b/src/3rdparty/phonon/ds9/mediaobject.cpp index 34f92c2..d640956 100644 --- a/src/3rdparty/phonon/ds9/mediaobject.cpp +++ b/src/3rdparty/phonon/ds9/mediaobject.cpp @@ -27,6 +27,9 @@ along with this library. If not, see . #include #include #include +#ifdef Q_CC_MSVC +# include +#endif #include #include "mediaobject.h" -- cgit v0.12 From f2f5184d4a1c1bb0dd4816a13918a67ae0435d3d Mon Sep 17 00:00:00 2001 From: Martin Smith Date: Thu, 15 Apr 2010 12:23:19 +0200 Subject: qdoc: Fixed .qdocconf files for assistant. (cherry picked from commit 114cb018c088570ff0640eeb0d57594905ff9fcf) --- tools/qdoc3/test/qt-build-docs.qdocconf | 30 ++++++++++++++++++++++++++- tools/qdoc3/test/qt-build-docs_zh_CN.qdocconf | 29 +++++++++++++++++++++++++- tools/qdoc3/test/qt.qdocconf | 29 +++++++++++++++++++++++++- tools/qdoc3/test/qt_zh_CN.qdocconf | 29 +++++++++++++++++++++++++- 4 files changed, 113 insertions(+), 4 deletions(-) diff --git a/tools/qdoc3/test/qt-build-docs.qdocconf b/tools/qdoc3/test/qt-build-docs.qdocconf index c9392c0..900c7c3 100644 --- a/tools/qdoc3/test/qt-build-docs.qdocconf +++ b/tools/qdoc3/test/qt-build-docs.qdocconf @@ -22,13 +22,41 @@ qhp.Qt.indexRoot = # Files not referenced in any qdoc file (last four are needed by qtdemo) # See also extraimages.HTML -qhp.Qt.extraFiles = classic.css \ +qhp.Qt.extraFiles = style/style.css \ + scripts/functions.js \ + scripts/jquery.js \ + images/api_examples.png \ + images/api_lookup.png \ + images/api_topcs.png \ + images/bg_11.png \ + images/bg_1_blank.png \ + images/bg_1.png \ + images/bg_1r.png \ + images/bg_r.png \ + images/bg_ul_blank.png \ + images/bg_ul.png \ + images/bg_ur_blank.png \ + images/bg_ur.png \ + images/breadcrumb.png \ + images/bullet_dn.png \ + images/bullet_gt.png \ + images/feedbackground.png \ + images/form_bg.png \ + images/horBar.png \ + images/page_bg.png \ + images/print.png \ + images/qt_guide.png \ images/qt-logo.png \ + images/qt_ref_doc.png \ + images/qt_tools.png \ + images/sep.png \ + images/sprites-combined.png \ images/taskmenuextension-example.png \ images/coloreditorfactoryimage.png \ images/dynamiclayouts-example.png \ images/stylesheet-coffee-plastique.png + qhp.Qt.filterAttributes = qt 4.7.0 qtrefdoc qhp.Qt.customFilters.Qt.name = Qt 4.7.0 qhp.Qt.customFilters.Qt.filterAttributes = qt 4.7.0 diff --git a/tools/qdoc3/test/qt-build-docs_zh_CN.qdocconf b/tools/qdoc3/test/qt-build-docs_zh_CN.qdocconf index 19db8a9..93c5e3e 100644 --- a/tools/qdoc3/test/qt-build-docs_zh_CN.qdocconf +++ b/tools/qdoc3/test/qt-build-docs_zh_CN.qdocconf @@ -29,8 +29,35 @@ qhp.Qt.customFilters.Qt.filterAttributes = qt 4.7.0 # Files not referenced in any qdoc file (last four are needed by qtdemo) # See also extraimages.HTML -qhp.Qt.extraFiles = classic.css \ +qhp.Qt.extraFiles = style/style.css \ + scripts/functions.js \ + scripts/jquery.js \ + images/api_examples.png \ + images/api_lookup.png \ + images/api_topcs.png \ + images/bg_11.png \ + images/bg_1_blank.png \ + images/bg_1.png \ + images/bg_1r.png \ + images/bg_r.png \ + images/bg_ul_blank.png \ + images/bg_ul.png \ + images/bg_ur_blank.png \ + images/bg_ur.png \ + images/breadcrumb.png \ + images/bullet_dn.png \ + images/bullet_gt.png \ + images/feedbackground.png \ + images/form_bg.png \ + images/horBar.png \ + images/page_bg.png \ + images/print.png \ + images/qt_guide.png \ images/qt-logo.png \ + images/qt_ref_doc.png \ + images/qt_tools.png \ + images/sep.png \ + images/sprites-combined.png \ images/taskmenuextension-example.png \ images/coloreditorfactoryimage.png \ images/dynamiclayouts-example.png \ diff --git a/tools/qdoc3/test/qt.qdocconf b/tools/qdoc3/test/qt.qdocconf index 29b49e2..91f9525 100644 --- a/tools/qdoc3/test/qt.qdocconf +++ b/tools/qdoc3/test/qt.qdocconf @@ -24,8 +24,35 @@ qhp.Qt.indexRoot = # Files not referenced in any qdoc file (last four are needed by qtdemo) # See also extraimages.HTML -qhp.Qt.extraFiles = classic.css \ +qhp.Qt.extraFiles = style/style.css \ + scripts/functions.js \ + scripts/jquery.js \ + images/api_examples.png \ + images/api_lookup.png \ + images/api_topcs.png \ + images/bg_11.png \ + images/bg_1_blank.png \ + images/bg_1.png \ + images/bg_1r.png \ + images/bg_r.png \ + images/bg_ul_blank.png \ + images/bg_ul.png \ + images/bg_ur_blank.png \ + images/bg_ur.png \ + images/breadcrumb.png \ + images/bullet_dn.png \ + images/bullet_gt.png \ + images/feedbackground.png \ + images/form_bg.png \ + images/horBar.png \ + images/page_bg.png \ + images/print.png \ + images/qt_guide.png \ images/qt-logo.png \ + images/qt_ref_doc.png \ + images/qt_tools.png \ + images/sep.png \ + images/sprites-combined.png \ images/taskmenuextension-example.png \ images/coloreditorfactoryimage.png \ images/dynamiclayouts-example.png \ diff --git a/tools/qdoc3/test/qt_zh_CN.qdocconf b/tools/qdoc3/test/qt_zh_CN.qdocconf index 980c542..925edec 100644 --- a/tools/qdoc3/test/qt_zh_CN.qdocconf +++ b/tools/qdoc3/test/qt_zh_CN.qdocconf @@ -31,8 +31,35 @@ qhp.Qt.customFilters.Qt.filterAttributes = qt 4.7.0 # Files not referenced in any qdoc file (last four are needed by qtdemo) # See also extraimages.HTML -qhp.Qt.extraFiles = classic.css \ +qhp.Qt.extraFiles = style/style.css \ + scripts/functions.js \ + scripts/jquery.js \ + images/api_examples.png \ + images/api_lookup.png \ + images/api_topcs.png \ + images/bg_11.png \ + images/bg_1_blank.png \ + images/bg_1.png \ + images/bg_1r.png \ + images/bg_r.png \ + images/bg_ul_blank.png \ + images/bg_ul.png \ + images/bg_ur_blank.png \ + images/bg_ur.png \ + images/breadcrumb.png \ + images/bullet_dn.png \ + images/bullet_gt.png \ + images/feedbackground.png \ + images/form_bg.png \ + images/horBar.png \ + images/page_bg.png \ + images/print.png \ + images/qt_guide.png \ images/qt-logo.png \ + images/qt_ref_doc.png \ + images/qt_tools.png \ + images/sep.png \ + images/sprites-combined.png \ images/taskmenuextension-example.png \ images/coloreditorfactoryimage.png \ images/dynamiclayouts-example.png \ -- cgit v0.12 From 3764acbd211b97cf48908d90697d16e43c116836 Mon Sep 17 00:00:00 2001 From: Morten Engvoldsen Date: Tue, 13 Apr 2010 15:15:33 +0200 Subject: Doc: Fixing design bugs. Updating the index page and script/style files. Adding some image files. Reveiwed-by: trustme (cherry picked from commit c0d02030333c9f96188b5a425f2552472ab53325) --- doc/src/index.qdoc | 2 - doc/src/template/images/bullet_dn.png | Bin 0 -> 230 bytes doc/src/template/images/bullet_up.png | Bin 0 -> 253 bytes doc/src/template/images/header.png | Bin 0 -> 2600 bytes doc/src/template/scripts/functions.js | 11 +- doc/src/template/style/style.css | 817 +++++++++--------------- tools/qdoc3/test/qt-defines.qdocconf | 2 + tools/qdoc3/test/qt-html-templates.qdocconf | 26 +- tools/qdoc3/test/scripts/functions.js | 60 ++ tools/qdoc3/test/scripts/jquery.js | 152 +++++ tools/qdoc3/test/style/style.css | 946 ++++++++++++++++++++++++++++ tools/qdoc3/test/style/style_ie6.css | 54 ++ tools/qdoc3/test/style/style_ie7.css | 19 + tools/qdoc3/test/style/style_ie8.css | 0 14 files changed, 1562 insertions(+), 527 deletions(-) create mode 100644 doc/src/template/images/bullet_dn.png create mode 100644 doc/src/template/images/bullet_up.png create mode 100644 doc/src/template/images/header.png create mode 100644 tools/qdoc3/test/scripts/functions.js create mode 100644 tools/qdoc3/test/scripts/jquery.js create mode 100644 tools/qdoc3/test/style/style.css create mode 100644 tools/qdoc3/test/style/style_ie6.css create mode 100644 tools/qdoc3/test/style/style_ie7.css create mode 100644 tools/qdoc3/test/style/style_ie8.css diff --git a/doc/src/index.qdoc b/doc/src/index.qdoc index 71060f8..2f23e6e 100644 --- a/doc/src/index.qdoc +++ b/doc/src/index.qdoc @@ -43,8 +43,6 @@ \page index.html \keyword Qt Reference Documentation - \title Qt Reference Documentation - \raw HTML
diff --git a/doc/src/template/images/bullet_dn.png b/doc/src/template/images/bullet_dn.png new file mode 100644 index 0000000..f776247 Binary files /dev/null and b/doc/src/template/images/bullet_dn.png differ diff --git a/doc/src/template/images/bullet_up.png b/doc/src/template/images/bullet_up.png new file mode 100644 index 0000000..285e741 Binary files /dev/null and b/doc/src/template/images/bullet_up.png differ diff --git a/doc/src/template/images/header.png b/doc/src/template/images/header.png new file mode 100644 index 0000000..141488b Binary files /dev/null and b/doc/src/template/images/header.png differ diff --git a/doc/src/template/scripts/functions.js b/doc/src/template/scripts/functions.js index c510410..329b910 100755 --- a/doc/src/template/scripts/functions.js +++ b/doc/src/template/scripts/functions.js @@ -1,7 +1,7 @@ /* START non link areas where cursor should change to pointing hand */ $('.t_button').mouseover(function() { - $(this).css('cursor','pointer'); + $('.t_button').css('cursor','pointer'); /*document.getElementById(this.id).style.cursor='pointer';*/ }); @@ -17,17 +17,20 @@ $('#medA').click(function() { $('.content h1').css('font','600 18px/1.2 Arial'); $('.content h2').css('font','600 16px/1.2 Arial'); $('.content h3').css('font','600 14px/1.2 Arial'); - $('.content p').css('font','13px/1.2 Verdana'); - $('.content li').css('font','600 10pt/1 Verdana'); + $('.content p').css('font','13px/20px Verdana'); + $('.content li').css('font','400 13px/1 Verdana'); $('.content li').css('line-height','14px'); + $('.content .toc li').css('font', 'normal 10px/1.2 Verdana'); $('.content table').css('font','13px/1.2 Verdana'); + $('.content .heading').css('font','600 16px/1 Arial'); + $('.content .indexboxcont li').css('font','600 13px/1 Verdana'); $('.t_button').removeClass('active') $(this).addClass('active') }); $('#bigA').click(function() { $('.content .heading,.content h1, .content h2, .content h3, .content p, .content li, .content table').css('font-size','large'); - $('.content li').css('line-height','14px'); + $('.content .heading,.content h1, .content h2, .content h3, .content p, .content li, .content table').css('line-height','25px'); $('.t_button').removeClass('active') $(this).addClass('active') }); diff --git a/doc/src/template/style/style.css b/doc/src/template/style/style.css index 4668c23..c46e875 100755 --- a/doc/src/template/style/style.css +++ b/doc/src/template/style/style.css @@ -73,6 +73,7 @@ { font-size: 100%; } + /* Page style */ html { background-color: #e5e5e5; @@ -101,7 +102,6 @@ { background: url(../images/bg_r.png) repeat-y 100% 0; } - .wrapper .hd { padding-left: 216px; @@ -109,12 +109,10 @@ background: url(../images/bg_ul.png) no-repeat 0 0; overflow: hidden; } - .offline .wrapper .hd { background: url(../images/bg_ul_blank.png) no-repeat 0 0; } - .wrapper .hd span { height: 15px; @@ -122,23 +120,19 @@ background: url(../images/bg_ur.png) no-repeat 100% 0; overflow: hidden; } - .offline .wrapper .hd span { /* background: url(../images/bg_ur_blank.png) no-repeat 100% 0; */ } - .wrapper .bd { background: url(../images/bg_l.png) repeat-y 0 0; position: relative; } - .offline .wrapper .bd { background: url(../images/bg_l_blank.png) repeat-y 0 0; } - .wrapper .ft { padding-left: 216px; @@ -146,12 +140,10 @@ background: url(../images/bg_ll.png) no-repeat 0 0; overflow: hidden; } - .offline .wrapper .ft { background: url(../images/bg_ll_blank.png) no-repeat 0 0; } - .wrapper .ft span { height: 15px; @@ -159,34 +151,23 @@ background: url(../images/bg_lr.png) no-repeat 100% 0; overflow: hidden; } - .header, .footer { display: block; clear: both; overflow: hidden; } - - /* .header - { - height: 130px; - position: relative; - } - */ - .header { height: 115px; position: relative; } - .header .icon { position: absolute; top: 13px; left: 0; } - .header .qtref { position: absolute; @@ -195,7 +176,6 @@ width: 302px; height: 22px; } - .header .qtref span { display: block; @@ -204,7 +184,184 @@ text-indent: -999em; background: url(../images/qt_ref_doc.png) no-repeat 0 0; } + /* header elements */ + #nav-topright + { + height: 70px; + } + + #nav-topright ul + { + list-style-type: none; + float: right; + width: 370px; + margin-top: 11px; + } + + #nav-topright li + { + display: inline-block; + margin-right: 20px; + float: left; + } + + #nav-topright li.nav-topright-last + { + margin-right: 0; + } + + #nav-topright li a + { + background: transparent url(../images/sprites-combined.png) no-repeat; + height: 18px; + display: block; + overflow: hidden; + text-indent: -9999px; + } + + #nav-topright li.nav-topright-home a + { + width: 65px; + background-position: -2px -91px; + } + + #nav-topright li.nav-topright-home a:hover + { + background-position: -2px -117px; + } + + + #nav-topright li.nav-topright-dev a + { + width: 30px; + background-position: -76px -91px; + } + + #nav-topright li.nav-topright-dev a:hover + { + background-position: -76px -117px; + } + + + #nav-topright li.nav-topright-labs a + { + width: 40px; + background-position: -114px -91px; + } + + #nav-topright li.nav-topright-labs a:hover + { + background-position: -114px -117px; + } + + #nav-topright li.nav-topright-doc a + { + width: 32px; + background-position: -162px -91px; + } + + #nav-topright li.nav-topright-doc a:hover, #nav-topright li.nav-topright-doc-active a + { + background-position: -162px -117px; + } + + #nav-topright li.nav-topright-blog a + { + width: 40px; + background-position: -203px -91px; + } + + #nav-topright li.nav-topright-blog a:hover, #nav-topright li.nav-topright-blog-active a + { + background-position: -203px -117px; + } + + #nav-topright li.nav-topright-shop a + { + width: 40px; + background-position: -252px -91px; + } + + #nav-topright li.nav-topright-shop a:hover, #nav-topright li.nav-topright-shop-active a + { + background-position: -252px -117px; + } + + #nav-logo + { + background: transparent url( "../images/sprites-combined.png" ) no-repeat 0 -225px; + left: -3px; + position: absolute; + width: 75px; + height: 75px; + top: 13px; + } + #nav-logo a + { + width: 75px; + height: 75px; + display: block; + text-indent: -9999px; + overflow: hidden; + } + /* Clearing */ + .header:after, .footer:after, .breadcrumb:after, .wrap .content:after, .group:after + { + content: "."; + display: block; + height: 0; + clear: both; + visibility: hidden; + } + /* ^ Clearing */ + + + + .shortCut-topleft-inactive + { + padding-left: 3px; + background: transparent url( "../images/sprites-combined.png" ) no-repeat 0px -58px; + height: 20px; + width: 93px; + } + .shortCut-topleft-inactive span + { + font-variant: normal; + } + #shortCut + { + padding-top: 10px; + font-weight: bolder; + color: #b0adab; + } + #shortCut ul + { + list-style-type: none; + float: left; + width: 347px; + margin-left: 100px; + } + #shortCut li + { + display: inline-block; + margin-right: 25px; + float: left; + white-space: nowrap; + } + #shortCut li a + { + color: #b0adab; + text-decoration: none; + } + #shortCut li a:hover + { + color: #44a51c; + text-decoration: none; + } + /* end of header elements */ + + /* menu element */ .sidebar { float: left; @@ -212,7 +369,6 @@ width: 200px; font-size: 11px; } - .sidebar a { color: #00732f; @@ -222,19 +378,15 @@ { display: none; } - .sidebar .searchlabel { padding: 0 0 2px 17px; font: normal bold 11px/1.2 Verdana; } - .sidebar .search { padding: 0 15px 0 16px; } - - .sidebar .search form { width: 167px; @@ -242,7 +394,6 @@ padding: 2px 0 0 5px; background: url(../images/form_bg.png) no-repeat 0 0; } - .sidebar .search form fieldset input#searchstring { width: 158px; @@ -252,84 +403,66 @@ outline: none; font: 13px/1.2 Verdana; } - .sidebar .box { padding: 17px 15px 5px 16px; } - .sidebar .box .first { background-image: none; } - .sidebar .box h2 { font: normal 18px/1.2 Arial; padding: 15px 0 0 40px; min-height: 32px; } - .sidebar .box#lookup h2 { background: url(../images/api_lookup.png) no-repeat 0 0; } - .sidebar .box#topics h2 { background: url(../images/api_topics.png) no-repeat 0 0; } - .sidebar .box#examples h2 { background: url(../images/api_examples.png) no-repeat 0 0; } - .sidebar .box .list { display: block; } - .sidebar .box .live { display: none; height: 100px; overflow: auto; } - .list li a:hover, .live li a:hover { text-decoration: underline; } - - - .sidebar .box ul - { - } - .sidebar .box ul li { padding-left: 12px; background: url(../images/bullet_gt.png) no-repeat 0 5px; margin-bottom: 15px; } - .sidebar .bottombar { background: url(../images/box_bg.png) repeat-x 0 bottom; } - + /* content elements */ .wrap { - /* margin: 0 5px 0 0px;*/ overflow: hidden; } - .offline .wrap { margin: 0 5px 0 5px; } - + /* tool bar */ .wrap .toolbar { background-color: #fafafa; @@ -339,12 +472,10 @@ margin-right: 5px; position: relative; } - .wrap .toolbar .toolblock { position: absolute; } - .wrap .toolbar .breadcrumb { font-size: 11px; @@ -359,12 +490,10 @@ vertical-align: top; overflow: hidden; } - .wrap .toolbar .toolbuttons .active { color: #00732F; } - .wrap .toolbar .toolbuttons ul { float: right; @@ -378,7 +507,6 @@ font-weight: bold; color: #B0ADAB; } - #smallA { font-size: 10pt; @@ -391,31 +519,20 @@ { font-size: 14pt; } - #smallA:hover, #medA:hover, #bigA:hover { color: #00732F; } - #print { font-size: 14pt; line-height: 20pt; } - #printIcon { margin-left: 5px; } - - .offline .wrap .breadcrumb - { - } - - .wrap .breadcrumb ul - { - } - + /* bread crumbs */ .wrap .breadcrumb ul li { float: left; @@ -424,105 +541,87 @@ margin-left: 15px; font-weight: bold; } - .wrap .breadcrumb ul li.last { font-weight: normal; } - - .wrap .breadcrumb ul li a - { - } - .wrap .breadcrumb ul li.first { background-image: none; padding-left: 0; margin-left: 0; } - .wrap .content { - /* left 30 top 27*/ padding: 30px; position: relative; } - + /* text elements */ .heading { font: normal 600 16px/1.0 Arial; padding-bottom: 15px; } + .subtitle + { + font-size: 13px; + } + + .small-subtitle + { + font-size: 13px; + } + .wrap .content h1 { font: 600 18px/1.2 Arial; padding-bottom: 15px; } - .wrap .content h2 { font: 600 16px/1.2 Arial; } - .wrap .content h3 { font: 600 14px/1.2 Arial; } - - - .wrap .content p { - padding-bottom: 10px; + line-height:20px; + padding:10px 5px 10px 5px; } - .wrap .content ul { - padding-left: 15px; + padding-left: 25px; } .wrap .content li { padding-left: 12px; background: url(../images/bullet_sq.png) no-repeat 0 5px; - font: normal 600 10pt/1 Verdana; + font: normal 400 10pt/1 Verdana; margin-bottom: 10px; line-height: 14px; } - - .content li:hover + a { + color: #00732F; text-decoration: none; } - - .content li + a:hover { - text-decoration: none; + color: #4c0033; + text-decoration: underline; } - - /*.content*/ a - { - color: #00732F; - text-decoration: none; - } - - .content a:hover - { - color: #4c0033; - text-decoration: underline; - } - .content a:visited { color: #4c0033; + text-decoration: none; } - .offline .wrap .content { padding-top: 15px; } - - .footer { min-height: 100px; @@ -531,7 +630,6 @@ text-align: center; padding-top: 40px; } - .feedback { float: right; @@ -539,7 +637,6 @@ font: normal 8px/1 Verdana; color: #B0ADAB; } - .feedback:hover { float: right; @@ -547,196 +644,6 @@ color: #00732F; text-decoration: underline; } - - - - /* Clearing */ - .header:after, .footer:after, .breadcrumb:after, .wrap .content:after, .group:after - { - content: "."; - display: block; - height: 0; - clear: both; - visibility: hidden; - } - /* ^ Clearing */ - - - /* header elements */ - - - #nav-topright - { - height: 70px; - } - - #nav-topright ul - { - list-style-type: none; - float: right; - width: 347px; - margin-top: 11px; - } - - #nav-topright li - { - display: inline-block; - margin-right: 20px; - float: left; - } - - #nav-topright li.nav-topright-last - { - margin-right: 0; - } - - #nav-topright li a - { - background: transparent url(../images/sprites-combined.png) no-repeat; - height: 18px; - display: block; - overflow: hidden; - text-indent: -9999px; - } - - #nav-topright li.nav-topright-home a - { - width: 65px; - background-position: -2px -91px; - } - - #nav-topright li.nav-topright-home a:hover - { - background-position: -2px -117px; - } - - - #nav-topright li.nav-topright-dev a - { - width: 30px; - background-position: -76px -91px; - } - - #nav-topright li.nav-topright-dev a:hover - { - background-position: -76px -117px; - } - - - #nav-topright li.nav-topright-labs a - { - width: 40px; - background-position: -114px -91px; - } - - #nav-topright li.nav-topright-labs a:hover - { - background-position: -114px -117px; - } - - #nav-topright li.nav-topright-doc a - { - width: 32px; - background-position: -162px -91px; - } - - #nav-topright li.nav-topright-doc a:hover, #nav-topright li.nav-topright-doc-active a - { - background-position: -162px -117px; - } - - #nav-topright li.nav-topright-blog a - { - width: 40px; - background-position: -203px -91px; - } - - #nav-topright li.nav-topright-blog a:hover, #nav-topright li.nav-topright-blog-active a - { - background-position: -203px -117px; - } - - #nav-topright li.nav-topright-shop a - { - width: 40px; - background-position: -252px -91px; - } - - #nav-topright li.nav-topright-shop a:hover, #nav-topright li.nav-topright-shop-active a - { - background-position: -252px -117px; - } - - #nav-logo - { - background: transparent url( "../images/sprites-combined.png" ) no-repeat 0 -225px; - left: -3px; - position: absolute; - width: 75px; - height: 75px; - top: 13px; - } - #nav-logo a - { - width: 75px; - height: 75px; - display: block; - text-indent: -9999px; - overflow: hidden; - } - - - .shortCut-topleft-inactive - { - padding-left: 3px; - background: transparent url( "../images/sprites-combined.png" ) no-repeat 0px -58px; - height: 20px; - width: 93px; - } - - .shortCut-topleft-inactive span - { - font-variant: normal; - } - - #shortCut - { - padding-top: 10px; - font-weight: bolder; - color: #b0adab; - } - - #shortCut ul - { - list-style-type: none; - float: left; - width: 347px; - margin-left: 100px; - } - - #shortCut li - { - display: inline-block; - margin-right: 25px; - float: left; - white-space: nowrap; - } - - #shortCut li a - { - color: #b0adab; - text-decoration: none; - } - - #shortCut li a:hover - { - color: #44a51c; - text-decoration: none; - } - - - /* end of header elements */ - hr { background-color: #e0e0e0; @@ -745,228 +652,111 @@ text-align: left; margin: 15px 0px 15px 0px; } + .content .alignedsummary { margin: 15px; } - - table.valuelist - { - border-width: 0px 0px 1px 0px; - border-style: solid; - border-color: #b0adab; - border-collapse: collapse; - background-color: #f0f0f0; /* border-bottom: solid 1px #b0adab;*/ - } - - table.valuelist th - { - border-width: 0px 0px 0px 0px; - padding: 4px; - color: #00732F; - font: 600 10pt/1 Verdana; - } - - table.generic, table.annotated + /* tables */ + table, pre { - border: none; - padding-left: 15px; - padding-right: 15px; - margin-bottom: 15px; - } - - - table td.memItemLeft - { - width: 180px; - padding: 2px 0px 0px 8px; - margin: 4px; - border-width: 1px; - border-color: #b0adab; - border-style: none; - font-size: 100%; - white-space: nowrap; - } - - table td.memItemRight - { - padding: 2px 8px 0px 8px; - margin: 4px; - border-width: 1px; - border-color: #b0adab; - border-style: none; - font-size: 100%; + -moz-border-radius: 7px 7px 7px 7px; + background-color: #F6F6F6; + border: 1px solid #E6E6E6; + border-collapse: separate; + font-size: 11px; + min-width: 395px; + margin-bottom: 25px; } - + thead{margin-top: 5px;} + th{ padding: 3px 15px 3px 15px;} + td{padding: 3px 15px 3px 20px;} table tr.odd { - background: #EBEBEB; + border-left: 1px solid #E6E6E6; + background-color: #F6F6F6; color: #66666E; } - table tr.even { - background: #F4F4F4; + border-left: 1px solid #E6E6E6; + background-color: #ffffff; color: #66666E; } - - table.annotated th + table tr.odd:hover { - padding: 3px; - text-align: left; + background-color: #E6E6E6; } - - table td, table th + table tr.even:hover { - padding: 3px; /* border:solid 1px #FFFFFF;*/ + background-color: #E6E6E6; } - - table tr pre - { - padding-top: 0px; - padding-bottom: 0px; - padding-left: 0px; - padding-right: 0px; - border: none; - background: none; - } - - tr.qt-style /* change me - widgets-sliders.html*/ - { - background: #BCBCBC; - border-bottom: solid 1px #b0adab; - } - - table tr.qt-code pre /* investigate */ - { - padding: 0.2em; - border: #e7e7e7 1px solid; - background: #f1f1f1; - color: black; - } - - span.preprocessor, span.preprocessor a - { - color: darkblue; - } - span.comment { - color: darkred; + color: #8B0000; font-style: italic; } - span.string, span.char { - color: darkgreen; + color: #254117; } - - .subtitle + pre { - font-size: 13px; + -moz-border-radius:7px 7px 7px 7px; + background-color:#F6F6F6; + border:1px solid #DDDDDD; + margin:0 20px 10px 10px; + padding:20px 15px 20px 20px; + overflow-x:auto; } - - .small-subtitle - { - font-size: 13px; - } - - .qmlitem - { - padding: 0; - } - - .qmlname - { - white-space: nowrap; - } - .qmltype { text-align: center; font-size: 160%; } - - .qmlproto - { - background-color: #eee; - border-width: 1px; - border-style: solid; - border-color: #ddd; - font-weight: bold; - padding: 6px 10px 6px 10px; - margin: 42px 0px 0px 0px; - } - .qmlreadonly { float: right; - color: red; - } - - .qmldoc - { + color: #254117; } - - *.qmlitem p - { - } - - - thead - { - margin-top: 5px; - } - - td - { - padding: 5px; - } - th - { - padding: 5px; - } - - #feedbackBox { - display: none; - position: fixed; + display:none; + -moz-border-radius:7px 7px 7px 7px; + border:1px solid #DDDDDD; + position:fixed; + top:100px; left: 33%; - bottom: 200px; height: 190px; width: 400px; padding: 5px; background-color: #e6e7e8; z-index: 4; } - #feedcloseX a { - padding-top: 5px; - padding-right: 5px; - color: #333333; + display:inline; + padding: 5px 5px 0 0; + margin-bottom:3px; + color: #363534; + font-weight:600; float: right; text-decoration: none; } - #feedbox + /* here */ { - float: none; - width: 350px; + display:inline; + width: 370px; height: 120px; - margin-top: 5px; - margin-left: 25px; - margin-right: 25px; + margin:0px 25px 10px 15px; } - #feedsubmit { - float: right; - margin-top: 4px; - margin-right: 22px; + display:inline; + float:right; + margin:4px 32px 0 0; } - #blurpage { display: none; @@ -979,74 +769,83 @@ background: transparent url(../images/feedbackground.png) 0 0; z-index: 3; } - /* page elements */ .toc { - float: right; - border: solid 1px #666600; - background-color: #FFFFCC; - margin: 15px; + float: right; + -moz-border-radius:7px 7px 7px 7px; + background-color:#F6F6F6; + border:1px solid #DDDDDD; + margin:0 20px 10px 10px; + padding:20px 15px 20px 20px; height: auto; width: 200px; } + .toc h3 + { + font:600 12px/1.2 Arial; + } + .toc ul { float: left; padding: 15px; + } + .content .toc li { - font: normal 13px/1.2 Verdana; + font: normal 10px/1.2 Verdana; + background: url(../images/bullet_dn.png) no-repeat 0 5px; } - - .relpage /* edit */ + + .relpage { + -moz-border-radius: 7px 7px 7px 7px; + border: 1px solid #DDDDDD; + padding: 25px 25px; clear:both; - border: solid 1px #666600; - background-color: #FFFFCC; - height: auto; - width: 100%; - } - .relpage ul - { - float:none; + } + .relpage ul + { + float: none; padding: 15px; - - } - .relpage li - { - font: normal 13px/1.2 Verdana; - - } -/* edit */ + } + .content .relpage li + { + font: normal 11px/1.2 Verdana; + } + /* edit */ h3.fn, span.fn { - background-color: #eee; + background-color: #F6F6F6; border-width: 1px; border-style: solid; - border-color: #ddd; - font-weight: bold; - /* padding: 6px 0px 6px 10px;*/ - /* margin: 42px 0px 0px 0px;*/ + border-color: #E6E6E6; + font-weight: bold; + /* padding: 6px 0px 6px 10px;*/ + /* margin: 42px 0px 0px 0px;*/ } /* edit */ .indexbox { - /* max-width:785px;*/ - width: 100%; /* margin-bottom: 30px;*/ + width: 100%; + } + .content .indexboxcont li + { + font: normal 600 13px/1 Verdana; } - .indexbox a + /* .indexbox a { color: #00732f; text-decoration: none; - } - .indexbox a:hover + }*/ + .indexbox a:hover, .indexbox a:visited:hover { - color: #00732f; + color: #4c0033; text-decoration: underline; } .indexbox a:visited @@ -1062,14 +861,14 @@ .indexboxbar { - background: transparent url( "../images/horBar.png" ) repeat-x left bottom; + background: transparent url( "../images/horBar.png" ) repeat-x left bottom; margin-bottom: 25px; } .indexboxcont .section { - display: inline-block; /*Pål padding-right: 20px; padding-left: 10px; */ - width: 49%; + display: inline-block; + width: 49%; *width:42%; _width:42%; padding:0 2% 0 1%; @@ -1078,14 +877,13 @@ .indexboxcont .indexIcon { - /*PÅL width: 115px;*/ - width: 13%; + width: 11%; *width:18%; _width:18%; overflow:hidden; } .indexboxcont .section p - { /*PÅL max-width: 350px;*/ + { padding-top: 20px; padding-bottom: 20px; } @@ -1093,37 +891,40 @@ .indexboxcont .sectionlist { display: inline-block; - width: 34%; - margin-right:-2px; - vertical-align:top; + width: 33%; + margin-right: -2px; + vertical-align: top; padding: 0; } .tricol { - /* margin-left: 10px; *//*PÅL padding-right:76px;*/ + } .indexboxcont .sectionlist ul { + padding-left: 15px; margin-bottom: 20px; } - +/* .indexboxcont .sectionlist ul li { line-height: 12px; } - +*/ .lastcol { display: inline-block; - vertical-align:top; + vertical-align: top; padding: 0; max-width: 25%; } .tricol .lastcol { + margin-left:-6px; } + /*.toc ul*/ /* end page elements */ } diff --git a/tools/qdoc3/test/qt-defines.qdocconf b/tools/qdoc3/test/qt-defines.qdocconf index e1a008e..faf3906 100644 --- a/tools/qdoc3/test/qt-defines.qdocconf +++ b/tools/qdoc3/test/qt-defines.qdocconf @@ -29,6 +29,8 @@ extraimages.HTML = qt-logo \ bg_ll_blank.png \ bg_ur.png \ bullet_sq.png \ + bullet_dn.png \ + bullet_up.png \ page_bg.png \ qt_tools.png \ api_topics.png \ diff --git a/tools/qdoc3/test/qt-html-templates.qdocconf b/tools/qdoc3/test/qt-html-templates.qdocconf index 5bb4382..67a25f3 100644 --- a/tools/qdoc3/test/qt-html-templates.qdocconf +++ b/tools/qdoc3/test/qt-html-templates.qdocconf @@ -103,7 +103,7 @@ HTML.postheader = "
\n" \ "
\n" HTML.footer = "
\n" \ - "
\n" \ + "
\n" \ " [+] Documentation Feedback
\n" \ "
\n" \ "
\n" \ @@ -113,20 +113,20 @@ HTML.footer = "
\n" \ "
\n" \ "
\n" \ "

\n" \ - " © 2008-2010 Nokia Corporation and/or its>\n" \ + " © 2008-2010 Nokia Corporation and/or its\n" \ " subsidiaries. Nokia, Qt and their respective logos are trademarks of Nokia Corporation>\n" \ " in Finland and/or other countries worldwide.

\n" \ "

\n" \ - " All other trademarks are property of their respective owners. \n" \ + " All other trademarks are property of their respective owners. Privacy Policy

\n" \ "
\n" \ "
\n" \ "
\n" \ "
\n" \ - " X\n" \ + " X\n" \ "
\n" \ " \n" \ - " \n" \ + " \n" \ "
\n" \ "
\n" \ @@ -134,12 +134,12 @@ HTML.footer = " \n" \ " \n" \ " \n" \ "\n" diff --git a/tools/qdoc3/test/scripts/functions.js b/tools/qdoc3/test/scripts/functions.js new file mode 100644 index 0000000..0135427 --- /dev/null +++ b/tools/qdoc3/test/scripts/functions.js @@ -0,0 +1,60 @@ + +/* START non link areas where cursor should change to pointing hand */ +$('.t_button').mouseover(function() { + $('.t_button').css('cursor','pointer'); + /*document.getElementById(this.id).style.cursor='pointer';*/ +}); + +/* END non link areas */ +$('#smallA').click(function() { + $('.content .heading,.content h1, .content h2, .content h3, .content p, .content li, .content table').css('font-size','smaller'); + $('.t_button').removeClass('active') + $(this).addClass('active') +}); + +$('#medA').click(function() { + $('.content .heading').css('font','600 16px/1 Arial'); + $('.content h1').css('font','600 18px/1.2 Arial'); + $('.content h2').css('font','600 16px/1.2 Arial'); + $('.content h3').css('font','600 14px/1.2 Arial'); + $('.content p').css('font','13px/20px Verdana'); + $('.content li').css('font','400 13px/1 Verdana'); + $('.content li').css('line-height','14px'); + $('.content table').css('font','13px/1.2 Verdana'); + $('.content .heading').css('font','600 16px/1 Arial'); + $('.content .indexboxcont li').css('font','600 13px/1 Verdana'); + $('.t_button').removeClass('active') + $(this).addClass('active') +}); + +$('#bigA').click(function() { + $('.content .heading,.content h1, .content h2, .content h3, .content p, .content li, .content table').css('font-size','large'); + $('.content .heading,.content h1, .content h2, .content h3, .content p, .content li, .content table').css('line-height','25px'); + $('.t_button').removeClass('active') + $(this).addClass('active') +}); + +function doSearch(str){ + +if (str.length>3) + { + alert('start search'); + // document.getElementById("refWrapper").innerHTML=""; + return; + } + else + return; + +// var url="indexSearch.php"; +// url=url+"?q="+str; + // url=url+"&sid="+Math.random(); + // var url="http://localhost:8983/solr/select?"; + // url=url+"&q="+str; + // url=url+"&fq=&start=0&rows=10&fl=&qt=&wt=&explainOther=&hl.fl="; + + // $.get(url, function(data){ + // alert(data); + // document.getElementById("refWrapper").innerHTML=data; + //}); + +} \ No newline at end of file diff --git a/tools/qdoc3/test/scripts/jquery.js b/tools/qdoc3/test/scripts/jquery.js new file mode 100644 index 0000000..0c7294c --- /dev/null +++ b/tools/qdoc3/test/scripts/jquery.js @@ -0,0 +1,152 @@ +/*! + * jQuery JavaScript Library v1.4.1 + * http://jquery.com/ + * + * Copyright 2010, John Resig + * Dual licensed under the MIT or GPL Version 2 licenses. + * http://jquery.org/license + * + * Includes Sizzle.js + * http://sizzlejs.com/ + * Copyright 2010, The Dojo Foundation + * Released under the MIT, BSD, and GPL Licenses. + * + * Date: Mon Jan 25 19:43:33 2010 -0500 + */ +(function(z,v){function la(){if(!c.isReady){try{r.documentElement.doScroll("left")}catch(a){setTimeout(la,1);return}c.ready()}}function Ma(a,b){b.src?c.ajax({url:b.src,async:false,dataType:"script"}):c.globalEval(b.text||b.textContent||b.innerHTML||"");b.parentNode&&b.parentNode.removeChild(b)}function X(a,b,d,f,e,i){var j=a.length;if(typeof b==="object"){for(var n in b)X(a,n,b[n],f,e,d);return a}if(d!==v){f=!i&&f&&c.isFunction(d);for(n=0;n-1){i=j.data;i.beforeFilter&&i.beforeFilter[a.type]&&!i.beforeFilter[a.type](a)||f.push(j.selector)}else delete x[o]}i=c(a.target).closest(f, +a.currentTarget);m=0;for(s=i.length;m)[^>]*$|^#([\w-]+)$/,Qa=/^.[^:#\[\.,]*$/,Ra=/\S/,Sa=/^(\s|\u00A0)+|(\s|\u00A0)+$/g,Ta=/^<(\w+)\s*\/?>(?:<\/\1>)?$/,O=navigator.userAgent, +va=false,P=[],L,$=Object.prototype.toString,aa=Object.prototype.hasOwnProperty,ba=Array.prototype.push,Q=Array.prototype.slice,wa=Array.prototype.indexOf;c.fn=c.prototype={init:function(a,b){var d,f;if(!a)return this;if(a.nodeType){this.context=this[0]=a;this.length=1;return this}if(typeof a==="string")if((d=Pa.exec(a))&&(d[1]||!b))if(d[1]){f=b?b.ownerDocument||b:r;if(a=Ta.exec(a))if(c.isPlainObject(b)){a=[r.createElement(a[1])];c.fn.attr.call(a,b,true)}else a=[f.createElement(a[1])];else{a=ra([d[1]], +[f]);a=(a.cacheable?a.fragment.cloneNode(true):a.fragment).childNodes}}else{if(b=r.getElementById(d[2])){if(b.id!==d[2])return S.find(a);this.length=1;this[0]=b}this.context=r;this.selector=a;return this}else if(!b&&/^\w+$/.test(a)){this.selector=a;this.context=r;a=r.getElementsByTagName(a)}else return!b||b.jquery?(b||S).find(a):c(b).find(a);else if(c.isFunction(a))return S.ready(a);if(a.selector!==v){this.selector=a.selector;this.context=a.context}return c.isArray(a)?this.setArray(a):c.makeArray(a, +this)},selector:"",jquery:"1.4.1",length:0,size:function(){return this.length},toArray:function(){return Q.call(this,0)},get:function(a){return a==null?this.toArray():a<0?this.slice(a)[0]:this[a]},pushStack:function(a,b,d){a=c(a||null);a.prevObject=this;a.context=this.context;if(b==="find")a.selector=this.selector+(this.selector?" ":"")+d;else if(b)a.selector=this.selector+"."+b+"("+d+")";return a},setArray:function(a){this.length=0;ba.apply(this,a);return this},each:function(a,b){return c.each(this, +a,b)},ready:function(a){c.bindReady();if(c.isReady)a.call(r,c);else P&&P.push(a);return this},eq:function(a){return a===-1?this.slice(a):this.slice(a,+a+1)},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},slice:function(){return this.pushStack(Q.apply(this,arguments),"slice",Q.call(arguments).join(","))},map:function(a){return this.pushStack(c.map(this,function(b,d){return a.call(b,d,b)}))},end:function(){return this.prevObject||c(null)},push:ba,sort:[].sort,splice:[].splice}; +c.fn.init.prototype=c.fn;c.extend=c.fn.extend=function(){var a=arguments[0]||{},b=1,d=arguments.length,f=false,e,i,j,n;if(typeof a==="boolean"){f=a;a=arguments[1]||{};b=2}if(typeof a!=="object"&&!c.isFunction(a))a={};if(d===b){a=this;--b}for(;b
a";var e=d.getElementsByTagName("*"),i=d.getElementsByTagName("a")[0];if(!(!e||!e.length||!i)){c.support= +{leadingWhitespace:d.firstChild.nodeType===3,tbody:!d.getElementsByTagName("tbody").length,htmlSerialize:!!d.getElementsByTagName("link").length,style:/red/.test(i.getAttribute("style")),hrefNormalized:i.getAttribute("href")==="/a",opacity:/^0.55$/.test(i.style.opacity),cssFloat:!!i.style.cssFloat,checkOn:d.getElementsByTagName("input")[0].value==="on",optSelected:r.createElement("select").appendChild(r.createElement("option")).selected,checkClone:false,scriptEval:false,noCloneEvent:true,boxModel:null}; +b.type="text/javascript";try{b.appendChild(r.createTextNode("window."+f+"=1;"))}catch(j){}a.insertBefore(b,a.firstChild);if(z[f]){c.support.scriptEval=true;delete z[f]}a.removeChild(b);if(d.attachEvent&&d.fireEvent){d.attachEvent("onclick",function n(){c.support.noCloneEvent=false;d.detachEvent("onclick",n)});d.cloneNode(true).fireEvent("onclick")}d=r.createElement("div");d.innerHTML="";a=r.createDocumentFragment();a.appendChild(d.firstChild); +c.support.checkClone=a.cloneNode(true).cloneNode(true).lastChild.checked;c(function(){var n=r.createElement("div");n.style.width=n.style.paddingLeft="1px";r.body.appendChild(n);c.boxModel=c.support.boxModel=n.offsetWidth===2;r.body.removeChild(n).style.display="none"});a=function(n){var o=r.createElement("div");n="on"+n;var m=n in o;if(!m){o.setAttribute(n,"return;");m=typeof o[n]==="function"}return m};c.support.submitBubbles=a("submit");c.support.changeBubbles=a("change");a=b=d=e=i=null}})();c.props= +{"for":"htmlFor","class":"className",readonly:"readOnly",maxlength:"maxLength",cellspacing:"cellSpacing",rowspan:"rowSpan",colspan:"colSpan",tabindex:"tabIndex",usemap:"useMap",frameborder:"frameBorder"};var G="jQuery"+J(),Ua=0,xa={},Va={};c.extend({cache:{},expando:G,noData:{embed:true,object:true,applet:true},data:function(a,b,d){if(!(a.nodeName&&c.noData[a.nodeName.toLowerCase()])){a=a==z?xa:a;var f=a[G],e=c.cache;if(!b&&!f)return null;f||(f=++Ua);if(typeof b==="object"){a[G]=f;e=e[f]=c.extend(true, +{},b)}else e=e[f]?e[f]:typeof d==="undefined"?Va:(e[f]={});if(d!==v){a[G]=f;e[b]=d}return typeof b==="string"?e[b]:e}},removeData:function(a,b){if(!(a.nodeName&&c.noData[a.nodeName.toLowerCase()])){a=a==z?xa:a;var d=a[G],f=c.cache,e=f[d];if(b){if(e){delete e[b];c.isEmptyObject(e)&&c.removeData(a)}}else{try{delete a[G]}catch(i){a.removeAttribute&&a.removeAttribute(G)}delete f[d]}}}});c.fn.extend({data:function(a,b){if(typeof a==="undefined"&&this.length)return c.data(this[0]);else if(typeof a==="object")return this.each(function(){c.data(this, +a)});var d=a.split(".");d[1]=d[1]?"."+d[1]:"";if(b===v){var f=this.triggerHandler("getData"+d[1]+"!",[d[0]]);if(f===v&&this.length)f=c.data(this[0],a);return f===v&&d[1]?this.data(d[0]):f}else return this.trigger("setData"+d[1]+"!",[d[0],b]).each(function(){c.data(this,a,b)})},removeData:function(a){return this.each(function(){c.removeData(this,a)})}});c.extend({queue:function(a,b,d){if(a){b=(b||"fx")+"queue";var f=c.data(a,b);if(!d)return f||[];if(!f||c.isArray(d))f=c.data(a,b,c.makeArray(d));else f.push(d); +return f}},dequeue:function(a,b){b=b||"fx";var d=c.queue(a,b),f=d.shift();if(f==="inprogress")f=d.shift();if(f){b==="fx"&&d.unshift("inprogress");f.call(a,function(){c.dequeue(a,b)})}}});c.fn.extend({queue:function(a,b){if(typeof a!=="string"){b=a;a="fx"}if(b===v)return c.queue(this[0],a);return this.each(function(){var d=c.queue(this,a,b);a==="fx"&&d[0]!=="inprogress"&&c.dequeue(this,a)})},dequeue:function(a){return this.each(function(){c.dequeue(this,a)})},delay:function(a,b){a=c.fx?c.fx.speeds[a]|| +a:a;b=b||"fx";return this.queue(b,function(){var d=this;setTimeout(function(){c.dequeue(d,b)},a)})},clearQueue:function(a){return this.queue(a||"fx",[])}});var ya=/[\n\t]/g,ca=/\s+/,Wa=/\r/g,Xa=/href|src|style/,Ya=/(button|input)/i,Za=/(button|input|object|select|textarea)/i,$a=/^(a|area)$/i,za=/radio|checkbox/;c.fn.extend({attr:function(a,b){return X(this,a,b,true,c.attr)},removeAttr:function(a){return this.each(function(){c.attr(this,a,"");this.nodeType===1&&this.removeAttribute(a)})},addClass:function(a){if(c.isFunction(a))return this.each(function(o){var m= +c(this);m.addClass(a.call(this,o,m.attr("class")))});if(a&&typeof a==="string")for(var b=(a||"").split(ca),d=0,f=this.length;d-1)return true;return false},val:function(a){if(a===v){var b=this[0];if(b){if(c.nodeName(b,"option"))return(b.attributes.value|| +{}).specified?b.value:b.text;if(c.nodeName(b,"select")){var d=b.selectedIndex,f=[],e=b.options;b=b.type==="select-one";if(d<0)return null;var i=b?d:0;for(d=b?d+1:e.length;i=0;else if(c.nodeName(this,"select")){var x=c.makeArray(s);c("option",this).each(function(){this.selected=c.inArray(c(this).val(),x)>=0});if(!x.length)this.selectedIndex=-1}else this.value=s}})}});c.extend({attrFn:{val:true,css:true,html:true,text:true,data:true,width:true,height:true,offset:true},attr:function(a,b,d,f){if(!a||a.nodeType===3||a.nodeType===8)return v;if(f&&b in c.attrFn)return c(a)[b](d); +f=a.nodeType!==1||!c.isXMLDoc(a);var e=d!==v;b=f&&c.props[b]||b;if(a.nodeType===1){var i=Xa.test(b);if(b in a&&f&&!i){if(e){b==="type"&&Ya.test(a.nodeName)&&a.parentNode&&c.error("type property can't be changed");a[b]=d}if(c.nodeName(a,"form")&&a.getAttributeNode(b))return a.getAttributeNode(b).nodeValue;if(b==="tabIndex")return(b=a.getAttributeNode("tabIndex"))&&b.specified?b.value:Za.test(a.nodeName)||$a.test(a.nodeName)&&a.href?0:v;return a[b]}if(!c.support.style&&f&&b==="style"){if(e)a.style.cssText= +""+d;return a.style.cssText}e&&a.setAttribute(b,""+d);a=!c.support.hrefNormalized&&f&&i?a.getAttribute(b,2):a.getAttribute(b);return a===null?v:a}return c.style(a,b,d)}});var ab=function(a){return a.replace(/[^\w\s\.\|`]/g,function(b){return"\\"+b})};c.event={add:function(a,b,d,f){if(!(a.nodeType===3||a.nodeType===8)){if(a.setInterval&&a!==z&&!a.frameElement)a=z;if(!d.guid)d.guid=c.guid++;if(f!==v){d=c.proxy(d);d.data=f}var e=c.data(a,"events")||c.data(a,"events",{}),i=c.data(a,"handle"),j;if(!i){j= +function(){return typeof c!=="undefined"&&!c.event.triggered?c.event.handle.apply(j.elem,arguments):v};i=c.data(a,"handle",j)}if(i){i.elem=a;b=b.split(/\s+/);for(var n,o=0;n=b[o++];){var m=n.split(".");n=m.shift();if(o>1){d=c.proxy(d);if(f!==v)d.data=f}d.type=m.slice(0).sort().join(".");var s=e[n],x=this.special[n]||{};if(!s){s=e[n]={};if(!x.setup||x.setup.call(a,f,m,d)===false)if(a.addEventListener)a.addEventListener(n,i,false);else a.attachEvent&&a.attachEvent("on"+n,i)}if(x.add)if((m=x.add.call(a, +d,f,m,s))&&c.isFunction(m)){m.guid=m.guid||d.guid;m.data=m.data||d.data;m.type=m.type||d.type;d=m}s[d.guid]=d;this.global[n]=true}a=null}}},global:{},remove:function(a,b,d){if(!(a.nodeType===3||a.nodeType===8)){var f=c.data(a,"events"),e,i,j;if(f){if(b===v||typeof b==="string"&&b.charAt(0)===".")for(i in f)this.remove(a,i+(b||""));else{if(b.type){d=b.handler;b=b.type}b=b.split(/\s+/);for(var n=0;i=b[n++];){var o=i.split(".");i=o.shift();var m=!o.length,s=c.map(o.slice(0).sort(),ab);s=new RegExp("(^|\\.)"+ +s.join("\\.(?:.*\\.)?")+"(\\.|$)");var x=this.special[i]||{};if(f[i]){if(d){j=f[i][d.guid];delete f[i][d.guid]}else for(var A in f[i])if(m||s.test(f[i][A].type))delete f[i][A];x.remove&&x.remove.call(a,o,j);for(e in f[i])break;if(!e){if(!x.teardown||x.teardown.call(a,o)===false)if(a.removeEventListener)a.removeEventListener(i,c.data(a,"handle"),false);else a.detachEvent&&a.detachEvent("on"+i,c.data(a,"handle"));e=null;delete f[i]}}}}for(e in f)break;if(!e){if(A=c.data(a,"handle"))A.elem=null;c.removeData(a, +"events");c.removeData(a,"handle")}}}},trigger:function(a,b,d,f){var e=a.type||a;if(!f){a=typeof a==="object"?a[G]?a:c.extend(c.Event(e),a):c.Event(e);if(e.indexOf("!")>=0){a.type=e=e.slice(0,-1);a.exclusive=true}if(!d){a.stopPropagation();this.global[e]&&c.each(c.cache,function(){this.events&&this.events[e]&&c.event.trigger(a,b,this.handle.elem)})}if(!d||d.nodeType===3||d.nodeType===8)return v;a.result=v;a.target=d;b=c.makeArray(b);b.unshift(a)}a.currentTarget=d;(f=c.data(d,"handle"))&&f.apply(d, +b);f=d.parentNode||d.ownerDocument;try{if(!(d&&d.nodeName&&c.noData[d.nodeName.toLowerCase()]))if(d["on"+e]&&d["on"+e].apply(d,b)===false)a.result=false}catch(i){}if(!a.isPropagationStopped()&&f)c.event.trigger(a,b,f,true);else if(!a.isDefaultPrevented()){d=a.target;var j;if(!(c.nodeName(d,"a")&&e==="click")&&!(d&&d.nodeName&&c.noData[d.nodeName.toLowerCase()])){try{if(d[e]){if(j=d["on"+e])d["on"+e]=null;this.triggered=true;d[e]()}}catch(n){}if(j)d["on"+e]=j;this.triggered=false}}},handle:function(a){var b, +d;a=arguments[0]=c.event.fix(a||z.event);a.currentTarget=this;d=a.type.split(".");a.type=d.shift();b=!d.length&&!a.exclusive;var f=new RegExp("(^|\\.)"+d.slice(0).sort().join("\\.(?:.*\\.)?")+"(\\.|$)");d=(c.data(this,"events")||{})[a.type];for(var e in d){var i=d[e];if(b||f.test(i.type)){a.handler=i;a.data=i.data;i=i.apply(this,arguments);if(i!==v){a.result=i;if(i===false){a.preventDefault();a.stopPropagation()}}if(a.isImmediatePropagationStopped())break}}return a.result},props:"altKey attrChange attrName bubbles button cancelable charCode clientX clientY ctrlKey currentTarget data detail eventPhase fromElement handler keyCode layerX layerY metaKey newValue offsetX offsetY originalTarget pageX pageY prevValue relatedNode relatedTarget screenX screenY shiftKey srcElement target toElement view wheelDelta which".split(" "), +fix:function(a){if(a[G])return a;var b=a;a=c.Event(b);for(var d=this.props.length,f;d;){f=this.props[--d];a[f]=b[f]}if(!a.target)a.target=a.srcElement||r;if(a.target.nodeType===3)a.target=a.target.parentNode;if(!a.relatedTarget&&a.fromElement)a.relatedTarget=a.fromElement===a.target?a.toElement:a.fromElement;if(a.pageX==null&&a.clientX!=null){b=r.documentElement;d=r.body;a.pageX=a.clientX+(b&&b.scrollLeft||d&&d.scrollLeft||0)-(b&&b.clientLeft||d&&d.clientLeft||0);a.pageY=a.clientY+(b&&b.scrollTop|| +d&&d.scrollTop||0)-(b&&b.clientTop||d&&d.clientTop||0)}if(!a.which&&(a.charCode||a.charCode===0?a.charCode:a.keyCode))a.which=a.charCode||a.keyCode;if(!a.metaKey&&a.ctrlKey)a.metaKey=a.ctrlKey;if(!a.which&&a.button!==v)a.which=a.button&1?1:a.button&2?3:a.button&4?2:0;return a},guid:1E8,proxy:c.proxy,special:{ready:{setup:c.bindReady,teardown:c.noop},live:{add:function(a,b){c.extend(a,b||{});a.guid+=b.selector+b.live;b.liveProxy=a;c.event.add(this,b.live,na,b)},remove:function(a){if(a.length){var b= +0,d=new RegExp("(^|\\.)"+a[0]+"(\\.|$)");c.each(c.data(this,"events").live||{},function(){d.test(this.type)&&b++});b<1&&c.event.remove(this,a[0],na)}},special:{}},beforeunload:{setup:function(a,b,d){if(this.setInterval)this.onbeforeunload=d;return false},teardown:function(a,b){if(this.onbeforeunload===b)this.onbeforeunload=null}}}};c.Event=function(a){if(!this.preventDefault)return new c.Event(a);if(a&&a.type){this.originalEvent=a;this.type=a.type}else this.type=a;this.timeStamp=J();this[G]=true}; +c.Event.prototype={preventDefault:function(){this.isDefaultPrevented=Z;var a=this.originalEvent;if(a){a.preventDefault&&a.preventDefault();a.returnValue=false}},stopPropagation:function(){this.isPropagationStopped=Z;var a=this.originalEvent;if(a){a.stopPropagation&&a.stopPropagation();a.cancelBubble=true}},stopImmediatePropagation:function(){this.isImmediatePropagationStopped=Z;this.stopPropagation()},isDefaultPrevented:Y,isPropagationStopped:Y,isImmediatePropagationStopped:Y};var Aa=function(a){for(var b= +a.relatedTarget;b&&b!==this;)try{b=b.parentNode}catch(d){break}if(b!==this){a.type=a.data;c.event.handle.apply(this,arguments)}},Ba=function(a){a.type=a.data;c.event.handle.apply(this,arguments)};c.each({mouseenter:"mouseover",mouseleave:"mouseout"},function(a,b){c.event.special[a]={setup:function(d){c.event.add(this,b,d&&d.selector?Ba:Aa,a)},teardown:function(d){c.event.remove(this,b,d&&d.selector?Ba:Aa)}}});if(!c.support.submitBubbles)c.event.special.submit={setup:function(a,b,d){if(this.nodeName.toLowerCase()!== +"form"){c.event.add(this,"click.specialSubmit."+d.guid,function(f){var e=f.target,i=e.type;if((i==="submit"||i==="image")&&c(e).closest("form").length)return ma("submit",this,arguments)});c.event.add(this,"keypress.specialSubmit."+d.guid,function(f){var e=f.target,i=e.type;if((i==="text"||i==="password")&&c(e).closest("form").length&&f.keyCode===13)return ma("submit",this,arguments)})}else return false},remove:function(a,b){c.event.remove(this,"click.specialSubmit"+(b?"."+b.guid:""));c.event.remove(this, +"keypress.specialSubmit"+(b?"."+b.guid:""))}};if(!c.support.changeBubbles){var da=/textarea|input|select/i;function Ca(a){var b=a.type,d=a.value;if(b==="radio"||b==="checkbox")d=a.checked;else if(b==="select-multiple")d=a.selectedIndex>-1?c.map(a.options,function(f){return f.selected}).join("-"):"";else if(a.nodeName.toLowerCase()==="select")d=a.selectedIndex;return d}function ea(a,b){var d=a.target,f,e;if(!(!da.test(d.nodeName)||d.readOnly)){f=c.data(d,"_change_data");e=Ca(d);if(a.type!=="focusout"|| +d.type!=="radio")c.data(d,"_change_data",e);if(!(f===v||e===f))if(f!=null||e){a.type="change";return c.event.trigger(a,b,d)}}}c.event.special.change={filters:{focusout:ea,click:function(a){var b=a.target,d=b.type;if(d==="radio"||d==="checkbox"||b.nodeName.toLowerCase()==="select")return ea.call(this,a)},keydown:function(a){var b=a.target,d=b.type;if(a.keyCode===13&&b.nodeName.toLowerCase()!=="textarea"||a.keyCode===32&&(d==="checkbox"||d==="radio")||d==="select-multiple")return ea.call(this,a)},beforeactivate:function(a){a= +a.target;a.nodeName.toLowerCase()==="input"&&a.type==="radio"&&c.data(a,"_change_data",Ca(a))}},setup:function(a,b,d){for(var f in T)c.event.add(this,f+".specialChange."+d.guid,T[f]);return da.test(this.nodeName)},remove:function(a,b){for(var d in T)c.event.remove(this,d+".specialChange"+(b?"."+b.guid:""),T[d]);return da.test(this.nodeName)}};var T=c.event.special.change.filters}r.addEventListener&&c.each({focus:"focusin",blur:"focusout"},function(a,b){function d(f){f=c.event.fix(f);f.type=b;return c.event.handle.call(this, +f)}c.event.special[b]={setup:function(){this.addEventListener(a,d,true)},teardown:function(){this.removeEventListener(a,d,true)}}});c.each(["bind","one"],function(a,b){c.fn[b]=function(d,f,e){if(typeof d==="object"){for(var i in d)this[b](i,f,d[i],e);return this}if(c.isFunction(f)){e=f;f=v}var j=b==="one"?c.proxy(e,function(n){c(this).unbind(n,j);return e.apply(this,arguments)}):e;return d==="unload"&&b!=="one"?this.one(d,f,e):this.each(function(){c.event.add(this,d,j,f)})}});c.fn.extend({unbind:function(a, +b){if(typeof a==="object"&&!a.preventDefault){for(var d in a)this.unbind(d,a[d]);return this}return this.each(function(){c.event.remove(this,a,b)})},trigger:function(a,b){return this.each(function(){c.event.trigger(a,b,this)})},triggerHandler:function(a,b){if(this[0]){a=c.Event(a);a.preventDefault();a.stopPropagation();c.event.trigger(a,b,this[0]);return a.result}},toggle:function(a){for(var b=arguments,d=1;d0){y=t;break}}t=t[g]}l[q]=y}}}var f=/((?:\((?:\([^()]+\)|[^()]+)+\)|\[(?:\[[^[\]]*\]|['"][^'"]*['"]|[^[\]'"]+)+\]|\\.|[^ >+~,(\[\\]+)+|[>+~])(\s*,\s*)?((?:.|\r|\n)*)/g,e=0,i=Object.prototype.toString,j=false,n=true;[0,0].sort(function(){n=false;return 0});var o=function(g,h,k,l){k=k||[];var q=h=h||r;if(h.nodeType!==1&&h.nodeType!==9)return[];if(!g|| +typeof g!=="string")return k;for(var p=[],u,t,y,R,H=true,M=w(h),I=g;(f.exec(""),u=f.exec(I))!==null;){I=u[3];p.push(u[1]);if(u[2]){R=u[3];break}}if(p.length>1&&s.exec(g))if(p.length===2&&m.relative[p[0]])t=fa(p[0]+p[1],h);else for(t=m.relative[p[0]]?[h]:o(p.shift(),h);p.length;){g=p.shift();if(m.relative[g])g+=p.shift();t=fa(g,t)}else{if(!l&&p.length>1&&h.nodeType===9&&!M&&m.match.ID.test(p[0])&&!m.match.ID.test(p[p.length-1])){u=o.find(p.shift(),h,M);h=u.expr?o.filter(u.expr,u.set)[0]:u.set[0]}if(h){u= +l?{expr:p.pop(),set:A(l)}:o.find(p.pop(),p.length===1&&(p[0]==="~"||p[0]==="+")&&h.parentNode?h.parentNode:h,M);t=u.expr?o.filter(u.expr,u.set):u.set;if(p.length>0)y=A(t);else H=false;for(;p.length;){var D=p.pop();u=D;if(m.relative[D])u=p.pop();else D="";if(u==null)u=h;m.relative[D](y,u,M)}}else y=[]}y||(y=t);y||o.error(D||g);if(i.call(y)==="[object Array]")if(H)if(h&&h.nodeType===1)for(g=0;y[g]!=null;g++){if(y[g]&&(y[g]===true||y[g].nodeType===1&&E(h,y[g])))k.push(t[g])}else for(g=0;y[g]!=null;g++)y[g]&& +y[g].nodeType===1&&k.push(t[g]);else k.push.apply(k,y);else A(y,k);if(R){o(R,q,k,l);o.uniqueSort(k)}return k};o.uniqueSort=function(g){if(C){j=n;g.sort(C);if(j)for(var h=1;h":function(g,h){var k=typeof h==="string";if(k&&!/\W/.test(h)){h=h.toLowerCase();for(var l=0,q=g.length;l=0))k||l.push(u);else if(k)h[p]=false;return false},ID:function(g){return g[1].replace(/\\/g,"")},TAG:function(g){return g[1].toLowerCase()},CHILD:function(g){if(g[1]==="nth"){var h=/(-?)(\d*)n((?:\+|-)?\d*)/.exec(g[2]==="even"&&"2n"||g[2]==="odd"&& +"2n+1"||!/\D/.test(g[2])&&"0n+"+g[2]||g[2]);g[2]=h[1]+(h[2]||1)-0;g[3]=h[3]-0}g[0]=e++;return g},ATTR:function(g,h,k,l,q,p){h=g[1].replace(/\\/g,"");if(!p&&m.attrMap[h])g[1]=m.attrMap[h];if(g[2]==="~=")g[4]=" "+g[4]+" ";return g},PSEUDO:function(g,h,k,l,q){if(g[1]==="not")if((f.exec(g[3])||"").length>1||/^\w/.test(g[3]))g[3]=o(g[3],null,null,h);else{g=o.filter(g[3],h,k,true^q);k||l.push.apply(l,g);return false}else if(m.match.POS.test(g[0])||m.match.CHILD.test(g[0]))return true;return g},POS:function(g){g.unshift(true); +return g}},filters:{enabled:function(g){return g.disabled===false&&g.type!=="hidden"},disabled:function(g){return g.disabled===true},checked:function(g){return g.checked===true},selected:function(g){return g.selected===true},parent:function(g){return!!g.firstChild},empty:function(g){return!g.firstChild},has:function(g,h,k){return!!o(k[3],g).length},header:function(g){return/h\d/i.test(g.nodeName)},text:function(g){return"text"===g.type},radio:function(g){return"radio"===g.type},checkbox:function(g){return"checkbox"=== +g.type},file:function(g){return"file"===g.type},password:function(g){return"password"===g.type},submit:function(g){return"submit"===g.type},image:function(g){return"image"===g.type},reset:function(g){return"reset"===g.type},button:function(g){return"button"===g.type||g.nodeName.toLowerCase()==="button"},input:function(g){return/input|select|textarea|button/i.test(g.nodeName)}},setFilters:{first:function(g,h){return h===0},last:function(g,h,k,l){return h===l.length-1},even:function(g,h){return h%2=== +0},odd:function(g,h){return h%2===1},lt:function(g,h,k){return hk[3]-0},nth:function(g,h,k){return k[3]-0===h},eq:function(g,h,k){return k[3]-0===h}},filter:{PSEUDO:function(g,h,k,l){var q=h[1],p=m.filters[q];if(p)return p(g,k,h,l);else if(q==="contains")return(g.textContent||g.innerText||a([g])||"").indexOf(h[3])>=0;else if(q==="not"){h=h[3];k=0;for(l=h.length;k= +0}},ID:function(g,h){return g.nodeType===1&&g.getAttribute("id")===h},TAG:function(g,h){return h==="*"&&g.nodeType===1||g.nodeName.toLowerCase()===h},CLASS:function(g,h){return(" "+(g.className||g.getAttribute("class"))+" ").indexOf(h)>-1},ATTR:function(g,h){var k=h[1];g=m.attrHandle[k]?m.attrHandle[k](g):g[k]!=null?g[k]:g.getAttribute(k);k=g+"";var l=h[2];h=h[4];return g==null?l==="!=":l==="="?k===h:l==="*="?k.indexOf(h)>=0:l==="~="?(" "+k+" ").indexOf(h)>=0:!h?k&&g!==false:l==="!="?k!==h:l==="^="? +k.indexOf(h)===0:l==="$="?k.substr(k.length-h.length)===h:l==="|="?k===h||k.substr(0,h.length+1)===h+"-":false},POS:function(g,h,k,l){var q=m.setFilters[h[2]];if(q)return q(g,k,h,l)}}},s=m.match.POS;for(var x in m.match){m.match[x]=new RegExp(m.match[x].source+/(?![^\[]*\])(?![^\(]*\))/.source);m.leftMatch[x]=new RegExp(/(^(?:.|\r|\n)*?)/.source+m.match[x].source.replace(/\\(\d+)/g,function(g,h){return"\\"+(h-0+1)}))}var A=function(g,h){g=Array.prototype.slice.call(g,0);if(h){h.push.apply(h,g);return h}return g}; +try{Array.prototype.slice.call(r.documentElement.childNodes,0)}catch(B){A=function(g,h){h=h||[];if(i.call(g)==="[object Array]")Array.prototype.push.apply(h,g);else if(typeof g.length==="number")for(var k=0,l=g.length;k";var k=r.documentElement;k.insertBefore(g,k.firstChild);if(r.getElementById(h)){m.find.ID=function(l,q,p){if(typeof q.getElementById!=="undefined"&&!p)return(q=q.getElementById(l[1]))?q.id===l[1]||typeof q.getAttributeNode!=="undefined"&&q.getAttributeNode("id").nodeValue===l[1]?[q]:v:[]};m.filter.ID=function(l,q){var p=typeof l.getAttributeNode!=="undefined"&&l.getAttributeNode("id"); +return l.nodeType===1&&p&&p.nodeValue===q}}k.removeChild(g);k=g=null})();(function(){var g=r.createElement("div");g.appendChild(r.createComment(""));if(g.getElementsByTagName("*").length>0)m.find.TAG=function(h,k){k=k.getElementsByTagName(h[1]);if(h[1]==="*"){h=[];for(var l=0;k[l];l++)k[l].nodeType===1&&h.push(k[l]);k=h}return k};g.innerHTML="";if(g.firstChild&&typeof g.firstChild.getAttribute!=="undefined"&&g.firstChild.getAttribute("href")!=="#")m.attrHandle.href=function(h){return h.getAttribute("href", +2)};g=null})();r.querySelectorAll&&function(){var g=o,h=r.createElement("div");h.innerHTML="

";if(!(h.querySelectorAll&&h.querySelectorAll(".TEST").length===0)){o=function(l,q,p,u){q=q||r;if(!u&&q.nodeType===9&&!w(q))try{return A(q.querySelectorAll(l),p)}catch(t){}return g(l,q,p,u)};for(var k in g)o[k]=g[k];h=null}}();(function(){var g=r.createElement("div");g.innerHTML="
";if(!(!g.getElementsByClassName||g.getElementsByClassName("e").length=== +0)){g.lastChild.className="e";if(g.getElementsByClassName("e").length!==1){m.order.splice(1,0,"CLASS");m.find.CLASS=function(h,k,l){if(typeof k.getElementsByClassName!=="undefined"&&!l)return k.getElementsByClassName(h[1])};g=null}}})();var E=r.compareDocumentPosition?function(g,h){return g.compareDocumentPosition(h)&16}:function(g,h){return g!==h&&(g.contains?g.contains(h):true)},w=function(g){return(g=(g?g.ownerDocument||g:0).documentElement)?g.nodeName!=="HTML":false},fa=function(g,h){var k=[], +l="",q;for(h=h.nodeType?[h]:h;q=m.match.PSEUDO.exec(g);){l+=q[0];g=g.replace(m.match.PSEUDO,"")}g=m.relative[g]?g+"*":g;q=0;for(var p=h.length;q=0===d})};c.fn.extend({find:function(a){for(var b=this.pushStack("","find",a),d=0,f=0,e=this.length;f0)for(var i=d;i0},closest:function(a,b){if(c.isArray(a)){var d=[],f=this[0],e,i={},j;if(f&&a.length){e=0;for(var n=a.length;e +-1:c(f).is(e)){d.push({selector:j,elem:f});delete i[j]}}f=f.parentNode}}return d}var o=c.expr.match.POS.test(a)?c(a,b||this.context):null;return this.map(function(m,s){for(;s&&s.ownerDocument&&s!==b;){if(o?o.index(s)>-1:c(s).is(a))return s;s=s.parentNode}return null})},index:function(a){if(!a||typeof a==="string")return c.inArray(this[0],a?c(a):this.parent().children());return c.inArray(a.jquery?a[0]:a,this)},add:function(a,b){a=typeof a==="string"?c(a,b||this.context):c.makeArray(a);b=c.merge(this.get(), +a);return this.pushStack(pa(a[0])||pa(b[0])?b:c.unique(b))},andSelf:function(){return this.add(this.prevObject)}});c.each({parent:function(a){return(a=a.parentNode)&&a.nodeType!==11?a:null},parents:function(a){return c.dir(a,"parentNode")},parentsUntil:function(a,b,d){return c.dir(a,"parentNode",d)},next:function(a){return c.nth(a,2,"nextSibling")},prev:function(a){return c.nth(a,2,"previousSibling")},nextAll:function(a){return c.dir(a,"nextSibling")},prevAll:function(a){return c.dir(a,"previousSibling")}, +nextUntil:function(a,b,d){return c.dir(a,"nextSibling",d)},prevUntil:function(a,b,d){return c.dir(a,"previousSibling",d)},siblings:function(a){return c.sibling(a.parentNode.firstChild,a)},children:function(a){return c.sibling(a.firstChild)},contents:function(a){return c.nodeName(a,"iframe")?a.contentDocument||a.contentWindow.document:c.makeArray(a.childNodes)}},function(a,b){c.fn[a]=function(d,f){var e=c.map(this,b,d);bb.test(a)||(f=d);if(f&&typeof f==="string")e=c.filter(f,e);e=this.length>1?c.unique(e): +e;if((this.length>1||db.test(f))&&cb.test(a))e=e.reverse();return this.pushStack(e,a,Q.call(arguments).join(","))}});c.extend({filter:function(a,b,d){if(d)a=":not("+a+")";return c.find.matches(a,b)},dir:function(a,b,d){var f=[];for(a=a[b];a&&a.nodeType!==9&&(d===v||a.nodeType!==1||!c(a).is(d));){a.nodeType===1&&f.push(a);a=a[b]}return f},nth:function(a,b,d){b=b||1;for(var f=0;a;a=a[d])if(a.nodeType===1&&++f===b)break;return a},sibling:function(a,b){for(var d=[];a;a=a.nextSibling)a.nodeType===1&&a!== +b&&d.push(a);return d}});var Fa=/ jQuery\d+="(?:\d+|null)"/g,V=/^\s+/,Ga=/(<([\w:]+)[^>]*?)\/>/g,eb=/^(?:area|br|col|embed|hr|img|input|link|meta|param)$/i,Ha=/<([\w:]+)/,fb=/"},F={option:[1,""],legend:[1,"
","
"],thead:[1,"","
"],tr:[2,"","
"],td:[3,"","
"], +col:[2,"","
"],area:[1,"",""],_default:[0,"",""]};F.optgroup=F.option;F.tbody=F.tfoot=F.colgroup=F.caption=F.thead;F.th=F.td;if(!c.support.htmlSerialize)F._default=[1,"div
","
"];c.fn.extend({text:function(a){if(c.isFunction(a))return this.each(function(b){var d=c(this);d.text(a.call(this,b,d.text()))});if(typeof a!=="object"&&a!==v)return this.empty().append((this[0]&&this[0].ownerDocument||r).createTextNode(a));return c.getText(this)}, +wrapAll:function(a){if(c.isFunction(a))return this.each(function(d){c(this).wrapAll(a.call(this,d))});if(this[0]){var b=c(a,this[0].ownerDocument).eq(0).clone(true);this[0].parentNode&&b.insertBefore(this[0]);b.map(function(){for(var d=this;d.firstChild&&d.firstChild.nodeType===1;)d=d.firstChild;return d}).append(this)}return this},wrapInner:function(a){if(c.isFunction(a))return this.each(function(b){c(this).wrapInner(a.call(this,b))});return this.each(function(){var b=c(this),d=b.contents();d.length? +d.wrapAll(a):b.append(a)})},wrap:function(a){return this.each(function(){c(this).wrapAll(a)})},unwrap:function(){return this.parent().each(function(){c.nodeName(this,"body")||c(this).replaceWith(this.childNodes)}).end()},append:function(){return this.domManip(arguments,true,function(a){this.nodeType===1&&this.appendChild(a)})},prepend:function(){return this.domManip(arguments,true,function(a){this.nodeType===1&&this.insertBefore(a,this.firstChild)})},before:function(){if(this[0]&&this[0].parentNode)return this.domManip(arguments, +false,function(b){this.parentNode.insertBefore(b,this)});else if(arguments.length){var a=c(arguments[0]);a.push.apply(a,this.toArray());return this.pushStack(a,"before",arguments)}},after:function(){if(this[0]&&this[0].parentNode)return this.domManip(arguments,false,function(b){this.parentNode.insertBefore(b,this.nextSibling)});else if(arguments.length){var a=this.pushStack(this,"after",arguments);a.push.apply(a,c(arguments[0]).toArray());return a}},clone:function(a){var b=this.map(function(){if(!c.support.noCloneEvent&& +!c.isXMLDoc(this)){var d=this.outerHTML,f=this.ownerDocument;if(!d){d=f.createElement("div");d.appendChild(this.cloneNode(true));d=d.innerHTML}return c.clean([d.replace(Fa,"").replace(V,"")],f)[0]}else return this.cloneNode(true)});if(a===true){qa(this,b);qa(this.find("*"),b.find("*"))}return b},html:function(a){if(a===v)return this[0]&&this[0].nodeType===1?this[0].innerHTML.replace(Fa,""):null;else if(typeof a==="string"&&!/\n"; out() << " \n"; out() << "\n"; - -#if 0 - out() << "\n"; - out() << QString("\n").arg(naturalLanguage); - - QString shortVersion; - if ((project != "Qtopia") && (project != "Qt Extended")) { - shortVersion = project + " " + shortVersion + ": "; - if (node && !node->doc().location().isEmpty()) - out() << "\n"; - - shortVersion = myTree->version(); - if (shortVersion.count(QChar('.')) == 2) - shortVersion.truncate(shortVersion.lastIndexOf(QChar('.'))); - if (!shortVersion.isEmpty()) { - if (project == "QSA") - shortVersion = "QSA " + shortVersion + ": "; - else - shortVersion = "Qt " + shortVersion + ": "; - } - } - - out() << "\n" - " " << shortVersion << protectEnc(title) << "\n"; - out() << QString("").arg(outputEncoding); - - if (!style.isEmpty()) - out() << " \n"; - - const QMap &metaMap = node->doc().metaTagMap(); - if (!metaMap.isEmpty()) { - QMapIterator i(metaMap); - while (i.hasNext()) { - i.next(); - out() << " \n"; - } - } - - navigationLinks.clear(); - - if (node && !node->links().empty()) { - QPair linkPair; - QPair anchorPair; - const Node *linkNode; - - if (node->links().contains(Node::PreviousLink)) { - linkPair = node->links()[Node::PreviousLink]; - linkNode = findNodeForTarget(linkPair.first, node, marker); - if (!linkNode || linkNode == node) - anchorPair = linkPair; - else - anchorPair = anchorForNode(linkNode); - - out() << " \n"; - - navigationLinks += "[Previous: "; - if (linkPair.first == linkPair.second && !anchorPair.second.isEmpty()) - navigationLinks += protectEnc(anchorPair.second); - else - navigationLinks += protectEnc(linkPair.second); - navigationLinks += "]\n"; - } - if (node->links().contains(Node::ContentsLink)) { - linkPair = node->links()[Node::ContentsLink]; - linkNode = findNodeForTarget(linkPair.first, node, marker); - if (!linkNode || linkNode == node) - anchorPair = linkPair; - else - anchorPair = anchorForNode(linkNode); - - out() << " \n"; - - navigationLinks += "["; - if (linkPair.first == linkPair.second && !anchorPair.second.isEmpty()) - navigationLinks += protectEnc(anchorPair.second); - else - navigationLinks += protectEnc(linkPair.second); - navigationLinks += "]\n"; - } - if (node->links().contains(Node::NextLink)) { - linkPair = node->links()[Node::NextLink]; - linkNode = findNodeForTarget(linkPair.first, node, marker); - if (!linkNode || linkNode == node) - anchorPair = linkPair; - else - anchorPair = anchorForNode(linkNode); - - out() << " \n"; - - navigationLinks += "[Next: "; - if (linkPair.first == linkPair.second && !anchorPair.second.isEmpty()) - navigationLinks += protectEnc(anchorPair.second); - else - navigationLinks += protectEnc(linkPair.second); - navigationLinks += "]\n"; - } - if (node->links().contains(Node::IndexLink)) { - linkPair = node->links()[Node::IndexLink]; - linkNode = findNodeForTarget(linkPair.first, node, marker); - if (!linkNode || linkNode == node) - anchorPair = linkPair; - else - anchorPair = anchorForNode(linkNode); - out() << " \n"; - } - if (node->links().contains(Node::StartLink)) { - linkPair = node->links()[Node::StartLink]; - linkNode = findNodeForTarget(linkPair.first, node, marker); - if (!linkNode || linkNode == node) - anchorPair = linkPair; - else - anchorPair = anchorForNode(linkNode); - out() << " \n"; - } - } - - foreach (const QString &stylesheet, stylesheets) { - out() << " \n"; - } - foreach (const QString &customHeadElement, customHeadElements) { - out() << " " << customHeadElement << "\n"; - } - - out() << "\n" - #endif + if (offlineDocs) + out() << "\n"; + else out() << "\n"; + if (mainPage) generateMacRef(node, marker); out() << QString(postHeader).replace("\\" + COMMAND_VERSION, myTree->version()); -#if 0 +#if 0 // Removed for new docf format. MWS if (node && !node->links().empty()) out() << "

\n" << navigationLinks << "

\n"; #endif @@ -4375,8 +4254,6 @@ void HtmlGenerator::endLink() inObsoleteLink = false; } -QT_END_NAMESPACE - #ifdef QDOC_QML /*! @@ -4728,3 +4605,139 @@ void HtmlGenerator::generatePageIndex(const QString& fileName, CodeMarker* marke } #endif + +#if 0 // fossil removed for new doc format MWS 19/04/2010 + out() << "\n"; + out() << QString("\n").arg(naturalLanguage); + + QString shortVersion; + if ((project != "Qtopia") && (project != "Qt Extended")) { + shortVersion = project + " " + shortVersion + ": "; + if (node && !node->doc().location().isEmpty()) + out() << "\n"; + + shortVersion = myTree->version(); + if (shortVersion.count(QChar('.')) == 2) + shortVersion.truncate(shortVersion.lastIndexOf(QChar('.'))); + if (!shortVersion.isEmpty()) { + if (project == "QSA") + shortVersion = "QSA " + shortVersion + ": "; + else + shortVersion = "Qt " + shortVersion + ": "; + } + } + + out() << "\n" + " " << shortVersion << protectEnc(title) << "\n"; + out() << QString("").arg(outputEncoding); + + if (!style.isEmpty()) + out() << " \n"; + + const QMap &metaMap = node->doc().metaTagMap(); + if (!metaMap.isEmpty()) { + QMapIterator i(metaMap); + while (i.hasNext()) { + i.next(); + out() << " \n"; + } + } + + navigationLinks.clear(); + + if (node && !node->links().empty()) { + QPair linkPair; + QPair anchorPair; + const Node *linkNode; + + if (node->links().contains(Node::PreviousLink)) { + linkPair = node->links()[Node::PreviousLink]; + linkNode = findNodeForTarget(linkPair.first, node, marker); + if (!linkNode || linkNode == node) + anchorPair = linkPair; + else + anchorPair = anchorForNode(linkNode); + + out() << " \n"; + + navigationLinks += "[Previous: "; + if (linkPair.first == linkPair.second && !anchorPair.second.isEmpty()) + navigationLinks += protectEnc(anchorPair.second); + else + navigationLinks += protectEnc(linkPair.second); + navigationLinks += "]\n"; + } + if (node->links().contains(Node::ContentsLink)) { + linkPair = node->links()[Node::ContentsLink]; + linkNode = findNodeForTarget(linkPair.first, node, marker); + if (!linkNode || linkNode == node) + anchorPair = linkPair; + else + anchorPair = anchorForNode(linkNode); + + out() << " \n"; + + navigationLinks += "["; + if (linkPair.first == linkPair.second && !anchorPair.second.isEmpty()) + navigationLinks += protectEnc(anchorPair.second); + else + navigationLinks += protectEnc(linkPair.second); + navigationLinks += "]\n"; + } + if (node->links().contains(Node::NextLink)) { + linkPair = node->links()[Node::NextLink]; + linkNode = findNodeForTarget(linkPair.first, node, marker); + if (!linkNode || linkNode == node) + anchorPair = linkPair; + else + anchorPair = anchorForNode(linkNode); + + out() << " \n"; + + navigationLinks += "[Next: "; + if (linkPair.first == linkPair.second && !anchorPair.second.isEmpty()) + navigationLinks += protectEnc(anchorPair.second); + else + navigationLinks += protectEnc(linkPair.second); + navigationLinks += "]\n"; + } + if (node->links().contains(Node::IndexLink)) { + linkPair = node->links()[Node::IndexLink]; + linkNode = findNodeForTarget(linkPair.first, node, marker); + if (!linkNode || linkNode == node) + anchorPair = linkPair; + else + anchorPair = anchorForNode(linkNode); + out() << " \n"; + } + if (node->links().contains(Node::StartLink)) { + linkPair = node->links()[Node::StartLink]; + linkNode = findNodeForTarget(linkPair.first, node, marker); + if (!linkNode || linkNode == node) + anchorPair = linkPair; + else + anchorPair = anchorForNode(linkNode); + out() << " \n"; + } + } + + foreach (const QString &stylesheet, stylesheets) { + out() << " \n"; + } + + foreach (const QString &customHeadElement, customHeadElements) { + out() << " " << customHeadElement << "\n"; + } + + out() << "\n" + #endif + + QT_END_NAMESPACE diff --git a/tools/qdoc3/htmlgenerator.h b/tools/qdoc3/htmlgenerator.h index 559c968..2a365e9 100644 --- a/tools/qdoc3/htmlgenerator.h +++ b/tools/qdoc3/htmlgenerator.h @@ -297,6 +297,7 @@ class HtmlGenerator : public PageGenerator bool inTableHeader; int numTableRows; bool threeColumnEnumValueTable; + bool offlineDocs; QString link; QStringList sectionNumber; QRegExp funcLeftParen; diff --git a/tools/qdoc3/test/qt.qdocconf b/tools/qdoc3/test/qt.qdocconf index cc3e436..ef6fe97 100644 --- a/tools/qdoc3/test/qt.qdocconf +++ b/tools/qdoc3/test/qt.qdocconf @@ -9,6 +9,7 @@ versionsym = version = %VERSION% description = Qt Reference Documentation url = http://qt.nokia.com/doc/4.7 +online = true sourceencoding = UTF-8 outputencoding = UTF-8 -- cgit v0.12 From d66a6da84af01f1a6d4fd52d9b1cbec72a4fae3c Mon Sep 17 00:00:00 2001 From: Jason McDonald Date: Tue, 20 Apr 2010 13:02:51 +1000 Subject: Make offline docs the default for package generation. Acked-by: Martin Smith --- tools/qdoc3/test/qt.qdocconf | 1 - 1 file changed, 1 deletion(-) diff --git a/tools/qdoc3/test/qt.qdocconf b/tools/qdoc3/test/qt.qdocconf index ef6fe97..cc3e436 100644 --- a/tools/qdoc3/test/qt.qdocconf +++ b/tools/qdoc3/test/qt.qdocconf @@ -9,7 +9,6 @@ versionsym = version = %VERSION% description = Qt Reference Documentation url = http://qt.nokia.com/doc/4.7 -online = true sourceencoding = UTF-8 outputencoding = UTF-8 -- cgit v0.12 From bb0aa3c61e8c443ec4207381ca10c85f6c4b6665 Mon Sep 17 00:00:00 2001 From: Shane Kearns Date: Tue, 20 Apr 2010 10:34:03 +0200 Subject: Fix crash on startup on Symbian OS The changes to QThread introduced by commit 9aa4538b219ed759a47e8d1f93c2797bf07b5e2f mean that the QThread constructor calls into the event dispatcher. The Symbian event dispatcher owns a QThread, so it crashed when the code re-entered the partially constructed event dispatcher and used an uninitialised pointer. This change delays construction of the QThread until the point of use, so that the event dispatcher is fully constructed. Task-number: QTBUG-10029 Reviewed-by: Jason Barron (cherry picked from commit 2b55d52669beb72396f94e449fdf172735349b3b) --- src/corelib/kernel/qeventdispatcher_symbian.cpp | 20 +++++++++++++++----- src/corelib/kernel/qeventdispatcher_symbian_p.h | 3 ++- 2 files changed, 17 insertions(+), 6 deletions(-) diff --git a/src/corelib/kernel/qeventdispatcher_symbian.cpp b/src/corelib/kernel/qeventdispatcher_symbian.cpp index ca44264..f811361 100644 --- a/src/corelib/kernel/qeventdispatcher_symbian.cpp +++ b/src/corelib/kernel/qeventdispatcher_symbian.cpp @@ -632,6 +632,7 @@ void QSocketActiveObject::deleteLater() QEventDispatcherSymbian::QEventDispatcherSymbian(QObject *parent) : QAbstractEventDispatcher(parent), + m_selectThread(0), m_activeScheduler(0), m_wakeUpAO(0), m_completeDeferredAOs(0), @@ -659,11 +660,19 @@ void QEventDispatcherSymbian::startingUp() wakeUp(); } +QSelectThread& QEventDispatcherSymbian::selectThread() { + if (!m_selectThread) + m_selectThread = new QSelectThread; + return *m_selectThread; +} + void QEventDispatcherSymbian::closingDown() { - if (m_selectThread.isRunning()) { - m_selectThread.stop(); + if (m_selectThread && m_selectThread->isRunning()) { + m_selectThread->stop(); } + delete m_selectThread; + m_selectThread = 0; delete m_completeDeferredAOs; delete m_wakeUpAO; @@ -935,12 +944,13 @@ void QEventDispatcherSymbian::registerSocketNotifier ( QSocketNotifier * notifie { QSocketActiveObject *socketAO = q_check_ptr(new QSocketActiveObject(this, notifier)); m_notifiers.insert(notifier, socketAO); - m_selectThread.requestSocketEvents(notifier, &socketAO->iStatus); + selectThread().requestSocketEvents(notifier, &socketAO->iStatus); } void QEventDispatcherSymbian::unregisterSocketNotifier ( QSocketNotifier * notifier ) { - m_selectThread.cancelSocketEvents(notifier); + if (m_selectThread) + m_selectThread->cancelSocketEvents(notifier); if (m_notifiers.contains(notifier)) { QSocketActiveObject *sockObj = *m_notifiers.find(notifier); m_deferredSocketEvents.removeAll(sockObj); @@ -951,7 +961,7 @@ void QEventDispatcherSymbian::unregisterSocketNotifier ( QSocketNotifier * notif void QEventDispatcherSymbian::reactivateSocketNotifier(QSocketNotifier *notifier) { - m_selectThread.requestSocketEvents(notifier, &m_notifiers[notifier]->iStatus); + selectThread().requestSocketEvents(notifier, &m_notifiers[notifier]->iStatus); } void QEventDispatcherSymbian::registerTimer ( int timerId, int interval, QObject * object ) diff --git a/src/corelib/kernel/qeventdispatcher_symbian_p.h b/src/corelib/kernel/qeventdispatcher_symbian_p.h index 1ab31cc..5281199 100644 --- a/src/corelib/kernel/qeventdispatcher_symbian_p.h +++ b/src/corelib/kernel/qeventdispatcher_symbian_p.h @@ -259,8 +259,9 @@ private: bool sendPostedEvents(); bool sendDeferredSocketEvents(); + QSelectThread& selectThread(); private: - QSelectThread m_selectThread; + QSelectThread *m_selectThread; CQtActiveScheduler *m_activeScheduler; -- cgit v0.12 From c6cb0de12b9bbb71690a0b6d5c53b2329767f2a4 Mon Sep 17 00:00:00 2001 From: kh1 Date: Mon, 19 Apr 2010 18:59:32 +0200 Subject: Quick fix to make the documentation work, needs a proper solution though. Reviewed-by: kh (cherry picked from commit 0fd81e81a357edb9f9e615cff28a1876bd363b2e) --- tools/assistant/tools/assistant/helpviewer.cpp | 4 ++++ tools/assistant/tools/assistant/helpviewer.h | 1 + tools/assistant/tools/assistant/helpviewer_qwv.cpp | 22 ++++++++++++++++++---- 3 files changed, 23 insertions(+), 4 deletions(-) diff --git a/tools/assistant/tools/assistant/helpviewer.cpp b/tools/assistant/tools/assistant/helpviewer.cpp index 0c51a02..85e4e71 100644 --- a/tools/assistant/tools/assistant/helpviewer.cpp +++ b/tools/assistant/tools/assistant/helpviewer.cpp @@ -52,6 +52,10 @@ QT_BEGIN_NAMESPACE +QString AbstractHelpViewer::DocPath = QString::fromLatin1("qthelp://com." + "trolltech.qt.%1/").arg(QString(QLatin1String(QT_VERSION_STR)) + .replace(QLatin1String("."), QLatin1String(""))); + QString AbstractHelpViewer::AboutBlank = QCoreApplication::translate("HelpViewer", "about:blank"); diff --git a/tools/assistant/tools/assistant/helpviewer.h b/tools/assistant/tools/assistant/helpviewer.h index 6f1f48d..9c3971f 100644 --- a/tools/assistant/tools/assistant/helpviewer.h +++ b/tools/assistant/tools/assistant/helpviewer.h @@ -67,6 +67,7 @@ public: virtual bool handleForwardBackwardMouseButtons(QMouseEvent *e) = 0; + static QString DocPath; static QString AboutBlank; static QString LocalHelpFile; static QString PageNotFoundMessage; diff --git a/tools/assistant/tools/assistant/helpviewer_qwv.cpp b/tools/assistant/tools/assistant/helpviewer_qwv.cpp index db1cd58..a19b29a 100644 --- a/tools/assistant/tools/assistant/helpviewer_qwv.cpp +++ b/tools/assistant/tools/assistant/helpviewer_qwv.cpp @@ -129,13 +129,27 @@ QNetworkReply *HelpNetworkAccessManager::createRequest(Operation /*op*/, const QNetworkRequest &request, QIODevice* /*outgoingData*/) { TRACE_OBJ - const QUrl &url = request.url(); - const QString &mimeType = AbstractHelpViewer::mimeFromUrl(url.toString()); - + QString url = request.url().toString(); HelpEngineWrapper &helpEngine = HelpEngineWrapper::instance(); + + // TODO: For some reason the url to load is already wrong (passed from webkit) + // though the css file and the references inside should work that way. One + // possible problem might be that the css is loaded at the same level as the + // html, thus a path inside the css like (../images/foo.png) might cd out of + // the virtual folder + if (!helpEngine.findFile(url).isValid()) { + if (url.startsWith(AbstractHelpViewer::DocPath)) { + if (!url.startsWith(AbstractHelpViewer::DocPath + QLatin1String("qdoc/"))) { + url = url.replace(AbstractHelpViewer::DocPath, + AbstractHelpViewer::DocPath + QLatin1String("qdoc/")); + } + } + } + + const QString &mimeType = AbstractHelpViewer::mimeFromUrl(url); const QByteArray &data = helpEngine.findFile(url).isValid() ? helpEngine.fileData(url) - : AbstractHelpViewer::PageNotFoundMessage.arg(url.toString()).toUtf8(); + : AbstractHelpViewer::PageNotFoundMessage.arg(url).toUtf8(); return new HelpNetworkReply(request, data, mimeType.isEmpty() ? QLatin1String("application/octet-stream") : mimeType); } -- cgit v0.12 From 0c3411c051e1f59e050fcf40fd55fa2feb585d6b Mon Sep 17 00:00:00 2001 From: Morten Engvoldsen Date: Tue, 20 Apr 2010 11:51:35 +0200 Subject: Doc: Correcting qdocconf files for assistant Linking correct files to the qdocconf files Reviewed-by: Daniel Molkentin (cherry picked from commit 84eadc0bc232d8196e08f5aa5614ce9a17ea93bd) --- tools/qdoc3/test/qt-build-docs.qdocconf | 21 ++++++++++++++------- tools/qdoc3/test/qt-build-docs_zh_CN.qdocconf | 20 +++++++++++++------- tools/qdoc3/test/qt.qdocconf | 20 +++++++++++++------- tools/qdoc3/test/qt_zh_CN.qdocconf | 20 +++++++++++++------- 4 files changed, 53 insertions(+), 28 deletions(-) diff --git a/tools/qdoc3/test/qt-build-docs.qdocconf b/tools/qdoc3/test/qt-build-docs.qdocconf index dbff4e2..0694748 100644 --- a/tools/qdoc3/test/qt-build-docs.qdocconf +++ b/tools/qdoc3/test/qt-build-docs.qdocconf @@ -22,14 +22,12 @@ qhp.Qt.indexTitle = Qt Reference Documentation # Files not referenced in any qdoc file (last four are needed by qtdemo) # See also extraimages.HTML qhp.Qt.extraFiles = index.html \ - style/style.css \ - scripts/functions.js \ - scripts/jquery.js \ images/api_examples.png \ images/api_lookup.png \ images/api_topics.png \ - images/bg_ll.png \ images/bg_l_blank.png \ + images/bg_ll_blank.png \ + images/bg_ll.png \ images/bg_l.png \ images/bg_lr.png \ images/bg_r.png \ @@ -37,24 +35,33 @@ qhp.Qt.extraFiles = index.html \ images/bg_ul.png \ images/bg_ur_blank.png \ images/bg_ur.png \ + images/box_bg.png \ images/breadcrumb.png \ images/bullet_dn.png \ images/bullet_gt.png \ + images/bullet_sq.png \ + images/bullet_up.png \ + images/coloreditorfactoryimage.png \ + images/content_bg.png \ + images/dynamiclayouts-example.png \ images/feedbackground.png \ images/form_bg.png \ images/horBar.png \ images/page_bg.png \ images/print.png \ images/qt_guide.png \ + images/qt_icon.png \ images/qt-logo.png \ images/qt_ref_doc.png \ images/qt_tools.png \ images/sep.png \ images/sprites-combined.png \ + images/stylesheet-coffee-plastique.png \ images/taskmenuextension-example.png \ - images/coloreditorfactoryimage.png \ - images/dynamiclayouts-example.png \ - images/stylesheet-coffee-plastique.png + scripts/functions.js \ + scripts/jquery.js \ + style/style.css + qhp.Qt.filterAttributes = qt 4.7.0 qtrefdoc diff --git a/tools/qdoc3/test/qt-build-docs_zh_CN.qdocconf b/tools/qdoc3/test/qt-build-docs_zh_CN.qdocconf index 461c069..5a3d726 100644 --- a/tools/qdoc3/test/qt-build-docs_zh_CN.qdocconf +++ b/tools/qdoc3/test/qt-build-docs_zh_CN.qdocconf @@ -30,14 +30,12 @@ qhp.Qt.customFilters.Qt.filterAttributes = qt 4.7.0 # Files not referenced in any qdoc file (last four are needed by qtdemo) # See also extraimages.HTML qhp.Qt.extraFiles = index.html \ - style/style.css \ - scripts/functions.js \ - scripts/jquery.js \ images/api_examples.png \ images/api_lookup.png \ images/api_topics.png \ - images/bg_ll.png \ images/bg_l_blank.png \ + images/bg_ll_blank.png \ + images/bg_ll.png \ images/bg_l.png \ images/bg_lr.png \ images/bg_r.png \ @@ -45,24 +43,32 @@ qhp.Qt.extraFiles = index.html \ images/bg_ul.png \ images/bg_ur_blank.png \ images/bg_ur.png \ + images/box_bg.png \ images/breadcrumb.png \ images/bullet_dn.png \ images/bullet_gt.png \ + images/bullet_sq.png \ + images/bullet_up.png \ + images/coloreditorfactoryimage.png \ + images/content_bg.png \ + images/dynamiclayouts-example.png \ images/feedbackground.png \ images/form_bg.png \ images/horBar.png \ images/page_bg.png \ images/print.png \ images/qt_guide.png \ + images/qt_icon.png \ images/qt-logo.png \ images/qt_ref_doc.png \ images/qt_tools.png \ images/sep.png \ images/sprites-combined.png \ + images/stylesheet-coffee-plastique.png \ images/taskmenuextension-example.png \ - images/coloreditorfactoryimage.png \ - images/dynamiclayouts-example.png \ - images/stylesheet-coffee-plastique.png + scripts/functions.js \ + scripts/jquery.js \ + style/style.css language = Cpp diff --git a/tools/qdoc3/test/qt.qdocconf b/tools/qdoc3/test/qt.qdocconf index cc3e436..92ce9a3 100644 --- a/tools/qdoc3/test/qt.qdocconf +++ b/tools/qdoc3/test/qt.qdocconf @@ -25,14 +25,12 @@ qhp.Qt.indexRoot = # Files not referenced in any qdoc file (last four are needed by qtdemo) # See also extraimages.HTML qhp.Qt.extraFiles = index.html \ - style/style.css \ - scripts/functions.js \ - scripts/jquery.js \ images/api_examples.png \ images/api_lookup.png \ images/api_topics.png \ - images/bg_ll.png \ images/bg_l_blank.png \ + images/bg_ll_blank.png \ + images/bg_ll.png \ images/bg_l.png \ images/bg_lr.png \ images/bg_r.png \ @@ -40,24 +38,32 @@ qhp.Qt.extraFiles = index.html \ images/bg_ul.png \ images/bg_ur_blank.png \ images/bg_ur.png \ + images/box_bg.png \ images/breadcrumb.png \ images/bullet_dn.png \ images/bullet_gt.png \ + images/bullet_sq.png \ + images/bullet_up.png \ + images/coloreditorfactoryimage.png \ + images/content_bg.png \ + images/dynamiclayouts-example.png \ images/feedbackground.png \ images/form_bg.png \ images/horBar.png \ images/page_bg.png \ images/print.png \ images/qt_guide.png \ + images/qt_icon.png \ images/qt-logo.png \ images/qt_ref_doc.png \ images/qt_tools.png \ images/sep.png \ images/sprites-combined.png \ + images/stylesheet-coffee-plastique.png \ images/taskmenuextension-example.png \ - images/coloreditorfactoryimage.png \ - images/dynamiclayouts-example.png \ - images/stylesheet-coffee-plastique.png + scripts/functions.js \ + scripts/jquery.js \ + style/style.css qhp.Qt.filterAttributes = qt 4.7.0 qtrefdoc qhp.Qt.customFilters.Qt.name = Qt 4.7.0 diff --git a/tools/qdoc3/test/qt_zh_CN.qdocconf b/tools/qdoc3/test/qt_zh_CN.qdocconf index c5d2c88..a5a65d8 100644 --- a/tools/qdoc3/test/qt_zh_CN.qdocconf +++ b/tools/qdoc3/test/qt_zh_CN.qdocconf @@ -32,14 +32,12 @@ qhp.Qt.customFilters.Qt.filterAttributes = qt 4.7.0 # Files not referenced in any qdoc file (last four are needed by qtdemo) # See also extraimages.HTML qhp.Qt.extraFiles = index.html \ - style/style.css \ - scripts/functions.js \ - scripts/jquery.js \ images/api_examples.png \ images/api_lookup.png \ images/api_topics.png \ - images/bg_ll.png \ images/bg_l_blank.png \ + images/bg_ll_blank.png \ + images/bg_ll.png \ images/bg_l.png \ images/bg_lr.png \ images/bg_r.png \ @@ -47,24 +45,32 @@ qhp.Qt.extraFiles = index.html \ images/bg_ul.png \ images/bg_ur_blank.png \ images/bg_ur.png \ + images/box_bg.png \ images/breadcrumb.png \ images/bullet_dn.png \ images/bullet_gt.png \ + images/bullet_sq.png \ + images/bullet_up.png \ + images/coloreditorfactoryimage.png \ + images/content_bg.png \ + images/dynamiclayouts-example.png \ images/feedbackground.png \ images/form_bg.png \ images/horBar.png \ images/page_bg.png \ images/print.png \ images/qt_guide.png \ + images/qt_icon.png \ images/qt-logo.png \ images/qt_ref_doc.png \ images/qt_tools.png \ images/sep.png \ images/sprites-combined.png \ + images/stylesheet-coffee-plastique.png \ images/taskmenuextension-example.png \ - images/coloreditorfactoryimage.png \ - images/dynamiclayouts-example.png \ - images/stylesheet-coffee-plastique.png + scripts/functions.js \ + scripts/jquery.js \ + style/style.css language = Cpp -- cgit v0.12 From 034e13e765874b25b56d16c9487efd2e98fe4518 Mon Sep 17 00:00:00 2001 From: Morten Engvoldsen Date: Tue, 20 Apr 2010 15:51:04 +0200 Subject: Doc: Cleaning HTML generator and updating index.qdoc Adding links to the index page and removing HTML attributes like align and valing form the HTML generator Reviewed-by: Martin Smith (cherry picked from commit 019af5ecb5dbc9c173109ba670180177713a51ad) --- tools/qdoc3/htmlgenerator.cpp | 123 ++++++++++++++-------------- tools/qdoc3/test/qt-html-templates.qdocconf | 18 ++-- 2 files changed, 68 insertions(+), 73 deletions(-) diff --git a/tools/qdoc3/htmlgenerator.cpp b/tools/qdoc3/htmlgenerator.cpp index 1192daf..68c27db 100644 --- a/tools/qdoc3/htmlgenerator.cpp +++ b/tools/qdoc3/htmlgenerator.cpp @@ -514,14 +514,14 @@ int HtmlGenerator::generateAtom(const Atom *atom, out() << formattingRightMap()[ATOM_FORMATTING_TELETYPE]; break; case Atom::Code: - out() << "
"
+	out() << "
"
               << trimmedTrailing(highlightedCode(indent(codeIndent,atom->string()),
                                                  marker,relative))
               << "
\n"; break; #ifdef QDOC_QML case Atom::Qml: - out() << "
"
+	out() << "
"
               << trimmedTrailing(highlightedCode(indent(codeIndent,atom->string()),
                                                  marker,relative))
               << "
\n"; @@ -529,7 +529,7 @@ int HtmlGenerator::generateAtom(const Atom *atom, #endif case Atom::CodeNew: out() << "

you can rewrite it as

\n" - << "
"
+              << "
"
               << trimmedTrailing(highlightedCode(indent(codeIndent,atom->string()),
                                                  marker,relative))
               << "
\n"; @@ -538,9 +538,9 @@ int HtmlGenerator::generateAtom(const Atom *atom, out() << "

For example, if you have code like

\n"; // fallthrough case Atom::CodeBad: - out() << "
"
+        out() << "
"
               << trimmedTrailing(protectEnc(plainCode(indent(codeIndent,atom->string()))))
-              << "
\n"; + << "
\n"; break; case Atom::FootnoteLeft: // ### For now @@ -849,7 +849,7 @@ int HtmlGenerator::generateAtom(const Atom *atom, if (atom->next() != 0) text = atom->next()->string(); if (atom->type() == Atom::Image) - out() << "

"; + out() << "

"; if (fileName.isEmpty()) { out() << "[Missing image " << protectEnc(atom->string()) << "]"; @@ -868,7 +868,7 @@ int HtmlGenerator::generateAtom(const Atom *atom, case Atom::ImageText: break; case Atom::LegaleseLeft: - out() << "

"; + out() << "
"; break; case Atom::LegaleseRight: out() << "
"; @@ -910,13 +910,13 @@ int HtmlGenerator::generateAtom(const Atom *atom, else if (atom->string() == ATOM_LIST_VALUE) { threeColumnEnumValueTable = isThreeColumnEnumValueTable(atom); if (threeColumnEnumValueTable) { - out() << "

" + out() << "
" << "" << "" << "\n"; } else { - out() << "

ConstantValueDescription
" + out() << "
" << "\n"; } } @@ -951,10 +951,10 @@ int HtmlGenerator::generateAtom(const Atom *atom, else { // (atom->string() == ATOM_LIST_VALUE) // ### Trenton - out() << "
ConstantValue
" + out() << "
" << protectEnc(plainCode(marker->markedUpEnumValue(atom->next()->string(), relative))) - << ""; + << ""; QString itemValue; if (relative->type() == Node::Enum) { @@ -980,7 +980,7 @@ int HtmlGenerator::generateAtom(const Atom *atom, } else if (atom->string() == ATOM_LIST_VALUE) { if (threeColumnEnumValueTable) { - out() << ""; + out() << ""; if (matchAhead(atom, Atom::ListItemRight)) out() << " "; } @@ -1010,7 +1010,7 @@ int HtmlGenerator::generateAtom(const Atom *atom, out() << "\n"; } else if (atom->string() == ATOM_LIST_VALUE) { - out() << "

\n"; + out() << "\n"; } else { out() << "\n"; @@ -1091,29 +1091,28 @@ int HtmlGenerator::generateAtom(const Atom *atom, } if (!atom->string().isEmpty()) { if (atom->string().contains("%")) - out() << "

string() << "\" " - << "align=\"center\">\n"; + out() << "
string() << "\">\n "; else { - out() << "

\n"; + out() << "
\n"; } } else { - out() << "

\n"; + out() << "
\n"; } numTableRows = 0; break; case Atom::TableRight: - out() << "

\n"; + out() << "\n"; break; case Atom::TableHeaderLeft: - out() << ""; + out() << ""; inTableHeader = true; break; case Atom::TableHeaderRight: out() << ""; if (matchAhead(atom, Atom::TableHeaderLeft)) { skipAhead = 1; - out() << "\n"; + out() << "\n"; } else { out() << "\n"; @@ -1122,9 +1121,9 @@ int HtmlGenerator::generateAtom(const Atom *atom, break; case Atom::TableRowLeft: if (++numTableRows % 2 == 1) - out() << ""; + out() << ""; else - out() << ""; + out() << ""; break; case Atom::TableRowRight: out() << "\n"; @@ -1189,11 +1188,11 @@ int HtmlGenerator::generateAtom(const Atom *atom, out() << "string()) << "\">"; break; case Atom::UnhandledFormat: - out() << "<Missing HTML>"; + out() << "<Missing HTML>"; break; case Atom::UnknownCommand: - out() << "\\" << protectEnc(atom->string()) - << ""; + out() << "\\" << protectEnc(atom->string()) + << ""; break; #ifdef QDOC_QML case Atom::QmlText: @@ -1811,7 +1810,7 @@ void HtmlGenerator::generateBrief(const Node *node, CodeMarker *marker, void HtmlGenerator::generateIncludes(const InnerNode *inner, CodeMarker *marker) { if (!inner->includes().isEmpty()) { - out() << "
"
+        out() << "
"
               << trimmedTrailing(highlightedCode(indent(codeIndent,
                                                         marker->markedUpIncludes(inner->includes())),
                                                  marker,inner))
@@ -1845,8 +1844,8 @@ void HtmlGenerator::generateTableOfContents(const Node *node,
 
     QString tdTag;
     if (numColumns > 1) {
-        tdTag = "";
-        out() << "

\n" + tdTag = "
"; /* width=\"" + QString::number((100 + numColumns - 1) / numColumns) + "%\">";*/ + out() << "\n" << tdTag << "\n"; } @@ -1898,7 +1897,7 @@ void HtmlGenerator::generateTableOfContents(const Node *node, } if (numColumns > 1) - out() << "

\n"; + out() << "
\n"; inContents = false; inLink = false; @@ -2011,7 +2010,7 @@ void HtmlGenerator::generateNavigationBar(const NavigationBar& bar, { if (bar.prev.begin() != 0 || bar.current.begin() != 0 || bar.next.begin() != 0) { - out() << "

"; + out() << "

"; if (bar.prev.begin() != 0) { #if 0 out() << "[\n"; + out() << "
\n"; int row = 0; foreach (const QString &name, nodeMap.keys()) { @@ -2197,9 +2196,9 @@ void HtmlGenerator::generateAnnotatedList(const Node *relative, continue; if (++row % 2 == 1) - out() << ""; + out() << ""; else - out() << ""; + out() << ""; out() << ""; @@ -2219,7 +2218,7 @@ void HtmlGenerator::generateAnnotatedList(const Node *relative, } out() << "\n"; } - out() << "
"; generateFullName(node, relative, marker); out() << "

\n"; + out() << "\n"; } /*! @@ -2372,7 +2371,7 @@ void HtmlGenerator::generateCompactList(const Node *relative, } firstOffset[NumColumns] = classMap.count(); - out() << "

\n"; + out() << "
\n"; for (k = 0; k < numRows; k++) { out() << "\n"; for (i = 0; i < NumColumns; i++) { @@ -2393,7 +2392,7 @@ void HtmlGenerator::generateCompactList(const Node *relative, currentParagraphNo[i] = NumParagraphs - 1; } #endif - out() << "\n"; } - out() << "
"; + out() << ""; if (currentOffsetInParagraph[i] == 0) { // start a new paragraph out() << "" @@ -2436,18 +2435,18 @@ void HtmlGenerator::generateCompactList(const Node *relative, } out() << "

\n"; + out() << "\n"; } void HtmlGenerator::generateFunctionIndex(const Node *relative, CodeMarker *marker) { - out() << "

"; + out() << "

"; for (int i = 0; i < 26; i++) { QChar ch('a' + i); out() << QString("%2 ").arg(ch).arg(ch.toUpper()); } - out() << "

\n"; + out() << "

\n"; char nextLetter = 'a'; char currentLetter; @@ -2715,8 +2714,8 @@ void HtmlGenerator::generateSection(const NodeList& nl, } else { if (twoColumn) - out() << "

\n" - << "\n
"; + out() << "\n" + << "\n
"; out() << "
    \n"; } @@ -2729,12 +2728,11 @@ void HtmlGenerator::generateSection(const NodeList& nl, } if (name_alignment) { - out() << "
"; + out() << "
"; } else { if (twoColumn && i == (int) (nl.count() + 1) / 2) - out() << "
    \n"; + out() << "
    \n"; out() << "
  • "; } @@ -2751,7 +2749,7 @@ void HtmlGenerator::generateSection(const NodeList& nl, else { out() << "
\n"; if (twoColumn) - out() << "

\n"; + out() << "
\n"; } } } @@ -2777,8 +2775,8 @@ void HtmlGenerator::generateSectionList(const Section& section, } else { if (twoColumn) - out() << "

\n" - << "\n
"; + out() << "\n" + << "\n
"; out() << "
    \n"; } @@ -2791,12 +2789,11 @@ void HtmlGenerator::generateSectionList(const Section& section, } if (name_alignment) { - out() << "
"; + out() << "
"; } else { if (twoColumn && i == (int) (section.members.count() + 1) / 2) - out() << "
    \n"; + out() << "
    \n"; out() << "
  • "; } @@ -2813,7 +2810,7 @@ void HtmlGenerator::generateSectionList(const Section& section, else { out() << "
\n"; if (twoColumn) - out() << "

\n"; + out() << "
\n"; } } @@ -2910,7 +2907,7 @@ QString HtmlGenerator::highlightedCode(const QString& markedCode, for (int i = 0, n = src.size(); i < n;) { if (src.at(i) == charLangle && src.at(i + 1).unicode() == '@') { if (nameAlignment && !done) {// && (i != 0)) Why was this here? - html += ""; + html += ""; done = true; } i += 2; @@ -3075,8 +3072,8 @@ void HtmlGenerator::generateSectionList(const Section& section, twoColumn = (section.members.count() >= 5); } if (twoColumn) - out() << "

\n" - << "\n
"; + out() << "\n" + << "\n
"; out() << "
    \n"; int i = 0; @@ -3088,7 +3085,7 @@ void HtmlGenerator::generateSectionList(const Section& section, } if (twoColumn && i == (int) (section.members.count() + 1) / 2) - out() << "
    \n"; + out() << "
    \n"; out() << "
  • "; if (style == CodeMarker::Accessors) @@ -3102,7 +3099,7 @@ void HtmlGenerator::generateSectionList(const Section& section, } out() << "
\n"; if (twoColumn) - out() << "

\n"; + out() << "
\n"; } if (style == CodeMarker::Summary && !section.inherited.isEmpty()) { @@ -4274,15 +4271,15 @@ void HtmlGenerator::generateQmlSummary(const Section& section, twoColumn = (count >= 5); } if (twoColumn) - out() << "

\n" - << "\n
"; + out() << "\n" + << "\n
"; out() << "
    \n"; int row = 0; m = section.members.begin(); while (m != section.members.end()) { if (twoColumn && row == (int) (count + 1) / 2) - out() << "
    \n"; + out() << "
    \n"; out() << "
  • "; generateQmlItem(*m,relative,marker,true); out() << "
  • \n"; @@ -4291,7 +4288,7 @@ void HtmlGenerator::generateQmlSummary(const Section& section, } out() << "
\n"; if (twoColumn) - out() << "

\n"; + out() << "
\n"; } } @@ -4383,7 +4380,7 @@ void HtmlGenerator::generateQmlInherits(const QmlClassNode* cn, const Node* n = myTree->findNode(strList,Node::Fake); if (n && n->subType() == Node::QmlClass) { const QmlClassNode* qcn = static_cast(n); - out() << "

"; + out() << "

"; Text text; text << "[Inherits "; text << Atom(Atom::LinkNode,CodeMarker::stringForNode(qcn)); @@ -4430,7 +4427,7 @@ void HtmlGenerator::generateQmlInstantiates(const QmlClassNode* qcn, { const ClassNode* cn = qcn->classNode(); if (cn && (cn->status() != Node::Internal)) { - out() << "

"; + out() << "

"; Text text; text << "["; text << Atom(Atom::LinkNode,CodeMarker::stringForNode(qcn)); @@ -4461,7 +4458,7 @@ void HtmlGenerator::generateInstantiatedBy(const ClassNode* cn, if (cn && cn->status() != Node::Internal && !cn->qmlElement().isEmpty()) { const Node* n = myTree->root()->findNode(cn->qmlElement(),Node::Fake); if (n && n->subType() == Node::QmlClass) { - out() << "

"; + out() << "

"; Text text; text << "["; text << Atom(Atom::LinkNode,CodeMarker::stringForNode(cn)); diff --git a/tools/qdoc3/test/qt-html-templates.qdocconf b/tools/qdoc3/test/qt-html-templates.qdocconf index 67a25f3..158aef3 100644 --- a/tools/qdoc3/test/qt-html-templates.qdocconf +++ b/tools/qdoc3/test/qt-html-templates.qdocconf @@ -2,7 +2,7 @@ HTML.stylesheets = style/style.css HTML.postheader = "

\n" \ "
\n" \ " Home
\n" \ - " Qt Reference Documentation\n" \ + " Qt Reference Documentation\n" \ "
\n" \ " \n" \ "
\n" \ "
\n" \ @@ -110,7 +110,6 @@ HTML.footer = "
\n" \ "
\n" \ " \n" \ "
\n" \ - " \n" \ "
\n" \ "

\n" \ " © 2008-2010 Nokia Corporation and/or its\n" \ @@ -121,10 +120,10 @@ HTML.footer = "

\n" \ " href=\"http://qt.nokia.com/about/privacy-policy\">Privacy Policy

\n" \ " \n" \ "
\n" \ - "
\n" \ "
\n" \ " X\n" \ "
\n" \ + " \n" \ " \n" \ " \n" \ @@ -132,7 +131,6 @@ HTML.footer = "
\n" \ " \n" \ "
\n" \ "
\n" \ - " \n" \ "\n"; - out() << " \n"; + out() << " \n"; out() << "\n"; if (offlineDocs) - out() << "\n"; + out() << "\n"; else - out() << "\n"; + out() << "\n"; #ifdef GENERATE_MAC_REFS if (mainPage) @@ -1833,18 +1845,16 @@ void HtmlGenerator::generateTitle(const QString& title, CodeMarker *marker) { if (!title.isEmpty()) - out() << "

" << protectEnc(title); + out() << "

" << protectEnc(title) << "

\n"; if (!subTitle.isEmpty()) { - out() << "
"; - if (subTitleSize == SmallSubTitle) - out() << ""; + out() << ""; else - out() << ""; + out() << " class=\"subtitle\">"; generateText(subTitle, relative, marker); out() << "\n"; } - if (!title.isEmpty()) - out() << "\n"; } void HtmlGenerator::generateFooter(const Node *node) @@ -1853,9 +1863,10 @@ void HtmlGenerator::generateFooter(const Node *node) out() << "

\n" << navigationLinks << "

\n"; out() << QString(footer).replace("\\" + COMMAND_VERSION, myTree->version()) - << QString(address).replace("\\" + COMMAND_VERSION, myTree->version()) - << "\n" - "\n"; + << QString(address).replace("\\" + COMMAND_VERSION, myTree->version()); + out() << " \n"; + out() << "\n"; + out() << "\n"; } void HtmlGenerator::generateBrief(const Node *node, CodeMarker *marker, @@ -1876,7 +1887,7 @@ void HtmlGenerator::generateBrief(const Node *node, CodeMarker *marker, void HtmlGenerator::generateIncludes(const InnerNode *inner, CodeMarker *marker) { if (!inner->includes().isEmpty()) { - out() << "
"
+        out() << "
"
               << trimmedTrailing(highlightedCode(indent(codeIndent,
                                                         marker->markedUpIncludes(inner->includes())),
                                                  marker,inner))
@@ -3766,7 +3777,7 @@ void HtmlGenerator::generateDetailedMember(const Node *node,
         out() << "

"; out() << ""; generateSynopsis(enume, relative, marker, CodeMarker::Detailed); - out() << "
"; + out() << "
"; generateSynopsis(enume->flagsType(), relative, marker, diff --git a/tools/qdoc3/test/assistant.qdocconf b/tools/qdoc3/test/assistant.qdocconf index 1deefce..112b1b2 100644 --- a/tools/qdoc3/test/assistant.qdocconf +++ b/tools/qdoc3/test/assistant.qdocconf @@ -16,45 +16,28 @@ qhp.Assistant.file = assistant.qhp qhp.Assistant.namespace = com.trolltech.assistant.470 qhp.Assistant.virtualFolder = qdoc qhp.Assistant.indexTitle = Qt Assistant Manual -qhp.Assistant.extraFiles = images/api_examples.png \ - images/api_lookup.png \ - images/api_topics.png \ +qhp.Assistant.extraFiles = images/bg_l.png \ images/bg_l_blank.png \ - images/bg_ll_blank.png \ - images/bg_ll.png \ - images/bg_l.png \ - images/bg_lr.png \ images/bg_r.png \ - images/bg_ul_blank.png \ - images/bg_ul.png \ - images/bg_ur_blank.png \ - images/bg_ur.png \ - images/box_bg.png \ - images/breadcrumb.png \ + images/box_bg.png \ + images/breadcrumb.png \ + images/bullet_gt.png \ images/bullet_dn.png \ - images/bullet_gt.png \ - images/bullet_sq.png \ + images/bullet_sq.png \ images/bullet_up.png \ - images/coloreditorfactoryimage.png \ - images/content_bg.png \ - images/dynamiclayouts-example.png \ images/feedbackground.png \ - images/form_bg.png \ images/horBar.png \ - images/page_bg.png \ - images/print.png \ - images/qt_guide.png \ - images/qt_icon.png \ - images/qt-logo.png \ - images/qt_ref_doc.png \ - images/qt_tools.png \ - images/sep.png \ - images/sprites-combined.png \ + images/page.png \ + images/page_bg.png \ + images/sprites-combined.png \ images/stylesheet-coffee-plastique.png \ images/taskmenuextension-example.png \ - scripts/functions.js \ - scripts/jquery.js \ + images/coloreditorfactoryimage.png \ + images/dynamiclayouts-example.png \ + scripts/functions.js \ + scripts/jquery.js \ style/style.css + qhp.Assistant.filterAttributes = qt 4.7.0 tools assistant qhp.Assistant.customFilters.Assistant.name = Qt Assistant Manual qhp.Assistant.customFilters.Assistant.filterAttributes = qt tools assistant diff --git a/tools/qdoc3/test/designer.qdocconf b/tools/qdoc3/test/designer.qdocconf index 513801a..d4da292 100644 --- a/tools/qdoc3/test/designer.qdocconf +++ b/tools/qdoc3/test/designer.qdocconf @@ -16,45 +16,28 @@ qhp.Designer.file = designer.qhp qhp.Designer.namespace = com.trolltech.designer.470 qhp.Designer.virtualFolder = qdoc qhp.Designer.indexTitle = Qt Designer Manual -qhp.Designer.extraFiles = images/api_examples.png \ - images/api_lookup.png \ - images/api_topics.png \ - images/bg_l_blank.png \ - images/bg_ll_blank.png \ - images/bg_ll.png \ - images/bg_l.png \ - images/bg_lr.png \ - images/bg_r.png \ - images/bg_ul_blank.png \ - images/bg_ul.png \ - images/bg_ur_blank.png \ - images/bg_ur.png \ - images/box_bg.png \ - images/breadcrumb.png \ - images/bullet_dn.png \ - images/bullet_gt.png \ - images/bullet_sq.png \ - images/bullet_up.png \ +qhp.Designer.extraFiles = images/bg_l.png \ + images/bg_l_blank.png \ + images/bg_r.png \ + images/box_bg.png \ + images/breadcrumb.png \ + images/bullet_gt.png \ + images/bullet_dn.png \ + images/bullet_sq.png \ + images/bullet_up.png \ + images/feedbackground.png \ + images/horBar.png \ + images/page.png \ + images/page_bg.png \ + images/sprites-combined.png \ + images/stylesheet-coffee-plastique.png \ + images/taskmenuextension-example.png \ images/coloreditorfactoryimage.png \ - images/content_bg.png \ images/dynamiclayouts-example.png \ - images/feedbackground.png \ - images/form_bg.png \ - images/horBar.png \ - images/page_bg.png \ - images/print.png \ - images/qt_guide.png \ - images/qt_icon.png \ - images/qt-logo.png \ - images/qt_ref_doc.png \ - images/qt_tools.png \ - images/sep.png \ - images/sprites-combined.png \ - images/stylesheet-coffee-plastique.png \ - images/taskmenuextension-example.png \ - scripts/functions.js \ - scripts/jquery.js \ - style/style.css + scripts/functions.js \ + scripts/jquery.js \ + style/style.css + qhp.Designer.filterAttributes = qt 4.7.0 tools designer qhp.Designer.customFilters.Designer.name = Qt Designer Manual qhp.Designer.customFilters.Designer.filterAttributes = qt tools designer diff --git a/tools/qdoc3/test/linguist.qdocconf b/tools/qdoc3/test/linguist.qdocconf index a3f4f00..7420b4f 100644 --- a/tools/qdoc3/test/linguist.qdocconf +++ b/tools/qdoc3/test/linguist.qdocconf @@ -16,45 +16,28 @@ qhp.Linguist.file = linguist.qhp qhp.Linguist.namespace = com.trolltech.linguist.470 qhp.Linguist.virtualFolder = qdoc qhp.Linguist.indexTitle = Qt Linguist Manual -qhp.Linguist.extraFiles = images/api_examples.png \ - images/api_lookup.png \ - images/api_topics.png \ - images/bg_l_blank.png \ - images/bg_ll_blank.png \ - images/bg_ll.png \ - images/bg_l.png \ - images/bg_lr.png \ - images/bg_r.png \ - images/bg_ul_blank.png \ - images/bg_ul.png \ - images/bg_ur_blank.png \ - images/bg_ur.png \ - images/box_bg.png \ - images/breadcrumb.png \ - images/bullet_dn.png \ - images/bullet_gt.png \ - images/bullet_sq.png \ - images/bullet_up.png \ +qhp.Linguist.extraFiles = images/bg_l.png \ + images/bg_l_blank.png \ + images/bg_r.png \ + images/box_bg.png \ + images/breadcrumb.png \ + images/bullet_gt.png \ + images/bullet_dn.png \ + images/bullet_sq.png \ + images/bullet_up.png \ + images/feedbackground.png \ + images/horBar.png \ + images/page.png \ + images/page_bg.png \ + images/sprites-combined.png \ + images/stylesheet-coffee-plastique.png \ + images/taskmenuextension-example.png \ images/coloreditorfactoryimage.png \ - images/content_bg.png \ images/dynamiclayouts-example.png \ - images/feedbackground.png \ - images/form_bg.png \ - images/horBar.png \ - images/page_bg.png \ - images/print.png \ - images/qt_guide.png \ - images/qt_icon.png \ - images/qt-logo.png \ - images/qt_ref_doc.png \ - images/qt_tools.png \ - images/sep.png \ - images/sprites-combined.png \ - images/stylesheet-coffee-plastique.png \ - images/taskmenuextension-example.png \ - scripts/functions.js \ - scripts/jquery.js \ - style/style.css + scripts/functions.js \ + scripts/jquery.js \ + style/style.css + qhp.Linguist.filterAttributes = qt 4.7.0 tools linguist qhp.Linguist.customFilters.Linguist.name = Qt Linguist Manual qhp.Linguist.customFilters.Linguist.filterAttributes = qt tools linguist diff --git a/tools/qdoc3/test/qdeclarative.qdocconf b/tools/qdoc3/test/qdeclarative.qdocconf index 80050e3..8015f57 100644 --- a/tools/qdoc3/test/qdeclarative.qdocconf +++ b/tools/qdoc3/test/qdeclarative.qdocconf @@ -27,45 +27,27 @@ qhp.Qml.indexTitle = Qml Reference # Files not referenced in any qdoc file # See also extraimages.HTML -qhp.Qml.extraFiles = images/api_examples.png \ - images/api_lookup.png \ - images/api_topics.png \ - images/bg_l_blank.png \ - images/bg_ll_blank.png \ - images/bg_ll.png \ - images/bg_l.png \ - images/bg_lr.png \ - images/bg_r.png \ - images/bg_ul_blank.png \ - images/bg_ul.png \ - images/bg_ur_blank.png \ - images/bg_ur.png \ - images/box_bg.png \ - images/breadcrumb.png \ - images/bullet_dn.png \ - images/bullet_gt.png \ - images/bullet_sq.png \ - images/bullet_up.png \ - images/coloreditorfactoryimage.png \ - images/content_bg.png \ - images/dynamiclayouts-example.png \ - images/feedbackground.png \ - images/form_bg.png \ - images/horBar.png \ - images/page_bg.png \ - images/print.png \ - images/qt_guide.png \ - images/qt_icon.png \ - images/qt-logo.png \ - images/qt_ref_doc.png \ - images/qt_tools.png \ - images/sep.png \ - images/sprites-combined.png \ - images/stylesheet-coffee-plastique.png \ - images/taskmenuextension-example.png \ - scripts/functions.js \ - scripts/jquery.js \ - style/style.css +qhp.Qml.extraFiles = images/bg_l.png \ + images/bg_l_blank.png \ + images/bg_r.png \ + images/box_bg.png \ + images/breadcrumb.png \ + images/bullet_gt.png \ + images/bullet_dn.png \ + images/bullet_sq.png \ + images/bullet_up.png \ + images/feedbackground.png \ + images/horBar.png \ + images/page.png \ + images/page_bg.png \ + images/sprites-combined.png \ + images/stylesheet-coffee-plastique.png \ + images/taskmenuextension-example.png \ + images/coloreditorfactoryimage.png \ + images/dynamiclayouts-example.png \ + scripts/functions.js \ + scripts/jquery.js \ + style/style.css qhp.Qml.filterAttributes = qt 4.6.0 qtrefdoc qhp.Qml.customFilters.Qt.name = Qt 4.6.0 diff --git a/tools/qdoc3/test/qmake.qdocconf b/tools/qdoc3/test/qmake.qdocconf index f38a2a4..49d088e 100644 --- a/tools/qdoc3/test/qmake.qdocconf +++ b/tools/qdoc3/test/qmake.qdocconf @@ -16,45 +16,28 @@ qhp.qmake.file = qmake.qhp qhp.qmake.namespace = com.trolltech.qmake.470 qhp.qmake.virtualFolder = qdoc qhp.qmake.indexTitle = QMake Manual -qhp.qmake.extraFiles = images/api_examples.png \ - images/api_lookup.png \ - images/api_topics.png \ - images/bg_l_blank.png \ - images/bg_ll_blank.png \ - images/bg_ll.png \ - images/bg_l.png \ - images/bg_lr.png \ - images/bg_r.png \ - images/bg_ul_blank.png \ - images/bg_ul.png \ - images/bg_ur_blank.png \ - images/bg_ur.png \ - images/box_bg.png \ - images/breadcrumb.png \ - images/bullet_dn.png \ - images/bullet_gt.png \ - images/bullet_sq.png \ - images/bullet_up.png \ - images/coloreditorfactoryimage.png \ - images/content_bg.png \ - images/dynamiclayouts-example.png \ - images/feedbackground.png \ - images/form_bg.png \ - images/horBar.png \ - images/page_bg.png \ - images/print.png \ - images/qt_guide.png \ - images/qt_icon.png \ - images/qt-logo.png \ - images/qt_ref_doc.png \ - images/qt_tools.png \ - images/sep.png \ - images/sprites-combined.png \ - images/stylesheet-coffee-plastique.png \ - images/taskmenuextension-example.png \ - scripts/functions.js \ - scripts/jquery.js \ - style/style.css +qhp.qmake.extraFiles = images/bg_l.png \ + images/bg_l_blank.png \ + images/bg_r.png \ + images/box_bg.png \ + images/breadcrumb.png \ + images/bullet_gt.png \ + images/bullet_dn.png \ + images/bullet_sq.png \ + images/bullet_up.png \ + images/feedbackground.png \ + images/horBar.png \ + images/page.png \ + images/page_bg.png \ + images/sprites-combined.png \ + images/stylesheet-coffee-plastique.png \ + images/taskmenuextension-example.png \ + images/coloreditorfactoryimage.png \ + images/dynamiclayouts-example.png \ + scripts/functions.js \ + scripts/jquery.js \ + style/style.css + qhp.qmake.filterAttributes = qt 4.7.0 tools qmake qhp.qmake.customFilters.qmake.name = qmake Manual qhp.qmake.customFilters.qmake.filterAttributes = qt tools qmake diff --git a/tools/qdoc3/test/qt-build-docs.qdocconf b/tools/qdoc3/test/qt-build-docs.qdocconf index 0694748..f0c2535 100644 --- a/tools/qdoc3/test/qt-build-docs.qdocconf +++ b/tools/qdoc3/test/qt-build-docs.qdocconf @@ -22,45 +22,27 @@ qhp.Qt.indexTitle = Qt Reference Documentation # Files not referenced in any qdoc file (last four are needed by qtdemo) # See also extraimages.HTML qhp.Qt.extraFiles = index.html \ - images/api_examples.png \ - images/api_lookup.png \ - images/api_topics.png \ - images/bg_l_blank.png \ - images/bg_ll_blank.png \ - images/bg_ll.png \ - images/bg_l.png \ - images/bg_lr.png \ - images/bg_r.png \ - images/bg_ul_blank.png \ - images/bg_ul.png \ - images/bg_ur_blank.png \ - images/bg_ur.png \ - images/box_bg.png \ - images/breadcrumb.png \ - images/bullet_dn.png \ - images/bullet_gt.png \ - images/bullet_sq.png \ - images/bullet_up.png \ - images/coloreditorfactoryimage.png \ - images/content_bg.png \ - images/dynamiclayouts-example.png \ - images/feedbackground.png \ - images/form_bg.png \ - images/horBar.png \ - images/page_bg.png \ - images/print.png \ - images/qt_guide.png \ - images/qt_icon.png \ - images/qt-logo.png \ - images/qt_ref_doc.png \ - images/qt_tools.png \ - images/sep.png \ - images/sprites-combined.png \ - images/stylesheet-coffee-plastique.png \ - images/taskmenuextension-example.png \ - scripts/functions.js \ - scripts/jquery.js \ - style/style.css + images/bg_l.png \ + images/bg_l_blank.png \ + images/bg_r.png \ + images/box_bg.png \ + images/breadcrumb.png \ + images/bullet_gt.png \ + images/bullet_dn.png \ + images/bullet_sq.png \ + images/bullet_up.png \ + images/feedbackground.png \ + images/horBar.png \ + images/page.png \ + images/page_bg.png \ + images/sprites-combined.png \ + images/stylesheet-coffee-plastique.png \ + images/taskmenuextension-example.png \ + images/coloreditorfactoryimage.png \ + images/dynamiclayouts-example.png \ + scripts/functions.js \ + scripts/jquery.js \ + style/style.css diff --git a/tools/qdoc3/test/qt-build-docs_zh_CN.qdocconf b/tools/qdoc3/test/qt-build-docs_zh_CN.qdocconf index 5a3d726..a00d5a1 100644 --- a/tools/qdoc3/test/qt-build-docs_zh_CN.qdocconf +++ b/tools/qdoc3/test/qt-build-docs_zh_CN.qdocconf @@ -30,45 +30,27 @@ qhp.Qt.customFilters.Qt.filterAttributes = qt 4.7.0 # Files not referenced in any qdoc file (last four are needed by qtdemo) # See also extraimages.HTML qhp.Qt.extraFiles = index.html \ - images/api_examples.png \ - images/api_lookup.png \ - images/api_topics.png \ - images/bg_l_blank.png \ - images/bg_ll_blank.png \ - images/bg_ll.png \ - images/bg_l.png \ - images/bg_lr.png \ - images/bg_r.png \ - images/bg_ul_blank.png \ - images/bg_ul.png \ - images/bg_ur_blank.png \ - images/bg_ur.png \ - images/box_bg.png \ - images/breadcrumb.png \ - images/bullet_dn.png \ - images/bullet_gt.png \ - images/bullet_sq.png \ - images/bullet_up.png \ - images/coloreditorfactoryimage.png \ - images/content_bg.png \ - images/dynamiclayouts-example.png \ - images/feedbackground.png \ - images/form_bg.png \ - images/horBar.png \ - images/page_bg.png \ - images/print.png \ - images/qt_guide.png \ - images/qt_icon.png \ - images/qt-logo.png \ - images/qt_ref_doc.png \ - images/qt_tools.png \ - images/sep.png \ - images/sprites-combined.png \ - images/stylesheet-coffee-plastique.png \ - images/taskmenuextension-example.png \ - scripts/functions.js \ - scripts/jquery.js \ - style/style.css + images/bg_l.png \ + images/bg_l_blank.png \ + images/bg_r.png \ + images/box_bg.png \ + images/breadcrumb.png \ + images/bullet_gt.png \ + images/bullet_dn.png \ + images/bullet_sq.png \ + images/bullet_up.png \ + images/feedbackground.png \ + images/horBar.png \ + images/page.png \ + images/page_bg.png \ + images/sprites-combined.png \ + images/stylesheet-coffee-plastique.png \ + images/taskmenuextension-example.png \ + images/coloreditorfactoryimage.png \ + images/dynamiclayouts-example.png \ + scripts/functions.js \ + scripts/jquery.js \ + style/style.css language = Cpp diff --git a/tools/qdoc3/test/qt-defines.qdocconf b/tools/qdoc3/test/qt-defines.qdocconf index 0426f4d..dc81757 100644 --- a/tools/qdoc3/test/qt-defines.qdocconf +++ b/tools/qdoc3/test/qt-defines.qdocconf @@ -20,37 +20,20 @@ codeindent = 1 # See also qhp.Qt.extraFiles extraimages.HTML = qt-logo \ trolltech-logo \ - api_examples.png \ - bg_ll.png \ - bg_ul_blank.png \ - bullet_gt.png \ - horBar.png \ - qt_ref_doc.png \ - api_lookup.png \ - bg_ll_blank.png \ - bg_ur.png \ - bullet_sq.png \ - bullet_dn.png \ - bullet_up.png \ - page_bg.png \ - qt_tools.png \ - api_topics.png \ - bg_lr.png \ - bg_ur_blank.png \ - content_bg.png \ - print.png \ - sep.png \ - bg_l.png \ - bg_r.png \ - box_bg.png \ - feedbackground.png \ - qt_guide.png \ - sprites-combined.png \ - bg_l_blank.png \ - bg_ul.png \ - breadcrumb.png \ - form_bg.png \ - qt_icon.png \ + bg_l.png \ + bg_l_blank.png \ + bg_r.png \ + box_bg.png \ + breadcrumb.png \ + bullet_gt.png \ + bullet_dn.png \ + bullet_sq.png \ + bullet_up.png \ + feedbackground.png \ + horBar.png \ + page.png \ + page_bg.png \ + sprites-combined.png \ taskmenuextension-example.png \ coloreditorfactoryimage.png \ dynamiclayouts-example.png \ diff --git a/tools/qdoc3/test/qt-html-templates.qdocconf b/tools/qdoc3/test/qt-html-templates.qdocconf index 0651176..00af376 100644 --- a/tools/qdoc3/test/qt-html-templates.qdocconf +++ b/tools/qdoc3/test/qt-html-templates.qdocconf @@ -33,30 +33,38 @@ HTML.postheader = "
\n" \ "
\n" \ " \n" \ "
\n" \ - " \n" \ + " \n" \ "
\n" \ " \n" \ "
\n" \ "
\n" \ - "

\n" \ + "

\n" \ " API Lookup

\n" \ - "
\n" \ - " \n" \ "
\n" \ - "
\n" \ + "
\n" \ "
\n" \ "
\n" \ "
\n" \ - "

\n" \ + "

\n" \ " API Topics

\n" \ - "
\n" \ - " \n" \ "
\n" \ - "
\n" \ + "
\n" \ "
\n" \ "
\n" \ "
\n" \ - "

\n" \ + "

\n" \ " API Examples

\n" \ - "
\n" \ - " \n" \ "
\n" \ - "
\n" \ + "
\n" \ "
\n" \ "
\n" \ "
\n" \ @@ -103,13 +116,13 @@ HTML.postpostheader = " \n" \ "
  • A
  • \n" \ "
  • A
  • \n" \ "
  • \n" \ - " \"\"\"Print
  • \n" \ + " Print\n" \ " \n" \ "
    \n" \ "
    \n" \ "
    \n" -HTML.footer = "
    \n" \ +HTML.footer = " \n" \ "
    \n" \ " [+] Documentation Feedback
    \n" \ "
    \n" \ @@ -117,6 +130,7 @@ HTML.footer = " \n" \ "
    \n" \ " \n" \ "
    \n" \ + " \n" \ "
    \n" \ "

    \n" \ " © 2008-2010 Nokia Corporation and/or its\n" \ @@ -131,14 +145,14 @@ HTML.footer = "

    \n" \ " X\n" \ " \n" \ "
    \n" \ - " \n" \ - " \n" \ + "

    \n" \ + "

    \n" \ "
    \n" \ " \n" \ "
    \n" \ "
    \n" \ - " -->\n" diff --git a/tools/qdoc3/test/qt.qdocconf b/tools/qdoc3/test/qt.qdocconf index 69ab4e1..59dd855 100644 --- a/tools/qdoc3/test/qt.qdocconf +++ b/tools/qdoc3/test/qt.qdocconf @@ -26,45 +26,27 @@ qhp.Qt.indexRoot = # Files not referenced in any qdoc file (last four are needed by qtdemo) # See also extraimages.HTML qhp.Qt.extraFiles = index.html \ - images/api_examples.png \ - images/api_lookup.png \ - images/api_topics.png \ - images/bg_l_blank.png \ - images/bg_ll_blank.png \ - images/bg_ll.png \ - images/bg_l.png \ - images/bg_lr.png \ - images/bg_r.png \ - images/bg_ul_blank.png \ - images/bg_ul.png \ - images/bg_ur_blank.png \ - images/bg_ur.png \ - images/box_bg.png \ - images/breadcrumb.png \ - images/bullet_dn.png \ - images/bullet_gt.png \ - images/bullet_sq.png \ - images/bullet_up.png \ - images/coloreditorfactoryimage.png \ - images/content_bg.png \ - images/dynamiclayouts-example.png \ - images/feedbackground.png \ - images/form_bg.png \ - images/horBar.png \ - images/page_bg.png \ - images/print.png \ - images/qt_guide.png \ - images/qt_icon.png \ - images/qt-logo.png \ - images/qt_ref_doc.png \ - images/qt_tools.png \ - images/sep.png \ - images/sprites-combined.png \ - images/stylesheet-coffee-plastique.png \ - images/taskmenuextension-example.png \ - scripts/functions.js \ - scripts/jquery.js \ - style/style.css + images/bg_l.png \ + images/bg_l_blank.png \ + images/bg_r.png \ + images/box_bg.png \ + images/breadcrumb.png \ + images/bullet_gt.png \ + images/bullet_dn.png \ + images/bullet_sq.png \ + images/bullet_up.png \ + images/feedbackground.png \ + images/horBar.png \ + images/page.png \ + images/page_bg.png \ + images/sprites-combined.png \ + images/stylesheet-coffee-plastique.png \ + images/taskmenuextension-example.png \ + images/coloreditorfactoryimage.png \ + images/dynamiclayouts-example.png \ + scripts/functions.js \ + scripts/jquery.js \ + style/style.css qhp.Qt.filterAttributes = qt 4.7.0 qtrefdoc qhp.Qt.customFilters.Qt.name = Qt 4.7.0 diff --git a/tools/qdoc3/test/qt_zh_CN.qdocconf b/tools/qdoc3/test/qt_zh_CN.qdocconf index a5a65d8..9275b5c 100644 --- a/tools/qdoc3/test/qt_zh_CN.qdocconf +++ b/tools/qdoc3/test/qt_zh_CN.qdocconf @@ -32,45 +32,27 @@ qhp.Qt.customFilters.Qt.filterAttributes = qt 4.7.0 # Files not referenced in any qdoc file (last four are needed by qtdemo) # See also extraimages.HTML qhp.Qt.extraFiles = index.html \ - images/api_examples.png \ - images/api_lookup.png \ - images/api_topics.png \ - images/bg_l_blank.png \ - images/bg_ll_blank.png \ - images/bg_ll.png \ - images/bg_l.png \ - images/bg_lr.png \ - images/bg_r.png \ - images/bg_ul_blank.png \ - images/bg_ul.png \ - images/bg_ur_blank.png \ - images/bg_ur.png \ - images/box_bg.png \ - images/breadcrumb.png \ - images/bullet_dn.png \ - images/bullet_gt.png \ - images/bullet_sq.png \ - images/bullet_up.png \ - images/coloreditorfactoryimage.png \ - images/content_bg.png \ - images/dynamiclayouts-example.png \ - images/feedbackground.png \ - images/form_bg.png \ - images/horBar.png \ - images/page_bg.png \ - images/print.png \ - images/qt_guide.png \ - images/qt_icon.png \ - images/qt-logo.png \ - images/qt_ref_doc.png \ - images/qt_tools.png \ - images/sep.png \ - images/sprites-combined.png \ - images/stylesheet-coffee-plastique.png \ - images/taskmenuextension-example.png \ - scripts/functions.js \ - scripts/jquery.js \ - style/style.css + images/bg_l.png \ + images/bg_l_blank.png \ + images/bg_r.png \ + images/box_bg.png \ + images/breadcrumb.png \ + images/bullet_gt.png \ + images/bullet_dn.png \ + images/bullet_sq.png \ + images/bullet_up.png \ + images/feedbackground.png \ + images/horBar.png \ + images/page.png \ + images/page_bg.png \ + images/sprites-combined.png \ + images/stylesheet-coffee-plastique.png \ + images/taskmenuextension-example.png \ + images/coloreditorfactoryimage.png \ + images/dynamiclayouts-example.png \ + scripts/functions.js \ + scripts/jquery.js \ + style/style.css language = Cpp diff --git a/tools/qdoc3/test/style/style.css b/tools/qdoc3/test/style/style.css index 1ed49fa..9c290f5 100644 --- a/tools/qdoc3/test/style/style.css +++ b/tools/qdoc3/test/style/style.css @@ -58,6 +58,19 @@ { vertical-align: baseline; } + .heading + { + font: normal 600 16px/1.0 Arial; + padding-bottom: 15px; + } + .subtitle + { + font-size: 13px; + } + .small-subtitle + { + font-size: 13px; + } legend { color: #000000; @@ -73,7 +86,6 @@ { font-size: 100%; } - /* Page style */ html { background-color: #e5e5e5; @@ -92,6 +104,11 @@ { font-style: italic; } + a + { + color: #00732f; + text-decoration: none; + } .header, .footer, .wrapper { min-width: 600px; @@ -106,23 +123,19 @@ { padding-left: 216px; height: 15px; - background: url(../images/bg_ul.png) no-repeat 0 0; + background: url(../images/page.png) no-repeat 0 0; overflow: hidden; } .offline .wrapper .hd { - background: url(../images/bg_ul_blank.png) no-repeat 0 0; + background: url(../images/page.png) no-repeat 0 -15px; } .wrapper .hd span { height: 15px; display: block; - background: url(../images/bg_ur.png) no-repeat 100% 0; overflow: hidden; - } - .offline .wrapper .hd span - { - /* background: url(../images/bg_ur_blank.png) no-repeat 100% 0; */ + background: url(../images/page.png) no-repeat 100% -30px; } .wrapper .bd { @@ -137,18 +150,18 @@ { padding-left: 216px; height: 15px; - background: url(../images/bg_ll.png) no-repeat 0 0; + background: url(../images/page.png) no-repeat 0 -75px; overflow: hidden; } .offline .wrapper .ft { - background: url(../images/bg_ll_blank.png) no-repeat 0 0; + background: url(../images/page.png) no-repeat 0 -90px; } .wrapper .ft span { height: 15px; display: block; - background: url(../images/bg_lr.png) no-repeat 100% 0; + background: url(../images/page.png) no-repeat 100% -60px; overflow: hidden; } .header, .footer @@ -182,186 +195,9 @@ width: 302px; height: 22px; text-indent: -999em; - background: url(../images/header.png) no-repeat 0 0; - } - /* header elements */ - #nav-topright - { - height: 70px; - } - - #nav-topright ul - { - list-style-type: none; - float: right; - width: 370px; - margin-top: 11px; - } - - #nav-topright li - { - display: inline-block; - margin-right: 20px; - float: left; - } - - #nav-topright li.nav-topright-last - { - margin-right: 0; - } - - #nav-topright li a - { - background: transparent url(../images/sprites-combined.png) no-repeat; - height: 18px; - display: block; - overflow: hidden; - text-indent: -9999px; - } - - #nav-topright li.nav-topright-home a - { - width: 65px; - background-position: -2px -91px; - } - - #nav-topright li.nav-topright-home a:hover - { - background-position: -2px -117px; - } - - - #nav-topright li.nav-topright-dev a - { - width: 30px; - background-position: -76px -91px; - } - - #nav-topright li.nav-topright-dev a:hover - { - background-position: -76px -117px; - } - - - #nav-topright li.nav-topright-labs a - { - width: 40px; - background-position: -114px -91px; - } - - #nav-topright li.nav-topright-labs a:hover - { - background-position: -114px -117px; - } - - #nav-topright li.nav-topright-doc a - { - width: 32px; - background-position: -162px -91px; - } - - #nav-topright li.nav-topright-doc a:hover, #nav-topright li.nav-topright-doc-active a - { - background-position: -162px -117px; - } - - #nav-topright li.nav-topright-blog a - { - width: 40px; - background-position: -203px -91px; - } - - #nav-topright li.nav-topright-blog a:hover, #nav-topright li.nav-topright-blog-active a - { - background-position: -203px -117px; - } - - #nav-topright li.nav-topright-shop a - { - width: 40px; - background-position: -252px -91px; - } - - #nav-topright li.nav-topright-shop a:hover, #nav-topright li.nav-topright-shop-active a - { - background-position: -252px -117px; - } - - #nav-logo - { - background: transparent url( "../images/sprites-combined.png" ) no-repeat 0 -225px; - left: -3px; - position: absolute; - width: 75px; - height: 75px; - top: 13px; - } - #nav-logo a - { - width: 75px; - height: 75px; - display: block; - text-indent: -9999px; - overflow: hidden; - } - /* Clearing */ - .header:after, .footer:after, .breadcrumb:after, .wrap .content:after, .group:after - { - content: "."; - display: block; - height: 0; - clear: both; - visibility: hidden; - } - /* ^ Clearing */ - - - - .shortCut-topleft-inactive - { - padding-left: 3px; - background: transparent url( "../images/sprites-combined.png" ) no-repeat 0px -58px; - height: 20px; - width: 93px; - } - .shortCut-topleft-inactive span - { - font-variant: normal; - } - #shortCut - { - padding-top: 10px; - font-weight: bolder; - color: #b0adab; - } - #shortCut ul - { - list-style-type: none; - float: left; - width: 347px; - margin-left: 100px; - } - #shortCut li - { - display: inline-block; - margin-right: 25px; - float: left; - white-space: nowrap; - } - #shortCut li a - { - color: #b0adab; - text-decoration: none; - } - #shortCut li a:hover - { - color: #44a51c; - text-decoration: none; + background: url(../images/sprites-combined.png) no-repeat -78px -235px; } - /* end of header elements */ - - /* menu element */ .sidebar { float: left; @@ -369,32 +205,32 @@ width: 200px; font-size: 11px; } - .sidebar a - { - color: #00732f; - text-decoration: none; - } - .offline .sidebar, .offline .feedback + + .offline .sidebar, .offline .feedback, .offline .t_button { display: none; } + .sidebar .searchlabel { padding: 0 0 2px 17px; font: normal bold 11px/1.2 Verdana; } + .sidebar .search { padding: 0 15px 0 16px; } + .sidebar .search form { - width: 167px; - height: 21px; - padding: 2px 0 0 5px; - background: url(../images/form_bg.png) no-repeat 0 0; + background: url(../images/sprites-combined.png) no-repeat -6px -348px; + height:21px; + padding:2px 0 0 5px; + width:167px; } - .sidebar .search form fieldset input#searchstring + + .sidebar .search form input#pageType { width: 158px; height: 19px; @@ -403,32 +239,62 @@ outline: none; font: 13px/1.2 Verdana; } + .sidebar .box { padding: 17px 15px 5px 16px; } + .sidebar .box .first { background-image: none; } + .sidebar .box h2 { font: normal 18px/1.2 Arial; - padding: 15px 0 0 40px; + padding: 0; min-height: 32px; } + .sidebar .box h2 span + { + overflow: hidden; + display: inline-block; + } .sidebar .box#lookup h2 { - background: url(../images/api_lookup.png) no-repeat 0 0; + background-image: none; + } + .sidebar #lookup.box h2 span + { + background: url(../images/sprites-combined.png) no-repeat -6px -311px; + width: 27px; + height: 35px; + margin-right: 13px; } .sidebar .box#topics h2 { - background: url(../images/api_topics.png) no-repeat 0 0; + background-image: none; + } + .sidebar #topics.box h2 span + { + background: url(../images/sprites-combined.png) no-repeat -94px -311px; + width: 27px; + height: 32px; + margin-right: 13px; } .sidebar .box#examples h2 { - background: url(../images/api_examples.png) no-repeat 0 0; + background-image: none; + } + .sidebar #examples.box h2 span + { + background: url(../images/sprites-combined.png) no-repeat -48px -311px; + width: 30px; + height: 31px; + margin-right: 9px; } + .sidebar .box .list { display: block; @@ -443,6 +309,9 @@ { text-decoration: underline; } + .sidebar .box ul + { + } .sidebar .box ul li { padding-left: 12px; @@ -453,23 +322,20 @@ { background: url(../images/box_bg.png) repeat-x 0 bottom; } - /* content elements */ .wrap { - overflow: hidden; + margin: 0 5px 0 208px; + overflow: visible; } .offline .wrap { margin: 0 5px 0 5px; } - /* tool bar */ .wrap .toolbar { background-color: #fafafa; border-bottom: 1px solid #d1d1d1; - height: 20px; - margin-left: 3px; - margin-right: 5px; + height: 20px; position: relative; } .wrap .toolbar .toolblock @@ -487,7 +353,7 @@ { padding: 0 0 10px 21px; right: 5px; - vertical-align: top; + vertical-align: middle; overflow: hidden; } .wrap .toolbar .toolbuttons .active @@ -507,32 +373,56 @@ font-weight: bold; color: #B0ADAB; } - #smallA + + .toolbuttons #print + { + border-left: 1px solid #c5c4c4; + margin-top: 0; + padding-left: 7px; + text-indent: 0; + } + .toolbuttons #print a + { + width: 16px; + height: 16px; + } + + .toolbuttons #print a span + { + width: 16px; + height: 16px; + text-indent: -999em; + display: block; + overflow: hidden; + background: url(../images/sprites-combined.png) no-repeat -137px -311px; + } + + .toolbuttons #smallA { font-size: 10pt; } - #medA + .toolbuttons #medA { font-size: 12pt; } - #bigA + .toolbuttons #bigA { font-size: 14pt; + margin-right: 7px; } + #smallA:hover, #medA:hover, #bigA:hover { color: #00732F; } - #print + + .offline .wrap .breadcrumb { - font-size: 14pt; - line-height: 20pt; } - #printIcon + + .wrap .breadcrumb ul { - margin-left: 5px; } - /* bread crumbs */ .wrap .breadcrumb ul li { float: left; @@ -545,6 +435,10 @@ { font-weight: normal; } + .wrap .breadcrumb ul li a + { + color: #363534; + } .wrap .breadcrumb ul li.first { background-image: none; @@ -554,29 +448,29 @@ .wrap .content { padding: 30px; - position: relative; } - /* text elements */ - .heading + + .wrap .content li { - font: normal 600 16px/1.0 Arial; - padding-bottom: 15px; + padding-left: 12px; + background: url(../images/bullet_sq.png) no-repeat 0 5px; + font: normal 400 10pt/1 Verdana; + color: #44a51c; + margin-bottom: 10px; } - - .subtitle + .content li:hover { - font-size: 13px; + text-decoration: underline; } - .small-subtitle + .offline .wrap .content { - font-size: 13px; + padding-top: 15px; } - + .wrap .content h1 { font: 600 18px/1.2 Arial; - padding-bottom: 15px; } .wrap .content h2 { @@ -588,26 +482,13 @@ } .wrap .content p { - line-height:20px; - padding:10px 5px 10px 5px; + line-height: 20px; + padding: 10px 5px 10px 5px; } .wrap .content ul { padding-left: 25px; } - .wrap .content li - { - padding-left: 12px; - background: url(../images/bullet_sq.png) no-repeat 0 5px; - font: normal 400 10pt/1 Verdana; - margin-bottom: 10px; - line-height: 14px; - } - a - { - color: #00732F; - text-decoration: none; - } a:hover { color: #4c0033; @@ -618,10 +499,6 @@ color: #4c0033; text-decoration: none; } - .offline .wrap .content - { - padding-top: 15px; - } .footer { min-height: 100px; @@ -629,11 +506,15 @@ font: normal 9px/1 Verdana; text-align: center; padding-top: 40px; + background-color: #E6E7E8; + margin: 0; } .feedback { - float: right; - padding-right: 10px; + float: none; + position: absolute; + right: 15px; + bottom: 10px; font: normal 8px/1 Verdana; color: #B0ADAB; } @@ -644,37 +525,223 @@ color: #00732F; text-decoration: underline; } + .header:after, .footer:after, .breadcrumb:after, .wrap .content:after, .group:after + { + content: "."; + display: block; + height: 0; + clear: both; + visibility: hidden; + } + #nav-topright + { + height: 70px; + } + + #nav-topright ul + { + list-style-type: none; + float: right; + width: 370px; + margin-top: 11px; + } + + #nav-topright li + { + display: inline-block; + margin-right: 20px; + float: left; + } + + #nav-topright li.nav-topright-last + { + margin-right: 0; + } + + #nav-topright li a + { + background: transparent url(../images/sprites-combined.png) no-repeat; + height: 18px; + display: block; + overflow: hidden; + text-indent: -9999px; + } + + #nav-topright li.nav-topright-home a + { + width: 65px; + background-position: -2px -91px; + } + + #nav-topright li.nav-topright-home a:hover + { + background-position: -2px -117px; + } + + + #nav-topright li.nav-topright-dev a + { + width: 30px; + background-position: -76px -91px; + } + + #nav-topright li.nav-topright-dev a:hover + { + background-position: -76px -117px; + } + + + #nav-topright li.nav-topright-labs a + { + width: 40px; + background-position: -114px -91px; + } + + #nav-topright li.nav-topright-labs a:hover + { + background-position: -114px -117px; + } + + #nav-topright li.nav-topright-doc a + { + width: 32px; + background-position: -162px -91px; + } + + #nav-topright li.nav-topright-doc a:hover, #nav-topright li.nav-topright-doc-active a + { + background-position: -162px -117px; + } + + #nav-topright li.nav-topright-blog a + { + width: 40px; + background-position: -203px -91px; + } + + #nav-topright li.nav-topright-blog a:hover, #nav-topright li.nav-topright-blog-active a + { + background-position: -203px -117px; + } + + #nav-topright li.nav-topright-shop a + { + width: 40px; + background-position: -252px -91px; + } + + #nav-topright li.nav-topright-shop a:hover, #nav-topright li.nav-topright-shop-active a + { + background-position: -252px -117px; + } + + #nav-logo + { + background: transparent url(../images/sprites-combined.png ) no-repeat 0 -225px; + left: -3px; + position: absolute; + width: 75px; + height: 75px; + top: 13px; + } + #nav-logo a + { + width: 75px; + height: 75px; + display: block; + text-indent: -9999px; + overflow: hidden; + } + + + .shortCut-topleft-inactive + { + padding-left: 3px; + background: transparent url( ../images/sprites-combined.png) no-repeat 0px -58px; + height: 20px; + width: 47px; + } + .shortCut-topleft-inactive span + { + font-variant: normal; + } + #shortCut + { + padding-top: 10px; + font-weight: bolder; + color: #b0adab; + } + #shortCut ul + { + list-style-type: none; + float: left; + width: 347px; + margin-left: 100px; + } + #shortCut li + { + display: inline-block; + margin-right: 25px; + float: left; + white-space: nowrap; + } + #shortCut li a + { + color: #b0adab; + } + #shortCut li a:hover + { + color: #44a51c; + } + hr { - background-color: #e0e0e0; + background-color: #E6E6E6; + border: 1px solid #E6E6E6; height: 1px; width: 100%; text-align: left; margin: 15px 0px 15px 0px; } - + .content .alignedsummary { margin: 15px; } - /* tables */ + pre + { + border: 1px solid #DDDDDD; + margin: 0 20px 10px 10px; + padding: 20px 15px 20px 20px; + overflow-x: auto; + } table, pre { -moz-border-radius: 7px 7px 7px 7px; background-color: #F6F6F6; border: 1px solid #E6E6E6; border-collapse: separate; - font-size: 11px; - min-width: 395px; + font-size: 11px; + /*min-width: 395px;*/ margin-bottom: 25px; + display: inline-block; + } + thead + { + margin-top: 5px; + } + th + { + padding: 3px 15px 3px 15px; + } + td + { + padding: 3px 15px 3px 20px; } - thead{margin-top: 5px;} - th{ padding: 3px 15px 3px 15px;} - td{padding: 3px 15px 3px 20px;} table tr.odd { border-left: 1px solid #E6E6E6; - background-color: #F6F6F6; + background-color: #F6F6F6; color: #66666E; } table tr.even @@ -685,12 +752,13 @@ } table tr.odd:hover { - background-color: #E6E6E6; + background-color: #E6E6E6; } table tr.even:hover { background-color: #E6E6E6; } + span.comment { color: #8B0000; @@ -700,15 +768,7 @@ { color: #254117; } - pre - { - -moz-border-radius:7px 7px 7px 7px; - background-color:#F6F6F6; - border:1px solid #DDDDDD; - margin:0 20px 10px 10px; - padding:20px 15px 20px 20px; - overflow-x:auto; - } + .qmltype { text-align: center; @@ -719,13 +779,28 @@ float: right; color: #254117; } + + .qmldefault + { + float: right; + color: red; + } + + .qmldoc + { + } + + *.qmlitem p + { + } + #feedbackBox { - display:none; - -moz-border-radius:7px 7px 7px 7px; - border:1px solid #DDDDDD; - position:fixed; - top:100px; + display: none; + -moz-border-radius: 7px 7px 7px 7px; + border: 1px solid #DDDDDD; + position: fixed; + top: 100px; left: 33%; height: 190px; width: 400px; @@ -735,27 +810,27 @@ } #feedcloseX a { - display:inline; + display: inline; padding: 5px 5px 0 0; - margin-bottom:3px; + margin-bottom: 3px; color: #363534; - font-weight:600; + font-weight: 600; float: right; text-decoration: none; } + #feedbox - /* here */ { - display:inline; + display: inline; width: 370px; height: 120px; - margin:0px 25px 10px 15px; + margin: 0px 25px 10px 15px; } #feedsubmit { - display:inline; - float:right; - margin:4px 32px 0 0; + display: inline; + float: right; + margin: 4px 32px 0 0; } #blurpage { @@ -771,141 +846,172 @@ } .toc { - float: right; - -moz-border-radius:7px 7px 7px 7px; - background-color:#F6F6F6; - border:1px solid #DDDDDD; - margin:0 20px 10px 10px; - padding:20px 15px 20px 20px; + float: right; + -moz-border-radius: 7px 7px 7px 7px; + background-color: #F6F6F6; + border: 1px solid #DDDDDD; + margin: 0 20px 10px 10px; + padding: 20px 15px 20px 20px; height: auto; width: 200px; } - .toc ul + .toc h3 { - float: left; - padding: 15px; - + font: 600 12px/1.2 Arial; + } + + .wrap .content .toc ul + { + padding-left: 0px; + } + + + .wrap .content .toc .level2 + { + margin-left: 15px; } - .content .toc li { - font: normal 12px/1.2 Verdana; + font: normal 10px/1.2 Verdana; background: url(../images/bullet_dn.png) no-repeat 0 5px; } - .relpage + .relpage { -moz-border-radius: 7px 7px 7px 7px; border: 1px solid #DDDDDD; padding: 25px 25px; - clear:both; + clear: both; } .relpage ul { float: none; padding: 15px; } - .content .relpage li + .content .relpage li { font: normal 11px/1.2 Verdana; } - /* edit */ h3.fn, span.fn { background-color: #F6F6F6; border-width: 1px; border-style: solid; border-color: #E6E6E6; - font-weight: bold; - /* padding: 6px 0px 6px 10px;*/ - /* margin: 42px 0px 0px 0px;*/ + font-weight: bold; } - /* edit */ - .indexbox - { - width: 100%; - } - .content .indexboxcont li - { - font: normal 600 13px/1 Verdana; - } - /* .indexbox a - { - color: #00732f; - text-decoration: none; - }*/ - .indexbox a:hover, .indexbox a:visited:hover - { - color: #4c0033; - text-decoration: underline; - } - .indexbox a:visited + /* start index box */ + .indexbox { - color: #00732f; - text-decoration: none; + width: 100%; + display:inline-block; } .indexboxcont { display: block; + /* overflow: hidden;*/ } .indexboxbar { - background: transparent url( "../images/horBar.png" ) repeat-x left bottom; + background: transparent url(../images/horBar.png ) repeat-x left bottom; margin-bottom: 25px; + /* background-image: none; + border-bottom: 1px solid #e2e2e2;*/ } .indexboxcont .section { - display: inline-block; + display: inline-block; width: 49%; *width:42%; _width:42%; padding:0 2% 0 1%; vertical-align:top; + } .indexboxcont .indexIcon - { + { width: 11%; *width:18%; _width:18%; overflow:hidden; + } .indexboxcont .section p - { + { padding-top: 20px; padding-bottom: 20px; } - .indexboxcont .sectionlist { display: inline-block; width: 33%; - margin-right: -2px; - vertical-align: top; padding: 0; } - .tricol - { - - } .indexboxcont .sectionlist ul { - padding-left: 15px; margin-bottom: 20px; } -/* + .indexboxcont .sectionlist ul li { line-height: 12px; } -*/ + + .content .indexboxcont li + { + font: normal 600 13px/1 Verdana; + } + + .indexbox a:hover, .indexbox a:visited:hover + { + color: #4c0033; + text-decoration: underline; + } + + .indexbox a:visited + { + color: #00732f; + text-decoration: none; + } + + .indexboxcont:after + { + content: "."; + display: block; + height: 0; + clear: both; + visibility: hidden; + } + + .indexbox .indexIcon span + { + display: block; + } + + .indexbox.guide .indexIcon span + { + width: 96px; + height: 137px; + background: url(../images/sprites-combined.png) no-repeat -5px -376px; + padding: 0; + } + + .indexbox.tools .indexIcon span + { + width: 115px; + height: 137px; + background: url(../images/sprites-combined.png) no-repeat -111px -376px; + padding: 0; + } + .lastcol { display: inline-block; @@ -916,12 +1022,9 @@ .tricol .lastcol { - margin-left:-6px; + margin-left: -6px; } - - /*.toc ul*/ - - /* end page elements */ + /* end indexbox */ } /* end of screen media */ @@ -929,7 +1032,7 @@ @media print { - .header, .footer, .toolbar, .feedback, .wrapper .hd, .wrapper .bd .sidebar, .wrapper .ft + input, textarea, .header, .footer, .toolbar, .feedback, .wrapper .hd, .wrapper .bd .sidebar, .wrapper .ft { display: none; background: none; -- cgit v0.12 From 33664eaa591b4325f83643d8c8a21476b1306c34 Mon Sep 17 00:00:00 2001 From: Thomas Zander Date: Tue, 4 May 2010 14:15:24 +0200 Subject: Disable compiling of the plugin when extra package not found The plugin will only compile when the symbian audiorouting API is installed which is not there by default. So check for that. The configure check should be added soon too. --- src/plugins/mediaservices/mediaservices.pro | 4 +++- src/s60installs/s60installs.pro | 7 ++++--- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/src/plugins/mediaservices/mediaservices.pro b/src/plugins/mediaservices/mediaservices.pro index 27f05bc..0f0b021 100644 --- a/src/plugins/mediaservices/mediaservices.pro +++ b/src/plugins/mediaservices/mediaservices.pro @@ -9,5 +9,7 @@ contains(QT_CONFIG, media-backend) { SUBDIRS += gstreamer } - symbian:SUBDIRS += symbian + symbian:contains(QT_CONFIG, audio-routing-available) { + SUBDIRS += symbian + } } diff --git a/src/s60installs/s60installs.pro b/src/s60installs/s60installs.pro index dfd2694..97b2232 100644 --- a/src/s60installs/s60installs.pro +++ b/src/s60installs/s60installs.pro @@ -158,11 +158,12 @@ symbian: { contains(QT_CONFIG, media-backend) { qtlibraries.sources += $$QMAKE_LIBDIR_QT/QtMediaServices$${QT_LIBINFIX}.dll - mediaservices_plugins.path = c:$$QT_PLUGINS_BASE_DIR/mediaservices - mediaservices_plugins.sources += $$QT_BUILD_TREE/plugins/mediaservices/qmmfengine$${QT_LIBINFIX}.dll + contains(QT_CONFIG, audio-routing-available) { + mediaservices_plugins.path = c:$$QT_PLUGINS_BASE_DIR/mediaservices + mediaservices_plugins.sources += $$QT_BUILD_TREE/plugins/mediaservices/qmmfengine$${QT_LIBINFIX}.dll + } DEPLOYMENT += mediaservices_plugins - } BLD_INF_RULES.prj_exports += "qt.iby $$CORE_MW_LAYER_IBY_EXPORT_PATH(qt.iby)" -- cgit v0.12 From e98459fd11180c24ba9e549b96908cb33a68c714 Mon Sep 17 00:00:00 2001 From: Martin Smith Date: Tue, 4 May 2010 14:38:20 +0200 Subject: doc: Edited the intro. --- doc/src/declarative/declarativeui.qdoc | 60 ++++++++++++++++------------------ 1 file changed, 28 insertions(+), 32 deletions(-) diff --git a/doc/src/declarative/declarativeui.qdoc b/doc/src/declarative/declarativeui.qdoc index d79c4d2..6a1f5c5 100644 --- a/doc/src/declarative/declarativeui.qdoc +++ b/doc/src/declarative/declarativeui.qdoc @@ -40,46 +40,42 @@ ****************************************************************************/ /*! -\title Declarative UI Using QML +\title Qt Quick \page declarativeui.html -\brief The Qt Declarative module provides a declarative framework for building -highly dynamic, custom user interfaces. +\brief Qt Quick provides a declarative framework for building highly +dynamic, custom user interfaces. -\section1 \l{QML Elements}{Fast QML Elements Reference Page} +Qt Quick provides a declarative framework for building highly dynamic, +custom user interfaces from a rich set of \l {QML Elements}{QML elements}. +Qt Quick helps programmers and designers collaborate to +build the fluid user interfaces that are becoming common in portable +consumer devices, such as mobile phones, media players, set-top boxes +and netbooks. -\raw HTML -
    -\endraw +QML is an extension to \l +{http://www.ecma-international.org/publications/standards/Ecma-262.htm} +{JavaScript}, that provides a mechanism to declaratively build an +object tree of \l {QML Elements}{QML elements}. QML improves the +integration between JavaScript and Qt's existing QObject based type +system, adds support for automatic \l {Property Binding}{property +bindings} and provides \l {Network Transparency}{network transparency} +at the language level. -\section1 Preamble +The \l {QML Elements}{QML elements} are a sophisticated set of +graphical and behavioral building blocks. These different elements +are combined together in \l {QML Documents}{QML documents} to build +components ranging in complexity from simple buttons and sliders, to +complete internet-enabled applications like a \l +{http://www.flickr.com}{Flickr} photo browser. -Qt Declarative UI provides a declarative framework for building highly dynamic, custom -user interfaces. Declarative UI helps programmers and designers collaborate to build -the animation rich, fluid user interfaces that are becoming common in portable -consumer devices, such as mobile phones, media players, set-top boxes and netbooks. - -The Qt Declarative module provides an engine for interpreting the declarative -QML language, and a rich set of \bold { \l {QML Elements}{QML elements} } -that can be used from QML. - -QML is an extension to \l {http://www.ecma-international.org/publications/standards/Ecma-262.htm} -{JavaScript}, that provides a mechanism to declaratively build an object tree -of QML elements. QML improves the integration between JavaScript and Qt's -existing QObject based type system, adds support for automatic -\l {Property Binding}{property bindings} and provides \l {Network Transparency}{network transparency} at the language -level. - -The QML elements are a sophisticated set of graphical and behavioral building -blocks. These different elements are combined together in \l {QML Documents}{QML documents} to build components -ranging in complexity from simple buttons and sliders, to complete -internet-enabled applications like a \l {http://www.flickr.com}{Flickr} photo browser. - -Qt Declarative builds on \l {QML for Qt programmers}{Qt's existing strengths}. -QML can be be used to incrementally extend an existing application or to build -completely new applications. QML is fully \l {Extending QML in C++}{extensible from C++}. +Qt Quick builds on \l {QML for Qt programmers}{Qt's existing +strengths}. QML can be be used to incrementally extend an existing +application or to build completely new applications. QML is fully \l +{Extending QML in C++}{extensible from C++}. \section1 Getting Started: + \list \o \l {Introduction to the QML language} \o \l {QML Tutorial}{Tutorial: 'Hello World'} -- cgit v0.12 From 855bbe53b69fa12a9daec49e6326a6bbe4483342 Mon Sep 17 00:00:00 2001 From: David Boddie Date: Tue, 4 May 2010 15:00:10 +0200 Subject: Doc: Fixed up the diagrams, aligning items with a grid. Reviewed-by: Trust Me --- doc/src/diagrams/modelview-move-rows-1.sk | 62 +++++++++++++++---------------- doc/src/diagrams/modelview-move-rows-2.sk | 46 +++++++++++------------ doc/src/diagrams/modelview-move-rows-3.sk | 54 +++++++++++++-------------- doc/src/diagrams/modelview-move-rows-4.sk | 40 ++++++++++---------- 4 files changed, 101 insertions(+), 101 deletions(-) diff --git a/doc/src/diagrams/modelview-move-rows-1.sk b/doc/src/diagrams/modelview-move-rows-1.sk index 3679dc7..dc90cfb 100644 --- a/doc/src/diagrams/modelview-move-rows-1.sk +++ b/doc/src/diagrams/modelview-move-rows-1.sk @@ -14,10 +14,10 @@ lw(1) r(30,0,0,-30,415.038,664.044) fp((1,1,1)) lw(1) -r(30,0,0,-30,219.351,425.18) +r(30,0,0,-30,220,425) fp((1,1,1)) lw(1) -r(30,0,0,-30,414.389,337.792) +r(30,0,0,-30,415,337.5) fp((1,1,1)) lw(1) r(30,0,0,-30,220,605) @@ -35,19 +35,19 @@ lw(1) r(30,0,0,-30,277.5,575) fp((0.753,0.753,1)) lw(1) -r(30,0,0,-30,219.351,335.18) +r(30,0,0,-30,220,335) fp((0.753,0.753,1)) lw(1) -r(30,0,0,-30,414.389,574.044) +r(30,0,0,-30,415,575) fp((1,1,1)) lw(1) r(30,0,0,-30,220,545) fp((1,1,1)) lw(1) -r(30.6087,0,0,-30,218.435,305.442) +r(30,0,0,-30.262,220,305.262) fp((1,1,1)) lw(1) -r(31.2174,0,0,-30,414.082,306.92) +r(30,0,0,-30,415,307.5) fp((1,1,1)) lw(1) r(30,0,0,-30,415.038,455.177) @@ -62,31 +62,31 @@ lw(1) r(30,0,0,-30,220,695) fp((1,1,1)) lw(1) -r(30,0,0,-30,415.038,694.044) +r(30,0,0,-30.956,415.038,695) fp((1,1,1)) lw(1) -r(30,0,0,-30,219.351,455.18) +r(30,0,0,-30,220,455) fp((1,1,1)) lw(1) -r(30,0,0,-30,414.389,367.792) +r(30,0,0,-30,415,367.5) fp((0.753,0.753,1)) lw(1) r(30,0,0,-30,277.5,605) fp((0.753,0.753,1)) lw(1) -r(30,0,0,-30,219.351,365.18) +r(30,0,0,-30,220,365) fp((0.753,0.753,1)) lw(1) -r(30,0,0,-30,414.389,604.044) +r(30,0,0,-30,415,605) fp((0.753,0.753,1)) lw(1) r(30,0,0,-30,277.5,635) fp((0.753,0.753,1)) lw(1) -r(30,0,0,-30,219.351,395.18) +r(30,0,0,-30,220,395) fp((0.753,0.753,1)) lw(1) -r(30,0,0,-30,414.389,634.044) +r(30,0,0,-30,415,635) le() lw(1) r(165,0,0,-230,210,705) @@ -107,13 +107,13 @@ le() lw(1) Fn('Helvetica') Fs(20) -txt('0',(228.791,433.32)) +txt('0',(229.44,433.14)) fp((0,0,0)) le() lw(1) Fn('Helvetica') Fs(20) -txt('0',(423.829,345.932)) +txt('0',(424.44,345.64)) fp((0,0,0)) le() lw(1) @@ -131,13 +131,13 @@ le() lw(1) Fn('Helvetica') Fs(20) -txt('1',(228.791,403.32)) +txt('1',(229.44,403.14)) fp((0,0,0)) le() lw(1) Fn('Helvetica') Fs(20) -txt('1',(423.829,315.932)) +txt('1',(424.44,315.64)) fp((0,0,0)) le() lw(1) @@ -161,13 +161,13 @@ le() lw(1) Fn('Helvetica') Fs(20) -txt('2',(228.791,373.32)) +txt('2',(229.44,373.14)) fp((0,0,0)) le() lw(1) Fn('Helvetica') Fs(20) -txt('2',(423.829,612.184)) +txt('2',(424.44,613.14)) fp((0,0,0)) le() lw(1) @@ -191,13 +191,13 @@ le() lw(1) Fn('Helvetica') Fs(20) -txt('3',(228.791,343.32)) +txt('3',(229.44,343.14)) fp((0,0,0)) le() lw(1) Fn('Helvetica') Fs(20) -txt('3',(423.829,582.184)) +txt('3',(424.44,583.14)) fp((0,0,0)) le() lw(1) @@ -221,13 +221,13 @@ le() lw(1) Fn('Helvetica') Fs(20) -txt('4',(228.791,313.32)) +txt('4',(229.44,313.14)) fp((0,0,0)) le() lw(1) Fn('Helvetica') Fs(20) -txt('4',(423.829,552.184)) +txt('4',(424.44,553.14)) fp((0,0,0)) le() lw(1) @@ -239,13 +239,13 @@ le() lw(1) Fn('Helvetica') Fs(20) -txt('5',(228.484,283.582)) +txt('5',(229.133,283.402)) fp((0.503,0.503,0.503)) le() lw(1) Fn('Helvetica') Fs(20) -txt('5',(423.522,285.06)) +txt('5',(424.44,285.64)) fp((0.503,0.503,0.503)) le() lw(1) @@ -255,17 +255,17 @@ txt('5',(424.478,433.317)) lw(1.5) la2(([(-4.0, 3.0), (2.0, 0.0), (-4.0, -3.0), (-4.0, 3.0)], 1)) b() -bs(275,635,0) -bs(255,635,0) +bs(277.5,635,0) +bs(252.5,635,0) lw(1.5) la2(([(-4.0, 3.0), (2.0, 0.0), (-4.0, -3.0), (-4.0, 3.0)], 1)) b() -bs(294.508,380.772,0) -bs(293.986,545.115,0) +bs(292.5,380,0) +bs(292.5,542.5,0) lw(1.5) la2(([(-4.0, 3.0), (2.0, 0.0), (-4.0, -3.0), (-4.0, 3.0)], 1)) b() -bs(249.466,380.772,0) -bs(291.551,380.772,0) +bs(250,380,0) +bs(290,380,0) guidelayer('Guide Lines',1,0,0,1,(0,0,1)) grid((0,0,2.5,2.5),1,(0,0,1),'Grid') diff --git a/doc/src/diagrams/modelview-move-rows-2.sk b/doc/src/diagrams/modelview-move-rows-2.sk index c453a78..7ddb95e 100644 --- a/doc/src/diagrams/modelview-move-rows-2.sk +++ b/doc/src/diagrams/modelview-move-rows-2.sk @@ -14,10 +14,10 @@ lw(1) r(30,0,0,-30,415.038,664.044) fp((1,1,1)) lw(1) -r(30,0,0,-30,219.351,425.18) +r(30,0,0,-30,220,425) fp((1,1,1)) lw(1) -r(30,0,0,-30,414.389,337.792) +r(30,0,0,-30,415,337.5) fp((1,1,1)) lw(1) r(30,0,0,-30,220,605) @@ -35,7 +35,7 @@ lw(1) r(30,0,0,-30,275,455) fp((0.753,0.753,1)) lw(1) -r(30,0,0,-30,219.351,335.18) +r(30,0,0,-30,220,335) fp((0.753,0.753,1)) lw(1) r(30,0,0,-30,415,455) @@ -47,10 +47,10 @@ lw(1) r(30,0,0,-30,415,545) fp((1,1,1)) lw(1) -r(30.6087,0,0,-30,218.435,305.442) +r(29.6927,0,0,-30,220,305.262) fp((1,1,1)) lw(1) -r(31.2174,0,0,-30,414.082,306.92) +r(30,0,0,-30,415,307.5) fp((1,1,1)) lw(1) r(30,0,0,-30,220,635) @@ -65,16 +65,16 @@ lw(1) r(30,0,0,-30,415.038,694.044) fp((1,1,1)) lw(1) -r(30,0,0,-30,219.351,455.18) +r(30,0,0,-30,220,455) fp((1,1,1)) lw(1) -r(30,0,0,-30,414.389,367.792) +r(30,0,0,-30,415,367.5) fp((0.753,0.753,1)) lw(1) r(30,0,0,-30,275,485) fp((0.753,0.753,1)) lw(1) -r(30,0,0,-30,219.351,365.18) +r(30,0,0,-30,220,365) fp((0.753,0.753,1)) lw(1) r(30,0,0,-30,415,485) @@ -83,7 +83,7 @@ lw(1) r(30,0,0,-30,275,515) fp((0.753,0.753,1)) lw(1) -r(30,0,0,-30,219.351,395.18) +r(30,0,0,-30,220,395) fp((0.753,0.753,1)) lw(1) r(30,0,0,-30,415,515) @@ -107,13 +107,13 @@ le() lw(1) Fn('Helvetica') Fs(20) -txt('0',(228.791,433.32)) +txt('0',(229.44,433.14)) fp((0,0,0)) le() lw(1) Fn('Helvetica') Fs(20) -txt('0',(423.829,345.932)) +txt('0',(424.44,345.64)) fp((0,0,0)) le() lw(1) @@ -131,13 +131,13 @@ le() lw(1) Fn('Helvetica') Fs(20) -txt('1',(228.791,403.32)) +txt('1',(229.44,403.14)) fp((0,0,0)) le() lw(1) Fn('Helvetica') Fs(20) -txt('1',(423.829,315.932)) +txt('1',(424.44,315.64)) fp((0,0,0)) le() lw(1) @@ -161,7 +161,7 @@ le() lw(1) Fn('Helvetica') Fs(20) -txt('2',(228.791,373.32)) +txt('2',(229.44,373.14)) fp((0,0,0)) le() lw(1) @@ -191,7 +191,7 @@ le() lw(1) Fn('Helvetica') Fs(20) -txt('3',(228.791,343.32)) +txt('3',(229.44,343.14)) fp((0,0,0)) le() lw(1) @@ -221,7 +221,7 @@ le() lw(1) Fn('Helvetica') Fs(20) -txt('4',(228.791,313.32)) +txt('4',(229.44,313.14)) fp((0,0,0)) le() lw(1) @@ -245,27 +245,27 @@ le() lw(1) Fn('Helvetica') Fs(20) -txt('5',(228.484,283.582)) +txt('5',(229.133,283.402)) fp((0.503,0.503,0.503)) le() lw(1) Fn('Helvetica') Fs(20) -txt('5',(423.522,285.06)) +txt('5',(424.44,285.64)) lw(1.5) la2(([(-4.0, 3.0), (2.0, 0.0), (-4.0, -3.0), (-4.0, 3.0)], 1)) b() -bs(272.5,515,0) +bs(275,515,0) bs(252.5,515,0) lw(1.5) la2(([(-4.0, 3.0), (2.0, 0.0), (-4.0, -3.0), (-4.0, 3.0)], 1)) b() -bs(294.508,380.772,0) -bs(295,425,0) +bs(292.5,380,0) +bs(292.5,422.5,0) lw(1.5) la2(([(-4.0, 3.0), (2.0, 0.0), (-4.0, -3.0), (-4.0, 3.0)], 1)) b() -bs(249.466,380.772,0) -bs(291.551,380.772,0) +bs(250,380,0) +bs(290,380,0) guidelayer('Guide Lines',1,0,0,1,(0,0,1)) grid((0,0,2.5,2.5),1,(0,0,1),'Grid') diff --git a/doc/src/diagrams/modelview-move-rows-3.sk b/doc/src/diagrams/modelview-move-rows-3.sk index d320900..33a9ad1 100644 --- a/doc/src/diagrams/modelview-move-rows-3.sk +++ b/doc/src/diagrams/modelview-move-rows-3.sk @@ -4,30 +4,30 @@ layout('A4',0) layer('Layer 1',1,1,0,0,(0,0,0)) fp((1,1,1)) lw(1) -r(30,0,0,-30,219.351,425.18) +r(30,0,0,-30,220,425) fp((1,1,1)) lw(1) -r(30,0,0,-30,345.913,400) +r(30,0,0,-30,344.997,400) lw(1) -r(30,0,0,-30,219.351,335.18) +r(30,0,0,-30,220,335) lw(1) -r(30,0,0,-30,345.916,339.739) +r(30,0,0,-30,345,339.739) fp((1,1,1)) lw(1) -r(30.6087,0,0,-30,218.435,305.442) +r(30,0,0,-30,220,305.262) fp((1,1,1)) lw(1) -r(30.6087,0,0,-30,345,310) +r(30,0,0,-30,345,310) fp((1,1,1)) lw(1) -r(30,0,0,-30,219.351,455.18) +r(30,0,0,-30,220,455) fp((1,1,1)) lw(1) -r(30,0,0,-30,345.913,430) +r(30,0,0,-30,344.997,430) lw(1) -r(30,0,0,-30,219.351,365.18) +r(30,0,0,-30,220,365) lw(1) -r(30,0,0,-30,345.916,369.739) +r(30,0,0,-30,345,369.739) fp((0.753,0.753,1)) lw(1) r(30,0,0,-30,272.5,455) @@ -36,7 +36,7 @@ lw(1) r(30,0,0,-30,345,460) fp((0.753,0.753,1)) lw(1) -r(30,0,0,-30,219.351,395.18) +r(30,0,0,-30,220,395) le() lw(1) r(165,0,0,-230,210,705) @@ -45,25 +45,25 @@ le() lw(1) Fn('Helvetica') Fs(20) -txt('0',(228.791,433.32)) +txt('0',(229.44,433.14)) fp((0.503,0.503,0.503)) le() lw(1) Fn('Helvetica') Fs(20) -txt('0',(355.353,408.14)) +txt('0',(354.437,408.14)) fp((0,0,0)) le() lw(1) Fn('Helvetica') Fs(20) -txt('1',(228.791,403.32)) +txt('1',(229.44,403.14)) fp((0.503,0.503,0.503)) le() lw(1) Fn('Helvetica') Fs(20) -txt('1',(355.353,378.14)) +txt('1',(354.437,378.14)) fp((0,0,0)) le() lw(1) @@ -81,37 +81,37 @@ le() lw(1) Fn('Helvetica') Fs(20) -txt('2',(228.791,373.32)) +txt('2',(229.44,373.14)) fp((0,0,0)) le() lw(1) Fn('Helvetica') Fs(20) -txt('3',(228.791,343.32)) +txt('3',(229.44,343.14)) fp((0,0,0)) le() lw(1) Fn('Helvetica') Fs(20) -txt('3',(355.356,347.879)) +txt('3',(354.44,347.879)) fp((0,0,0)) le() lw(1) Fn('Helvetica') Fs(20) -txt('4',(228.791,313.32)) +txt('4',(229.44,313.14)) fp((0,0,0)) le() lw(1) Fn('Helvetica') Fs(20) -txt('4',(355.356,317.879)) +txt('4',(354.44,317.879)) fp((0,0,0)) le() lw(1) Fn('Helvetica') Fs(20) -txt('5',(228.484,283.582)) +txt('5',(229.133,283.402)) fp((0,0,0)) le() lw(1) @@ -121,17 +121,17 @@ txt('5',(355.049,288.14)) lw(1.5) la2(([(-4.0, 3.0), (2.0, 0.0), (-4.0, -3.0), (-4.0, 3.0)], 1)) b() -bs(270,455,0) -bs(250,455,0) +bs(272.5,455,0) +bs(252.5,455,0) lw(1.5) la2(([(-4.0, 3.0), (2.0, 0.0), (-4.0, -3.0), (-4.0, 3.0)], 1)) b() -bs(294.508,380.772,0) -bs(295,425,0) +bs(287.5,380,0) +bs(287.5,422.5,0) lw(1.5) la2(([(-4.0, 3.0), (2.0, 0.0), (-4.0, -3.0), (-4.0, 3.0)], 1)) b() -bs(249.466,380.772,0) -bs(291.551,380.772,0) +bs(250,380,0) +bs(285,380,0) guidelayer('Guide Lines',1,0,0,1,(0,0,1)) grid((0,0,2.5,2.5),1,(0,0,1),'Grid') diff --git a/doc/src/diagrams/modelview-move-rows-4.sk b/doc/src/diagrams/modelview-move-rows-4.sk index a8a1157..0531749 100644 --- a/doc/src/diagrams/modelview-move-rows-4.sk +++ b/doc/src/diagrams/modelview-move-rows-4.sk @@ -4,28 +4,28 @@ layout('A4',0) layer('Layer 1',1,1,0,0,(0,0,0)) fp((1,1,1)) lw(1) -r(30,0,0,-30,219.351,425.18) +r(30,0,0,-30,220,425) fp((1,1,1)) lw(1) r(30,0,0,-30,345,430) lw(1) -r(30,0,0,-30,219.351,335.18) +r(30,0,0,-30,220,335.18) lw(1) r(30,0,0,-30,345,339.739) fp((1,1,1)) lw(1) -r(30.6087,0,0,-30,218.435,305.442) +r(30,0,0,-30.442,220,305.442) fp((1,1,1)) lw(1) -r(30.6087,0,0,-30,344.084,310) +r(30,0,0,-30,345,310) fp((1,1,1)) lw(1) -r(30,0,0,-30,219.351,455.18) +r(30,0,0,-30,220,455) fp((1,1,1)) lw(1) r(30,0,0,-30,345,460) lw(1) -r(30,0,0,-30,219.351,365.18) +r(30,0,0,-30,220,365) lw(1) r(30,0,0,-30,345,400) fp((0.753,0.753,1)) @@ -36,7 +36,7 @@ lw(1) r(30,0,0,-30,345,370) fp((0.753,0.753,1)) lw(1) -r(30,0,0,-30,219.351,395.18) +r(30,0,0,-30,220,395) le() lw(1) r(165,0,0,-230,210,705) @@ -45,7 +45,7 @@ le() lw(1) Fn('Helvetica') Fs(20) -txt('0',(228.791,433.32)) +txt('0',(229.44,433.14)) fp((0,0,0)) le() lw(1) @@ -57,7 +57,7 @@ le() lw(1) Fn('Helvetica') Fs(20) -txt('1',(228.791,403.32)) +txt('1',(229.44,403.14)) fp((0,0,0)) le() lw(1) @@ -81,13 +81,13 @@ le() lw(1) Fn('Helvetica') Fs(20) -txt('2',(228.791,373.32)) +txt('2',(229.44,373.14)) fp((0,0,0)) le() lw(1) Fn('Helvetica') Fs(20) -txt('3',(228.791,343.32)) +txt('3',(229.44,343.14)) fp((0.503,0.503,0.503)) le() lw(1) @@ -99,7 +99,7 @@ le() lw(1) Fn('Helvetica') Fs(20) -txt('4',(228.791,313.32)) +txt('4',(229.44,313.14)) fp((0,0,0)) le() lw(1) @@ -111,27 +111,27 @@ le() lw(1) Fn('Helvetica') Fs(20) -txt('5',(228.484,283.582)) +txt('5',(229.44,283.582)) fp((0,0,0)) le() lw(1) Fn('Helvetica') Fs(20) -txt('5',(354.133,288.14)) +txt('5',(354.44,288.14)) lw(1.5) la2(([(-4.0, 3.0), (2.0, 0.0), (-4.0, -3.0), (-4.0, 3.0)], 1)) b() -bs(270,335,0) -bs(250,335,0) +bs(272.5,335,0) +bs(252.5,335,0) lw(1.5) la2(([(-4.0, 3.0), (2.0, 0.0), (-4.0, -3.0), (-4.0, 3.0)], 1)) b() -bs(294.508,380.772,0) -bs(295,335,0) +bs(287.5,380,0) +bs(287.5,337.5,0) lw(1.5) la2(([(-4.0, 3.0), (2.0, 0.0), (-4.0, -3.0), (-4.0, 3.0)], 1)) b() -bs(249.466,380.772,0) -bs(291.551,380.772,0) +bs(250,380,0) +bs(285,380,0) guidelayer('Guide Lines',1,0,0,1,(0,0,1)) grid((0,0,2.5,2.5),1,(0,0,1),'Grid') -- cgit v0.12 From d52cc1ded5f30a6da0d11b9c3f7de66b2d3e9ee9 Mon Sep 17 00:00:00 2001 From: Jens Bache-Wiig Date: Tue, 4 May 2010 15:14:56 +0200 Subject: Fix rtl issues with sliders in GTK style Sliders that draw groove decorations did not invert appearance correctly in vertical or rtl cases. With this fix we will flip the rectangles of the respective decorations and tell gtk if we are using an rtl widget or not. Task-number: QTBUG-8986 Reviewed-yb: thorbjorn --- src/gui/styles/qgtkstyle.cpp | 23 ++++++++++++++++------- 1 file changed, 16 insertions(+), 7 deletions(-) diff --git a/src/gui/styles/qgtkstyle.cpp b/src/gui/styles/qgtkstyle.cpp index e3ca8b2..0988fd8 100644 --- a/src/gui/styles/qgtkstyle.cpp +++ b/src/gui/styles/qgtkstyle.cpp @@ -1937,14 +1937,11 @@ void QGtkStyle::drawComplexControl(ComplexControl control, const QStyleOptionCom QRect groove = proxy()->subControlRect(CC_Slider, option, SC_SliderGroove, widget); QRect handle = proxy()->subControlRect(CC_Slider, option, SC_SliderHandle, widget); - QRect ticks = proxy()->subControlRect(CC_Slider, option, SC_SliderTickmarks, widget); bool horizontal = slider->orientation == Qt::Horizontal; bool ticksAbove = slider->tickPosition & QSlider::TicksAbove; bool ticksBelow = slider->tickPosition & QSlider::TicksBelow; - QColor activeHighlight = option->palette.color(QPalette::Normal, QPalette::Highlight); - QPixmap cache; QBrush oldBrush = painter->brush(); QPen oldPen = painter->pen(); @@ -1953,6 +1950,8 @@ void QGtkStyle::drawComplexControl(ComplexControl control, const QStyleOptionCom QColor highlightAlpha(Qt::white); highlightAlpha.setAlpha(80); + QGtkStylePrivate::gtk_widget_set_direction(hScaleWidget, slider->upsideDown ? + GTK_TEXT_DIR_RTL : GTK_TEXT_DIR_LTR); GtkWidget *scaleWidget = horizontal ? hScaleWidget : vScaleWidget; style = scaleWidget->style; @@ -1986,11 +1985,21 @@ void QGtkStyle::drawComplexControl(ComplexControl control, const QStyleOptionCom QRect lowerGroove = grooveRect; if (horizontal) { - upperGroove.setLeft(handle.center().x()); - lowerGroove.setRight(handle.center().x()); + if (slider->upsideDown) { + lowerGroove.setLeft(handle.center().x()); + upperGroove.setRight(handle.center().x()); + } else { + upperGroove.setLeft(handle.center().x()); + lowerGroove.setRight(handle.center().x()); + } } else { - upperGroove.setBottom(handle.center().y()); - lowerGroove.setTop(handle.center().y()); + if (!slider->upsideDown) { + lowerGroove.setBottom(handle.center().y()); + upperGroove.setTop(handle.center().y()); + } else { + upperGroove.setBottom(handle.center().y()); + lowerGroove.setTop(handle.center().y()); + } } gtkPainter.paintBox( scaleWidget, "trough-upper", upperGroove, state, -- cgit v0.12 From 409ced7dc098438e185b9a6db6b3f53b1472839d Mon Sep 17 00:00:00 2001 From: Martin Smith Date: Tue, 4 May 2010 15:33:02 +0200 Subject: qdoc: Fixed the alphabet index in the compact list. Now it leaves out any letter that doesn't appear in the list. i.e. If there are no classes that begin with QJ... J does not appear in the alphabet index. --- doc/src/declarative/declarativeui.qdoc | 8 ++++---- tools/qdoc3/htmlgenerator.cpp | 13 ++++--------- 2 files changed, 8 insertions(+), 13 deletions(-) diff --git a/doc/src/declarative/declarativeui.qdoc b/doc/src/declarative/declarativeui.qdoc index 6a1f5c5..5283ba8 100644 --- a/doc/src/declarative/declarativeui.qdoc +++ b/doc/src/declarative/declarativeui.qdoc @@ -74,7 +74,7 @@ strengths}. QML can be be used to incrementally extend an existing application or to build completely new applications. QML is fully \l {Extending QML in C++}{extensible from C++}. -\section1 Getting Started: +\section1 Getting Started \list \o \l {Introduction to the QML language} @@ -84,7 +84,7 @@ application or to build completely new applications. QML is fully \l \o \l {QML for Qt programmers} \endlist -\section1 Core QML Features: +\section1 Core QML Features \list \o \l {QML Documents} \o \l {Property Binding} @@ -102,7 +102,7 @@ application or to build completely new applications. QML is fully \l \o \l {qmlruntime.html}{The Qt Declarative Runtime} \endlist -\section1 Using QML with C++: +\section1 Using QML with C++ \list \o \l {Tutorial: Writing QML extensions with C++} \o \l {Extending QML in C++} @@ -110,7 +110,7 @@ application or to build completely new applications. QML is fully \l \o \l {Integrating QML with existing Qt UI code} \endlist -\section1 Reference: +\section1 Reference \list \o \l {QML Elements} \o \l {QML Global Object} diff --git a/tools/qdoc3/htmlgenerator.cpp b/tools/qdoc3/htmlgenerator.cpp index 569d1cd..d32ae99 100644 --- a/tools/qdoc3/htmlgenerator.cpp +++ b/tools/qdoc3/htmlgenerator.cpp @@ -2399,6 +2399,7 @@ void HtmlGenerator::generateCompactList(const Node *relative, */ NodeMap paragraph[NumParagraphs+1]; QString paragraphName[NumParagraphs+1]; + QSet usedParagraphNames; NodeMap::ConstIterator c = classMap.begin(); while (c != classMap.end()) { @@ -2422,6 +2423,7 @@ void HtmlGenerator::generateCompactList(const Node *relative, } paragraphName[paragraphNo] = key[0].toUpper(); + usedParagraphNames.insert(key[0].toLower().cell()); paragraph[paragraphNo].insert(key, c.value()); ++c; } @@ -2469,12 +2471,12 @@ void HtmlGenerator::generateCompactList(const Node *relative, out() << "

    "; for (int i = 0; i < 26; i++) { QChar ch('a' + i); - out() << QString("%2 ").arg(ch).arg(ch.toUpper()); + if (usedParagraphNames.contains(char('a' + i))) + out() << QString("%2 ").arg(ch).arg(ch.toUpper()); } out() << "

    \n"; } - QSet used; out() << "\n"; for (k = 0; k < numRows; k++) { out() << "\n"; @@ -2502,7 +2504,6 @@ void HtmlGenerator::generateCompactList(const Node *relative, if (includeAlphabet) { QChar c = paragraphName[currentParagraphNo[i]][0].toLower(); out() << QString("").arg(c); - used.insert(c.cell()); } out() << "" << paragraphName[currentParagraphNo[i]] @@ -2545,12 +2546,6 @@ void HtmlGenerator::generateCompactList(const Node *relative, out() << "\n"; } out() << "
    \n"; - char C = 'a'; - while (C <= 'z') { - if (!used.contains(C)) - out() << QString("").arg(C); - ++C; - } } void HtmlGenerator::generateFunctionIndex(const Node *relative, -- cgit v0.12 From 8737df24cd58359dacd3d0cb7f856cb7484f03c8 Mon Sep 17 00:00:00 2001 From: Morten Engvoldsen Date: Tue, 4 May 2010 15:53:33 +0200 Subject: Doc: Updating style and HTML in CSS and qdoc Adding all classnames generated in qdoc to the CSS and removing redundant   from htmlgenerator. Reviewed-by: Trust Me --- doc/src/template/style/style.css | 96 +++++++++++++++++++++++++++++++++++----- tools/qdoc3/htmlgenerator.cpp | 12 ++--- 2 files changed, 91 insertions(+), 17 deletions(-) diff --git a/doc/src/template/style/style.css b/doc/src/template/style/style.css index 9c290f5..2da91f3 100755 --- a/doc/src/template/style/style.css +++ b/doc/src/template/style/style.css @@ -58,6 +58,10 @@ { vertical-align: baseline; } + tt, .qmlreadonly span, .qmldefault span + { + word-spacing:5px; + } .heading { font: normal 600 16px/1.0 Arial; @@ -483,7 +487,7 @@ .wrap .content p { line-height: 20px; - padding: 10px 5px 10px 5px; + padding: 5px 5px 5px 5px; } .wrap .content ul { @@ -499,7 +503,11 @@ color: #4c0033; text-decoration: none; } - .footer + .content a:visited:hover + { + color: #4c0033; + text-decoration: underline; + } .footer { min-height: 100px; color: #797775; @@ -665,6 +673,10 @@ { font-variant: normal; } + .shortCut-topleft-inactive span a:hover, .shortCut-topleft-active a:hover + { + text-decoration:none; + } #shortCut { padding-top: 10px; @@ -732,12 +744,16 @@ } th { - padding: 3px 15px 3px 15px; + padding: 5px 15px 5px 15px; } td { padding: 3px 15px 3px 20px; } + td.rightAlign + { + padding: 3px 15px 3px 10px; + } table tr.odd { border-left: 1px solid #E6E6E6; @@ -758,7 +774,7 @@ { background-color: #E6E6E6; } - + span.comment { color: #8B0000; @@ -856,11 +872,35 @@ width: 200px; } - .toc h3 + .toc h3, .generic a { font: 600 12px/1.2 Arial; } + .generic{} + .alignedsummary{} + .propsummary{} + .memItemLeft{} + .memItemRight{} + .bottomAlign{} + .highlightedCode{} + .LegaleseLeft{} + .valuelist{} + .annotated{} + .obsolete{} + .compat{} + .flags{} + .qmlsummary{} + .qmlitem{} + .qmlproto{} + .qmlname{} + .qmlreadonly{} + .qmldefault{} + .qmldoc{} + .qt-style{} + .redFont{} + code{} + .wrap .content .toc ul { padding-left: 0px; @@ -901,8 +941,42 @@ border-style: solid; border-color: #E6E6E6; font-weight: bold; - } - + word-spacing:3px; + } + + .functionIndex { + font-size:12pt; + word-spacing:10px; + margin-bottom:10px; + background-color: #F6F6F6; + border-width: 1px; + border-style: solid; + border-color: #E6E6E6; + } + + .centerAlign + { + text-align:center; + } + + .rightAlign + { + text-align:right; + } + + + .leftAlign + { + text-align:left; + } + + .topAlign{ + vertical-align:top + } + + .functionIndex a{ + display:inline-block; + } /* start index box */ .indexbox @@ -929,8 +1003,8 @@ { display: inline-block; width: 49%; - *width:42%; - _width:42%; + /* *width:42%; + _width:42%;*/ padding:0 2% 0 1%; vertical-align:top; @@ -939,8 +1013,8 @@ .indexboxcont .indexIcon { width: 11%; - *width:18%; - _width:18%; + /* *width:18%; + _width:18%;*/ overflow:hidden; } diff --git a/tools/qdoc3/htmlgenerator.cpp b/tools/qdoc3/htmlgenerator.cpp index d32ae99..801e199 100644 --- a/tools/qdoc3/htmlgenerator.cpp +++ b/tools/qdoc3/htmlgenerator.cpp @@ -2507,7 +2507,7 @@ void HtmlGenerator::generateCompactList(const Node *relative, } out() << "" << paragraphName[currentParagraphNo[i]] - << " "; + << ""; } out() << "\n"; @@ -2677,7 +2677,7 @@ void HtmlGenerator::generateQmlItem(const Node *node, if (summary) marked.replace("@name>", "b>"); - marked.replace("<@extra>", "  "); + marked.replace("<@extra>", ""); marked.replace("", ""); if (summary) { @@ -2986,7 +2986,7 @@ void HtmlGenerator::generateSynopsis(const Node *node, extraRegExp.setMinimal(true); marked.replace(extraRegExp, ""); } else { - marked.replace("<@extra>", "  "); + marked.replace("<@extra>", ""); marked.replace("", ""); } @@ -3265,7 +3265,7 @@ void HtmlGenerator::generateSynopsis(const Node *node, extraRegExp.setMinimal(true); marked.replace(extraRegExp, ""); } else { - marked.replace("<@extra>", "  "); + marked.replace("<@extra>", ""); marked.replace("", ""); } @@ -4436,9 +4436,9 @@ void HtmlGenerator::generateDetailedQmlMember(const Node *node, out() << ""; out() << ""; if (!qpn->isWritable()) - out() << "read-only "; + out() << "read-only"; if (qpgn->isDefault()) - out() << "default "; + out() << "default"; generateQmlItem(qpn, relative, marker, false); out() << ""; if (qpgn->isDefault()) { -- cgit v0.12 From 62201af6fd7a704e936692231b35342ce051bb08 Mon Sep 17 00:00:00 2001 From: Friedemann Kleint Date: Wed, 12 May 2010 10:49:07 +0200 Subject: REG 4.7: Edit widgets icon no longer in toolbar. Task-number: QTBUG-10626 Reviewed-by: Daniel Molkentin --- tools/designer/src/designer/qdesigner_actions.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/tools/designer/src/designer/qdesigner_actions.cpp b/tools/designer/src/designer/qdesigner_actions.cpp index a593a76..86b6214 100644 --- a/tools/designer/src/designer/qdesigner_actions.cpp +++ b/tools/designer/src/designer/qdesigner_actions.cpp @@ -347,6 +347,7 @@ QDesignerActions::QDesignerActions(QDesignerWorkbench *workbench) connect(m_editWidgetsAction, SIGNAL(triggered()), this, SLOT(editWidgetsSlot())); m_editWidgetsAction->setChecked(true); m_editWidgetsAction->setEnabled(false); + m_editWidgetsAction->setProperty(QDesignerActions::defaultToolbarPropertyName, true); m_toolActions->addAction(m_editWidgetsAction); connect(formWindowManager, SIGNAL(activeFormWindowChanged(QDesignerFormWindowInterface*)), -- cgit v0.12 From 0ebc9783d8ca0c4b27208bbc002c53c52c19ab4c Mon Sep 17 00:00:00 2001 From: "Bradley T. Hughes" Date: Tue, 4 May 2010 16:25:18 +0200 Subject: Use qrand() instead of rand() This only affects X11 code, and are the only 2 places in Qt where rand() is used instead of qrand(). Task-number: QTBUG-9793 Reviewed-by: TrustMe --- src/gui/kernel/qwidget_x11.cpp | 2 +- src/gui/painting/qpaintengine_x11.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/gui/kernel/qwidget_x11.cpp b/src/gui/kernel/qwidget_x11.cpp index 37ac6bf..43f510c 100644 --- a/src/gui/kernel/qwidget_x11.cpp +++ b/src/gui/kernel/qwidget_x11.cpp @@ -3000,7 +3000,7 @@ Picture QX11Data::getSolidFill(int screen, const QColor &c) return X11->solid_fills[i].picture; } // none found, replace one - int i = rand() % 16; + int i = qrand() % 16; if (X11->solid_fills[i].screen != screen && X11->solid_fills[i].picture) { XRenderFreePicture (X11->display, X11->solid_fills[i].picture); diff --git a/src/gui/painting/qpaintengine_x11.cpp b/src/gui/painting/qpaintengine_x11.cpp index da48fcb..aef8b80 100644 --- a/src/gui/painting/qpaintengine_x11.cpp +++ b/src/gui/painting/qpaintengine_x11.cpp @@ -315,7 +315,7 @@ static Picture getPatternFill(int screen, const QBrush &b) return X11->pattern_fills[i].picture; } // none found, replace one - int i = rand() % 16; + int i = qrand() % 16; if (X11->pattern_fills[i].screen != screen && X11->pattern_fills[i].picture) { XRenderFreePicture (X11->display, X11->pattern_fills[i].picture); -- cgit v0.12 From d59ef5d00b6c07c3a1c332ebdd0fac060538940c Mon Sep 17 00:00:00 2001 From: Thiago Macieira Date: Tue, 4 May 2010 18:48:36 +0200 Subject: QtDeclarative: remove spurious semi-colons from the source code --- src/declarative/graphicsitems/qdeclarativegridview_p.h | 2 +- src/declarative/graphicsitems/qdeclarativelistview_p.h | 2 +- src/declarative/qml/qdeclarativebinding_p.h | 2 +- src/declarative/qml/qdeclarativecompiledbindings_p.h | 4 ++-- src/declarative/qml/qdeclarativecomponent_p.h | 2 +- src/declarative/qml/qdeclarativecontext.h | 2 +- src/declarative/qml/qdeclarativeguard_p.h | 2 +- src/declarative/qml/qdeclarativepropertycache.cpp | 2 +- src/declarative/qml/qdeclarativescriptstring.h | 2 +- src/declarative/qml/qdeclarativestringconverters_p.h | 2 +- src/declarative/qml/qdeclarativeworkerscript_p.h | 2 +- src/declarative/qml/qdeclarativexmlhttprequest.cpp | 6 +++--- src/declarative/util/qdeclarativelistmodelworkeragent_p.h | 2 +- src/declarative/util/qdeclarativesmoothedanimation_p.h | 2 +- src/declarative/util/qdeclarativesmoothedfollow_p.h | 2 +- src/declarative/util/qdeclarativetransitionmanager_p_p.h | 2 +- 16 files changed, 19 insertions(+), 19 deletions(-) diff --git a/src/declarative/graphicsitems/qdeclarativegridview_p.h b/src/declarative/graphicsitems/qdeclarativegridview_p.h index c06879e..f5d061d 100644 --- a/src/declarative/graphicsitems/qdeclarativegridview_p.h +++ b/src/declarative/graphicsitems/qdeclarativegridview_p.h @@ -142,7 +142,7 @@ public: void setSnapMode(SnapMode mode); enum PositionMode { Beginning, Center, End, Visible, Contain }; - Q_ENUMS(PositionMode); + Q_ENUMS(PositionMode) Q_INVOKABLE void positionViewAtIndex(int index, int mode); Q_INVOKABLE int indexAt(int x, int y) const; diff --git a/src/declarative/graphicsitems/qdeclarativelistview_p.h b/src/declarative/graphicsitems/qdeclarativelistview_p.h index 9c0b7dd..051455c 100644 --- a/src/declarative/graphicsitems/qdeclarativelistview_p.h +++ b/src/declarative/graphicsitems/qdeclarativelistview_p.h @@ -200,7 +200,7 @@ public: static QDeclarativeListViewAttached *qmlAttachedProperties(QObject *); enum PositionMode { Beginning, Center, End, Visible, Contain }; - Q_ENUMS(PositionMode); + Q_ENUMS(PositionMode) Q_INVOKABLE void positionViewAtIndex(int index, int mode); Q_INVOKABLE int indexAt(int x, int y) const; diff --git a/src/declarative/qml/qdeclarativebinding_p.h b/src/declarative/qml/qdeclarativebinding_p.h index 2d3acf5..598f09f 100644 --- a/src/declarative/qml/qdeclarativebinding_p.h +++ b/src/declarative/qml/qdeclarativebinding_p.h @@ -164,6 +164,6 @@ private: QT_END_NAMESPACE -Q_DECLARE_METATYPE(QDeclarativeBinding*); +Q_DECLARE_METATYPE(QDeclarativeBinding*) #endif // QDECLARATIVEBINDING_P_H diff --git a/src/declarative/qml/qdeclarativecompiledbindings_p.h b/src/declarative/qml/qdeclarativecompiledbindings_p.h index a17bc84..d5c6a02 100644 --- a/src/declarative/qml/qdeclarativecompiledbindings_p.h +++ b/src/declarative/qml/qdeclarativecompiledbindings_p.h @@ -104,8 +104,8 @@ protected: int qt_metacall(QMetaObject::Call, int, void **); private: - Q_DISABLE_COPY(QDeclarativeCompiledBindings); - Q_DECLARE_PRIVATE(QDeclarativeCompiledBindings); + Q_DISABLE_COPY(QDeclarativeCompiledBindings) + Q_DECLARE_PRIVATE(QDeclarativeCompiledBindings) }; QT_END_NAMESPACE diff --git a/src/declarative/qml/qdeclarativecomponent_p.h b/src/declarative/qml/qdeclarativecomponent_p.h index 24e5386..8b95945 100644 --- a/src/declarative/qml/qdeclarativecomponent_p.h +++ b/src/declarative/qml/qdeclarativecomponent_p.h @@ -149,7 +149,7 @@ Q_SIGNALS: void destruction(); private: - friend class QDeclarativeContextData;; + friend class QDeclarativeContextData; friend class QDeclarativeComponentPrivate; }; diff --git a/src/declarative/qml/qdeclarativecontext.h b/src/declarative/qml/qdeclarativecontext.h index 548869c..d87123a 100644 --- a/src/declarative/qml/qdeclarativecontext.h +++ b/src/declarative/qml/qdeclarativecontext.h @@ -107,7 +107,7 @@ private: }; QT_END_NAMESPACE -Q_DECLARE_METATYPE(QList); +Q_DECLARE_METATYPE(QList) QT_END_HEADER diff --git a/src/declarative/qml/qdeclarativeguard_p.h b/src/declarative/qml/qdeclarativeguard_p.h index be60ce4..02fed0b 100644 --- a/src/declarative/qml/qdeclarativeguard_p.h +++ b/src/declarative/qml/qdeclarativeguard_p.h @@ -97,7 +97,7 @@ private: QT_END_NAMESPACE -Q_DECLARE_METATYPE(QDeclarativeGuard); +Q_DECLARE_METATYPE(QDeclarativeGuard) #include "private/qdeclarativedata_p.h" diff --git a/src/declarative/qml/qdeclarativepropertycache.cpp b/src/declarative/qml/qdeclarativepropertycache.cpp index 888945b..26bddde 100644 --- a/src/declarative/qml/qdeclarativepropertycache.cpp +++ b/src/declarative/qml/qdeclarativepropertycache.cpp @@ -45,7 +45,7 @@ #include "private/qdeclarativebinding_p.h" #include -Q_DECLARE_METATYPE(QScriptValue); +Q_DECLARE_METATYPE(QScriptValue) QT_BEGIN_NAMESPACE diff --git a/src/declarative/qml/qdeclarativescriptstring.h b/src/declarative/qml/qdeclarativescriptstring.h index 43bef44..fc92a9b 100644 --- a/src/declarative/qml/qdeclarativescriptstring.h +++ b/src/declarative/qml/qdeclarativescriptstring.h @@ -79,7 +79,7 @@ private: QT_END_NAMESPACE -Q_DECLARE_METATYPE(QDeclarativeScriptString); +Q_DECLARE_METATYPE(QDeclarativeScriptString) QT_END_HEADER diff --git a/src/declarative/qml/qdeclarativestringconverters_p.h b/src/declarative/qml/qdeclarativestringconverters_p.h index 7afdfd3..97f72fc 100644 --- a/src/declarative/qml/qdeclarativestringconverters_p.h +++ b/src/declarative/qml/qdeclarativestringconverters_p.h @@ -80,7 +80,7 @@ namespace QDeclarativeStringConverters QSizeF Q_DECLARATIVE_EXPORT sizeFFromString(const QString &, bool *ok = 0); QRectF Q_DECLARATIVE_EXPORT rectFFromString(const QString &, bool *ok = 0); QVector3D Q_DECLARATIVE_EXPORT vector3DFromString(const QString &, bool *ok = 0); -}; +} QT_END_NAMESPACE diff --git a/src/declarative/qml/qdeclarativeworkerscript_p.h b/src/declarative/qml/qdeclarativeworkerscript_p.h index 6cce799..4019d13 100644 --- a/src/declarative/qml/qdeclarativeworkerscript_p.h +++ b/src/declarative/qml/qdeclarativeworkerscript_p.h @@ -119,7 +119,7 @@ private: QT_END_NAMESPACE -QML_DECLARE_TYPE(QDeclarativeWorkerScript); +QML_DECLARE_TYPE(QDeclarativeWorkerScript) QT_END_HEADER diff --git a/src/declarative/qml/qdeclarativexmlhttprequest.cpp b/src/declarative/qml/qdeclarativexmlhttprequest.cpp index b7e1832..e034165 100644 --- a/src/declarative/qml/qdeclarativexmlhttprequest.cpp +++ b/src/declarative/qml/qdeclarativexmlhttprequest.cpp @@ -318,9 +318,9 @@ public: QT_END_NAMESPACE -Q_DECLARE_METATYPE(Node); -Q_DECLARE_METATYPE(NodeList); -Q_DECLARE_METATYPE(NamedNodeMap); +Q_DECLARE_METATYPE(Node) +Q_DECLARE_METATYPE(NodeList) +Q_DECLARE_METATYPE(NamedNodeMap) QT_BEGIN_NAMESPACE diff --git a/src/declarative/util/qdeclarativelistmodelworkeragent_p.h b/src/declarative/util/qdeclarativelistmodelworkeragent_p.h index 53d30c2..1622144 100644 --- a/src/declarative/util/qdeclarativelistmodelworkeragent_p.h +++ b/src/declarative/util/qdeclarativelistmodelworkeragent_p.h @@ -146,7 +146,7 @@ private: QT_END_NAMESPACE -Q_DECLARE_METATYPE(QDeclarativeListModelWorkerAgent::VariantRef); +Q_DECLARE_METATYPE(QDeclarativeListModelWorkerAgent::VariantRef) QT_END_HEADER diff --git a/src/declarative/util/qdeclarativesmoothedanimation_p.h b/src/declarative/util/qdeclarativesmoothedanimation_p.h index 17aafa4..f45d19f 100644 --- a/src/declarative/util/qdeclarativesmoothedanimation_p.h +++ b/src/declarative/util/qdeclarativesmoothedanimation_p.h @@ -96,7 +96,7 @@ Q_SIGNALS: QT_END_NAMESPACE -QML_DECLARE_TYPE(QDeclarativeSmoothedAnimation); +QML_DECLARE_TYPE(QDeclarativeSmoothedAnimation) QT_END_HEADER diff --git a/src/declarative/util/qdeclarativesmoothedfollow_p.h b/src/declarative/util/qdeclarativesmoothedfollow_p.h index d860052..6319192 100644 --- a/src/declarative/util/qdeclarativesmoothedfollow_p.h +++ b/src/declarative/util/qdeclarativesmoothedfollow_p.h @@ -106,7 +106,7 @@ Q_SIGNALS: QT_END_NAMESPACE -QML_DECLARE_TYPE(QDeclarativeSmoothedFollow); +QML_DECLARE_TYPE(QDeclarativeSmoothedFollow) QT_END_HEADER diff --git a/src/declarative/util/qdeclarativetransitionmanager_p_p.h b/src/declarative/util/qdeclarativetransitionmanager_p_p.h index 4131391..2e23898 100644 --- a/src/declarative/util/qdeclarativetransitionmanager_p_p.h +++ b/src/declarative/util/qdeclarativetransitionmanager_p_p.h @@ -70,7 +70,7 @@ public: void cancel(); private: - Q_DISABLE_COPY(QDeclarativeTransitionManager); + Q_DISABLE_COPY(QDeclarativeTransitionManager) QDeclarativeTransitionManagerPrivate *d; void complete(); -- cgit v0.12 From 395e00552802024cb41335bc87675441ff119d3e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jo=C3=A3o=20Abecasis?= Date: Tue, 4 May 2010 18:43:42 +0200 Subject: Skip tst_LargeFile::mapOffsetOverflow on Mac On this platform mmap'ing beyond EOF may succeed, even beyond filesystem capabilities, but generate Bus Errors on access. Skipping this failing test and accepting the underlying undefined behavior is the right thing to do, until QFile offers proper guarantees. Reviewed-by: Thiago Macieira --- tests/auto/qfile/largefile/tst_largefile.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/tests/auto/qfile/largefile/tst_largefile.cpp b/tests/auto/qfile/largefile/tst_largefile.cpp index 041e5f2..60c5f89 100644 --- a/tests/auto/qfile/largefile/tst_largefile.cpp +++ b/tests/auto/qfile/largefile/tst_largefile.cpp @@ -523,6 +523,10 @@ void tst_LargeFile::mapFile() void tst_LargeFile::mapOffsetOverflow() { +#if defined(Q_OS_MAC) + QSKIP("mmap'ping beyond EOF may succeed; generate bus error on access", SkipAll); +#endif + // Out-of-range mappings should fail, and not silently clip the offset for (int i = 50; i < 63; ++i) { uchar *address = 0; -- cgit v0.12 From 36e6c652bc087a6adcef1fad9f899b787e67e9af Mon Sep 17 00:00:00 2001 From: Aaron McCarthy Date: Wed, 5 May 2010 10:06:52 +1000 Subject: Update changelog. --- dist/changes-4.7.0 | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/dist/changes-4.7.0 b/dist/changes-4.7.0 index 4fd7fdb..d156bd7 100644 --- a/dist/changes-4.7.0 +++ b/dist/changes-4.7.0 @@ -27,6 +27,13 @@ General Improvements - Support for the GL_EXT_geometry_shader4, aka Geometry Shaders, was added to QGLShaderProgram. +New features +------------ + + - QNetworkSession, QNetworkConfiguration, QNetworkConfigurationManager + * New bearer management classes added. + + Third party components ---------------------- -- cgit v0.12 From 3b3ec6bc4114db82462eef812a47db420d4505c2 Mon Sep 17 00:00:00 2001 From: Rhys Weatherley Date: Wed, 5 May 2010 10:19:40 +1000 Subject: Fix a crash with null objects returned from a Q_INVOKABLE Task-number: QTBUG-10412 Reviewed-by: Aaron Kennedy --- src/declarative/qml/qdeclarativeobjectscriptclass.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/declarative/qml/qdeclarativeobjectscriptclass.cpp b/src/declarative/qml/qdeclarativeobjectscriptclass.cpp index 03366f0..170f440 100644 --- a/src/declarative/qml/qdeclarativeobjectscriptclass.cpp +++ b/src/declarative/qml/qdeclarativeobjectscriptclass.cpp @@ -775,7 +775,8 @@ QScriptDeclarativeClass::Value MetaCallArgument::toValue(QDeclarativeEngine *e) return QScriptDeclarativeClass::Value(engine, *((QString *)&data)); } else if (type == QMetaType::QObjectStar) { QObject *object = *((QObject **)&data); - QDeclarativeData::get(object, true)->setImplicitDestructible(); + if (object) + QDeclarativeData::get(object, true)->setImplicitDestructible(); QDeclarativeEnginePrivate *priv = QDeclarativeEnginePrivate::get(e); return QScriptDeclarativeClass::Value(engine, priv->objectClass->newQObject(object)); } else if (type == qMetaTypeId >()) { -- cgit v0.12 From 4982b883c31874206aaa05268852fbcee81a8a39 Mon Sep 17 00:00:00 2001 From: Michael Brasser Date: Wed, 5 May 2010 11:49:20 +1000 Subject: Enable states to be activated via their 'when' clause even if unnamed. Autogenerate a name for unnamed states: "anonymousState1", etc. Task-number: QTBUG-10352 Reviewed-by: Aaron Kennedy --- src/declarative/util/qdeclarativestategroup.cpp | 10 +++++++++- .../qdeclarativestates/data/unnamedWhen.qml | 14 ++++++++++++++ .../qdeclarativestates/tst_qdeclarativestates.cpp | 20 ++++++++++++++++++++ 3 files changed, 43 insertions(+), 1 deletion(-) create mode 100644 tests/auto/declarative/qdeclarativestates/data/unnamedWhen.qml diff --git a/src/declarative/util/qdeclarativestategroup.cpp b/src/declarative/util/qdeclarativestategroup.cpp index 5b51495..9b042d7 100644 --- a/src/declarative/util/qdeclarativestategroup.cpp +++ b/src/declarative/util/qdeclarativestategroup.cpp @@ -47,6 +47,7 @@ #include #include +#include #include #include @@ -62,7 +63,7 @@ class QDeclarativeStateGroupPrivate : public QObjectPrivate public: QDeclarativeStateGroupPrivate() : nullState(0), componentComplete(true), - ignoreTrans(false), applyingState(false) {} + ignoreTrans(false), applyingState(false), unnamedCount(0) {} QString currentState; QDeclarativeState *nullState; @@ -78,6 +79,7 @@ public: bool componentComplete; bool ignoreTrans; bool applyingState; + int unnamedCount; QDeclarativeTransition *findTransition(const QString &from, const QString &to); void setCurrentStateInternal(const QString &state, bool = false); @@ -259,6 +261,12 @@ void QDeclarativeStateGroup::componentComplete() Q_D(QDeclarativeStateGroup); d->componentComplete = true; + for (int ii = 0; ii < d->states.count(); ++ii) { + QDeclarativeState *state = d->states.at(ii); + if (state->name().isEmpty()) + state->setName(QLatin1String("anonymousState") % QString::number(++d->unnamedCount)); + } + if (d->updateAutoState()) { return; } else if (!d->currentState.isEmpty()) { diff --git a/tests/auto/declarative/qdeclarativestates/data/unnamedWhen.qml b/tests/auto/declarative/qdeclarativestates/data/unnamedWhen.qml new file mode 100644 index 0000000..a70840c --- /dev/null +++ b/tests/auto/declarative/qdeclarativestates/data/unnamedWhen.qml @@ -0,0 +1,14 @@ +import Qt 4.7 + +Rectangle { + id: theRect + property bool triggerState: false + property string stateString: "" + states: State { + when: triggerState + PropertyChanges { + target: theRect + stateString: "inState" + } + } +} diff --git a/tests/auto/declarative/qdeclarativestates/tst_qdeclarativestates.cpp b/tests/auto/declarative/qdeclarativestates/tst_qdeclarativestates.cpp index d384d26..13992ad 100644 --- a/tests/auto/declarative/qdeclarativestates/tst_qdeclarativestates.cpp +++ b/tests/auto/declarative/qdeclarativestates/tst_qdeclarativestates.cpp @@ -110,6 +110,7 @@ private slots: void illegalObjectCreation(); void whenOrdering(); void urlResolution(); + void unnamedWhen(); }; void tst_qdeclarativestates::initTestCase() @@ -1049,6 +1050,25 @@ void tst_qdeclarativestates::urlResolution() QCOMPARE(image3->source(), resolved); } +void tst_qdeclarativestates::unnamedWhen() +{ + QDeclarativeEngine engine; + + QDeclarativeComponent c(&engine, SRCDIR "/data/unnamedWhen.qml"); + QDeclarativeRectangle *rect = qobject_cast(c.create()); + QVERIFY(rect != 0); + QDeclarativeItemPrivate *rectPrivate = QDeclarativeItemPrivate::get(rect); + + QCOMPARE(rectPrivate->state(), QLatin1String("")); + QCOMPARE(rect->property("stateString").toString(), QLatin1String("")); + rect->setProperty("triggerState", true); + QCOMPARE(rectPrivate->state(), QLatin1String("anonymousState1")); + QCOMPARE(rect->property("stateString").toString(), QLatin1String("inState")); + rect->setProperty("triggerState", false); + QCOMPARE(rectPrivate->state(), QLatin1String("")); + QCOMPARE(rect->property("stateString").toString(), QLatin1String("")); +} + QTEST_MAIN(tst_qdeclarativestates) #include "tst_qdeclarativestates.moc" -- cgit v0.12 From a5d15c36ae3db3caff4eeb86fd7eb5cdbb928f2d Mon Sep 17 00:00:00 2001 From: Warwick Allison Date: Wed, 5 May 2010 12:16:28 +1000 Subject: syntax update --- src/imports/gestures/qdeclarativegesturearea.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/imports/gestures/qdeclarativegesturearea.cpp b/src/imports/gestures/qdeclarativegesturearea.cpp index 615c674..19afe0c 100644 --- a/src/imports/gestures/qdeclarativegesturearea.cpp +++ b/src/imports/gestures/qdeclarativegesturearea.cpp @@ -259,7 +259,7 @@ bool QDeclarativeGestureAreaPrivate::gestureEvent(QGestureEvent *event) bool accept = true; for (Bindings::Iterator it = bindings.begin(); it != bindings.end(); ++it) { if ((gesture = event->gesture(it.key()))) { - it.value()->value(); + it.value()->evaluate(); event->setAccepted(true); // XXX only if value returns true? } } -- cgit v0.12 From 326dab74ba8df7707d1054ca5e0280c5f131c148 Mon Sep 17 00:00:00 2001 From: Aaron Kennedy Date: Wed, 5 May 2010 12:51:02 +1000 Subject: Null objects should appear as JS null --- src/declarative/qml/qdeclarativeobjectscriptclass.cpp | 3 ++- tests/auto/declarative/qdeclarativeecmascript/data/deletedObject.qml | 4 ++-- .../declarative/qdeclarativeecmascript/tst_qdeclarativeecmascript.cpp | 2 +- 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/src/declarative/qml/qdeclarativeobjectscriptclass.cpp b/src/declarative/qml/qdeclarativeobjectscriptclass.cpp index 170f440..8b64e0e 100644 --- a/src/declarative/qml/qdeclarativeobjectscriptclass.cpp +++ b/src/declarative/qml/qdeclarativeobjectscriptclass.cpp @@ -104,7 +104,8 @@ QScriptValue QDeclarativeObjectScriptClass::newQObject(QObject *object, int type QScriptEngine *scriptEngine = QDeclarativeEnginePrivate::getScriptEngine(engine); if (!object) - return newObject(scriptEngine, this, new ObjectData(object, type)); + return scriptEngine->nullValue(); +// return newObject(scriptEngine, this, new ObjectData(object, type)); if (QObjectPrivate::get(object)->wasDeleted) return scriptEngine->undefinedValue(); diff --git a/tests/auto/declarative/qdeclarativeecmascript/data/deletedObject.qml b/tests/auto/declarative/qdeclarativeecmascript/data/deletedObject.qml index 72b59ae..2337e44 100644 --- a/tests/auto/declarative/qdeclarativeecmascript/data/deletedObject.qml +++ b/tests/auto/declarative/qdeclarativeecmascript/data/deletedObject.qml @@ -19,7 +19,7 @@ QtObject { myObject.deleteOnSet = 1; - test3 = myObject.value == undefined; - test4 = obj.value == undefined; + test3 = myObject == null + test4 = obj == null } } diff --git a/tests/auto/declarative/qdeclarativeecmascript/tst_qdeclarativeecmascript.cpp b/tests/auto/declarative/qdeclarativeecmascript/tst_qdeclarativeecmascript.cpp index 6d39be2..8c9290f 100644 --- a/tests/auto/declarative/qdeclarativeecmascript/tst_qdeclarativeecmascript.cpp +++ b/tests/auto/declarative/qdeclarativeecmascript/tst_qdeclarativeecmascript.cpp @@ -1104,7 +1104,7 @@ void tst_qdeclarativeecmascript::exceptionClearsOnReeval() QDeclarativeComponent component(&engine, TEST_FILE("exceptionClearsOnReeval.qml")); QString url = component.url().toString(); - QString warning = url + ":4: TypeError: Result of expression 'objectProperty.objectProperty' [undefined] is not an object."; + QString warning = url + ":4: TypeError: Result of expression 'objectProperty' [null] is not an object."; QTest::ignoreMessage(QtWarningMsg, warning.toLatin1().constData()); MyQmlObject *object = qobject_cast(component.create()); -- cgit v0.12 From dcee637a9f7a024803f0e5cc1bf57d878dca2ac3 Mon Sep 17 00:00:00 2001 From: Bea Lam Date: Wed, 5 May 2010 09:50:53 +1000 Subject: Doc improvements, simplify example code --- doc/src/declarative/advtutorial.qdoc | 50 +++++++++++++++---- doc/src/declarative/tutorial.qdoc | 15 +++--- .../declarative/tutorials/helloworld/tutorial1.qml | 3 +- .../declarative/tutorials/helloworld/tutorial2.qml | 3 +- .../declarative/tutorials/helloworld/tutorial3.qml | 3 +- .../tutorials/samegame/samegame1/Block.qml | 2 +- .../tutorials/samegame/samegame1/Button.qml | 17 +++++-- .../tutorials/samegame/samegame1/samegame.qml | 7 ++- .../tutorials/samegame/samegame2/Block.qml | 2 +- .../tutorials/samegame/samegame2/Button.qml | 17 +++++-- .../tutorials/samegame/samegame2/samegame.qml | 5 +- .../tutorials/samegame/samegame3/Button.qml | 17 +++++-- .../tutorials/samegame/samegame3/Dialog.qml | 33 ++++++------- .../tutorials/samegame/samegame3/samegame.js | 9 ++-- .../tutorials/samegame/samegame3/samegame.qml | 14 +++--- .../samegame/samegame4/content/Button.qml | 17 +++++-- .../samegame/samegame4/content/Dialog.qml | 57 ++++++++++++++++------ .../samegame/samegame4/content/samegame.js | 17 ++++--- .../tutorials/samegame/samegame4/samegame.qml | 38 +++++---------- 19 files changed, 208 insertions(+), 118 deletions(-) diff --git a/doc/src/declarative/advtutorial.qdoc b/doc/src/declarative/advtutorial.qdoc index 42ce246..7d2967e 100644 --- a/doc/src/declarative/advtutorial.qdoc +++ b/doc/src/declarative/advtutorial.qdoc @@ -109,12 +109,16 @@ Notice the anchors for the \c Item, \c Button and \c Text elements are set using \section2 Adding \c Button and \c Block components -The \c Button item in the code above is defined in a separate file named \c Button.qml. +The \c Button item in the code above is defined in a separate component file named \c Button.qml. To create a functional button, we use the QML elements \l Text and \l MouseArea inside a \l Rectangle. Here is the \c Button.qml code: \snippet declarative/tutorials/samegame/samegame1/Button.qml 0 +This essentially defines a rectangle that contains text and can be clicked. The \l MouseArea +has an \c onClicked() handler that is implemented to emit the \c clicked() signal of the +\c container when the area is clicked. + In Same Game, the screen is filled with small blocks when the game begins. Each block is just an item that contains an image. The block code is defined in a separate \c Block.qml file: @@ -226,14 +230,14 @@ until it is won or lost. To do this, we have added the following functions to \c samegame.js: \list -\o function \c{handleClick(x,y)} -\o function \c{floodFill(xIdx,yIdx,type)} -\o function \c{shuffleDown()} -\o function \c{victoryCheck()} -\o function \c{floodMoveCheck(xIdx, yIdx, type)} +\o \c{handleClick(x,y)} +\o \c{floodFill(xIdx,yIdx,type)} +\o \c{shuffleDown()} +\o \c{victoryCheck()} +\o \c{floodMoveCheck(xIdx, yIdx, type)} \endlist -As this is a tutorial about QML, not game design, we will only discuss \c handleClick() and \c victoryCheck() below since they interface directly with the QML elements. Note that although the game logic here is written in JavaScript, it could have been written in C++ and then exposed to JavaScript. +As this is a tutorial about QML, not game design, we will only discuss \c handleClick() and \c victoryCheck() below since they interface directly with the QML elements. Note that although the game logic here is written in JavaScript, it could have been written in C++ and then exposed to QML. \section3 Enabling mouse click interaction @@ -269,6 +273,8 @@ And this is how it is used in the main \c samegame.qml file: \snippet declarative/tutorials/samegame/samegame3/samegame.qml 2 +We give the dialog a \l {Item::z}{z} value of 100 to ensure it is displayed on top of our other components. The default \c z value for an item is 0. + \section3 A dash of color @@ -383,15 +389,41 @@ The theme change here is produced simply by replacing the block images. This can Another feature we might want to add to the game is a method of storing and retrieving high scores. -In \c samegame.qml we now pop up a dialog when the game is over and requests the player's name so it can be added to a High Scores table. The dialog is created using \c Dialog.qml: +To do this, we will show a dialog when the game is over to request the player's name and add it to a High Scores table. +This requires a few changes to \c Dialog.qml. In addition to a \c Text element, it now has a +\c TextInput child item for receiving keyboard text input: + +\snippet declarative/tutorials/samegame/samegame4/content/Dialog.qml 0 +\dots 4 +\snippet declarative/tutorials/samegame/samegame4/content/Dialog.qml 2 +\dots 4 +\snippet declarative/tutorials/samegame/samegame4/content/Dialog.qml 3 + +We'll also add a \c showWithInput() function. The text input will only be visible if this function +is called instead of \c show(). When the dialog is closed, it emits a \c closed() signal, and +other elements can retrieve the text entered by the user through an \c inputText property: + +\snippet declarative/tutorials/samegame/samegame4/content/Dialog.qml 0 +\snippet declarative/tutorials/samegame/samegame4/content/Dialog.qml 1 +\dots 4 +\snippet declarative/tutorials/samegame/samegame4/content/Dialog.qml 3 + +Now the dialog can be used in \c samegame.qml: \snippet declarative/tutorials/samegame/samegame4/samegame.qml 0 -When the dialog is closed, we call the new \c saveHighScore() function in \c samegame.js, which stores the high score locally in an SQL database and also send the score to an online database if possible. +When the dialog emits the \c closed signal, we call the new \c saveHighScore() function in \c samegame.js, which stores the high score locally in an SQL database and also send the score to an online database if possible. +The \c nameInputDialog is activated in the \c victoryCheck() function in \c samegame.js: + +\snippet declarative/tutorials/samegame/samegame4/content/samegame.js 3 +\dots 4 +\snippet declarative/tutorials/samegame/samegame4/content/samegame.js 4 \section3 Storing high scores offline +Now we need to implement the functionality to actually save the High Scores table. + Here is the \c saveHighScore() function in \c samegame.js: \snippet declarative/tutorials/samegame/samegame4/content/samegame.js 2 diff --git a/doc/src/declarative/tutorial.qdoc b/doc/src/declarative/tutorial.qdoc index 1a93d05..4cfb999 100644 --- a/doc/src/declarative/tutorial.qdoc +++ b/doc/src/declarative/tutorial.qdoc @@ -86,7 +86,7 @@ Here is the QML code for the application: \section2 Import First, we need to import the types that we need for this example. Most QML files will import the built-in QML -types (like \l{Rectangle}, \l{Image}, ...) that come with Qt with: +types (like \l{Rectangle}, \l{Image}, ...) that come with Qt, using: \snippet examples/declarative/tutorials/helloworld/tutorial1.qml 3 @@ -95,7 +95,7 @@ types (like \l{Rectangle}, \l{Image}, ...) that come with Qt with: \snippet examples/declarative/tutorials/helloworld/tutorial1.qml 1 We declare a root element of type \l{Rectangle}. It is one of the basic building blocks you can use to create an application in QML. -We give it an \c{id} to be able to refer to it later. In this case, we call it \e page. +We give it an \c{id} to be able to refer to it later. In this case, we call it "page". We also set the \c width, \c height and \c color properties. The \l{Rectangle} element contains many other properties (such as \c x and \c y), but these are left at their default values. @@ -103,15 +103,16 @@ The \l{Rectangle} element contains many other properties (such as \c x and \c y) \snippet examples/declarative/tutorials/helloworld/tutorial1.qml 2 -We add a \l Text element as a child of our root element that will display the text 'Hello world!'. +We add a \l Text element as a child of the root Rectangle element that displays the text 'Hello world!'. The \c y property is used to position the text vertically at 30 pixels from the top of its parent. -The \c font.pointSize and \c font.bold properties are related to fonts and use the \l{dot properties}{dot notation}. - The \c anchors.horizontalCenter property refers to the horizontal center of an element. In this case, we specify that our text element should be horizontally centered in the \e page element (see \l{anchor-layout}{Anchor-based Layout}). +The \c font.pointSize and \c font.bold properties are related to fonts and use the \l{dot properties}{dot notation}. + + \section2 Viewing the example To view what you have created, run the \l{Qt Declarative UI Runtime}{qml} tool (located in the \c bin directory) with your filename as the first argument. @@ -134,10 +135,10 @@ This chapter adds a color picker to change the color of the text. \image declarative-tutorial2.png Our color picker is made of six cells with different colors. -To avoid writing the same code multiple times, we first create a new \c Cell component. +To avoid writing the same code multiple times for each cell, we create a new \c Cell component. A component provides a way of defining a new type that we can re-use in other QML files. A QML component is like a black-box and interacts with the outside world through properties, signals and slots and is generally -defined in its own QML file (for more details, see \l {Defining new Components}). +defined in its own QML file. (For more details, see \l {Defining new Components}). The component's filename must always start with a capital letter. Here is the QML code for \c Cell.qml: diff --git a/examples/declarative/tutorials/helloworld/tutorial1.qml b/examples/declarative/tutorials/helloworld/tutorial1.qml index 5e27b45..04cd155 100644 --- a/examples/declarative/tutorials/helloworld/tutorial1.qml +++ b/examples/declarative/tutorials/helloworld/tutorial1.qml @@ -14,8 +14,9 @@ Rectangle { Text { id: helloText text: "Hello world!" + y: 30 + anchors.horizontalCenter: page.horizontalCenter font.pointSize: 24; font.bold: true - y: 30; anchors.horizontalCenter: page.horizontalCenter } //![2] } diff --git a/examples/declarative/tutorials/helloworld/tutorial2.qml b/examples/declarative/tutorials/helloworld/tutorial2.qml index 085efa4..66be509 100644 --- a/examples/declarative/tutorials/helloworld/tutorial2.qml +++ b/examples/declarative/tutorials/helloworld/tutorial2.qml @@ -9,8 +9,9 @@ Rectangle { Text { id: helloText text: "Hello world!" + y: 30 + anchors.horizontalCenter: page.horizontalCenter font.pointSize: 24; font.bold: true - y: 30; anchors.horizontalCenter: page.horizontalCenter } Grid { diff --git a/examples/declarative/tutorials/helloworld/tutorial3.qml b/examples/declarative/tutorials/helloworld/tutorial3.qml index 4bf4970..041d9a9 100644 --- a/examples/declarative/tutorials/helloworld/tutorial3.qml +++ b/examples/declarative/tutorials/helloworld/tutorial3.qml @@ -9,8 +9,9 @@ Rectangle { Text { id: helloText text: "Hello world!" + y: 30 + anchors.horizontalCenter: page.horizontalCenter font.pointSize: 24; font.bold: true - y: 30; anchors.horizontalCenter: page.horizontalCenter //![1] MouseArea { id: mouseArea; anchors.fill: parent } diff --git a/examples/declarative/tutorials/samegame/samegame1/Block.qml b/examples/declarative/tutorials/samegame/samegame1/Block.qml index a23654b..11fd844 100644 --- a/examples/declarative/tutorials/samegame/samegame1/Block.qml +++ b/examples/declarative/tutorials/samegame/samegame1/Block.qml @@ -7,7 +7,7 @@ Item { Image { id: img anchors.fill: parent - source: "../shared/pics/redStone.png"; + source: "../shared/pics/redStone.png" } } //![0] diff --git a/examples/declarative/tutorials/samegame/samegame1/Button.qml b/examples/declarative/tutorials/samegame/samegame1/Button.qml index e84b1ce..96a80eb 100644 --- a/examples/declarative/tutorials/samegame/samegame1/Button.qml +++ b/examples/declarative/tutorials/samegame/samegame1/Button.qml @@ -8,9 +8,9 @@ Rectangle { signal clicked - width: buttonLabel.width + 20; height: buttonLabel.height + 6 - smooth: true + width: buttonLabel.width + 20; height: buttonLabel.height + 5 border { width: 1; color: Qt.darker(activePalette.button) } + smooth: true radius: 8 // color the button with a gradient @@ -27,8 +27,17 @@ Rectangle { GradientStop { position: 1.0; color: activePalette.button } } - MouseArea { id: mouseArea; anchors.fill: parent; onClicked: container.clicked() } + MouseArea { + id: mouseArea + anchors.fill: parent + onClicked: container.clicked(); + } - Text { id: buttonLabel; text: container.text; anchors.centerIn: container; color: activePalette.buttonText } + Text { + id: buttonLabel + anchors.centerIn: container + color: activePalette.buttonText + text: container.text + } } //![0] diff --git a/examples/declarative/tutorials/samegame/samegame1/samegame.qml b/examples/declarative/tutorials/samegame/samegame1/samegame.qml index b6e01fd..f2974be 100644 --- a/examples/declarative/tutorials/samegame/samegame1/samegame.qml +++ b/examples/declarative/tutorials/samegame/samegame1/samegame.qml @@ -22,21 +22,20 @@ Rectangle { Rectangle { id: toolBar - width: parent.width; height: 32 + width: parent.width; height: 30 color: activePalette.window anchors.bottom: screen.bottom Button { - anchors { left: parent.left; leftMargin: 3; verticalCenter: parent.verticalCenter } + anchors { left: parent.left; verticalCenter: parent.verticalCenter } text: "New Game" onClicked: console.log("This doesn't do anything yet...") } Text { id: score - anchors { right: parent.right; rightMargin: 3; verticalCenter: parent.verticalCenter } + anchors { right: parent.right; verticalCenter: parent.verticalCenter } text: "Score: Who knows?" - font.bold: true } } } diff --git a/examples/declarative/tutorials/samegame/samegame2/Block.qml b/examples/declarative/tutorials/samegame/samegame2/Block.qml index 4e71e60..39da84e 100644 --- a/examples/declarative/tutorials/samegame/samegame2/Block.qml +++ b/examples/declarative/tutorials/samegame/samegame2/Block.qml @@ -6,6 +6,6 @@ Item { Image { id: img anchors.fill: parent - source: "../shared/pics/redStone.png"; + source: "../shared/pics/redStone.png" } } diff --git a/examples/declarative/tutorials/samegame/samegame2/Button.qml b/examples/declarative/tutorials/samegame/samegame2/Button.qml index 737d886..4ed856b 100644 --- a/examples/declarative/tutorials/samegame/samegame2/Button.qml +++ b/examples/declarative/tutorials/samegame/samegame2/Button.qml @@ -7,9 +7,9 @@ Rectangle { signal clicked - width: buttonLabel.width + 20; height: buttonLabel.height + 6 - smooth: true + width: buttonLabel.width + 20; height: buttonLabel.height + 5 border { width: 1; color: Qt.darker(activePalette.button) } + smooth: true radius: 8 // color the button with a gradient @@ -26,7 +26,16 @@ Rectangle { GradientStop { position: 1.0; color: activePalette.button } } - MouseArea { id: mouseArea; anchors.fill: parent; onClicked: container.clicked() } + MouseArea { + id: mouseArea + anchors.fill: parent + onClicked: container.clicked(); + } - Text { id: buttonLabel; text: container.text; anchors.centerIn: container; color: activePalette.buttonText } + Text { + id: buttonLabel + anchors.centerIn: container + color: activePalette.buttonText + text: container.text + } } diff --git a/examples/declarative/tutorials/samegame/samegame2/samegame.qml b/examples/declarative/tutorials/samegame/samegame2/samegame.qml index a7d1fba..9b4d4d5 100644 --- a/examples/declarative/tutorials/samegame/samegame2/samegame.qml +++ b/examples/declarative/tutorials/samegame/samegame2/samegame.qml @@ -30,7 +30,7 @@ Rectangle { //![1] Button { - anchors { left: parent.left; leftMargin: 3; verticalCenter: parent.verticalCenter } + anchors { left: parent.left; verticalCenter: parent.verticalCenter } text: "New Game" onClicked: SameGame.startNewGame() } @@ -38,9 +38,8 @@ Rectangle { Text { id: score - anchors { right: parent.right; rightMargin: 3; verticalCenter: parent.verticalCenter } + anchors { right: parent.right; verticalCenter: parent.verticalCenter } text: "Score: Who knows?" - font.bold: true } } } diff --git a/examples/declarative/tutorials/samegame/samegame3/Button.qml b/examples/declarative/tutorials/samegame/samegame3/Button.qml index 737d886..4ed856b 100644 --- a/examples/declarative/tutorials/samegame/samegame3/Button.qml +++ b/examples/declarative/tutorials/samegame/samegame3/Button.qml @@ -7,9 +7,9 @@ Rectangle { signal clicked - width: buttonLabel.width + 20; height: buttonLabel.height + 6 - smooth: true + width: buttonLabel.width + 20; height: buttonLabel.height + 5 border { width: 1; color: Qt.darker(activePalette.button) } + smooth: true radius: 8 // color the button with a gradient @@ -26,7 +26,16 @@ Rectangle { GradientStop { position: 1.0; color: activePalette.button } } - MouseArea { id: mouseArea; anchors.fill: parent; onClicked: container.clicked() } + MouseArea { + id: mouseArea + anchors.fill: parent + onClicked: container.clicked(); + } - Text { id: buttonLabel; text: container.text; anchors.centerIn: container; color: activePalette.buttonText } + Text { + id: buttonLabel + anchors.centerIn: container + color: activePalette.buttonText + text: container.text + } } diff --git a/examples/declarative/tutorials/samegame/samegame3/Dialog.qml b/examples/declarative/tutorials/samegame/samegame3/Dialog.qml index 15b3b2f..3efed2f 100644 --- a/examples/declarative/tutorials/samegame/samegame3/Dialog.qml +++ b/examples/declarative/tutorials/samegame/samegame3/Dialog.qml @@ -2,31 +2,30 @@ import Qt 4.7 Rectangle { - id: page + id: container - signal closed - - function forceClose() { - page.closed(); - page.opacity = 0; + function show(text) { + dialogText.text = text; + container.opacity = 1; } - function show(txt) { - dialogText.text = txt; - page.opacity = 1; + function hide() { + container.opacity = 0; } - width: dialogText.width + 20; height: dialogText.height + 20 - color: "white" - border.width: 1 + width: dialogText.width + 20 + height: dialogText.height + 20 opacity: 0 - Behavior on opacity { - NumberAnimation { duration: 1000 } + Text { + id: dialogText + anchors.centerIn: parent + text: "" } - Text { id: dialogText; anchors.centerIn: parent; text: "Hello World!" } - - MouseArea { anchors.fill: parent; onClicked: forceClose(); } + MouseArea { + anchors.fill: parent + onClicked: hide(); + } } //![0] diff --git a/examples/declarative/tutorials/samegame/samegame3/samegame.js b/examples/declarative/tutorials/samegame/samegame3/samegame.js index 4256aee..84439fc 100644 --- a/examples/declarative/tutorials/samegame/samegame3/samegame.js +++ b/examples/declarative/tutorials/samegame/samegame3/samegame.js @@ -17,7 +17,7 @@ function startNewGame() { maxIndex = maxRow * maxColumn; //Close dialogs - dialog.forceClose(); + dialog.hide(); //Initialize Board board = new Array(maxIndex); @@ -59,10 +59,9 @@ function createBlock(column, row) { return true; } -var fillFound; -//Set after a floodFill call to the number of blocks found -var floodBoard; -//Set to 1 if the floodFill reaches off that node +var fillFound; //Set after a floodFill call to the number of blocks found +var floodBoard; //Set to 1 if the floodFill reaches off that node + //![1] function handleClick(xPos, yPos) { var column = Math.floor(xPos / gameCanvas.blockSize); diff --git a/examples/declarative/tutorials/samegame/samegame3/samegame.qml b/examples/declarative/tutorials/samegame/samegame3/samegame.qml index 50f9d5d..ac93eb1 100644 --- a/examples/declarative/tutorials/samegame/samegame3/samegame.qml +++ b/examples/declarative/tutorials/samegame/samegame3/samegame.qml @@ -30,7 +30,6 @@ Rectangle { width: parent.width - (parent.width % blockSize) height: parent.height - (parent.height % blockSize) anchors.centerIn: parent - z: 20 MouseArea { anchors.fill: parent @@ -41,26 +40,29 @@ Rectangle { } //![2] - Dialog { id: dialog; anchors.centerIn: parent; z: 21 } + Dialog { + id: dialog + anchors.centerIn: parent + z: 100 + } //![2] Rectangle { id: toolBar - width: parent.width; height: 32 + width: parent.width; height: 30 color: activePalette.window anchors.bottom: screen.bottom Button { - anchors { left: parent.left; leftMargin: 3; verticalCenter: parent.verticalCenter } + anchors { left: parent.left; verticalCenter: parent.verticalCenter } text: "New Game" onClicked: SameGame.startNewGame() } Text { id: score - anchors { right: parent.right; rightMargin: 3; verticalCenter: parent.verticalCenter } + anchors { right: parent.right; verticalCenter: parent.verticalCenter } text: "Score: Who knows?" - font.bold: true } } } diff --git a/examples/declarative/tutorials/samegame/samegame4/content/Button.qml b/examples/declarative/tutorials/samegame/samegame4/content/Button.qml index 737d886..4ed856b 100644 --- a/examples/declarative/tutorials/samegame/samegame4/content/Button.qml +++ b/examples/declarative/tutorials/samegame/samegame4/content/Button.qml @@ -7,9 +7,9 @@ Rectangle { signal clicked - width: buttonLabel.width + 20; height: buttonLabel.height + 6 - smooth: true + width: buttonLabel.width + 20; height: buttonLabel.height + 5 border { width: 1; color: Qt.darker(activePalette.button) } + smooth: true radius: 8 // color the button with a gradient @@ -26,7 +26,16 @@ Rectangle { GradientStop { position: 1.0; color: activePalette.button } } - MouseArea { id: mouseArea; anchors.fill: parent; onClicked: container.clicked() } + MouseArea { + id: mouseArea + anchors.fill: parent + onClicked: container.clicked(); + } - Text { id: buttonLabel; text: container.text; anchors.centerIn: container; color: activePalette.buttonText } + Text { + id: buttonLabel + anchors.centerIn: container + color: activePalette.buttonText + text: container.text + } } diff --git a/examples/declarative/tutorials/samegame/samegame4/content/Dialog.qml b/examples/declarative/tutorials/samegame/samegame4/content/Dialog.qml index 6848534..2f45362 100644 --- a/examples/declarative/tutorials/samegame/samegame4/content/Dialog.qml +++ b/examples/declarative/tutorials/samegame/samegame4/content/Dialog.qml @@ -1,30 +1,59 @@ import Qt 4.7 +//![0] Rectangle { - id: page + id: container +//![0] +//![1] + property string inputText: textInput.text signal closed - function forceClose() { - page.closed(); - page.opacity = 0; + function show(text) { + dialogText.text = text; + container.opacity = 1; + textInput.opacity = 0; } - function show(txt) { - dialogText.text = txt; - page.opacity = 1; + function showWithInput(text) { + show(text); + textInput.opacity = 1; + textInput.text = "" } - width: dialogText.width + 20; height: dialogText.height + 20 - color: "white" - border.width: 1 + function hide() { + container.opacity = 0; + container.closed(); + } +//![1] + + width: dialogText.width + textInput.width + 20 + height: dialogText.height + 20 opacity: 0 - Behavior on opacity { - NumberAnimation { duration: 1000 } + Text { + id: dialogText + anchors { verticalCenter: parent.verticalCenter; left: parent.left; leftMargin: 10 } + text: "" + } + +//![2] + TextInput { + id: textInput + anchors { verticalCenter: parent.verticalCenter; left: dialogText.right } + width: 80 + focus: true + text: "" + + onAccepted: container.hide() // close dialog when Enter is pressed } +//![2] - Text { id: dialogText; anchors.centerIn: parent; text: "Hello World!" } + MouseArea { + anchors.fill: parent + onClicked: hide(); + } - MouseArea { anchors.fill: parent; onClicked: forceClose(); } +//![3] } +//![3] diff --git a/examples/declarative/tutorials/samegame/samegame4/content/samegame.js b/examples/declarative/tutorials/samegame/samegame4/content/samegame.js index 961cd66..06d21e6 100755 --- a/examples/declarative/tutorials/samegame/samegame4/content/samegame.js +++ b/examples/declarative/tutorials/samegame/samegame4/content/samegame.js @@ -25,8 +25,8 @@ function startNewGame() { maxIndex = maxRow * maxColumn; //Close dialogs - nameInputDialog.forceClose(); - dialog.forceClose(); + nameInputDialog.hide(); + dialog.hide(); //Initialize Board board = new Array(maxIndex); @@ -72,10 +72,9 @@ function createBlock(column, row) { return true; } -var fillFound; -//Set after a floodFill call to the number of blocks found -var floodBoard; -//Set to 1 if the floodFill reaches off that node +var fillFound; //Set after a floodFill call to the number of blocks found +var floodBoard; //Set to 1 if the floodFill reaches off that node + function handleClick(xPos, yPos) { var column = Math.floor(xPos / gameCanvas.blockSize); var row = Math.floor(yPos / gameCanvas.blockSize); @@ -157,7 +156,9 @@ function shuffleDown() { } } +//![3] function victoryCheck() { +//![3] //Award bonus points if no blocks left var deservesBonus = true; for (var column = maxColumn - 1; column >= 0; column--) @@ -166,12 +167,14 @@ function victoryCheck() { if (deservesBonus) gameCanvas.score += 500; +//![4] //Check whether game has finished if (deservesBonus || !(floodMoveCheck(0, maxRow - 1, -1))) { gameDuration = new Date() - gameDuration; - nameInputDialog.show("You won! Please enter your name: "); + nameInputDialog.showWithInput("You won! Please enter your name: "); } } +//![4] //only floods up and right, to see if it can find adjacent same-typed blocks function floodMoveCheck(column, row, type) { diff --git a/examples/declarative/tutorials/samegame/samegame4/samegame.qml b/examples/declarative/tutorials/samegame/samegame4/samegame.qml index 404af0a..feb61fd 100644 --- a/examples/declarative/tutorials/samegame/samegame4/samegame.qml +++ b/examples/declarative/tutorials/samegame/samegame4/samegame.qml @@ -25,7 +25,7 @@ Rectangle { property int score: 0 property int blockSize: 40 - z: 20; anchors.centerIn: parent + anchors.centerIn: parent width: parent.width - (parent.width % blockSize); height: parent.height - (parent.height % blockSize); @@ -35,53 +35,41 @@ Rectangle { } } - Dialog { id: dialog; anchors.centerIn: parent; z: 21 } + Dialog { + id: dialog + anchors.centerIn: parent + z: 100 + } //![0] Dialog { id: nameInputDialog - anchors.centerIn: parent - z: 22 + z: 100 - Text { - id: dialogText - opacity: 0 - text: " You won! Please enter your name:" - } - - TextInput { - id: nameInput - width: 72 - anchors { verticalCenter: parent.verticalCenter; left: dialogText.right } - focus: true - - onAccepted: { - if (nameInputDialog.opacity == 1 && nameInput.text != "") - SameGame.saveHighScore(nameInput.text); - nameInputDialog.forceClose(); - } + onClosed: { + if (nameInputDialog.inputText != "") + SameGame.saveHighScore(nameInputDialog.inputText); } } //![0] Rectangle { id: toolBar - width: parent.width; height: 32 + width: parent.width; height: 30 color: activePalette.window anchors.bottom: screen.bottom Button { - anchors { left: parent.left; leftMargin: 3; verticalCenter: parent.verticalCenter } + anchors { left: parent.left; verticalCenter: parent.verticalCenter } text: "New Game" onClicked: SameGame.startNewGame() } Text { id: score - anchors { right: parent.right; rightMargin: 3; verticalCenter: parent.verticalCenter } + anchors { right: parent.right; verticalCenter: parent.verticalCenter } text: "Score: " + gameCanvas.score - font.bold: true } } } -- cgit v0.12 From c76d98da76fd687d2953f0026b16bca3c7fcf485 Mon Sep 17 00:00:00 2001 From: Warwick Allison Date: Wed, 5 May 2010 13:24:25 +1000 Subject: Allow translations without extra command-line args, and document both. --- doc/src/declarative/qmlruntime.qdoc | 17 +++++++++ tools/qml/qmlruntime.cpp | 72 +++++++++++++++++++++++-------------- tools/qml/qmlruntime.h | 6 ++++ 3 files changed, 68 insertions(+), 27 deletions(-) diff --git a/doc/src/declarative/qmlruntime.qdoc b/doc/src/declarative/qmlruntime.qdoc index a724c7d..23c5c32 100644 --- a/doc/src/declarative/qmlruntime.qdoc +++ b/doc/src/declarative/qmlruntime.qdoc @@ -112,6 +112,23 @@ When run with the \c -help option, qml shows available options. + \section2 Translations + + When the runtime loads an initial QML file, it will install a translation file from + a "i18n" subdirectory relative to that initial QML file. The actual translation file + loaded will be according to the system locale and have the form + "qml_.qm", where is a two-letter ISO 639 language, + such as "qml_fr.qm", optionally followed by an underscore and an uppercase two-letter ISO 3166 country + code, such as "qml_fr_FR.qm" or "qml_fr_CA.qm". + + Such files can be created using \l{Qt Linguist}. + + See \l{scripting.html#internationalization} for information about how to make + the JavaScript in QML files use translatable strings. + + Additionally, the QML runtime will load translation files specified on the + command line via the \c -translation option. + \section2 Dummy Data The secondary use of the qml runtime is to allow QML files to be viewed with diff --git a/tools/qml/qmlruntime.cpp b/tools/qml/qmlruntime.cpp index 008f163..da31284 100644 --- a/tools/qml/qmlruntime.cpp +++ b/tools/qml/qmlruntime.cpp @@ -66,6 +66,7 @@ #include #include #include +#include #include #include #include @@ -464,6 +465,7 @@ QDeclarativeViewer::QDeclarativeViewer(QWidget *parent, Qt::WindowFlags flags) , frame_stream(0), scaleSkin(true), mb(0) , portraitOrientation(0), landscapeOrientation(0) , m_scriptOptions(0), tester(0), useQmlFileBrowser(true) + , translator(0) { QDeclarativeViewer::registerTypes(); setWindowTitle(tr("Qt Qml Runtime")); @@ -937,6 +939,46 @@ void QDeclarativeViewer::launch(const QString& file_or_url) QMetaObject::invokeMethod(this, "open", Qt::QueuedConnection, Q_ARG(QString, file_or_url)); } +void QDeclarativeViewer::loadTranslationFile(const QString& directory) +{ + if (!translator) { + translator = new QTranslator(this); + QApplication::installTranslator(translator); + } + + translator->load(QLatin1String("qml_" )+QLocale::system().name(), directory + QLatin1String("/i18n")); +} + +void QDeclarativeViewer::loadDummyDataFiles(const QString& directory) +{ + QDir dir(directory+"/dummydata", "*.qml"); + QStringList list = dir.entryList(); + for (int i = 0; i < list.size(); ++i) { + QString qml = list.at(i); + QFile f(dir.filePath(qml)); + f.open(QIODevice::ReadOnly); + QByteArray data = f.readAll(); + QDeclarativeComponent comp(canvas->engine()); + comp.setData(data, QUrl()); + QObject *dummyData = comp.create(); + + if(comp.isError()) { + QList errors = comp.errors(); + foreach (const QDeclarativeError &error, errors) { + qWarning() << error; + } + if (tester) tester->executefailure(); + } + + if (dummyData) { + qWarning() << "Loaded dummy data:" << dir.filePath(qml); + qml.truncate(qml.length()-4); + canvas->rootContext()->setContextProperty(qml, dummyData); + dummyData->setParent(this); + } + } +} + bool QDeclarativeViewer::open(const QString& file_or_url) { currentFileOrUrl = file_or_url; @@ -966,39 +1008,15 @@ bool QDeclarativeViewer::open(const QString& file_or_url) QString fileName = url.toLocalFile(); if (!fileName.isEmpty()) { - QFileInfo fi(fileName); if (fi.exists()) { if (fi.suffix().toLower() != QLatin1String("qml")) { qWarning() << "qml cannot open non-QML file" << fileName; return false; } - QDir dir(fi.path()+"/dummydata", "*.qml"); - QStringList list = dir.entryList(); - for (int i = 0; i < list.size(); ++i) { - QString qml = list.at(i); - QFile f(dir.filePath(qml)); - f.open(QIODevice::ReadOnly); - QByteArray data = f.readAll(); - QDeclarativeComponent comp(canvas->engine()); - comp.setData(data, QUrl()); - QObject *dummyData = comp.create(); - - if(comp.isError()) { - QList errors = comp.errors(); - foreach (const QDeclarativeError &error, errors) { - qWarning() << error; - } - if (tester) tester->executefailure(); - } - - if (dummyData) { - qWarning() << "Loaded dummy data:" << dir.filePath(qml); - qml.truncate(qml.length()-4); - ctxt->setContextProperty(qml, dummyData); - dummyData->setParent(this); - } - } + QFileInfo fi(fileName); + loadTranslationFile(fi.path()); + loadDummyDataFiles(fi.path()); } else { qWarning() << "qml cannot find file:" << fileName; return false; diff --git a/tools/qml/qmlruntime.h b/tools/qml/qmlruntime.h index 2a0a07d..0b23303 100644 --- a/tools/qml/qmlruntime.h +++ b/tools/qml/qmlruntime.h @@ -59,6 +59,7 @@ class QDeclarativeTester; class QNetworkReply; class QNetworkCookieJar; class NetworkAccessManagerFactory; +class QTranslator; class QDeclarativeViewer #if defined(Q_OS_SYMBIAN) @@ -192,6 +193,11 @@ private: NetworkAccessManagerFactory *namFactory; bool useQmlFileBrowser; + + QTranslator *translator; + void loadTranslationFile(const QString& directory); + + void loadDummyDataFiles(const QString& directory); }; Q_DECLARE_OPERATORS_FOR_FLAGS(QDeclarativeViewer::ScriptOptions) -- cgit v0.12 From 9719866c686805d69b0026f555c97594e09c836f Mon Sep 17 00:00:00 2001 From: Warwick Allison Date: Wed, 5 May 2010 13:35:11 +1000 Subject: Example i18n. --- examples/declarative/i18n/i18n.qml | 33 ++++++++++++++++++++++++++++ examples/declarative/i18n/i18n/base.ts | 12 ++++++++++ examples/declarative/i18n/i18n/qml_en_AU.qm | Bin 0 -> 81 bytes examples/declarative/i18n/i18n/qml_en_AU.ts | 12 ++++++++++ examples/declarative/i18n/i18n/qml_fr.qm | Bin 0 -> 85 bytes examples/declarative/i18n/i18n/qml_fr.ts | 12 ++++++++++ 6 files changed, 69 insertions(+) create mode 100644 examples/declarative/i18n/i18n.qml create mode 100644 examples/declarative/i18n/i18n/base.ts create mode 100644 examples/declarative/i18n/i18n/qml_en_AU.qm create mode 100644 examples/declarative/i18n/i18n/qml_en_AU.ts create mode 100644 examples/declarative/i18n/i18n/qml_fr.qm create mode 100644 examples/declarative/i18n/i18n/qml_fr.ts diff --git a/examples/declarative/i18n/i18n.qml b/examples/declarative/i18n/i18n.qml new file mode 100644 index 0000000..3b1279a --- /dev/null +++ b/examples/declarative/i18n/i18n.qml @@ -0,0 +1,33 @@ +import Qt 4.7 + +// +// The QML runtime automatically loads a translation from the i18n subdirectory of the root +// QML file, based on the system language. +// +// The files are created/updated by running: +// +// lupdate i18n.qml -ts i18n/*.ts +// +// The .ts files can then be edited with Linguist: +// +// linguist i18n/qml_fr.ts +// +// The run-time translation files are then generaeted by running: +// +// lrelease i18n/*.ts +// +// Translations for new languages are created by copying i18n/base.ts to i18n/qml_.ts +// and editing the result with Linguist. +// + +Column { + Text { + text: "If a translation is available for the system language (eg. Franch) then the string below will translated (eg. 'Bonjour'). Otherwise is will show 'Hello'." + width: 200 + wrapMode: Text.WordWrap + } + Text { + text: qsTr("Hello") + font.pointSize: 25 + } +} diff --git a/examples/declarative/i18n/i18n/base.ts b/examples/declarative/i18n/i18n/base.ts new file mode 100644 index 0000000..82547a1 --- /dev/null +++ b/examples/declarative/i18n/i18n/base.ts @@ -0,0 +1,12 @@ + + + + + i18n + + + Hello + + + + diff --git a/examples/declarative/i18n/i18n/qml_en_AU.qm b/examples/declarative/i18n/i18n/qml_en_AU.qm new file mode 100644 index 0000000..fb8b710 Binary files /dev/null and b/examples/declarative/i18n/i18n/qml_en_AU.qm differ diff --git a/examples/declarative/i18n/i18n/qml_en_AU.ts b/examples/declarative/i18n/i18n/qml_en_AU.ts new file mode 100644 index 0000000..e991aff --- /dev/null +++ b/examples/declarative/i18n/i18n/qml_en_AU.ts @@ -0,0 +1,12 @@ + + + + + i18n + + + Hello + G'day + + + diff --git a/examples/declarative/i18n/i18n/qml_fr.qm b/examples/declarative/i18n/i18n/qml_fr.qm new file mode 100644 index 0000000..583562e Binary files /dev/null and b/examples/declarative/i18n/i18n/qml_fr.qm differ diff --git a/examples/declarative/i18n/i18n/qml_fr.ts b/examples/declarative/i18n/i18n/qml_fr.ts new file mode 100644 index 0000000..365abd9 --- /dev/null +++ b/examples/declarative/i18n/i18n/qml_fr.ts @@ -0,0 +1,12 @@ + + + + + i18n + + + Hello + Bonjour + + + -- cgit v0.12 From 846210c6381827396868d15cdbb6d42daabda147 Mon Sep 17 00:00:00 2001 From: Michael Brasser Date: Wed, 5 May 2010 14:32:45 +1000 Subject: Don't start valuesource animations until all component objects have been completed. Task-number: QTBUG-9413 --- src/declarative/util/qdeclarativeanimation.cpp | 10 ++++++++++ src/declarative/util/qdeclarativeanimation_p.h | 1 + .../animation/pauseAnimation/pauseAnimation-visual.qml | 4 ++-- 3 files changed, 13 insertions(+), 2 deletions(-) diff --git a/src/declarative/util/qdeclarativeanimation.cpp b/src/declarative/util/qdeclarativeanimation.cpp index 4059522..d9abe71 100644 --- a/src/declarative/util/qdeclarativeanimation.cpp +++ b/src/declarative/util/qdeclarativeanimation.cpp @@ -55,6 +55,7 @@ #include #include #include +#include #include #include @@ -178,6 +179,10 @@ void QDeclarativeAbstractAnimation::setRunning(bool r) d->running = r; if (r == false) d->avoidPropertyValueSourceStart = true; + else { + QDeclarativeEnginePrivate *engPriv = QDeclarativeEnginePrivate::get(qmlEngine(this)); + engPriv->registerFinalizedParserStatusObject(this, this->metaObject()->indexOfSlot("componentFinalized()")); + } return; } @@ -268,6 +273,11 @@ void QDeclarativeAbstractAnimation::componentComplete() { Q_D(QDeclarativeAbstractAnimation); d->componentComplete = true; +} + +void QDeclarativeAbstractAnimation::componentFinalized() +{ + Q_D(QDeclarativeAbstractAnimation); if (d->running) { d->running = false; setRunning(true); diff --git a/src/declarative/util/qdeclarativeanimation_p.h b/src/declarative/util/qdeclarativeanimation_p.h index 40c893c..e7cd8a8 100644 --- a/src/declarative/util/qdeclarativeanimation_p.h +++ b/src/declarative/util/qdeclarativeanimation_p.h @@ -133,6 +133,7 @@ public: private Q_SLOTS: void timelineComplete(); + void componentFinalized(); private: virtual void setTarget(const QDeclarativeProperty &); diff --git a/tests/auto/declarative/qmlvisual/animation/pauseAnimation/pauseAnimation-visual.qml b/tests/auto/declarative/qmlvisual/animation/pauseAnimation/pauseAnimation-visual.qml index d82c6df..cc9a639 100644 --- a/tests/auto/declarative/qmlvisual/animation/pauseAnimation/pauseAnimation-visual.qml +++ b/tests/auto/declarative/qmlvisual/animation/pauseAnimation/pauseAnimation-visual.qml @@ -16,7 +16,7 @@ Rectangle { id: img source: "pics/qtlogo.png" x: 60-width/2 - y: 100 + y: 200-img.height SequentialAnimation on y { loops: Animation.Infinite NumberAnimation { @@ -24,7 +24,7 @@ Rectangle { easing.type: "InOutQuad" } NumberAnimation { - to: 100 + to: 200-img.height easing.type: "OutBounce" duration: 2000 } -- cgit v0.12 From ce9bc843443f2c61361afa75a62a7d39029557e6 Mon Sep 17 00:00:00 2001 From: Martin Jones Date: Wed, 5 May 2010 14:38:55 +1000 Subject: QList models now update their properties when they change. Task-number: QTBUG-10348 --- doc/src/declarative/qdeclarativemodels.qdoc | 11 +++++++++-- examples/declarative/objectlistmodel/dataobject.cpp | 10 ++++++++-- examples/declarative/objectlistmodel/dataobject.h | 8 ++++++-- examples/declarative/objectlistmodel/view.qml | 2 +- src/declarative/QmlChanges.txt | 4 ++++ .../graphicsitems/qdeclarativevisualitemmodel.cpp | 8 ++++++-- .../declarative/qdeclarativerepeater/data/objlist.qml | 2 +- .../qdeclarativerepeater/tst_qdeclarativerepeater.cpp | 19 ++++++++++++++----- 8 files changed, 49 insertions(+), 15 deletions(-) diff --git a/doc/src/declarative/qdeclarativemodels.qdoc b/doc/src/declarative/qdeclarativemodels.qdoc index 91acb3c..9b706a1 100644 --- a/doc/src/declarative/qdeclarativemodels.qdoc +++ b/doc/src/declarative/qdeclarativemodels.qdoc @@ -283,7 +283,9 @@ QDeclarativeContext *ctxt = view.rootContext(); ctxt->setContextProperty("myModel", QVariant::fromValue(dataList)); \endcode -The properties of the object may then be accessed in the delegate: +The QObject* is available as the \c modelData property. As a convenience, +the properties of the object are also made available directly in the +delegate's context: \code ListView { @@ -295,13 +297,18 @@ ListView { Rectangle { height: 25 width: 100 - color: model.color + color: model.modelData.color Text { text: name } } } } \endcode +Note the use of the fully qualified access to the \c color property. +The properties of the object are not replicated in the \c model +object, since they are easily available via the modelData +object. + Note: There is no way for the view to know that the contents of a QList have changed. If the QList is changed, it will be necessary to reset the model by calling QDeclarativeContext::setContextProperty() again. diff --git a/examples/declarative/objectlistmodel/dataobject.cpp b/examples/declarative/objectlistmodel/dataobject.cpp index 4c44ee4..14be1b9 100644 --- a/examples/declarative/objectlistmodel/dataobject.cpp +++ b/examples/declarative/objectlistmodel/dataobject.cpp @@ -59,7 +59,10 @@ QString DataObject::name() const void DataObject::setName(const QString &name) { - m_name = name; + if (name != m_name) { + m_name = name; + emit nameChanged(); + } } QString DataObject::color() const @@ -69,5 +72,8 @@ QString DataObject::color() const void DataObject::setColor(const QString &color) { - m_color = color; + if (color != m_color) { + m_color = color; + emit colorChanged(); + } } diff --git a/examples/declarative/objectlistmodel/dataobject.h b/examples/declarative/objectlistmodel/dataobject.h index 6804474..852110d 100644 --- a/examples/declarative/objectlistmodel/dataobject.h +++ b/examples/declarative/objectlistmodel/dataobject.h @@ -48,8 +48,8 @@ class DataObject : public QObject { Q_OBJECT - Q_PROPERTY(QString name READ name WRITE setName) - Q_PROPERTY(QString color READ color WRITE setColor) + Q_PROPERTY(QString name READ name WRITE setName NOTIFY nameChanged) + Q_PROPERTY(QString color READ color WRITE setColor NOTIFY colorChanged) public: DataObject(QObject *parent=0); @@ -61,6 +61,10 @@ public: QString color() const; void setColor(const QString &color); +signals: + void nameChanged(); + void colorChanged(); + private: QString m_name; QString m_color; diff --git a/examples/declarative/objectlistmodel/view.qml b/examples/declarative/objectlistmodel/view.qml index 908e388..2b8383f 100644 --- a/examples/declarative/objectlistmodel/view.qml +++ b/examples/declarative/objectlistmodel/view.qml @@ -9,7 +9,7 @@ ListView { Rectangle { height: 25 width: 100 - color: model.color + color: model.modelData.color Text { text: name } } } diff --git a/src/declarative/QmlChanges.txt b/src/declarative/QmlChanges.txt index 7218f78..dfc4244 100644 --- a/src/declarative/QmlChanges.txt +++ b/src/declarative/QmlChanges.txt @@ -4,6 +4,10 @@ The changes below are pre Qt 4.7.0 RC Flickable: overShoot is replaced by boundsBehavior enumeration. Component: isReady, isLoading, isError and isNull properties removed, use status property instead +QList models no longer provide properties in model object. The +properties are now updated when the object changes. An object's property +"foo" may now be accessed as "foo", modelData.foo" or model.modelData.foo" + C++ API ------- diff --git a/src/declarative/graphicsitems/qdeclarativevisualitemmodel.cpp b/src/declarative/graphicsitems/qdeclarativevisualitemmodel.cpp index 2addc77..f01d4c2 100644 --- a/src/declarative/graphicsitems/qdeclarativevisualitemmodel.cpp +++ b/src/declarative/graphicsitems/qdeclarativevisualitemmodel.cpp @@ -437,8 +437,7 @@ int QDeclarativeVisualDataModelDataMetaObject::createProperty(const char *name, if ((!model->m_listModelInterface || !model->m_abstractItemModel) && model->m_listAccessor) { if (model->m_listAccessor->type() == QDeclarativeListAccessor::ListProperty) { model->ensureRoles(); - QObject *object = model->m_listAccessor->at(data->m_index).value(); - if (object && (object->property(name).isValid() || qstrcmp(name,"modelData")==0)) + if (qstrcmp(name,"modelData") == 0) return QDeclarativeOpenMetaObject::createProperty(name, type); } } @@ -1029,6 +1028,11 @@ QDeclarativeItem *QDeclarativeVisualDataModel::item(int index, const QByteArray if (!ccontext) ccontext = qmlContext(this); QDeclarativeContext *ctxt = new QDeclarativeContext(ccontext); QDeclarativeVisualDataModelData *data = new QDeclarativeVisualDataModelData(index, this); + if ((!d->m_listModelInterface || !d->m_abstractItemModel) && d->m_listAccessor + && d->m_listAccessor->type() == QDeclarativeListAccessor::ListProperty) { + ctxt->setContextObject(d->m_listAccessor->at(index).value()); + ctxt = new QDeclarativeContext(ctxt, ctxt); + } ctxt->setContextProperty(QLatin1String("model"), data); ctxt->setContextObject(data); d->m_completePending = false; diff --git a/tests/auto/declarative/qdeclarativerepeater/data/objlist.qml b/tests/auto/declarative/qdeclarativerepeater/data/objlist.qml index 17c5d8d..e1bd2e2 100644 --- a/tests/auto/declarative/qdeclarativerepeater/data/objlist.qml +++ b/tests/auto/declarative/qdeclarativerepeater/data/objlist.qml @@ -14,7 +14,7 @@ Rectangle { property int instantiated: 0 Component { Item{ - Component.onCompleted: {if(index!=model.idx) repeater.errors += 1; repeater.instantiated++} + Component.onCompleted: {if(index!=modelData.idx) repeater.errors += 1; repeater.instantiated++} } } } diff --git a/tests/auto/declarative/qdeclarativerepeater/tst_qdeclarativerepeater.cpp b/tests/auto/declarative/qdeclarativerepeater/tst_qdeclarativerepeater.cpp index 8be7d80..e6b2fdd 100644 --- a/tests/auto/declarative/qdeclarativerepeater/tst_qdeclarativerepeater.cpp +++ b/tests/auto/declarative/qdeclarativerepeater/tst_qdeclarativerepeater.cpp @@ -185,15 +185,24 @@ void tst_QDeclarativeRepeater::numberModel() delete canvas; } +class MyObject : public QObject +{ + Q_OBJECT + Q_PROPERTY(int idx READ idx CONSTANT) +public: + MyObject(int i) : QObject(), m_idx(i) {} + + int idx() const { return m_idx; } + + int m_idx; +}; + void tst_QDeclarativeRepeater::objectList() { QDeclarativeView *canvas = createView(); - QObjectList data; - for(int i=0; i<100; i++){ - data << new QObject(); - data.back()->setProperty("idx", i); - } + for(int i=0; i<100; i++) + data << new MyObject(i); QDeclarativeContext *ctxt = canvas->rootContext(); ctxt->setContextProperty("testData", QVariant::fromValue(data)); -- cgit v0.12 From de5728c826d44808529a681472b899f30e18e325 Mon Sep 17 00:00:00 2001 From: Warwick Allison Date: Wed, 5 May 2010 14:51:11 +1000 Subject: doc Task-number: QTBUG-10386 --- .../graphicsitems/qdeclarativeborderimage.cpp | 14 +-- .../graphicsitems/qdeclarativeflickable.cpp | 14 +-- .../graphicsitems/qdeclarativeflipable.cpp | 2 +- .../graphicsitems/qdeclarativegridview.cpp | 18 ++-- .../graphicsitems/qdeclarativeimage.cpp | 20 ++-- src/declarative/graphicsitems/qdeclarativeitem.cpp | 2 +- .../graphicsitems/qdeclarativelistview.cpp | 18 ++-- .../graphicsitems/qdeclarativeloader.cpp | 8 +- .../graphicsitems/qdeclarativepathview.cpp | 8 +- .../graphicsitems/qdeclarativepositioners.cpp | 14 +-- src/declarative/graphicsitems/qdeclarativetext.cpp | 73 +++++++------ .../graphicsitems/qdeclarativetextedit.cpp | 46 ++++----- .../graphicsitems/qdeclarativetextinput.cpp | 28 ++--- src/declarative/qml/qdeclarativecomponent.cpp | 8 +- src/declarative/util/qdeclarativeanimation.cpp | 114 ++++++++++----------- src/declarative/util/qdeclarativefontloader.cpp | 8 +- .../util/qdeclarativesmoothedanimation.cpp | 6 +- .../util/qdeclarativesmoothedfollow.cpp | 6 +- src/declarative/util/qdeclarativexmllistmodel.cpp | 8 +- 19 files changed, 210 insertions(+), 205 deletions(-) diff --git a/src/declarative/graphicsitems/qdeclarativeborderimage.cpp b/src/declarative/graphicsitems/qdeclarativeborderimage.cpp index 14a2cab..018bd55 100644 --- a/src/declarative/graphicsitems/qdeclarativeborderimage.cpp +++ b/src/declarative/graphicsitems/qdeclarativeborderimage.cpp @@ -102,10 +102,10 @@ QDeclarativeBorderImage::~QDeclarativeBorderImage() This property holds the status of image loading. It can be one of: \list - \o Null - no image has been set - \o Ready - the image has been loaded - \o Loading - the image is currently being loaded - \o Error - an error occurred while loading the image + \o BorderImage.Null - no image has been set + \o BorderImage.Ready - the image has been loaded + \o BorderImage.Loading - the image is currently being loaded + \o BorderImage.Error - an error occurred while loading the image \endlist \sa progress @@ -300,9 +300,9 @@ QDeclarativeScaleGrid *QDeclarativeBorderImage::border() This property describes how to repeat or stretch the middle parts of the border image. \list - \o Stretch - Scale the image to fit to the available area. - \o Repeat - Tile the image until there is no more space. May crop the last image. - \o Round - Like Repeat, but scales the images down to ensure that the last image is not cropped. + \o BorderImage.Stretch - Scale the image to fit to the available area. + \o BorderImage.Repeat - Tile the image until there is no more space. May crop the last image. + \o BorderImage.Round - Like Repeat, but scales the images down to ensure that the last image is not cropped. \endlist */ QDeclarativeBorderImage::TileMode QDeclarativeBorderImage::horizontalTileMode() const diff --git a/src/declarative/graphicsitems/qdeclarativeflickable.cpp b/src/declarative/graphicsitems/qdeclarativeflickable.cpp index 35aa0f8..3128851 100644 --- a/src/declarative/graphicsitems/qdeclarativeflickable.cpp +++ b/src/declarative/graphicsitems/qdeclarativeflickable.cpp @@ -587,13 +587,13 @@ QDeclarativeFlickableVisibleArea *QDeclarativeFlickable::visibleArea() This property determines which directions the view can be flicked. \list - \o AutoFlickDirection (default) - allows flicking vertically if the + \o Flickable.AutoFlickDirection (default) - allows flicking vertically if the \e contentHeight is not equal to the \e height of the Flickable. Allows flicking horizontally if the \e contentWidth is not equal to the \e width of the Flickable. - \o HorizontalFlick - allows flicking horizontally. - \o VerticalFlick - allows flicking vertically. - \o HorizontalAndVerticalFlick - allows flicking in both directions. + \o Flickable.HorizontalFlick - allows flicking horizontally. + \o Flickable.VerticalFlick - allows flicking vertically. + \o Flickable.HorizontalAndVerticalFlick - allows flicking in both directions. \endlist */ QDeclarativeFlickable::FlickDirection QDeclarativeFlickable::flickDirection() const @@ -1031,11 +1031,11 @@ void QDeclarativeFlickable::setOverShoot(bool o) The \c boundsBehavior can be one of: \list - \o \e StopAtBounds - the contents can not be dragged beyond the boundary + \o \e Flickable.StopAtBounds - the contents can not be dragged beyond the boundary of the flickable, and flicks will not overshoot. - \o \e DragOverBounds - the contents can be dragged beyond the boundary + \o \e Flickable.DragOverBounds - the contents can be dragged beyond the boundary of the Flickable, but flicks will not overshoot. - \o \e DragAndOvershootBounds (default) - the contents can be dragged + \o \e Flickable.DragAndOvershootBounds (default) - the contents can be dragged beyond the boundary of the Flickable, and can overshoot the boundary when flicked. \endlist diff --git a/src/declarative/graphicsitems/qdeclarativeflipable.cpp b/src/declarative/graphicsitems/qdeclarativeflipable.cpp index 85f40c3..e2fc809 100644 --- a/src/declarative/graphicsitems/qdeclarativeflipable.cpp +++ b/src/declarative/graphicsitems/qdeclarativeflipable.cpp @@ -167,7 +167,7 @@ void QDeclarativeFlipable::retransformBack() \qmlproperty enumeration Flipable::side The side of the Flippable currently visible. Possible values are \c - Front and \c Back. + Flippable.Front and \c Flippable.Back. */ QDeclarativeFlipable::Side QDeclarativeFlipable::side() const { diff --git a/src/declarative/graphicsitems/qdeclarativegridview.cpp b/src/declarative/graphicsitems/qdeclarativegridview.cpp index 8fb3632..f55c483 100644 --- a/src/declarative/graphicsitems/qdeclarativegridview.cpp +++ b/src/declarative/graphicsitems/qdeclarativegridview.cpp @@ -1280,17 +1280,17 @@ void QDeclarativeGridView::setHighlightMoveDuration(int duration) highlight range. Furthermore, the behaviour of the current item index will occur whether or not a highlight exists. - If highlightRangeMode is set to \e ApplyRange the view will + If highlightRangeMode is set to \e GridView.ApplyRange the view will attempt to maintain the highlight within the range, however the highlight can move outside of the range at the ends of the list or due to a mouse interaction. - If highlightRangeMode is set to \e StrictlyEnforceRange the highlight will never + If highlightRangeMode is set to \e GridView.StrictlyEnforceRange the highlight will never move outside of the range. This means that the current item will change if a keyboard or mouse action would cause the highlight to move outside of the range. - The default value is \e NoHighlightRange. + The default value is \e GridView.NoHighlightRange. Note that a valid range requires preferredHighlightEnd to be greater than or equal to preferredHighlightBegin. @@ -1348,10 +1348,10 @@ void QDeclarativeGridView::setHighlightRangeMode(HighlightRangeMode mode) \qmlproperty enumeration GridView::flow This property holds the flow of the grid. - Possible values are \c LeftToRight (default) and \c TopToBottom. + Possible values are \c GridView.LeftToRight (default) and \c GridView.TopToBottom. - If \a flow is \c LeftToRight, the view will scroll vertically. - If \a flow is \c TopToBottom, the view will scroll horizontally. + If \a flow is \c GridView.LeftToRight, the view will scroll vertically. + If \a flow is \c GridView.TopToBottom, the view will scroll horizontally. */ QDeclarativeGridView::Flow QDeclarativeGridView::flow() const { @@ -1474,10 +1474,10 @@ void QDeclarativeGridView::setCellHeight(int cellHeight) The allowed values are: \list - \o NoSnap (default) - the view will stop anywhere within the visible area. - \o SnapToRow - the view will settle with a row (or column for TopToBottom flow) + \o GridView.NoSnap (default) - the view will stop anywhere within the visible area. + \o GridView.SnapToRow - the view will settle with a row (or column for TopToBottom flow) aligned with the start of the view. - \o SnapOneRow - the view will settle no more than one row (or column for TopToBottom flow) + \o GridView.SnapOneRow - the view will settle no more than one row (or column for TopToBottom flow) away from the first visible row at the time the mouse button is released. This mode is particularly useful for moving one page at a time. \endlist diff --git a/src/declarative/graphicsitems/qdeclarativeimage.cpp b/src/declarative/graphicsitems/qdeclarativeimage.cpp index 1c32b45..aeddb15 100644 --- a/src/declarative/graphicsitems/qdeclarativeimage.cpp +++ b/src/declarative/graphicsitems/qdeclarativeimage.cpp @@ -199,12 +199,12 @@ void QDeclarativeImagePrivate::setPixmap(const QPixmap &pixmap) than the size of the item. \list - \o Stretch - the image is scaled to fit - \o PreserveAspectFit - the image is scaled uniformly to fit without cropping - \o PreserveAspectCrop - the image is scaled uniformly to fill, cropping if necessary - \o Tile - the image is duplicated horizontally and vertically - \o TileVertically - the image is stretched horizontally and tiled vertically - \o TileHorizontally - the image is stretched vertically and tiled horizontally + \o Image.Stretch - the image is scaled to fit + \o Image.PreserveAspectFit - the image is scaled uniformly to fit without cropping + \o Image.PreserveAspectCrop - the image is scaled uniformly to fill, cropping if necessary + \o Image.Tile - the image is duplicated horizontally and vertically + \o Image.TileVertically - the image is stretched horizontally and tiled vertically + \o Image.TileHorizontally - the image is stretched vertically and tiled horizontally \endlist \image declarative-image_fillMode.gif @@ -243,10 +243,10 @@ qreal QDeclarativeImage::paintedHeight() const This property holds the status of image loading. It can be one of: \list - \o Null - no image has been set - \o Ready - the image has been loaded - \o Loading - the image is currently being loaded - \o Error - an error occurred while loading the image + \o Image.Null - no image has been set + \o Image.Ready - the image has been loaded + \o Image.Loading - the image is currently being loaded + \o Image.Error - an error occurred while loading the image \endlist Note that a change in the status property does not cause anything to happen diff --git a/src/declarative/graphicsitems/qdeclarativeitem.cpp b/src/declarative/graphicsitems/qdeclarativeitem.cpp index 14f6b4a..a0983cc 100644 --- a/src/declarative/graphicsitems/qdeclarativeitem.cpp +++ b/src/declarative/graphicsitems/qdeclarativeitem.cpp @@ -1432,7 +1432,7 @@ QDeclarativeItem::~QDeclarativeItem() } \endqml - The default transform origin is \c Center. + The default transform origin is \c Item.Center. */ /*! diff --git a/src/declarative/graphicsitems/qdeclarativelistview.cpp b/src/declarative/graphicsitems/qdeclarativelistview.cpp index 0f3ee61..3b77ff8 100644 --- a/src/declarative/graphicsitems/qdeclarativelistview.cpp +++ b/src/declarative/graphicsitems/qdeclarativelistview.cpp @@ -1690,17 +1690,17 @@ void QDeclarativeListView::setHighlightFollowsCurrentItem(bool autoHighlight) highlight range. Furthermore, the behaviour of the current item index will occur whether or not a highlight exists. - If highlightRangeMode is set to \e ApplyRange the view will + If highlightRangeMode is set to \e ListView.ApplyRange the view will attempt to maintain the highlight within the range, however the highlight can move outside of the range at the ends of the list or due to a mouse interaction. - If highlightRangeMode is set to \e StrictlyEnforceRange the highlight will never + If highlightRangeMode is set to \e ListView.StrictlyEnforceRange the highlight will never move outside of the range. This means that the current item will change if a keyboard or mouse action would cause the highlight to move outside of the range. - The default value is \e NoHighlightRange. + The default value is \e ListView.NoHighlightRange. Note that a valid range requires preferredHighlightEnd to be greater than or equal to preferredHighlightBegin. @@ -1780,9 +1780,9 @@ void QDeclarativeListView::setSpacing(qreal spacing) Possible values are \c Vertical (default) and \c Horizontal. - Vertical Example: + ListView.Vertical Example: \image trivialListView.png - Horizontal Example: + ListView.Horizontal Example: \image ListViewHorizontal.png */ QDeclarativeListView::Orientation QDeclarativeListView::orientation() const @@ -1996,17 +1996,17 @@ void QDeclarativeListView::setHighlightResizeDuration(int duration) The allowed values are: \list - \o NoSnap (default) - the view will stop anywhere within the visible area. - \o SnapToItem - the view will settle with an item aligned with the start of + \o ListView.NoSnap (default) - the view will stop anywhere within the visible area. + \o ListView.SnapToItem - the view will settle with an item aligned with the start of the view. - \o SnapOneItem - the view will settle no more than one item away from the first + \o ListView.SnapOneItem - the view will settle no more than one item away from the first visible item at the time the mouse button is released. This mode is particularly useful for moving one page at a time. \endlist snapMode does not affect the currentIndex. To update the currentIndex as the list is moved set \e highlightRangeMode - to \e StrictlyEnforceRange. + to \e ListView.StrictlyEnforceRange. \sa highlightRangeMode */ diff --git a/src/declarative/graphicsitems/qdeclarativeloader.cpp b/src/declarative/graphicsitems/qdeclarativeloader.cpp index 62fa4db..7edd53c 100644 --- a/src/declarative/graphicsitems/qdeclarativeloader.cpp +++ b/src/declarative/graphicsitems/qdeclarativeloader.cpp @@ -329,10 +329,10 @@ void QDeclarativeLoaderPrivate::_q_sourceLoaded() This property holds the status of QML loading. It can be one of: \list - \o Null - no QML source has been set - \o Ready - the QML source has been loaded - \o Loading - the QML source is currently being loaded - \o Error - an error occurred while loading the QML source + \o Loader.Null - no QML source has been set + \o Loader.Ready - the QML source has been loaded + \o Loader.Loading - the QML source is currently being loaded + \o Loader.Error - an error occurred while loading the QML source \endlist Note that a change in the status property does not cause anything to happen diff --git a/src/declarative/graphicsitems/qdeclarativepathview.cpp b/src/declarative/graphicsitems/qdeclarativepathview.cpp index 7cb723c..9ae6f9d 100644 --- a/src/declarative/graphicsitems/qdeclarativepathview.cpp +++ b/src/declarative/graphicsitems/qdeclarativepathview.cpp @@ -618,12 +618,12 @@ QDeclarativeItem *QDeclarativePathView::highlightItem() These properties set the preferred range of the highlight (current item) within the view. The preferred values must be in the range 0.0-1.0. - If highlightRangeMode is set to \e ApplyRange the view will + If highlightRangeMode is set to \e PathView.ApplyRange the view will attempt to maintain the highlight within the range, however the highlight can move outside of the range at the ends of the path or due to a mouse interaction. - If highlightRangeMode is set to \e StrictlyEnforceRange the highlight will never + If highlightRangeMode is set to \e PathView.StrictlyEnforceRange the highlight will never move outside of the range. This means that the current item will change if a keyboard or mouse action would cause the highlight to move outside of the range. @@ -631,14 +631,14 @@ QDeclarativeItem *QDeclarativePathView::highlightItem() Note that this is the correct way to influence where the current item ends up when the view moves. For example, if you want the currently selected item to be in the middle of the path, then set the - highlight range to be 0.5,0.5 and highlightRangeMode to StrictlyEnforceRange. + highlight range to be 0.5,0.5 and highlightRangeMode to PathView.StrictlyEnforceRange. Then, when the path scrolls, the currently selected item will be the item at that position. This also applies to when the currently selected item changes - it will scroll to within the preferred highlight range. Furthermore, the behaviour of the current item index will occur whether or not a highlight exists. - The default value is \e StrictlyEnforceRange. + The default value is \e PathView.StrictlyEnforceRange. Note that a valid range requires preferredHighlightEnd to be greater than or equal to preferredHighlightBegin. diff --git a/src/declarative/graphicsitems/qdeclarativepositioners.cpp b/src/declarative/graphicsitems/qdeclarativepositioners.cpp index 7e4549f..206b09d 100644 --- a/src/declarative/graphicsitems/qdeclarativepositioners.cpp +++ b/src/declarative/graphicsitems/qdeclarativepositioners.cpp @@ -738,14 +738,14 @@ void QDeclarativeGrid::setRows(const int rows) } /*! - \qmlproperty enumeration Flow::flow + \qmlproperty enumeration Grid::flow This property holds the flow of the layout. - Possible values are \c LeftToRight (default) and \c TopToBottom. + Possible values are \c Grid.LeftToRight (default) and \c Grid.TopToBottom. - If \a flow is \c LeftToRight, the items are positioned next to + If \a flow is \c Grid.LeftToRight, the items are positioned next to to each other from left to right, then wrapped to the next line. - If \a flow is \c TopToBottom, the items are positioned next to each + If \a flow is \c Grid.TopToBottom, the items are positioned next to each other from top to bottom, then wrapped to the next column. */ QDeclarativeGrid::Flow QDeclarativeGrid::flow() const @@ -952,12 +952,12 @@ QDeclarativeFlow::QDeclarativeFlow(QDeclarativeItem *parent) \qmlproperty enumeration Flow::flow This property holds the flow of the layout. - Possible values are \c LeftToRight (default) and \c TopToBottom. + Possible values are \c Flow.LeftToRight (default) and \c Flow.TopToBottom. - If \a flow is \c LeftToRight, the items are positioned next to + If \a flow is \c Flow.LeftToRight, the items are positioned next to to each other from left to right until the width of the Flow is exceeded, then wrapped to the next line. - If \a flow is \c TopToBottom, the items are positioned next to each + If \a flow is \c Flow.TopToBottom, the items are positioned next to each other from top to bottom until the height of the Flow is exceeded, then wrapped to the next column. */ diff --git a/src/declarative/graphicsitems/qdeclarativetext.cpp b/src/declarative/graphicsitems/qdeclarativetext.cpp index eeff0c3..4e7e0fd 100644 --- a/src/declarative/graphicsitems/qdeclarativetext.cpp +++ b/src/declarative/graphicsitems/qdeclarativetext.cpp @@ -200,11 +200,11 @@ QDeclarativeTextPrivate::~QDeclarativeTextPrivate() The weight can be one of: \list - \o Light - \o Normal - the default - \o DemiBold - \o Bold - \o Black + \o Font.Light + \o Font.Normal - the default + \o Font.DemiBold + \o Font.Bold + \o Font.Black \endlist \qml @@ -277,11 +277,11 @@ QDeclarativeTextPrivate::~QDeclarativeTextPrivate() Sets the capitalization for the text. \list - \o MixedCase - This is the normal text rendering option where no capitalization change is applied. - \o AllUppercase - This alters the text to be rendered in all uppercase type. - \o AllLowercase - This alters the text to be rendered in all lowercase type. - \o SmallCaps - This alters the text to be rendered in small-caps type. - \o Capitalize - This alters the text to be rendered with the first character of each word as an uppercase character. + \o Font.MixedCase - This is the normal text rendering option where no capitalization change is applied. + \o Font.AllUppercase - This alters the text to be rendered in all uppercase type. + \o Font.AllLowercase - This alters the text to be rendered in all lowercase type. + \o Font.SmallCaps - This alters the text to be rendered in small-caps type. + \o Font.Capitalize - This alters the text to be rendered with the first character of each word as an uppercase character. \endlist \qml @@ -380,10 +380,10 @@ QColor QDeclarativeText::color() const Supported text styles are: \list - \o Normal - the default - \o Outline - \o Raised - \o Sunken + \o Text.Normal - the default + \o Text.Outline + \o Text.Raised + \o Text.Sunken \endlist \qml @@ -451,9 +451,14 @@ QColor QDeclarativeText::styleColor() const Sets the horizontal and vertical alignment of the text within the Text items width and height. By default, the text is top-left aligned. - The valid values for \c horizontalAlignment are \c AlignLeft, \c AlignRight and - \c AlignHCenter. The valid values for \c verticalAlignment are \c AlignTop, \c AlignBottom - and \c AlignVCenter. + The valid values for \c horizontalAlignment are \c Text.AlignLeft, \c Text.AlignRight and + \c Text.AlignHCenter. The valid values for \c verticalAlignment are \c Text.AlignTop, \c Text.AlignBottom + and \c Text.AlignVCenter. + + Note that for a single line of text, the size of the text is the area of the text. In this common case, + all alignments are equivalent. If you want the text to be, say, centered in it parent, then you will + need to either modify the Item::anchors, or set horizontalAlignment to Text.AlignHCenter and bind the width to + that of the parent. */ QDeclarativeText::HAlignment QDeclarativeText::hAlign() const { @@ -494,16 +499,16 @@ void QDeclarativeText::setVAlign(VAlignment align) wrap if an explicit width has been set. wrapMode can be one of: \list - \o NoWrap - no wrapping will be performed. - \o WordWrap - wrapping is done on word boundaries. If the text cannot be + \o Text.NoWrap - no wrapping will be performed. + \o Text.WordWrap - wrapping is done on word boundaries. If the text cannot be word-wrapped to the specified width it will be partially drawn outside of the item's bounds. If this is undesirable then enable clipping on the item (Item::clip). - \o WrapAnywhere - Text can be wrapped at any point on a line, even if it occurs in the middle of a word. - \o WrapAtWordBoundaryOrAnywhere - If possible, wrapping occurs at a word boundary; otherwise it + \o Text.WrapAnywhere - Text can be wrapped at any point on a line, even if it occurs in the middle of a word. + \o Text.WrapAtWordBoundaryOrAnywhere - If possible, wrapping occurs at a word boundary; otherwise it will occur at the appropriate point on the line, even in the middle of a word. \endlist - The default is NoWrap. + The default is Text.NoWrap. */ QDeclarativeText::WrapMode QDeclarativeText::wrapMode() const { @@ -533,17 +538,17 @@ void QDeclarativeText::setWrapMode(WrapMode mode) Supported text formats are: \list - \o AutoText - \o PlainText - \o RichText - \o StyledText + \o Text.AutoText + \o Text.PlainText + \o Text.RichText + \o Text.StyledText \endlist - The default is AutoText. If the text format is AutoText the text element + The default is Text.AutoText. If the text format is Text.AutoText the text element will automatically determine whether the text should be treated as rich text. This determination is made using Qt::mightBeRichText(). - StyledText is an optimized format supporting some basic text + Text.StyledText is an optimized format supporting some basic text styling markup, in the style of html 3.2: \code @@ -554,7 +559,7 @@ void QDeclarativeText::setWrapMode(WrapMode mode) > < & \endcode - \c StyledText parser is strict, requiring tags to be correctly nested. + \c Text.StyledText parser is strict, requiring tags to be correctly nested. \table \row @@ -622,13 +627,13 @@ void QDeclarativeText::setTextFormat(TextFormat format) Eliding can be: \list - \o ElideNone - the default - \o ElideLeft - \o ElideMiddle - \o ElideRight + \o Text.ElideNone - the default + \o Text.ElideLeft + \o Text.ElideMiddle + \o Text.ElideRight \endlist - If the text is a multi-length string, and the mode is not \c ElideNone, + If the text is a multi-length string, and the mode is not \c Text.ElideNone, the first string that fits will be used, otherwise the last will be elided. Multi-length strings are ordered from longest to shortest, separated by the diff --git a/src/declarative/graphicsitems/qdeclarativetextedit.cpp b/src/declarative/graphicsitems/qdeclarativetextedit.cpp index 762640c..d0ee2ee 100644 --- a/src/declarative/graphicsitems/qdeclarativetextedit.cpp +++ b/src/declarative/graphicsitems/qdeclarativetextedit.cpp @@ -138,11 +138,11 @@ QString QDeclarativeTextEdit::text() const The weight can be one of: \list - \o Light - \o Normal - the default - \o DemiBold - \o Bold - \o Black + \o Font.Light + \o Font.Normal - the default + \o Font.DemiBold + \o Font.Bold + \o Font.Black \endlist \qml @@ -215,11 +215,11 @@ QString QDeclarativeTextEdit::text() const Sets the capitalization for the text. \list - \o MixedCase - This is the normal text rendering option where no capitalization change is applied. - \o AllUppercase - This alters the text to be rendered in all uppercase type. - \o AllLowercase - This alters the text to be rendered in all lowercase type. - \o SmallCaps - This alters the text to be rendered in small-caps type. - \o Capitalize - This alters the text to be rendered with the first character of each word as an uppercase character. + \o Font.MixedCase - This is the normal text rendering option where no capitalization change is applied. + \o Font.AllUppercase - This alters the text to be rendered in all uppercase type. + \o Font.AllLowercase - This alters the text to be rendered in all lowercase type. + \o Font.SmallCaps - This alters the text to be rendered in small-caps type. + \o Font.Capitalize - This alters the text to be rendered with the first character of each word as an uppercase character. \endlist \qml @@ -255,13 +255,13 @@ void QDeclarativeTextEdit::setText(const QString &text) The way the text property should be displayed. \list - \o AutoText - \o PlainText - \o RichText - \o StyledText + \o TextEdit.AutoText + \o TextEdit.PlainText + \o TextEdit.RichText + \o TextEdit.StyledText \endlist - The default is AutoText. If the text format is AutoText the text edit + The default is TextEdit.AutoText. If the text format is TextEdit.AutoText the text edit will automatically determine whether the text should be treated as rich text. This determination is made using Qt::mightBeRichText(). @@ -428,9 +428,9 @@ void QDeclarativeTextEdit::setSelectedTextColor(const QColor &color) Sets the horizontal and vertical alignment of the text within the TextEdit items width and height. By default, the text is top-left aligned. - The valid values for \c horizontalAlignment are \c AlignLeft, \c AlignRight and - \c AlignHCenter. The valid values for \c verticalAlignment are \c AlignTop, \c AlignBottom - and \c AlignVCenter. + The valid values for \c horizontalAlignment are \c TextEdit.AlignLeft, \c TextEdit.AlignRight and + \c TextEdit.AlignHCenter. The valid values for \c verticalAlignment are \c TextEdit.AlignTop, \c TextEdit.AlignBottom + and \c TextEdit.AlignVCenter. */ QDeclarativeTextEdit::HAlignment QDeclarativeTextEdit::hAlign() const { @@ -473,14 +473,14 @@ void QDeclarativeTextEdit::setVAlign(QDeclarativeTextEdit::VAlignment alignment) The text will only wrap if an explicit width has been set. \list - \o NoWrap - no wrapping will be performed. - \o WordWrap - wrapping is done on word boundaries. - \o WrapAnywhere - Text can be wrapped at any point on a line, even if it occurs in the middle of a word. - \o WrapAtWordBoundaryOrAnywhere - If possible, wrapping occurs at a word boundary; otherwise it + \o TextEdit.NoWrap - no wrapping will be performed. + \o TextEdit.WordWrap - wrapping is done on word boundaries. + \o TextEdit.WrapAnywhere - Text can be wrapped at any point on a line, even if it occurs in the middle of a word. + \o TextEdit.WrapAtWordBoundaryOrAnywhere - If possible, wrapping occurs at a word boundary; otherwise it will occur at the appropriate point on the line, even in the middle of a word. \endlist - The default is NoWrap. + The default is TextEdit.NoWrap. */ QDeclarativeTextEdit::WrapMode QDeclarativeTextEdit::wrapMode() const { diff --git a/src/declarative/graphicsitems/qdeclarativetextinput.cpp b/src/declarative/graphicsitems/qdeclarativetextinput.cpp index 775450a..b04e36e 100644 --- a/src/declarative/graphicsitems/qdeclarativetextinput.cpp +++ b/src/declarative/graphicsitems/qdeclarativetextinput.cpp @@ -118,11 +118,11 @@ void QDeclarativeTextInput::setText(const QString &s) The weight can be one of: \list - \o Light - \o Normal - the default - \o DemiBold - \o Bold - \o Black + \o Font.Light + \o Font.Normal - the default + \o Font.DemiBold + \o Font.Bold + \o Font.Black \endlist \qml @@ -195,11 +195,11 @@ void QDeclarativeTextInput::setText(const QString &s) Sets the capitalization for the text. \list - \o MixedCase - This is the normal text rendering option where no capitalization change is applied. - \o AllUppercase - This alters the text to be rendered in all uppercase type. - \o AllLowercase - This alters the text to be rendered in all lowercase type. - \o SmallCaps - This alters the text to be rendered in small-caps type. - \o Capitalize - This alters the text to be rendered with the first character of each word as an uppercase character. + \o Font.MixedCase - This is the normal text rendering option where no capitalization change is applied. + \o Font.AllUppercase - This alters the text to be rendered in all uppercase type. + \o Font.AllLowercase - This alters the text to be rendered in all lowercase type. + \o Font.SmallCaps - This alters the text to be rendered in small-caps type. + \o Font.Capitalize - This alters the text to be rendered with the first character of each word as an uppercase character. \endlist \qml @@ -308,8 +308,8 @@ void QDeclarativeTextInput::setSelectedTextColor(const QColor &color) vertically. You can use anchors to align it however you want within another item. - The valid values for \c horizontalAlignment are \c AlignLeft, \c AlignRight and - \c AlignHCenter. + The valid values for \c horizontalAlignment are \c TextInput.AlignLeft, \c TextInput.AlignRight and + \c TextInput.AlignHCenter. */ QDeclarativeTextInput::HAlignment QDeclarativeTextInput::hAlign() const { @@ -600,9 +600,9 @@ void QDeclarativeTextInput::setAutoScroll(bool b) This property holds the notation of how a string can describe a number. The values for this property are DoubleValidator.StandardNotation or DoubleValidator.ScientificNotation. - If this property is set to ScientificNotation, the written number may have an exponent part(i.e. 1.5E-2). + If this property is set to DoubleValidator.ScientificNotation, the written number may have an exponent part(i.e. 1.5E-2). - By default, this property is set to ScientificNotation. + By default, this property is set to DoubleValidator.ScientificNotation. */ /*! diff --git a/src/declarative/qml/qdeclarativecomponent.cpp b/src/declarative/qml/qdeclarativecomponent.cpp index 3ca0707..fb799dc 100644 --- a/src/declarative/qml/qdeclarativecomponent.cpp +++ b/src/declarative/qml/qdeclarativecomponent.cpp @@ -241,10 +241,10 @@ QDeclarativeComponent::~QDeclarativeComponent() \qmlproperty enumeration Component::status This property holds the status of component loading. It can be one of: \list - \o Null - no data is available for the component - \o Ready - the component has been loaded, and can be used to create instances. - \o Loading - the component is currently being loaded - \o Error - an error occurred while loading the component. + \o Component.Null - no data is available for the component + \o Component.Ready - the component has been loaded, and can be used to create instances. + \o Component.Loading - the component is currently being loaded + \o Component.Error - an error occurred while loading the component. Calling errorsString() will provide a human-readable description of any errors. \endlist */ diff --git a/src/declarative/util/qdeclarativeanimation.cpp b/src/declarative/util/qdeclarativeanimation.cpp index 4059522..067565d 100644 --- a/src/declarative/util/qdeclarativeanimation.cpp +++ b/src/declarative/util/qdeclarativeanimation.cpp @@ -1320,27 +1320,27 @@ void QDeclarativeRotationAnimation::setTo(qreal t) /*! \qmlproperty enumeration RotationAnimation::direction The direction in which to rotate. - Possible values are Numerical, Clockwise, Counterclockwise, - or Shortest. + + Possible values are: \table \row - \o Numerical + \o RotationAnimation.Numerical \o Rotate by linearly interpolating between the two numbers. A rotation from 10 to 350 will rotate 340 degrees clockwise. \row - \o Clockwise + \o RotationAnimation.Clockwise \o Rotate clockwise between the two values \row - \o Counterclockwise + \o RotationAnimation.Counterclockwise \o Rotate counterclockwise between the two values \row - \o Shortest + \o RotationAnimation.Shortest \o Rotate in the direction that produces the shortest animation path. A rotation from 10 to 350 will rotate 20 degrees counterclockwise. \endtable - The default direction is Numerical. + The default direction is RotationAnimation.Numerical. */ QDeclarativeRotationAnimation::RotationDirection QDeclarativeRotationAnimation::direction() const { @@ -1754,189 +1754,189 @@ void QDeclarativePropertyAnimation::setTo(const QVariant &t) Linear. \qml - PropertyAnimation { properties: "y"; easing.type: "InOutElastic"; easing.amplitude: 2.0; easing.period: 1.5 } + PropertyAnimation { properties: "y"; easing.type: Easing.InOutElastic; easing.amplitude: 2.0; easing.period: 1.5 } \endqml Available types are: \table \row - \o \c Linear + \o \c Easing.Linear \o Easing curve for a linear (t) function: velocity is constant. \o \inlineimage qeasingcurve-linear.png \row - \o \c InQuad + \o \c Easing.InQuad \o Easing curve for a quadratic (t^2) function: accelerating from zero velocity. \o \inlineimage qeasingcurve-inquad.png \row - \o \c OutQuad + \o \c Easing.OutQuad \o Easing curve for a quadratic (t^2) function: decelerating to zero velocity. \o \inlineimage qeasingcurve-outquad.png \row - \o \c InOutQuad + \o \c Easing.InOutQuad \o Easing curve for a quadratic (t^2) function: acceleration until halfway, then deceleration. \o \inlineimage qeasingcurve-inoutquad.png \row - \o \c OutInQuad + \o \c Easing.OutInQuad \o Easing curve for a quadratic (t^2) function: deceleration until halfway, then acceleration. \o \inlineimage qeasingcurve-outinquad.png \row - \o \c InCubic + \o \c Easing.InCubic \o Easing curve for a cubic (t^3) function: accelerating from zero velocity. \o \inlineimage qeasingcurve-incubic.png \row - \o \c OutCubic + \o \c Easing.OutCubic \o Easing curve for a cubic (t^3) function: decelerating from zero velocity. \o \inlineimage qeasingcurve-outcubic.png \row - \o \c InOutCubic + \o \c Easing.InOutCubic \o Easing curve for a cubic (t^3) function: acceleration until halfway, then deceleration. \o \inlineimage qeasingcurve-inoutcubic.png \row - \o \c OutInCubic + \o \c Easing.OutInCubic \o Easing curve for a cubic (t^3) function: deceleration until halfway, then acceleration. \o \inlineimage qeasingcurve-outincubic.png \row - \o \c InQuart + \o \c Easing.InQuart \o Easing curve for a quartic (t^4) function: accelerating from zero velocity. \o \inlineimage qeasingcurve-inquart.png \row - \o \c OutQuart + \o \c Easing.OutQuart \o Easing curve for a cubic (t^4) function: decelerating from zero velocity. \o \inlineimage qeasingcurve-outquart.png \row - \o \c InOutQuart + \o \c Easing.InOutQuart \o Easing curve for a cubic (t^4) function: acceleration until halfway, then deceleration. \o \inlineimage qeasingcurve-inoutquart.png \row - \o \c OutInQuart + \o \c Easing.OutInQuart \o Easing curve for a cubic (t^4) function: deceleration until halfway, then acceleration. \o \inlineimage qeasingcurve-outinquart.png \row - \o \c InQuint + \o \c Easing.InQuint \o Easing curve for a quintic (t^5) function: accelerating from zero velocity. \o \inlineimage qeasingcurve-inquint.png \row - \o \c OutQuint + \o \c Easing.OutQuint \o Easing curve for a cubic (t^5) function: decelerating from zero velocity. \o \inlineimage qeasingcurve-outquint.png \row - \o \c InOutQuint + \o \c Easing.InOutQuint \o Easing curve for a cubic (t^5) function: acceleration until halfway, then deceleration. \o \inlineimage qeasingcurve-inoutquint.png \row - \o \c OutInQuint + \o \c Easing.OutInQuint \o Easing curve for a cubic (t^5) function: deceleration until halfway, then acceleration. \o \inlineimage qeasingcurve-outinquint.png \row - \o \c InSine + \o \c Easing.InSine \o Easing curve for a sinusoidal (sin(t)) function: accelerating from zero velocity. \o \inlineimage qeasingcurve-insine.png \row - \o \c OutSine + \o \c Easing.OutSine \o Easing curve for a sinusoidal (sin(t)) function: decelerating from zero velocity. \o \inlineimage qeasingcurve-outsine.png \row - \o \c InOutSine + \o \c Easing.InOutSine \o Easing curve for a sinusoidal (sin(t)) function: acceleration until halfway, then deceleration. \o \inlineimage qeasingcurve-inoutsine.png \row - \o \c OutInSine + \o \c Easing.OutInSine \o Easing curve for a sinusoidal (sin(t)) function: deceleration until halfway, then acceleration. \o \inlineimage qeasingcurve-outinsine.png \row - \o \c InExpo + \o \c Easing.InExpo \o Easing curve for an exponential (2^t) function: accelerating from zero velocity. \o \inlineimage qeasingcurve-inexpo.png \row - \o \c OutExpo + \o \c Easing.OutExpo \o Easing curve for an exponential (2^t) function: decelerating from zero velocity. \o \inlineimage qeasingcurve-outexpo.png \row - \o \c InOutExpo + \o \c Easing.InOutExpo \o Easing curve for an exponential (2^t) function: acceleration until halfway, then deceleration. \o \inlineimage qeasingcurve-inoutexpo.png \row - \o \c OutInExpo + \o \c Easing.OutInExpo \o Easing curve for an exponential (2^t) function: deceleration until halfway, then acceleration. \o \inlineimage qeasingcurve-outinexpo.png \row - \o \c InCirc + \o \c Easing.InCirc \o Easing curve for a circular (sqrt(1-t^2)) function: accelerating from zero velocity. \o \inlineimage qeasingcurve-incirc.png \row - \o \c OutCirc + \o \c Easing.OutCirc \o Easing curve for a circular (sqrt(1-t^2)) function: decelerating from zero velocity. \o \inlineimage qeasingcurve-outcirc.png \row - \o \c InOutCirc + \o \c Easing.InOutCirc \o Easing curve for a circular (sqrt(1-t^2)) function: acceleration until halfway, then deceleration. \o \inlineimage qeasingcurve-inoutcirc.png \row - \o \c OutInCirc + \o \c Easing.OutInCirc \o Easing curve for a circular (sqrt(1-t^2)) function: deceleration until halfway, then acceleration. \o \inlineimage qeasingcurve-outincirc.png \row - \o \c InElastic + \o \c Easing.InElastic \o Easing curve for an elastic (exponentially decaying sine wave) function: accelerating from zero velocity. \br The peak amplitude can be set with the \e amplitude parameter, and the period of decay by the \e period parameter. \o \inlineimage qeasingcurve-inelastic.png \row - \o \c OutElastic + \o \c Easing.OutElastic \o Easing curve for an elastic (exponentially decaying sine wave) function: decelerating from zero velocity. \br The peak amplitude can be set with the \e amplitude parameter, and the period of decay by the \e period parameter. \o \inlineimage qeasingcurve-outelastic.png \row - \o \c InOutElastic + \o \c Easing.InOutElastic \o Easing curve for an elastic (exponentially decaying sine wave) function: acceleration until halfway, then deceleration. \o \inlineimage qeasingcurve-inoutelastic.png \row - \o \c OutInElastic + \o \c Easing.OutInElastic \o Easing curve for an elastic (exponentially decaying sine wave) function: deceleration until halfway, then acceleration. \o \inlineimage qeasingcurve-outinelastic.png \row - \o \c InBack + \o \c Easing.InBack \o Easing curve for a back (overshooting cubic function: (s+1)*t^3 - s*t^2) easing in: accelerating from zero velocity. \o \inlineimage qeasingcurve-inback.png \row - \o \c OutBack + \o \c Easing.OutBack \o Easing curve for a back (overshooting cubic function: (s+1)*t^3 - s*t^2) easing out: decelerating to zero velocity. \o \inlineimage qeasingcurve-outback.png \row - \o \c InOutBack + \o \c Easing.InOutBack \o Easing curve for a back (overshooting cubic function: (s+1)*t^3 - s*t^2) easing in/out: acceleration until halfway, then deceleration. \o \inlineimage qeasingcurve-inoutback.png \row - \o \c OutInBack + \o \c Easing.OutInBack \o Easing curve for a back (overshooting cubic easing: (s+1)*t^3 - s*t^2) easing out/in: deceleration until halfway, then acceleration. \o \inlineimage qeasingcurve-outinback.png \row - \o \c InBounce + \o \c Easing.InBounce \o Easing curve for a bounce (exponentially decaying parabolic bounce) function: accelerating from zero velocity. \o \inlineimage qeasingcurve-inbounce.png \row - \o \c OutBounce + \o \c Easing.OutBounce \o Easing curve for a bounce (exponentially decaying parabolic bounce) function: decelerating from zero velocity. \o \inlineimage qeasingcurve-outbounce.png \row - \o \c InOutBounce + \o \c Easing.InOutBounce \o Easing curve for a bounce (exponentially decaying parabolic bounce) function easing in/out: acceleration until halfway, then deceleration. \o \inlineimage qeasingcurve-inoutbounce.png \row - \o \c OutInBounce + \o \c Easing.OutInBounce \o Easing curve for a bounce (exponentially decaying parabolic bounce) function easing out/in: deceleration until halfway, then acceleration. \o \inlineimage qeasingcurve-outinbounce.png \endtable - easing.amplitude is not applicable for all curve types. It is only applicable for bounce and elastic curves (curves of type - QEasingCurve::InBounce, QEasingCurve::OutBounce, QEasingCurve::InOutBounce, QEasingCurve::OutInBounce, QEasingCurve::InElastic, - QEasingCurve::OutElastic, QEasingCurve::InOutElastic or QEasingCurve::OutInElastic). + easing.amplitude is only applicable for bounce and elastic curves (curves of type + Easing.InBounce, Easing.OutBounce, Easing.InOutBounce, Easing.OutInBounce, Easing.InElastic, + Easing.OutElastic, Easing.InOutElastic or Easing.OutInElastic). - easing.overshoot is not applicable for all curve types. It is only applicable if type is: QEasingCurve::InBack, QEasingCurve::OutBack, - QEasingCurve::InOutBack or QEasingCurve::OutInBack. + easing.overshoot is only applicable if type is: Easing.InBack, Easing.OutBack, + Easing.InOutBack or Easing.OutInBack. - easing.period is not applicable for all curve types. It is only applicable if type is: QEasingCurve::InElastic, QEasingCurve::OutElastic, - QEasingCurve::InOutElastic or QEasingCurve::OutInElastic. + easing.period is only applicable if type is: Easing.InElastic, Easing.OutElastic, + Easing.InOutElastic or Easing.OutInElastic. */ QEasingCurve QDeclarativePropertyAnimation::easing() const { @@ -2730,7 +2730,7 @@ void QDeclarativeAnchorAnimation::setDuration(int duration) Linear. \qml - AnchorAnimation { easing.type: "InOutQuad" } + AnchorAnimation { easing.type: Easing.InOutQuad } \endqml See the \l{PropertyAnimation::easing.type} documentation for information diff --git a/src/declarative/util/qdeclarativefontloader.cpp b/src/declarative/util/qdeclarativefontloader.cpp index f98ce8b..adfcd62 100644 --- a/src/declarative/util/qdeclarativefontloader.cpp +++ b/src/declarative/util/qdeclarativefontloader.cpp @@ -185,10 +185,10 @@ void QDeclarativeFontLoader::setName(const QString &name) This property holds the status of font loading. It can be one of: \list - \o Null - no font has been set - \o Ready - the font has been loaded - \o Loading - the font is currently being loaded - \o Error - an error occurred while loading the font + \o FontLoader.Null - no font has been set + \o FontLoader.Ready - the font has been loaded + \o FontLoader.Loading - the font is currently being loaded + \o FontLoader.Error - an error occurred while loading the font \endlist Note that a change in the status property does not cause anything to happen diff --git a/src/declarative/util/qdeclarativesmoothedanimation.cpp b/src/declarative/util/qdeclarativesmoothedanimation.cpp index 19a00ee..bd48ef0 100644 --- a/src/declarative/util/qdeclarativesmoothedanimation.cpp +++ b/src/declarative/util/qdeclarativesmoothedanimation.cpp @@ -388,10 +388,10 @@ void QDeclarativeSmoothedAnimation::transition(QDeclarativeStateActions &actions Sets how the SmoothedAnimation behaves if an animation direction is reversed. - If reversing mode is \c Eased, the animation will smoothly decelerate, and - then reverse direction. If the reversing mode is \c Immediate, the + If reversing mode is \c SmoothedAnimation.Eased, the animation will smoothly decelerate, and + then reverse direction. If the reversing mode is \c SmoothedAnimation.Immediate, the animation will immediately begin accelerating in the reverse direction, - begining with a velocity of 0. If the reversing mode is \c Sync, the + begining with a velocity of 0. If the reversing mode is \c SmoothedAnimation.Sync, the property is immediately set to the target value. */ QDeclarativeSmoothedAnimation::ReversingMode QDeclarativeSmoothedAnimation::reversingMode() const diff --git a/src/declarative/util/qdeclarativesmoothedfollow.cpp b/src/declarative/util/qdeclarativesmoothedfollow.cpp index 3ed9257..e919282 100644 --- a/src/declarative/util/qdeclarativesmoothedfollow.cpp +++ b/src/declarative/util/qdeclarativesmoothedfollow.cpp @@ -143,10 +143,10 @@ QDeclarativeSmoothedFollowPrivate::QDeclarativeSmoothedFollowPrivate() Sets how the SmoothedFollow behaves if an animation direction is reversed. - If reversing mode is \c Eased, the animation will smoothly decelerate, and - then reverse direction. If the reversing mode is \c Immediate, the + If reversing mode is \SmoothedFollow.c Eased, the animation will smoothly decelerate, and + then reverse direction. If the reversing mode is \c SmoothedFollow.Immediate, the animation will immediately begin accelerating in the reverse direction, - begining with a velocity of 0. If the reversing mode is \c Sync, the + begining with a velocity of 0. If the reversing mode is \c SmoothedFollow.Sync, the property is immediately set to the target value. */ QDeclarativeSmoothedFollow::ReversingMode QDeclarativeSmoothedFollow::reversingMode() const diff --git a/src/declarative/util/qdeclarativexmllistmodel.cpp b/src/declarative/util/qdeclarativexmllistmodel.cpp index bdebadf..ae3b5d7 100644 --- a/src/declarative/util/qdeclarativexmllistmodel.cpp +++ b/src/declarative/util/qdeclarativexmllistmodel.cpp @@ -675,10 +675,10 @@ void QDeclarativeXmlListModel::setNamespaceDeclarations(const QString &declarati Specifies the model loading status, which can be one of the following: \list - \o Null - No XML data has been set for this model. - \o Ready - The XML data has been loaded into the model. - \o Loading - The model is in the process of reading and loading XML data. - \o Error - An error occurred while the model was loading. + \o XmlListModel.Null - No XML data has been set for this model. + \o XmlListModel.Ready - The XML data has been loaded into the model. + \o XmlListModel.Loading - The model is in the process of reading and loading XML data. + \o XmlListModel.Error - An error occurred while the model was loading. \endlist \sa progress -- cgit v0.12 From b1bf4b23fb34337ea1b5ebdd5aedaad48f5c9f4a Mon Sep 17 00:00:00 2001 From: Martin Jones Date: Wed, 5 May 2010 15:13:35 +1000 Subject: Test for QList model with object properties changing. --- .../tst_qdeclarativevisualdatamodel.cpp | 99 ++++++++++++++++++++++ 1 file changed, 99 insertions(+) diff --git a/tests/auto/declarative/qdeclarativevisualdatamodel/tst_qdeclarativevisualdatamodel.cpp b/tests/auto/declarative/qdeclarativevisualdatamodel/tst_qdeclarativevisualdatamodel.cpp index 7de15a3..c238ef9 100644 --- a/tests/auto/declarative/qdeclarativevisualdatamodel/tst_qdeclarativevisualdatamodel.cpp +++ b/tests/auto/declarative/qdeclarativevisualdatamodel/tst_qdeclarativevisualdatamodel.cpp @@ -44,6 +44,10 @@ #include #include #include +#include +#include +#include +#include #include #include #include @@ -74,9 +78,50 @@ public: private slots: void rootIndex(); + void objectListModel(); private: QDeclarativeEngine engine; + template + T *findItem(QGraphicsObject *parent, const QString &objectName, int index); +}; + +class DataObject : public QObject +{ + Q_OBJECT + + Q_PROPERTY(QString name READ name WRITE setName NOTIFY nameChanged) + Q_PROPERTY(QString color READ color WRITE setColor NOTIFY colorChanged) + +public: + DataObject(QObject *parent=0) : QObject(parent) {} + DataObject(const QString &name, const QString &color, QObject *parent=0) + : QObject(parent), m_name(name), m_color(color) { } + + + QString name() const { return m_name; } + void setName(const QString &name) { + if (name != m_name) { + m_name = name; + emit nameChanged(); + } + } + + QString color() const { return m_color; } + void setColor(const QString &color) { + if (color != m_color) { + m_color = color; + emit colorChanged(); + } + } + +signals: + void nameChanged(); + void colorChanged(); + +private: + QString m_name; + QString m_color; }; tst_qdeclarativevisualdatamodel::tst_qdeclarativevisualdatamodel() @@ -105,6 +150,60 @@ void tst_qdeclarativevisualdatamodel::rootIndex() delete obj; } +void tst_qdeclarativevisualdatamodel::objectListModel() +{ + QDeclarativeView view; + + QList dataList; + dataList.append(new DataObject("Item 1", "red")); + dataList.append(new DataObject("Item 2", "green")); + dataList.append(new DataObject("Item 3", "blue")); + dataList.append(new DataObject("Item 4", "yellow")); + + QDeclarativeContext *ctxt = view.rootContext(); + ctxt->setContextProperty("myModel", QVariant::fromValue(dataList)); + + view.setSource(QUrl::fromLocalFile(SRCDIR "/data/objectlist.qml")); + + QDeclarativeListView *listview = qobject_cast(view.rootObject()); + QVERIFY(listview != 0); + + QDeclarativeItem *viewport = listview->viewport(); + QVERIFY(viewport != 0); + + QDeclarativeText *name = findItem(viewport, "name", 0); + QCOMPARE(name->text(), QString("Item 1")); + + dataList[0]->setProperty("name", QLatin1String("Changed")); + QCOMPARE(name->text(), QString("Changed")); +} + +template +T *tst_qdeclarativevisualdatamodel::findItem(QGraphicsObject *parent, const QString &objectName, int index) +{ + const QMetaObject &mo = T::staticMetaObject; + //qDebug() << parent->childItems().count() << "children"; + for (int i = 0; i < parent->childItems().count(); ++i) { + QDeclarativeItem *item = qobject_cast(parent->childItems().at(i)); + if(!item) + continue; + //qDebug() << "try" << item; + if (mo.cast(item) && (objectName.isEmpty() || item->objectName() == objectName)) { + if (index != -1) { + QDeclarativeExpression e(qmlContext(item), "index", item); + if (e.evaluate().toInt() == index) + return static_cast(item); + } else { + return static_cast(item); + } + } + item = findItem(item, objectName, index); + if (item) + return static_cast(item); + } + + return 0; +} QTEST_MAIN(tst_qdeclarativevisualdatamodel) -- cgit v0.12 From ba8ff70b5ac7b68be57a4b63e439fd5a37c4aafa Mon Sep 17 00:00:00 2001 From: Martin Jones Date: Wed, 5 May 2010 15:24:53 +1000 Subject: Turn off smooth rendering for qDrawBorderPixmap() with transforms. On non-gl graphics systems smooth rendering of qDrawBorderPixmap() with a transform applied resulted in ugly artifacts. Better to draw without smooth and get a correct looking result, though with jaggy edges. Task-number: QTBUG-5687 Reviewed-by: Gunnar --- src/gui/painting/qdrawutil.cpp | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/src/gui/painting/qdrawutil.cpp b/src/gui/painting/qdrawutil.cpp index a62f06b..ef9b18c 100644 --- a/src/gui/painting/qdrawutil.cpp +++ b/src/gui/painting/qdrawutil.cpp @@ -1137,6 +1137,15 @@ void qDrawBorderPixmap(QPainter *painter, const QRect &targetRect, const QMargin xTarget.resize(columns + 1); yTarget.resize(rows + 1); + bool oldAA = painter->testRenderHint(QPainter::Antialiasing); + bool oldSmooth = painter->testRenderHint(QPainter::SmoothPixmapTransform); + if (painter->paintEngine()->type() != QPaintEngine::OpenGL + && painter->paintEngine()->type() != QPaintEngine::OpenGL2 + && (oldSmooth || oldAA) && painter->combinedTransform().type() != QTransform::TxNone) { + painter->setRenderHint(QPainter::Antialiasing, false); + painter->setRenderHint(QPainter::SmoothPixmapTransform, false); + } + xTarget[0] = targetRect.left(); xTarget[1] = targetCenterLeft; xTarget[columns - 1] = targetCenterRight; @@ -1342,6 +1351,11 @@ void qDrawBorderPixmap(QPainter *painter, const QRect &targetRect, const QMargin painter->drawPixmapFragments(opaqueData.data(), opaqueData.size(), pixmap, QPainter::OpaqueHint); if (translucentData.size()) painter->drawPixmapFragments(translucentData.data(), translucentData.size(), pixmap); + + if (oldAA) + painter->setRenderHint(QPainter::Antialiasing, true); + if (oldSmooth) + painter->setRenderHint(QPainter::SmoothPixmapTransform, true); } QT_END_NAMESPACE -- cgit v0.12 From 06c8e20cd7c04c5a11eee5b5a255099fa29bb3e4 Mon Sep 17 00:00:00 2001 From: Bea Lam Date: Wed, 5 May 2010 14:29:16 +1000 Subject: Fix qdoc errors --- doc/src/declarative/advtutorial.qdoc | 2 +- src/declarative/graphicsitems/qdeclarativeitem.cpp | 8 +------- src/declarative/graphicsitems/qdeclarativepainteditem.cpp | 2 +- src/declarative/graphicsitems/qdeclarativetextinput.cpp | 4 ++-- src/declarative/qml/qdeclarativeengine.cpp | 2 +- src/declarative/qml/qdeclarativepropertyvaluesource.cpp | 3 +++ 6 files changed, 9 insertions(+), 12 deletions(-) diff --git a/doc/src/declarative/advtutorial.qdoc b/doc/src/declarative/advtutorial.qdoc index 7d2967e..8f95190 100644 --- a/doc/src/declarative/advtutorial.qdoc +++ b/doc/src/declarative/advtutorial.qdoc @@ -468,6 +468,6 @@ By following this tutorial you've seen how you can write a fully functional appl \endlist There is so much more to learn about QML that we haven't been able to cover in this tutorial. Check out all the -demos and examples and the \l {Declarative UI (QML)}{documentation} to find out all the things you can do with QML! +demos and examples and the \l {Declarative UI Using QML}{documentation} to find out all the things you can do with QML! */ diff --git a/src/declarative/graphicsitems/qdeclarativeitem.cpp b/src/declarative/graphicsitems/qdeclarativeitem.cpp index a0983cc..0395766 100644 --- a/src/declarative/graphicsitems/qdeclarativeitem.cpp +++ b/src/declarative/graphicsitems/qdeclarativeitem.cpp @@ -1632,10 +1632,6 @@ void QDeclarativeItemPrivate::parentProperty(QObject *o, void *rv, QDeclarativeN specify it. */ -/*! - \internal -*/ - /*! \internal */ QDeclarativeListProperty QDeclarativeItemPrivate::data() { @@ -1646,7 +1642,7 @@ QDeclarativeListProperty QDeclarativeItemPrivate::data() \property QDeclarativeItem::childrenRect \brief The geometry of an item's children. - childrenRect provides an easy way to access the (collective) position and size of the item's children. + This property holds the (collective) position and size of the item's children. */ QRectF QDeclarativeItem::childrenRect() { @@ -2966,7 +2962,6 @@ void QDeclarativeItem::setFocus(bool focus) } /*! - \reimp \internal */ void QDeclarativeItem::paint(QPainter *, const QStyleOptionGraphicsItem *, QWidget *) @@ -2974,7 +2969,6 @@ void QDeclarativeItem::paint(QPainter *, const QStyleOptionGraphicsItem *, QWidg } /*! - \reimp \internal */ bool QDeclarativeItem::event(QEvent *ev) diff --git a/src/declarative/graphicsitems/qdeclarativepainteditem.cpp b/src/declarative/graphicsitems/qdeclarativepainteditem.cpp index 5dd7e5d..6430fae 100644 --- a/src/declarative/graphicsitems/qdeclarativepainteditem.cpp +++ b/src/declarative/graphicsitems/qdeclarativepainteditem.cpp @@ -231,7 +231,7 @@ void QDeclarativePaintedItem::setCacheFrozen(bool frozen) } /*! - \reimp + \internal */ void QDeclarativePaintedItem::paint(QPainter *p, const QStyleOptionGraphicsItem *, QWidget *) { diff --git a/src/declarative/graphicsitems/qdeclarativetextinput.cpp b/src/declarative/graphicsitems/qdeclarativetextinput.cpp index b04e36e..a1fa8c6 100644 --- a/src/declarative/graphicsitems/qdeclarativetextinput.cpp +++ b/src/declarative/graphicsitems/qdeclarativetextinput.cpp @@ -828,7 +828,7 @@ void QDeclarativeTextInput::moveCursor() } /*! - \qmlmethod int xToPosition(int x) + \qmlmethod int TextInput::xToPosition(int x) This function returns the character position at x pixels from the left of the textInput. Position 0 is before the @@ -1097,7 +1097,7 @@ QString QDeclarativeTextInput::displayText() const } /*! - \qmlmethod void moveCursorSelection(int position) + \qmlmethod void TextInput::moveCursorSelection(int position) Moves the cursor to \a position and updates the selection accordingly. (To only move the cursor, set the \l cursorPosition property.) diff --git a/src/declarative/qml/qdeclarativeengine.cpp b/src/declarative/qml/qdeclarativeengine.cpp index dee5ec6..ac60758 100644 --- a/src/declarative/qml/qdeclarativeengine.cpp +++ b/src/declarative/qml/qdeclarativeengine.cpp @@ -1550,7 +1550,7 @@ QStringList QDeclarativeEngine::importPathList() const } /*! - Sets the list of directories where the engine searches for + Sets \a paths as the list of directories where the engine searches for installed modules in a URL-based directory structure. By default, the list contains the paths specified in the \c QML_IMPORT_PATH environment diff --git a/src/declarative/qml/qdeclarativepropertyvaluesource.cpp b/src/declarative/qml/qdeclarativepropertyvaluesource.cpp index a0ed78f..039998f 100644 --- a/src/declarative/qml/qdeclarativepropertyvaluesource.cpp +++ b/src/declarative/qml/qdeclarativepropertyvaluesource.cpp @@ -60,6 +60,9 @@ QDeclarativePropertyValueSource::QDeclarativePropertyValueSource() { } +/*! + Destroys the value source. +*/ QDeclarativePropertyValueSource::~QDeclarativePropertyValueSource() { } -- cgit v0.12 From dc4f8e4b23a4b07efe1605c2ae479e219b456df9 Mon Sep 17 00:00:00 2001 From: Bea Lam Date: Wed, 5 May 2010 15:41:08 +1000 Subject: Docs - point to property types from tutorial and QML Basic Types page --- doc/src/declarative/basictypes.qdoc | 9 ++++++--- doc/src/declarative/tutorial.qdoc | 14 +++++++------- 2 files changed, 13 insertions(+), 10 deletions(-) diff --git a/doc/src/declarative/basictypes.qdoc b/doc/src/declarative/basictypes.qdoc index 6901947..8db1c35 100644 --- a/doc/src/declarative/basictypes.qdoc +++ b/doc/src/declarative/basictypes.qdoc @@ -43,9 +43,12 @@ \page qdeclarativebasictypes.html \title QML Basic Types - QML uses a set of property types, which are primitive within QML. - These basic types are referenced throughout the documentation of the - QML elements. Almost all of them are exactly what you would expect. + QML has a set of primitive types, as listed below, that are used throughout + the \l {QML Elements}. + + The simpler types in this list can also be used for defining a new + \c property in a component. See \l{Extending types from QML} for the + list of types that can be used for custom properties. \annotatedlist qmlbasictypes */ diff --git a/doc/src/declarative/tutorial.qdoc b/doc/src/declarative/tutorial.qdoc index 4cfb999..75c0f851 100644 --- a/doc/src/declarative/tutorial.qdoc +++ b/doc/src/declarative/tutorial.qdoc @@ -57,10 +57,10 @@ The tutorial's source code is located in the $QTDIR/examples/declarative/tutoria Tutorial chapters: -\list -\o \l {QML Tutorial 1 - Basic Types} -\o \l {QML Tutorial 2 - QML Component} -\o \l {QML Tutorial 3 - States and Transitions} +\list 1 +\o \l {QML Tutorial 1 - Basic Types}{Basic Types} +\o \l {QML Tutorial 2 - QML Components}{QML Components} +\o \l {QML Tutorial 3 - States and Transitions}{States and Transitions} \endlist */ @@ -125,7 +125,7 @@ bin/qml $QTDIR/examples/declarative/tutorials/helloworld/tutorial1.qml /*! \page qml-tutorial2.html -\title QML Tutorial 2 - QML Component +\title QML Tutorial 2 - QML Components \contentspage QML Tutorial \previouspage QML Tutorial 1 - Basic Types \nextpage QML Tutorial 3 - States and Transitions @@ -137,7 +137,7 @@ This chapter adds a color picker to change the color of the text. Our color picker is made of six cells with different colors. To avoid writing the same code multiple times for each cell, we create a new \c Cell component. A component provides a way of defining a new type that we can re-use in other QML files. -A QML component is like a black-box and interacts with the outside world through properties, signals and slots and is generally +A QML component is like a black-box and interacts with the outside world through properties, signals and functions and is generally defined in its own QML file. (For more details, see \l {Defining new Components}). The component's filename must always start with a capital letter. @@ -158,7 +158,7 @@ An \l Item is the most basic visual element in QML and is often used as a contai We declare a \c cellColor property. This property is accessible from \e outside our component, this allows us to instantiate the cells with different colors. -This property is just an alias to an existing property - the color of the rectangle that compose the cell (see \l{intro-properties}{Properties}). +This property is just an alias to an existing property - the color of the rectangle that compose the cell (see \l{Adding new properties}). \snippet examples/declarative/tutorials/helloworld/Cell.qml 5 -- cgit v0.12 From f8af54e12bcb6e991315c53eca758c43653610fa Mon Sep 17 00:00:00 2001 From: Martin Jones Date: Wed, 5 May 2010 15:54:33 +1000 Subject: little doc fix. --- src/declarative/util/qdeclarativesmoothedfollow.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/declarative/util/qdeclarativesmoothedfollow.cpp b/src/declarative/util/qdeclarativesmoothedfollow.cpp index e919282..f70df9d 100644 --- a/src/declarative/util/qdeclarativesmoothedfollow.cpp +++ b/src/declarative/util/qdeclarativesmoothedfollow.cpp @@ -143,7 +143,7 @@ QDeclarativeSmoothedFollowPrivate::QDeclarativeSmoothedFollowPrivate() Sets how the SmoothedFollow behaves if an animation direction is reversed. - If reversing mode is \SmoothedFollow.c Eased, the animation will smoothly decelerate, and + If reversing mode is \c SmoothedFollow.Eased, the animation will smoothly decelerate, and then reverse direction. If the reversing mode is \c SmoothedFollow.Immediate, the animation will immediately begin accelerating in the reverse direction, begining with a velocity of 0. If the reversing mode is \c SmoothedFollow.Sync, the -- cgit v0.12 From 80c04413ba2c1a20a5d93d69df92ba908c26d81d Mon Sep 17 00:00:00 2001 From: Martin Jones Date: Wed, 5 May 2010 16:03:16 +1000 Subject: Document delegate life cycle. Task-number: QTBUG-10353 --- src/declarative/graphicsitems/qdeclarativegridview.cpp | 3 +++ src/declarative/graphicsitems/qdeclarativelistview.cpp | 3 +++ src/declarative/graphicsitems/qdeclarativepathview.cpp | 6 +++++- 3 files changed, 11 insertions(+), 1 deletion(-) diff --git a/src/declarative/graphicsitems/qdeclarativegridview.cpp b/src/declarative/graphicsitems/qdeclarativegridview.cpp index f55c483..4c72482 100644 --- a/src/declarative/graphicsitems/qdeclarativegridview.cpp +++ b/src/declarative/graphicsitems/qdeclarativegridview.cpp @@ -908,6 +908,9 @@ void QDeclarativeGridViewPrivate::flick(AxisData &data, qreal minExtent, qreal m In this case ListModel is a handy way for us to test our UI. In practice the model would be implemented in C++, or perhaps via a SQL data source. + Delegates are instantiated as needed and may be destroyed at any time. + State should \e never be stored in a delegate. + \bold Note that views do not enable \e clip automatically. If the view is not clipped by another item or the screen, it will be necessary to set \e {clip: true} in order to have the out of view items clipped diff --git a/src/declarative/graphicsitems/qdeclarativelistview.cpp b/src/declarative/graphicsitems/qdeclarativelistview.cpp index 589b8e2..3877fab 100644 --- a/src/declarative/graphicsitems/qdeclarativelistview.cpp +++ b/src/declarative/graphicsitems/qdeclarativelistview.cpp @@ -1314,6 +1314,9 @@ void QDeclarativeListViewPrivate::flick(AxisData &data, qreal minExtent, qreal m In this case ListModel is a handy way for us to test our UI. In practice the model would be implemented in C++, or perhaps via a SQL data source. + Delegates are instantiated as needed and may be destroyed at any time. + State should \e never be stored in a delegate. + \bold Note that views do not enable \e clip automatically. If the view is not clipped by another item or the screen, it will be necessary to set \e {clip: true} in order to have the out of view items clipped diff --git a/src/declarative/graphicsitems/qdeclarativepathview.cpp b/src/declarative/graphicsitems/qdeclarativepathview.cpp index 9ae6f9d..5c3a3c0 100644 --- a/src/declarative/graphicsitems/qdeclarativepathview.cpp +++ b/src/declarative/graphicsitems/qdeclarativepathview.cpp @@ -308,12 +308,16 @@ void QDeclarativePathViewPrivate::regenerate() The model is typically provided by a QAbstractListModel "C++ model object", but can also be created directly in QML. - The items are laid out along a path defined by a \l Path and may be flicked to scroll. + The \l delegate is instantiated for each item on the \l path. + The items may be flicked to move them along the path. \snippet doc/src/snippets/declarative/pathview/pathview.qml 0 \image pathview.gif + Delegates are instantiated as needed and may be destroyed at any time. + State should \e never be stored in a delegate. + \bold Note that views do not enable \e clip automatically. If the view is not clipped by another item or the screen, it will be necessary to set \e {clip: true} in order to have the out of view items clipped -- cgit v0.12 From f5e3e21e95275a8cf31cddf2063dfa497e92872e Mon Sep 17 00:00:00 2001 From: Yann Bodson Date: Wed, 5 May 2010 16:22:51 +1000 Subject: Use enum rather than string for easing type. --- demos/declarative/calculator/calculator.qml | 4 +- demos/declarative/flickr/flickr.qml | 4 +- demos/declarative/flickr/mobile/GridDelegate.qml | 6 +- demos/declarative/flickr/mobile/ImageDetails.qml | 2 +- demos/declarative/flickr/mobile/TitleBar.qml | 2 +- demos/declarative/minehunt/MinehuntCore/Tile.qml | 2 +- .../photoviewer/PhotoViewerCore/AlbumDelegate.qml | 8 +- .../twitter/TwitterCore/HomeTitleBar.qml | 2 +- .../twitter/TwitterCore/MultiTitleBar.qml | 2 +- demos/declarative/twitter/TwitterCore/TitleBar.qml | 2 +- demos/declarative/twitter/twitter.qml | 2 +- .../content/RetractingWebBrowserHeader.qml | 2 +- demos/declarative/webbrowser/webbrowser.qml | 4 +- examples/declarative/animations/easing.qml | 104 +++++++++++---------- .../declarative/animations/property-animation.qml | 4 +- .../declarative/behaviors/behavior-example.qml | 4 +- .../border-image/content/MyBorderImage.qml | 20 +++- .../connections/connections-example.qml | 2 +- examples/declarative/focus/Core/ListViews.qml | 6 +- examples/declarative/focus/focus.qml | 4 +- examples/declarative/fonts/hello.qml | 2 +- examples/declarative/layouts/Button.qml | 42 ++++++--- examples/declarative/layouts/positioners.qml | 16 ++-- examples/declarative/parallax/qml/Smiley.qml | 4 +- examples/declarative/proxywidgets/proxywidgets.qml | 2 +- .../declarative/slideswitch/content/Switch.qml | 2 +- examples/declarative/states/transitions.qml | 4 +- .../declarative/tutorials/helloworld/tutorial3.qml | 2 +- examples/declarative/xmldata/yahoonews.qml | 2 +- .../graphicsitems/qdeclarativegridview.cpp | 2 +- .../graphicsitems/qdeclarativelistview.cpp | 2 +- .../graphicsitems/qdeclarativepositioners.cpp | 2 +- src/declarative/util/qdeclarativeanimation.cpp | 2 +- src/declarative/util/qdeclarativebehavior.cpp | 2 +- src/declarative/util/qdeclarativespringfollow.cpp | 2 +- 35 files changed, 154 insertions(+), 120 deletions(-) diff --git a/demos/declarative/calculator/calculator.qml b/demos/declarative/calculator/calculator.qml index 286a4d1..75f5735 100644 --- a/demos/declarative/calculator/calculator.qml +++ b/demos/declarative/calculator/calculator.qml @@ -98,8 +98,8 @@ Rectangle { transitions: Transition { SequentialAnimation { PropertyAction { target: rotateButton; property: "operation" } - NumberAnimation { properties: "rotation"; duration: 300; easing.type: "InOutQuint" } - NumberAnimation { properties: "x,y,width,height"; duration: 300; easing.type: "InOutQuint" } + NumberAnimation { properties: "rotation"; duration: 300; easing.type: Easing.InOutQuint } + NumberAnimation { properties: "x,y,width,height"; duration: 300; easing.type: Easing.InOutQuint } } } } diff --git a/demos/declarative/flickr/flickr.qml b/demos/declarative/flickr/flickr.qml index 8b73beb..29763d4 100644 --- a/demos/declarative/flickr/flickr.qml +++ b/demos/declarative/flickr/flickr.qml @@ -38,7 +38,7 @@ Item { } transitions: Transition { - NumberAnimation { properties: "x"; duration: 500; easing.type: "InOutQuad" } + NumberAnimation { properties: "x"; duration: 500; easing.type: Easing.InOutQuad } } } @@ -76,7 +76,7 @@ Item { } transitions: Transition { - NumberAnimation { properties: "x"; duration: 500; easing.type: "InOutQuad" } + NumberAnimation { properties: "x"; duration: 500; easing.type: Easing.InOutQuad } } } } diff --git a/demos/declarative/flickr/mobile/GridDelegate.qml b/demos/declarative/flickr/mobile/GridDelegate.qml index 5ab7b87..eccdc34 100644 --- a/demos/declarative/flickr/mobile/GridDelegate.qml +++ b/demos/declarative/flickr/mobile/GridDelegate.qml @@ -21,7 +21,7 @@ Item { anchors.centerIn: parent scale: 0.0 - Behavior on scale { NumberAnimation { easing.type: "InOutQuad"} } + Behavior on scale { NumberAnimation { easing.type: Easing.InOutQuad} } id: scaleMe Rectangle { height: 79; width: 79; id: blackRect; anchors.centerIn: parent; color: "black"; smooth: true } @@ -53,14 +53,14 @@ Transition { from: "Show"; to: "Details" ParentAnimation { - NumberAnimation { properties: "x,y"; duration: 500; easing.type: "InOutQuad" } + NumberAnimation { properties: "x,y"; duration: 500; easing.type: Easing.InOutQuad } } }, Transition { from: "Details"; to: "Show" SequentialAnimation { ParentAnimation { - NumberAnimation { properties: "x,y"; duration: 500; easing.type: "InOutQuad" } + NumberAnimation { properties: "x,y"; duration: 500; easing.type: Easing.InOutQuad } } PropertyAction { targets: wrapper; properties: "z" } } diff --git a/demos/declarative/flickr/mobile/ImageDetails.qml b/demos/declarative/flickr/mobile/ImageDetails.qml index 58b0b83..310c9df 100644 --- a/demos/declarative/flickr/mobile/ImageDetails.qml +++ b/demos/declarative/flickr/mobile/ImageDetails.qml @@ -114,7 +114,7 @@ Flipable { transitions: Transition { SequentialAnimation { PropertyAction { target: bigImage; property: "smooth"; value: false } - NumberAnimation { easing.type: "InOutQuad"; properties: "angle"; duration: 500 } + NumberAnimation { easing.type: Easing.InOutQuad; properties: "angle"; duration: 500 } PropertyAction { target: bigImage; property: "smooth"; value: !flickable.moving } } } diff --git a/demos/declarative/flickr/mobile/TitleBar.qml b/demos/declarative/flickr/mobile/TitleBar.qml index bb57429..025b897 100644 --- a/demos/declarative/flickr/mobile/TitleBar.qml +++ b/demos/declarative/flickr/mobile/TitleBar.qml @@ -81,6 +81,6 @@ Item { } transitions: Transition { - NumberAnimation { properties: "x"; easing.type: "InOutQuad" } + NumberAnimation { properties: "x"; easing.type: Easing.InOutQuad } } } diff --git a/demos/declarative/minehunt/MinehuntCore/Tile.qml b/demos/declarative/minehunt/MinehuntCore/Tile.qml index f3620f4..98b2017 100644 --- a/demos/declarative/minehunt/MinehuntCore/Tile.qml +++ b/demos/declarative/minehunt/MinehuntCore/Tile.qml @@ -57,7 +57,7 @@ Flipable { PauseAnimation { duration: pauseDur } - RotationAnimation { easing.type: "InOutQuad" } + RotationAnimation { easing.type: Easing.InOutQuad } ScriptAction { script: if (modelData.hasMine && modelData.flipped) { expl.explode = true } } } } diff --git a/demos/declarative/photoviewer/PhotoViewerCore/AlbumDelegate.qml b/demos/declarative/photoviewer/PhotoViewerCore/AlbumDelegate.qml index d39b7bc..142735f 100644 --- a/demos/declarative/photoviewer/PhotoViewerCore/AlbumDelegate.qml +++ b/demos/declarative/photoviewer/PhotoViewerCore/AlbumDelegate.qml @@ -78,11 +78,11 @@ Component { ] GridView.onAdd: NumberAnimation { - target: albumWrapper; properties: "scale"; from: 0.0; to: 1.0; easing.type: "OutQuad" + target: albumWrapper; properties: "scale"; from: 0.0; to: 1.0; easing.type: Easing.OutQuad } GridView.onRemove: SequentialAnimation { PropertyAction { target: albumWrapper; property: "GridView.delayRemove"; value: true } - NumberAnimation { target: albumWrapper; property: "scale"; from: 1.0; to: 0.0; easing.type: "OutQuad" } + NumberAnimation { target: albumWrapper; property: "scale"; from: 1.0; to: 0.0; easing.type: Easing.OutQuad } PropertyAction { target: albumWrapper; property: "GridView.delayRemove"; value: false } } @@ -92,12 +92,12 @@ Component { SequentialAnimation { NumberAnimation { properties: 'opacity'; duration: 250 } PauseAnimation { duration: 350 } - NumberAnimation { target: backButton; properties: "y"; duration: 200; easing.type: "OutQuad" } + NumberAnimation { target: backButton; properties: "y"; duration: 200; easing.type: Easing.OutQuad } } }, Transition { from: 'inGrid'; to: '*' - NumberAnimation { properties: "y,opacity"; easing.type: "OutQuad"; duration: 300 } + NumberAnimation { properties: "y,opacity"; easing.type: Easing.OutQuad; duration: 300 } } ] } diff --git a/demos/declarative/twitter/TwitterCore/HomeTitleBar.qml b/demos/declarative/twitter/TwitterCore/HomeTitleBar.qml index c1ae3e5..11aa74f 100644 --- a/demos/declarative/twitter/TwitterCore/HomeTitleBar.qml +++ b/demos/declarative/twitter/TwitterCore/HomeTitleBar.qml @@ -113,7 +113,7 @@ Item { transitions: [ Transition { from: "*"; to: "*" - NumberAnimation { properties: "x,y,width,height"; easing.type: "InOutQuad" } + NumberAnimation { properties: "x,y,width,height"; easing.type: Easing.InOutQuad } } ] } diff --git a/demos/declarative/twitter/TwitterCore/MultiTitleBar.qml b/demos/declarative/twitter/TwitterCore/MultiTitleBar.qml index 8c27e2b..445eda4 100644 --- a/demos/declarative/twitter/TwitterCore/MultiTitleBar.qml +++ b/demos/declarative/twitter/TwitterCore/MultiTitleBar.qml @@ -18,7 +18,7 @@ Item { } ] transitions: [ - Transition { NumberAnimation { properties: "x,y"; duration: 500; easing.type: "InOutQuad" } } + Transition { NumberAnimation { properties: "x,y"; duration: 500; easing.type: Easing.InOutQuad } } ] } diff --git a/demos/declarative/twitter/TwitterCore/TitleBar.qml b/demos/declarative/twitter/TwitterCore/TitleBar.qml index 87ceec5..5256de4 100644 --- a/demos/declarative/twitter/TwitterCore/TitleBar.qml +++ b/demos/declarative/twitter/TwitterCore/TitleBar.qml @@ -70,6 +70,6 @@ Item { } transitions: Transition { - NumberAnimation { properties: "x"; easing.type: "InOutQuad" } + NumberAnimation { properties: "x"; easing.type: Easing.InOutQuad } } } diff --git a/demos/declarative/twitter/twitter.qml b/demos/declarative/twitter/twitter.qml index 0e3ec3e..f86388e 100644 --- a/demos/declarative/twitter/twitter.qml +++ b/demos/declarative/twitter/twitter.qml @@ -88,7 +88,7 @@ Item { } ] transitions: [ - Transition { NumberAnimation { properties: "x,y"; duration: 500; easing.type: "InOutQuad" } } + Transition { NumberAnimation { properties: "x,y"; duration: 500; easing.type: Easing.InOutQuad } } ] } } diff --git a/demos/declarative/webbrowser/content/RetractingWebBrowserHeader.qml b/demos/declarative/webbrowser/content/RetractingWebBrowserHeader.qml index f5bfadf..b02a5bf 100644 --- a/demos/declarative/webbrowser/content/RetractingWebBrowserHeader.qml +++ b/demos/declarative/webbrowser/content/RetractingWebBrowserHeader.qml @@ -105,7 +105,7 @@ Image { NumberAnimation { targets: header properties: "progressOff" - easing.type: "InOutQuad" + easing.type: Easing.InOutQuad duration: 300 } } diff --git a/demos/declarative/webbrowser/webbrowser.qml b/demos/declarative/webbrowser/webbrowser.qml index fbbe7b2..f1a6034 100644 --- a/demos/declarative/webbrowser/webbrowser.qml +++ b/demos/declarative/webbrowser/webbrowser.qml @@ -99,7 +99,7 @@ Item { Transition { NumberAnimation { properties: "opacity" - easing.type: "InOutQuad" + easing.type: Easing.InOutQuad duration: 300 } } @@ -155,7 +155,7 @@ Item { Transition { NumberAnimation { properties: "opacity" - easing.type: "InOutQuad" + easing.type: Easing.InOutQuad duration: 320 } } diff --git a/examples/declarative/animations/easing.qml b/examples/declarative/animations/easing.qml index b0f9669..939d43b 100644 --- a/examples/declarative/animations/easing.qml +++ b/examples/declarative/animations/easing.qml @@ -6,47 +6,47 @@ Rectangle { ListModel { id: easingTypes - ListElement { type: "Linear"; ballColor: "DarkRed" } - ListElement { type: "InQuad"; ballColor: "IndianRed" } - ListElement { type: "OutQuad"; ballColor: "Salmon" } - ListElement { type: "InOutQuad"; ballColor: "Tomato" } - ListElement { type: "OutInQuad"; ballColor: "DarkOrange" } - ListElement { type: "InCubic"; ballColor: "Gold" } - ListElement { type: "OutCubic"; ballColor: "Yellow" } - ListElement { type: "InOutCubic"; ballColor: "PeachPuff" } - ListElement { type: "OutInCubic"; ballColor: "Thistle" } - ListElement { type: "InQuart"; ballColor: "Orchid" } - ListElement { type: "OutQuart"; ballColor: "Purple" } - ListElement { type: "InOutQuart"; ballColor: "SlateBlue" } - ListElement { type: "OutInQuart"; ballColor: "Chartreuse" } - ListElement { type: "InQuint"; ballColor: "LimeGreen" } - ListElement { type: "OutQuint"; ballColor: "SeaGreen" } - ListElement { type: "InOutQuint"; ballColor: "DarkGreen" } - ListElement { type: "OutInQuint"; ballColor: "Olive" } - ListElement { type: "InSine"; ballColor: "DarkSeaGreen" } - ListElement { type: "OutSine"; ballColor: "Teal" } - ListElement { type: "InOutSine"; ballColor: "Turquoise" } - ListElement { type: "OutInSine"; ballColor: "SteelBlue" } - ListElement { type: "InExpo"; ballColor: "SkyBlue" } - ListElement { type: "OutExpo"; ballColor: "RoyalBlue" } - ListElement { type: "InOutExpo"; ballColor: "MediumBlue" } - ListElement { type: "OutInExpo"; ballColor: "MidnightBlue" } - ListElement { type: "InCirc"; ballColor: "CornSilk" } - ListElement { type: "OutCirc"; ballColor: "Bisque" } - ListElement { type: "InOutCirc"; ballColor: "RosyBrown" } - ListElement { type: "OutInCirc"; ballColor: "SandyBrown" } - ListElement { type: "InElastic"; ballColor: "DarkGoldenRod" } - ListElement { type: "OutElastic"; ballColor: "Chocolate" } - ListElement { type: "InOutElastic"; ballColor: "SaddleBrown" } - ListElement { type: "OutInElastic"; ballColor: "Brown" } - ListElement { type: "InBack"; ballColor: "Maroon" } - ListElement { type: "OutBack"; ballColor: "LavenderBlush" } - ListElement { type: "InOutBack"; ballColor: "MistyRose" } - ListElement { type: "OutInBack"; ballColor: "Gainsboro" } - ListElement { type: "OutBounce"; ballColor: "Silver" } - ListElement { type: "InBounce"; ballColor: "DimGray" } - ListElement { type: "InOutBounce"; ballColor: "SlateGray" } - ListElement { type: "OutInBounce"; ballColor: "DarkSlateGray" } + ListElement { name: "Easing.Linear"; type: Easing.Linear; ballColor: "DarkRed" } + ListElement { name: "Easing.InQuad"; type: Easing.InQuad; ballColor: "IndianRed" } + ListElement { name: "Easing.OutQuad"; type: Easing.OutQuad; ballColor: "Salmon" } + ListElement { name: "Easing.InOutQuad"; type: Easing.InOutQuad; ballColor: "Tomato" } + ListElement { name: "Easing.OutInQuad"; type: Easing.OutInQuad; ballColor: "DarkOrange" } + ListElement { name: "Easing.InCubic"; type: Easing.InCubic; ballColor: "Gold" } + ListElement { name: "Easing.OutCubic"; type: Easing.OutCubic; ballColor: "Yellow" } + ListElement { name: "Easing.InOutCubic"; type: Easing.InOutCubic; ballColor: "PeachPuff" } + ListElement { name: "Easing.OutInCubic"; type: Easing.OutInCubic; ballColor: "Thistle" } + ListElement { name: "Easing.InQuart"; type: Easing.InQuart; ballColor: "Orchid" } + ListElement { name: "Easing.OutQuart"; type: Easing.OutQuart; ballColor: "Purple" } + ListElement { name: "Easing.InOutQuart"; type: Easing.InOutQuart; ballColor: "SlateBlue" } + ListElement { name: "Easing.OutInQuart"; type: Easing.OutInQuart; ballColor: "Chartreuse" } + ListElement { name: "Easing.InQuint"; type: Easing.InQuint; ballColor: "LimeGreen" } + ListElement { name: "Easing.OutQuint"; type: Easing.OutQuint; ballColor: "SeaGreen" } + ListElement { name: "Easing.InOutQuint"; type: Easing.InOutQuint; ballColor: "DarkGreen" } + ListElement { name: "Easing.OutInQuint"; type: Easing.OutInQuint; ballColor: "Olive" } + ListElement { name: "Easing.InSine"; type: Easing.InSine; ballColor: "DarkSeaGreen" } + ListElement { name: "Easing.OutSine"; type: Easing.OutSine; ballColor: "Teal" } + ListElement { name: "Easing.InOutSine"; type: Easing.InOutSine; ballColor: "Turquoise" } + ListElement { name: "Easing.OutInSine"; type: Easing.OutInSine; ballColor: "SteelBlue" } + ListElement { name: "Easing.InExpo"; type: Easing.InExpo; ballColor: "SkyBlue" } + ListElement { name: "Easing.OutExpo"; type: Easing.OutExpo; ballColor: "RoyalBlue" } + ListElement { name: "Easing.InOutExpo"; type: Easing.InOutExpo; ballColor: "MediumBlue" } + ListElement { name: "Easing.OutInExpo"; type: Easing.OutInExpo; ballColor: "MidnightBlue" } + ListElement { name: "Easing.InCirc"; type: Easing.InCirc; ballColor: "CornSilk" } + ListElement { name: "Easing.OutCirc"; type: Easing.OutCirc; ballColor: "Bisque" } + ListElement { name: "Easing.InOutCirc"; type: Easing.InOutCirc; ballColor: "RosyBrown" } + ListElement { name: "Easing.OutInCirc"; type: Easing.OutInCirc; ballColor: "SandyBrown" } + ListElement { name: "Easing.InElastic"; type: Easing.InElastic; ballColor: "DarkGoldenRod" } + ListElement { name: "Easing.InElastic"; type: Easing.OutElastic; ballColor: "Chocolate" } + ListElement { name: "Easing.InOutElastic"; type: Easing.InOutElastic; ballColor: "SaddleBrown" } + ListElement { name: "Easing.OutInElastic"; type: Easing.OutInElastic; ballColor: "Brown" } + ListElement { name: "Easing.InBack"; type: Easing.InBack; ballColor: "Maroon" } + ListElement { name: "Easing.OutBack"; type: Easing.OutBack; ballColor: "LavenderBlush" } + ListElement { name: "Easing.InOutBack"; type: Easing.InOutBack; ballColor: "MistyRose" } + ListElement { name: "Easing.OutInBack"; type: Easing.OutInBack; ballColor: "Gainsboro" } + ListElement { name: "Easing.OutBounce"; type: Easing.OutBounce; ballColor: "Silver" } + ListElement { name: "Easing.InBounce"; type: Easing.InBounce; ballColor: "DimGray" } + ListElement { name: "Easing.InOutBounce"; type: Easing.InOutBounce; ballColor: "SlateGray" } + ListElement { name: "Easing.OutInBounce"; type: Easing.OutInBounce; ballColor: "DarkSlateGray" } } Component { @@ -54,19 +54,26 @@ Rectangle { Item { height: 42; width: window.width - Text { text: type; anchors.centerIn: parent; color: "White" } + + Text { text: name; anchors.centerIn: parent; color: "White" } + Rectangle { id: slot1; color: "#121212"; x: 30; height: 32; width: 32 - border.color: "#343434"; border.width: 1; radius: 8; anchors.verticalCenter: parent.verticalCenter + border.color: "#343434"; border.width: 1; radius: 8 + anchors.verticalCenter: parent.verticalCenter } + Rectangle { id: slot2; color: "#121212"; x: window.width - 62; height: 32; width: 32 - border.color: "#343434"; border.width: 1; radius: 8; anchors.verticalCenter: parent.verticalCenter + border.color: "#343434"; border.width: 1; radius: 8 + anchors.verticalCenter: parent.verticalCenter } + Rectangle { id: rect; x: 30; color: "#454545" border.color: "White"; border.width: 2 - height: 32; width: 32; radius: 8; anchors.verticalCenter: parent.verticalCenter + height: 32; width: 32; radius: 8 + anchors.verticalCenter: parent.verticalCenter MouseArea { onClicked: if (rect.state == '') rect.state = "right"; else rect.state = '' @@ -79,10 +86,8 @@ Rectangle { } transitions: Transition { - // ParallelAnimation { - NumberAnimation { properties: "x"; easing.type: type; duration: 1000 } - ColorAnimation { properties: "color"; easing.type: type; duration: 1000 } - // } + NumberAnimation { properties: "x"; easing.type: type; duration: 1000 } + ColorAnimation { properties: "color"; easing.type: type; duration: 1000 } } } } @@ -90,6 +95,7 @@ Rectangle { Flickable { anchors.fill: parent; contentHeight: layout.height + Column { id: layout anchors.left: parent.left; anchors.right: parent.right diff --git a/examples/declarative/animations/property-animation.qml b/examples/declarative/animations/property-animation.qml index 5afe8ef..6360511 100644 --- a/examples/declarative/animations/property-animation.qml +++ b/examples/declarative/animations/property-animation.qml @@ -48,13 +48,13 @@ Item { // Move from minHeight to maxHeight in 300ms, using the OutExpo easing function NumberAnimation { from: smiley.minHeight; to: smiley.maxHeight - easing.type: "OutExpo"; duration: 300 + easing.type: Easing.OutExpo; duration: 300 } // Then move back to minHeight in 1 second, using the OutBounce easing function NumberAnimation { from: smiley.maxHeight; to: smiley.minHeight - easing.type: "OutBounce"; duration: 1000 + easing.type: Easing.OutBounce; duration: 1000 } // Then pause for 500ms diff --git a/examples/declarative/behaviors/behavior-example.qml b/examples/declarative/behaviors/behavior-example.qml index b7bae6c..1f17b81 100644 --- a/examples/declarative/behaviors/behavior-example.qml +++ b/examples/declarative/behaviors/behavior-example.qml @@ -49,12 +49,12 @@ Rectangle { // Setting an 'elastic' behavior on the focusRect's x property. Behavior on x { - NumberAnimation { easing.type: "OutElastic"; easing.amplitude: 3.0; easing.period: 2.0; duration: 300 } + NumberAnimation { easing.type: Easing.OutElastic; easing.amplitude: 3.0; easing.period: 2.0; duration: 300 } } // Setting an 'elastic' behavior on the focusRect's y property. Behavior on y { - NumberAnimation { easing.type: "OutElastic"; easing.amplitude: 3.0; easing.period: 2.0; duration: 300 } + NumberAnimation { easing.type: Easing.OutElastic; easing.amplitude: 3.0; easing.period: 2.0; duration: 300 } } Text { diff --git a/examples/declarative/border-image/content/MyBorderImage.qml b/examples/declarative/border-image/content/MyBorderImage.qml index 2573a14..b47df7b 100644 --- a/examples/declarative/border-image/content/MyBorderImage.qml +++ b/examples/declarative/border-image/content/MyBorderImage.qml @@ -20,14 +20,26 @@ Item { SequentialAnimation on width { loops: Animation.Infinite - NumberAnimation { from: container.minWidth; to: container.maxWidth; duration: 2000; easing.type: "InOutQuad"} - NumberAnimation { from: container.maxWidth; to: container.minWidth; duration: 2000; easing.type: "InOutQuad" } + NumberAnimation { + from: container.minWidth; to: container.maxWidth + duration: 2000; easing.type: Easing.InOutQuad + } + NumberAnimation { + from: container.maxWidth; to: container.minWidth + duration: 2000; easing.type: Easing.InOutQuad + } } SequentialAnimation on height { loops: Animation.Infinite - NumberAnimation { from: container.minHeight; to: container.maxHeight; duration: 2000; easing.type: "InOutQuad"} - NumberAnimation { from: container.maxHeight; to: container.minHeight; duration: 2000; easing.type: "InOutQuad" } + NumberAnimation { + from: container.minHeight; to: container.maxHeight + duration: 2000; easing.type: Easing.InOutQuad + } + NumberAnimation { + from: container.maxHeight; to: container.minHeight + duration: 2000; easing.type: Easing.InOutQuad + } } border.top: container.margin diff --git a/examples/declarative/connections/connections-example.qml b/examples/declarative/connections/connections-example.qml index fbef968..1dd10ab 100644 --- a/examples/declarative/connections/connections-example.qml +++ b/examples/declarative/connections/connections-example.qml @@ -17,7 +17,7 @@ Rectangle { rotation: window.angle Behavior on rotation { - NumberAnimation { easing.type: "OutCubic"; duration: 300 } + NumberAnimation { easing.type: Easing.OutCubic; duration: 300 } } } diff --git a/examples/declarative/focus/Core/ListViews.qml b/examples/declarative/focus/Core/ListViews.qml index 089f821..32a5d4c 100644 --- a/examples/declarative/focus/Core/ListViews.qml +++ b/examples/declarative/focus/Core/ListViews.qml @@ -14,7 +14,7 @@ FocusScope { delegate: ListViewDelegate {} Behavior on y { - NumberAnimation { duration: 600; easing.type: "OutQuint" } + NumberAnimation { duration: 600; easing.type: Easing.OutQuint } } } @@ -26,7 +26,7 @@ FocusScope { delegate: ListViewDelegate {} Behavior on y { - NumberAnimation { duration: 600; easing.type: "OutQuint" } + NumberAnimation { duration: 600; easing.type: Easing.OutQuint } } } @@ -38,7 +38,7 @@ FocusScope { delegate: ListViewDelegate {} Behavior on y { - NumberAnimation { duration: 600; easing.type: "OutQuint" } + NumberAnimation { duration: 600; easing.type: Easing.OutQuint } } } diff --git a/examples/declarative/focus/focus.qml b/examples/declarative/focus/focus.qml index 22b0e50..8c992ae 100644 --- a/examples/declarative/focus/focus.qml +++ b/examples/declarative/focus/focus.qml @@ -38,7 +38,7 @@ Rectangle { } transitions: Transition { - NumberAnimation { properties: "y"; duration: 600; easing.type: "OutQuint" } + NumberAnimation { properties: "y"; duration: 600; easing.type: Easing.OutQuint } } } @@ -64,6 +64,6 @@ Rectangle { } transitions: Transition { - NumberAnimation { properties: "x,opacity"; duration: 600; easing.type: "OutQuint" } + NumberAnimation { properties: "x,opacity"; duration: 600; easing.type: Easing.OutQuint } } } diff --git a/examples/declarative/fonts/hello.qml b/examples/declarative/fonts/hello.qml index d4d0e4c..0d6f4cd 100644 --- a/examples/declarative/fonts/hello.qml +++ b/examples/declarative/fonts/hello.qml @@ -19,7 +19,7 @@ Rectangle { SequentialAnimation on font.letterSpacing { loops: Animation.Infinite; - NumberAnimation { from: 100; to: 300; easing.type: "InQuad"; duration: 3000 } + NumberAnimation { from: 100; to: 300; easing.type: Easing.InQuad; duration: 3000 } ScriptAction { script: { container.y = (screen.height / 4) + (Math.random() * screen.height / 2) diff --git a/examples/declarative/layouts/Button.qml b/examples/declarative/layouts/Button.qml index 0f08893..d03eeb5 100644 --- a/examples/declarative/layouts/Button.qml +++ b/examples/declarative/layouts/Button.qml @@ -1,22 +1,38 @@ import Qt 4.7 -Rectangle { border.color: "black"; color: "steelblue"; radius: 5; width: pix.width + textelement.width + 13; height: pix.height + 10; id: page +Rectangle { + id: page + property string text property string icon signal clicked - Image { id: pix; x: 5; y:5; source: parent.icon} - Text { id: textelement; text: page.text; color: "white"; x:pix.width+pix.x+3; anchors.verticalCenter: pix.verticalCenter;} - MouseArea{ id:mr; anchors.fill: parent; onClicked: {parent.focus = true; page.clicked()}} + border.color: "black"; color: "steelblue"; radius: 5 + width: pix.width + textelement.width + 13 + height: pix.height + 10 + + Image { id: pix; x: 5; y:5; source: parent.icon } + + Text { + id: textelement + text: page.text; color: "white" + x: pix.width + pix.x + 3 + anchors.verticalCenter: pix.verticalCenter + } + + MouseArea { + id: mr + anchors.fill: parent + onClicked: { parent.focus = true; page.clicked() } + } - states: - State{ name:"pressed"; when:mr.pressed - PropertyChanges {target:textelement; x: 5} - PropertyChanges {target:pix; x:textelement.x+textelement.width + 3} - } + states: State { + name: "pressed"; when: mr.pressed + PropertyChanges { target: textelement; x: 5 } + PropertyChanges { target: pix; x: textelement.x + textelement.width + 3 } + } - transitions: - Transition{ - NumberAnimation { properties:"x,left"; easing.type:"InOutQuad"; duration:200 } - } + transitions: Transition { + NumberAnimation { properties: "x,left"; easing.type: Easing.InOutQuad; duration: 200 } + } } diff --git a/examples/declarative/layouts/positioners.qml b/examples/declarative/layouts/positioners.qml index 3703b59..2cb0b8b 100644 --- a/examples/declarative/layouts/positioners.qml +++ b/examples/declarative/layouts/positioners.qml @@ -8,10 +8,10 @@ Rectangle { id: layout1 y: 0 move: Transition { - NumberAnimation { properties: "y"; easing.type: "OutBounce" } + NumberAnimation { properties: "y"; easing.type: Easing.OutBounce } } add: Transition { - NumberAnimation { properties: "y"; easing.type: "OutQuad" } + NumberAnimation { properties: "y"; easing.type: Easing.OutQuad } } Rectangle { color: "red"; width: 100; height: 50; border.color: "black"; radius: 15 } @@ -43,10 +43,10 @@ Rectangle { id: layout2 y: 300 move: Transition { - NumberAnimation { properties: "x"; easing.type: "OutBounce" } + NumberAnimation { properties: "x"; easing.type: Easing.OutBounce } } add: Transition { - NumberAnimation { properties: "x"; easing.type: "OutQuad" } + NumberAnimation { properties: "x"; easing.type: Easing.OutQuad } } Rectangle { color: "red"; width: 50; height: 100; border.color: "black"; radius: 15 } @@ -117,11 +117,11 @@ Rectangle { columns: 3 move: Transition { - NumberAnimation { properties: "x,y"; easing.type: "OutBounce" } + NumberAnimation { properties: "x,y"; easing.type: Easing.OutBounce } } add: Transition { - NumberAnimation { properties: "x,y"; easing.type: "OutBounce" } + NumberAnimation { properties: "x,y"; easing.type: Easing.OutBounce } } Rectangle { color: "red"; width: 50; height: 50; border.color: "black"; radius: 15 } @@ -167,11 +167,11 @@ Rectangle { x: 260; y: 250; width: 150 move: Transition { - NumberAnimation { properties: "x,y"; easing.type: "OutBounce" } + NumberAnimation { properties: "x,y"; easing.type: Easing.OutBounce } } add: Transition { - NumberAnimation { properties: "x,y"; easing.type: "OutBounce" } + NumberAnimation { properties: "x,y"; easing.type: Easing.OutBounce } } Rectangle { color: "red"; width: 50; height: 50; border.color: "black"; radius: 15 } diff --git a/examples/declarative/parallax/qml/Smiley.qml b/examples/declarative/parallax/qml/Smiley.qml index b1e1ae8..cfa4fed 100644 --- a/examples/declarative/parallax/qml/Smiley.qml +++ b/examples/declarative/parallax/qml/Smiley.qml @@ -30,13 +30,13 @@ Item { // Move from minHeight to maxHeight in 300ms, using the OutExpo easing function NumberAnimation { from: smiley.minHeight; to: smiley.maxHeight - easing.type: "OutExpo"; duration: 300 + easing.type: Easing.OutExpo; duration: 300 } // Then move back to minHeight in 1 second, using the OutBounce easing function NumberAnimation { from: smiley.maxHeight; to: smiley.minHeight - easing.type: "OutBounce"; duration: 1000 + easing.type: Easing.OutBounce; duration: 1000 } // Then pause for 500ms diff --git a/examples/declarative/proxywidgets/proxywidgets.qml b/examples/declarative/proxywidgets/proxywidgets.qml index 46dcf99..88de37f 100644 --- a/examples/declarative/proxywidgets/proxywidgets.qml +++ b/examples/declarative/proxywidgets/proxywidgets.qml @@ -63,7 +63,7 @@ Rectangle { transitions: Transition { ParallelAnimation { - NumberAnimation { properties: "x,y,rotation"; duration: 600; easing.type: "OutQuad" } + NumberAnimation { properties: "x,y,rotation"; duration: 600; easing.type: Easing.OutQuad } ColorAnimation { target: window; duration: 600 } } } diff --git a/examples/declarative/slideswitch/content/Switch.qml b/examples/declarative/slideswitch/content/Switch.qml index a8fa6ef..1aa7696 100644 --- a/examples/declarative/slideswitch/content/Switch.qml +++ b/examples/declarative/slideswitch/content/Switch.qml @@ -69,7 +69,7 @@ Item { //![7] transitions: Transition { - NumberAnimation { properties: "x"; easing.type: "InOutQuad"; duration: 200 } + NumberAnimation { properties: "x"; easing.type: Easing.InOutQuad; duration: 200 } } //![7] } diff --git a/examples/declarative/states/transitions.qml b/examples/declarative/states/transitions.qml index d1b1dd6..ccc7060 100644 --- a/examples/declarative/states/transitions.qml +++ b/examples/declarative/states/transitions.qml @@ -72,14 +72,14 @@ Rectangle { // with OutBounce easing function. Transition { from: "*"; to: "middleRight" - NumberAnimation { properties: "x,y"; easing.type: "OutBounce"; duration: 1000 } + NumberAnimation { properties: "x,y"; easing.type: Easing.OutBounce; duration: 1000 } }, // When transitioning to 'bottomLeft' move x,y over a duration of 2 seconds, // with InOutQuad easing function. Transition { from: "*"; to: "bottomLeft" - NumberAnimation { properties: "x,y"; easing.type: "InOutQuad"; duration: 2000 } + NumberAnimation { properties: "x,y"; easing.type: Easing.InOutQuad; duration: 2000 } }, // For any other state changes move x,y linearly over duration of 200ms. diff --git a/examples/declarative/tutorials/helloworld/tutorial3.qml b/examples/declarative/tutorials/helloworld/tutorial3.qml index 041d9a9..0da762c 100644 --- a/examples/declarative/tutorials/helloworld/tutorial3.qml +++ b/examples/declarative/tutorials/helloworld/tutorial3.qml @@ -28,7 +28,7 @@ Rectangle { transitions: Transition { from: ""; to: "down"; reversible: true ParallelAnimation { - NumberAnimation { properties: "y,rotation"; duration: 500; easing.type: "InOutQuad" } + NumberAnimation { properties: "y,rotation"; duration: 500; easing.type: Easing.InOutQuad } ColorAnimation { duration: 500 } } } diff --git a/examples/declarative/xmldata/yahoonews.qml b/examples/declarative/xmldata/yahoonews.qml index 668778e..5bab463 100644 --- a/examples/declarative/xmldata/yahoonews.qml +++ b/examples/declarative/xmldata/yahoonews.qml @@ -65,7 +65,7 @@ Rectangle { transitions: Transition { from: "*"; to: "Details"; reversible: true SequentialAnimation { - NumberAnimation { duration: 200; properties: "height"; easing.type: "OutQuad" } + NumberAnimation { duration: 200; properties: "height"; easing.type: Easing.OutQuad } NumberAnimation { duration: 200; properties: "opacity" } } } diff --git a/src/declarative/graphicsitems/qdeclarativegridview.cpp b/src/declarative/graphicsitems/qdeclarativegridview.cpp index 4c72482..9ae7279 100644 --- a/src/declarative/graphicsitems/qdeclarativegridview.cpp +++ b/src/declarative/graphicsitems/qdeclarativegridview.cpp @@ -964,7 +964,7 @@ QDeclarativeGridView::~QDeclarativeGridView() id: wrapper GridView.onRemove: SequentialAnimation { PropertyAction { target: wrapper; property: "GridView.delayRemove"; value: true } - NumberAnimation { target: wrapper; property: "scale"; to: 0; duration: 250; easing.type: "InOutQuad" } + NumberAnimation { target: wrapper; property: "scale"; to: 0; duration: 250; easing.type: Easing.InOutQuad } PropertyAction { target: wrapper; property: "GridView.delayRemove"; value: false } } } diff --git a/src/declarative/graphicsitems/qdeclarativelistview.cpp b/src/declarative/graphicsitems/qdeclarativelistview.cpp index 3877fab..cef7e18 100644 --- a/src/declarative/graphicsitems/qdeclarativelistview.cpp +++ b/src/declarative/graphicsitems/qdeclarativelistview.cpp @@ -1395,7 +1395,7 @@ QDeclarativeListView::~QDeclarativeListView() id: wrapper ListView.onRemove: SequentialAnimation { PropertyAction { target: wrapper; property: "ListView.delayRemove"; value: true } - NumberAnimation { target: wrapper; property: "scale"; to: 0; duration: 250; easing.type: "InOutQuad" } + NumberAnimation { target: wrapper; property: "scale"; to: 0; duration: 250; easing.type: Easing.InOutQuad } PropertyAction { target: wrapper; property: "ListView.delayRemove"; value: false } } } diff --git a/src/declarative/graphicsitems/qdeclarativepositioners.cpp b/src/declarative/graphicsitems/qdeclarativepositioners.cpp index 206b09d..93bff3e 100644 --- a/src/declarative/graphicsitems/qdeclarativepositioners.cpp +++ b/src/declarative/graphicsitems/qdeclarativepositioners.cpp @@ -377,7 +377,7 @@ Column { move: Transition { NumberAnimation { properties: "y" - easing.type: "OutBounce" + easing.type: Easing.OutBounce } } } diff --git a/src/declarative/util/qdeclarativeanimation.cpp b/src/declarative/util/qdeclarativeanimation.cpp index 9f95348..7f4d2e4 100644 --- a/src/declarative/util/qdeclarativeanimation.cpp +++ b/src/declarative/util/qdeclarativeanimation.cpp @@ -1615,7 +1615,7 @@ void QDeclarativePropertyAnimationPrivate::convertVariant(QVariant &variant, int Animate any objects that have changed their x or y properties in the target state using an InOutQuad easing curve: \qml - Transition { PropertyAnimation { properties: "x,y"; easing.type: "InOutQuad" } } + Transition { PropertyAnimation { properties: "x,y"; easing.type: Easing.InOutQuad } } \endqml \o In a Behavior diff --git a/src/declarative/util/qdeclarativebehavior.cpp b/src/declarative/util/qdeclarativebehavior.cpp index 90344ab..ba90007 100644 --- a/src/declarative/util/qdeclarativebehavior.cpp +++ b/src/declarative/util/qdeclarativebehavior.cpp @@ -82,7 +82,7 @@ public: y: 200 // initial value Behavior on y { NumberAnimation { - easing.type: "OutBounce" + easing.type: Easing.OutBounce easing.amplitude: 100 duration: 200 } diff --git a/src/declarative/util/qdeclarativespringfollow.cpp b/src/declarative/util/qdeclarativespringfollow.cpp index 70077f3..aae66ac 100644 --- a/src/declarative/util/qdeclarativespringfollow.cpp +++ b/src/declarative/util/qdeclarativespringfollow.cpp @@ -227,7 +227,7 @@ void QDeclarativeSpringFollowPrivate::stop() loops: Animation.Infinite NumberAnimation { to: 200 - easing.type: "OutBounce" + easing.type: Easing.OutBounce easing.amplitude: 100 duration: 2000 } -- cgit v0.12 From ab030e931e05a060b4f6fabf4235f05aeb0c252c Mon Sep 17 00:00:00 2001 From: Martin Jones Date: Wed, 5 May 2010 16:39:05 +1000 Subject: Fix cacheBuffer documentation. Task-number: QTBUG-10385 --- .../graphicsitems/qdeclarativegridview.cpp | 20 ++++++++++++++------ .../graphicsitems/qdeclarativelistview.cpp | 18 +++++++++++++----- src/declarative/util/qdeclarativeanimation.cpp | 2 +- 3 files changed, 28 insertions(+), 12 deletions(-) diff --git a/src/declarative/graphicsitems/qdeclarativegridview.cpp b/src/declarative/graphicsitems/qdeclarativegridview.cpp index 4c72482..528cb22 100644 --- a/src/declarative/graphicsitems/qdeclarativegridview.cpp +++ b/src/declarative/graphicsitems/qdeclarativegridview.cpp @@ -1405,12 +1405,20 @@ void QDeclarativeGridView::setWrapEnabled(bool wrap) } /*! - \qmlproperty int GridView::cacheBuffer - This property holds the number of off-screen pixels to cache. - - This property determines the number of pixels above the top of the view - and below the bottom of the view to cache. Setting this value can make - scrolling the view smoother at the expense of additional memory usage. + \qmlproperty int GridView::cacheBuffer + This property determines whether delegates are retained outside the + visible area of the view. + + If non-zero the view will keep as many delegates + instantiated as will fit within the buffer specified. For example, + if in a vertical view the delegate is 20 pixels high and \c cacheBuffer is + set to 40, then up to 2 delegates above and 2 delegates below the visible + area may be retained. + + Setting this value can make scrolling the list smoother at the expense + of additional memory usage. It is not a substitute for creating efficient + delegates; the fewer elements in a delegate, the faster a view may be + scrolled. */ int QDeclarativeGridView::cacheBuffer() const { diff --git a/src/declarative/graphicsitems/qdeclarativelistview.cpp b/src/declarative/graphicsitems/qdeclarativelistview.cpp index 3877fab..75cf547 100644 --- a/src/declarative/graphicsitems/qdeclarativelistview.cpp +++ b/src/declarative/graphicsitems/qdeclarativelistview.cpp @@ -1839,11 +1839,19 @@ void QDeclarativeListView::setWrapEnabled(bool wrap) /*! \qmlproperty int ListView::cacheBuffer - This property holds the number of off-screen pixels to cache. - - This property determines the number of pixels above the top of the list - and below the bottom of the list to cache. Setting this value can make - scrolling the list smoother at the expense of additional memory usage. + This property determines whether delegates are retained outside the + visible area of the view. + + If non-zero the view will keep as many delegates + instantiated as will fit within the buffer specified. For example, + if in a vertical view the delegate is 20 pixels high and \c cacheBuffer is + set to 40, then up to 2 delegates above and 2 delegates below the visible + area may be retained. + + Setting this value can make scrolling the list smoother at the expense + of additional memory usage. It is not a substitute for creating efficient + delegates; the fewer elements in a delegate, the faster a view may be + scrolled. */ int QDeclarativeListView::cacheBuffer() const { diff --git a/src/declarative/util/qdeclarativeanimation.cpp b/src/declarative/util/qdeclarativeanimation.cpp index 9f95348..5b2954b 100644 --- a/src/declarative/util/qdeclarativeanimation.cpp +++ b/src/declarative/util/qdeclarativeanimation.cpp @@ -874,7 +874,7 @@ void QDeclarativePropertyActionPrivate::init() This property holds an explicit target object to animate. The exact effect of the \c target property depends on how the animation - is being used. Refer to the \l animation documentation for details. + is being used. Refer to the \l {QML Animation} documentation for details. */ QObject *QDeclarativePropertyAction::target() const -- cgit v0.12 From 44144cf60e978f7d5d70aec49d114d57832a78c3 Mon Sep 17 00:00:00 2001 From: Alexis Menard Date: Wed, 5 May 2010 09:37:01 +0200 Subject: Fix a bug in QGraphicsItem::scroll. If the rect argument is null, well we should not do the scrolling with an null rectangle but rather with the boundingRect like the documentation says. Task-number:QTBUG-10400 Reviewed-by:janarve --- src/gui/graphicsview/qgraphicsitem.cpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/gui/graphicsview/qgraphicsitem.cpp b/src/gui/graphicsview/qgraphicsitem.cpp index 326f130..81138d9 100644 --- a/src/gui/graphicsview/qgraphicsitem.cpp +++ b/src/gui/graphicsview/qgraphicsitem.cpp @@ -5635,8 +5635,9 @@ void QGraphicsItem::scroll(qreal dx, qreal dy, const QRectF &rect) // Adjust with 2 pixel margin. Notice the loss of precision // when converting to QRect. int adjust = 2; + QRectF scrollRect = !rect.isNull() ? rect : boundingRect(); QRectF br = boundingRect().adjusted(-adjust, -adjust, adjust, adjust); - QRect irect = rect.toRect().translated(-br.x(), -br.y()); + QRect irect = scrollRect.toRect().translated(-br.x(), -br.y()); pix.scroll(dx, dy, irect); @@ -5644,11 +5645,11 @@ void QGraphicsItem::scroll(qreal dx, qreal dy, const QRectF &rect) // Translate the existing expose. foreach (QRectF exposedRect, c->exposed) - c->exposed += exposedRect.translated(dx, dy) & rect; + c->exposed += exposedRect.translated(dx, dy) & scrollRect; // Calculate exposure. QRegion exposed; - QRect r = rect.toRect(); + QRect r = scrollRect.toRect(); exposed += r; exposed -= r.translated(dx, dy); foreach (QRect rect, exposed.rects()) -- cgit v0.12 From 238ed995be8f32e815ffb6883144d0547355a8eb Mon Sep 17 00:00:00 2001 From: Alan Alpert Date: Tue, 4 May 2010 14:14:46 +0200 Subject: Move Qt.widgets import to be an unsupported example Layout examples for QML are also cleaned up a bit. Layouts test removed, and LayoutItem test added, to clarify what we support. Reviewed-by: Michael Brasser --- examples/declarative/layouts/Button.qml | 22 -- examples/declarative/layouts/add.png | Bin 1577 -> 0 bytes examples/declarative/layouts/del.png | Bin 1661 -> 0 bytes .../layouts/graphicsLayouts/graphicslayouts.cpp | 366 +++++++++++++++++++++ .../layouts/graphicsLayouts/graphicslayouts.pro | 13 + .../layouts/graphicsLayouts/graphicslayouts.qml | 77 +++++ .../layouts/graphicsLayouts/graphicslayouts.qrc | 5 + .../layouts/graphicsLayouts/graphicslayouts_p.h | 303 +++++++++++++++++ .../declarative/layouts/graphicsLayouts/main.cpp | 60 ++++ .../declarative/layouts/layoutItem/layoutItem.pro | 13 + .../declarative/layouts/layoutItem/layoutItem.qml | 16 + .../declarative/layouts/layoutItem/layoutItem.qrc | 5 + examples/declarative/layouts/layoutItem/main.cpp | 73 ++++ examples/declarative/layouts/layouts.qml | 29 -- examples/declarative/layouts/layouts.qmlproject | 16 - examples/declarative/layouts/positioners.qml | 213 ------------ .../declarative/layouts/positioners/Button.qml | 22 ++ examples/declarative/layouts/positioners/add.png | Bin 0 -> 1577 bytes examples/declarative/layouts/positioners/del.png | Bin 0 -> 1661 bytes .../layouts/positioners/positioners.qml | 213 ++++++++++++ .../layouts/positioners/positioners.qmlproject | 18 + .../positioners/positioners.qmlproject.user | 41 +++ src/imports/imports.pro | 2 +- src/imports/widgets/graphicslayouts.cpp | 366 --------------------- src/imports/widgets/graphicslayouts_p.h | 303 ----------------- src/imports/widgets/qmldir | 1 - src/imports/widgets/widgets.cpp | 71 ---- src/imports/widgets/widgets.pro | 30 -- .../qdeclarativelayoutitem/data/layoutItem.qml | 9 + .../qdeclarativelayoutitem.pro | 8 + .../tst_qdeclarativelayoutitem.cpp | 115 +++++++ .../qdeclarativelayouts/data/layouts.qml | 31 -- .../qdeclarativelayouts/qdeclarativelayouts.pro | 10 - .../tst_qdeclarativelayouts.cpp | 147 --------- 34 files changed, 1358 insertions(+), 1240 deletions(-) delete mode 100644 examples/declarative/layouts/Button.qml delete mode 100644 examples/declarative/layouts/add.png delete mode 100644 examples/declarative/layouts/del.png create mode 100644 examples/declarative/layouts/graphicsLayouts/graphicslayouts.cpp create mode 100644 examples/declarative/layouts/graphicsLayouts/graphicslayouts.pro create mode 100644 examples/declarative/layouts/graphicsLayouts/graphicslayouts.qml create mode 100644 examples/declarative/layouts/graphicsLayouts/graphicslayouts.qrc create mode 100644 examples/declarative/layouts/graphicsLayouts/graphicslayouts_p.h create mode 100644 examples/declarative/layouts/graphicsLayouts/main.cpp create mode 100644 examples/declarative/layouts/layoutItem/layoutItem.pro create mode 100644 examples/declarative/layouts/layoutItem/layoutItem.qml create mode 100644 examples/declarative/layouts/layoutItem/layoutItem.qrc create mode 100644 examples/declarative/layouts/layoutItem/main.cpp delete mode 100644 examples/declarative/layouts/layouts.qml delete mode 100644 examples/declarative/layouts/layouts.qmlproject delete mode 100644 examples/declarative/layouts/positioners.qml create mode 100644 examples/declarative/layouts/positioners/Button.qml create mode 100644 examples/declarative/layouts/positioners/add.png create mode 100644 examples/declarative/layouts/positioners/del.png create mode 100644 examples/declarative/layouts/positioners/positioners.qml create mode 100644 examples/declarative/layouts/positioners/positioners.qmlproject create mode 100644 examples/declarative/layouts/positioners/positioners.qmlproject.user delete mode 100644 src/imports/widgets/graphicslayouts.cpp delete mode 100644 src/imports/widgets/graphicslayouts_p.h delete mode 100644 src/imports/widgets/qmldir delete mode 100644 src/imports/widgets/widgets.cpp delete mode 100644 src/imports/widgets/widgets.pro create mode 100644 tests/auto/declarative/qdeclarativelayoutitem/data/layoutItem.qml create mode 100644 tests/auto/declarative/qdeclarativelayoutitem/qdeclarativelayoutitem.pro create mode 100644 tests/auto/declarative/qdeclarativelayoutitem/tst_qdeclarativelayoutitem.cpp delete mode 100644 tests/auto/declarative/qdeclarativelayouts/data/layouts.qml delete mode 100644 tests/auto/declarative/qdeclarativelayouts/qdeclarativelayouts.pro delete mode 100644 tests/auto/declarative/qdeclarativelayouts/tst_qdeclarativelayouts.cpp diff --git a/examples/declarative/layouts/Button.qml b/examples/declarative/layouts/Button.qml deleted file mode 100644 index 0f08893..0000000 --- a/examples/declarative/layouts/Button.qml +++ /dev/null @@ -1,22 +0,0 @@ -import Qt 4.7 - -Rectangle { border.color: "black"; color: "steelblue"; radius: 5; width: pix.width + textelement.width + 13; height: pix.height + 10; id: page - property string text - property string icon - signal clicked - - Image { id: pix; x: 5; y:5; source: parent.icon} - Text { id: textelement; text: page.text; color: "white"; x:pix.width+pix.x+3; anchors.verticalCenter: pix.verticalCenter;} - MouseArea{ id:mr; anchors.fill: parent; onClicked: {parent.focus = true; page.clicked()}} - - states: - State{ name:"pressed"; when:mr.pressed - PropertyChanges {target:textelement; x: 5} - PropertyChanges {target:pix; x:textelement.x+textelement.width + 3} - } - - transitions: - Transition{ - NumberAnimation { properties:"x,left"; easing.type:"InOutQuad"; duration:200 } - } -} diff --git a/examples/declarative/layouts/add.png b/examples/declarative/layouts/add.png deleted file mode 100644 index f29d84b..0000000 Binary files a/examples/declarative/layouts/add.png and /dev/null differ diff --git a/examples/declarative/layouts/del.png b/examples/declarative/layouts/del.png deleted file mode 100644 index 1d753a3..0000000 Binary files a/examples/declarative/layouts/del.png and /dev/null differ diff --git a/examples/declarative/layouts/graphicsLayouts/graphicslayouts.cpp b/examples/declarative/layouts/graphicsLayouts/graphicslayouts.cpp new file mode 100644 index 0000000..25cf994 --- /dev/null +++ b/examples/declarative/layouts/graphicsLayouts/graphicslayouts.cpp @@ -0,0 +1,366 @@ +/**************************************************************************** +** +** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). +** All rights reserved. +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the QtDeclarative module of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** No Commercial Usage +** This file contains pre-release code and may not be distributed. +** You may use this file in accordance with the terms and conditions +** contained in the Technology Preview License Agreement accompanying +** this package. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 2.1 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 2.1 requirements +** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** In addition, as a special exception, Nokia gives you certain additional +** rights. These rights are described in the Nokia Qt LGPL Exception +** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +** +** If you have questions regarding the use of this file, please contact +** Nokia at qt-info@nokia.com. +** +** +** +** +** +** +** +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +#include "graphicslayouts_p.h" + +#include +#include + +QT_BEGIN_NAMESPACE + +LinearLayoutAttached::LinearLayoutAttached(QObject *parent) +: QObject(parent), _stretch(1), _alignment(Qt::AlignCenter), _spacing(0) +{ +} + +void LinearLayoutAttached::setStretchFactor(int f) +{ + if (_stretch == f) + return; + + _stretch = f; + emit stretchChanged(reinterpret_cast(parent()), _stretch); +} + +void LinearLayoutAttached::setSpacing(int s) +{ + if (_spacing == s) + return; + + _spacing = s; + emit spacingChanged(reinterpret_cast(parent()), _spacing); +} + +void LinearLayoutAttached::setAlignment(Qt::Alignment a) +{ + if (_alignment == a) + return; + + _alignment = a; + emit alignmentChanged(reinterpret_cast(parent()), _alignment); +} + +QGraphicsLinearLayoutStretchItemObject::QGraphicsLinearLayoutStretchItemObject(QObject *parent) + : QObject(parent) +{ +} + +QSizeF QGraphicsLinearLayoutStretchItemObject::sizeHint(Qt::SizeHint which, const QSizeF &constraint) const +{ +Q_UNUSED(which); +Q_UNUSED(constraint); +return QSizeF(); +} + + +QGraphicsLinearLayoutObject::QGraphicsLinearLayoutObject(QObject *parent) +: QObject(parent) +{ +} + +QGraphicsLinearLayoutObject::~QGraphicsLinearLayoutObject() +{ +} + +void QGraphicsLinearLayoutObject::insertLayoutItem(int index, QGraphicsLayoutItem *item) +{ +insertItem(index, item); + +//connect attached properties +if (LinearLayoutAttached *obj = attachedProperties.value(item)) { + setStretchFactor(item, obj->stretchFactor()); + setAlignment(item, obj->alignment()); + updateSpacing(item, obj->spacing()); + QObject::connect(obj, SIGNAL(stretchChanged(QGraphicsLayoutItem*,int)), + this, SLOT(updateStretch(QGraphicsLayoutItem*,int))); + QObject::connect(obj, SIGNAL(alignmentChanged(QGraphicsLayoutItem*,Qt::Alignment)), + this, SLOT(updateAlignment(QGraphicsLayoutItem*,Qt::Alignment))); + QObject::connect(obj, SIGNAL(spacingChanged(QGraphicsLayoutItem*,int)), + this, SLOT(updateSpacing(QGraphicsLayoutItem*,int))); + //### need to disconnect when widget is removed? +} +} + +//### is there a better way to do this? +void QGraphicsLinearLayoutObject::clearChildren() +{ +for (int i = 0; i < count(); ++i) + removeAt(i); +} + +qreal QGraphicsLinearLayoutObject::contentsMargin() const +{ + qreal a,b,c,d; + getContentsMargins(&a, &b, &c, &d); + if(a==b && a==c && a==d) + return a; + return -1; +} + +void QGraphicsLinearLayoutObject::setContentsMargin(qreal m) +{ + setContentsMargins(m,m,m,m); +} + +void QGraphicsLinearLayoutObject::updateStretch(QGraphicsLayoutItem *item, int stretch) +{ +QGraphicsLinearLayout::setStretchFactor(item, stretch); +} + +void QGraphicsLinearLayoutObject::updateSpacing(QGraphicsLayoutItem* item, int spacing) +{ + for(int i=0; i < count(); i++){ + if(itemAt(i) == item){ //I do not see the reverse function, which is why we must loop over all items + QGraphicsLinearLayout::setItemSpacing(i, spacing); + return; + } + } +} + +void QGraphicsLinearLayoutObject::updateAlignment(QGraphicsLayoutItem *item, Qt::Alignment alignment) +{ +QGraphicsLinearLayout::setAlignment(item, alignment); +} + +QHash QGraphicsLinearLayoutObject::attachedProperties; +LinearLayoutAttached *QGraphicsLinearLayoutObject::qmlAttachedProperties(QObject *obj) +{ +// ### This is not allowed - you must attach to any object +if (!qobject_cast(obj)) + return 0; +LinearLayoutAttached *rv = new LinearLayoutAttached(obj); +attachedProperties.insert(qobject_cast(obj), rv); +return rv; +} + +////////////////////////////////////////////////////////////////////////////////////////////////////// +// QGraphicsGridLayout-related classes +////////////////////////////////////////////////////////////////////////////////////////////////////// +GridLayoutAttached::GridLayoutAttached(QObject *parent) +: QObject(parent), _row(-1), _column(-1), _rowspan(1), _colspan(1), _alignment(-1), _rowstretch(-1), + _colstretch(-1), _rowspacing(-1), _colspacing(-1), _rowprefheight(-1), _rowmaxheight(-1), _rowminheight(-1), + _rowfixheight(-1), _colprefwidth(-1), _colmaxwidth(-1), _colminwidth(-1), _colfixwidth(-1) +{ +} + +void GridLayoutAttached::setRow(int r) +{ + if (_row == r) + return; + + _row = r; + //emit rowChanged(reinterpret_cast(parent()), _row); +} + +void GridLayoutAttached::setColumn(int c) +{ + if (_column == c) + return; + + _column = c; + //emit columnChanged(reinterpret_cast(parent()), _column); +} + +void GridLayoutAttached::setRowSpan(int rs) +{ + if (_rowspan == rs) + return; + + _rowspan = rs; + //emit rowSpanChanged(reinterpret_cast(parent()), _rowSpan); +} + +void GridLayoutAttached::setColumnSpan(int cs) +{ + if (_colspan == cs) + return; + + _colspan = cs; + //emit columnSpanChanged(reinterpret_cast(parent()), _columnSpan); +} + +void GridLayoutAttached::setAlignment(Qt::Alignment a) +{ + if (_alignment == a) + return; + + _alignment = a; + emit alignmentChanged(reinterpret_cast(parent()), _alignment); +} + +void GridLayoutAttached::setRowStretchFactor(int f) +{ + _rowstretch = f; +} + +void GridLayoutAttached::setColumnStretchFactor(int f) +{ + _colstretch = f; +} + +void GridLayoutAttached::setRowSpacing(int s) +{ + _rowspacing = s; +} + +void GridLayoutAttached::setColumnSpacing(int s) +{ + _colspacing = s; +} + + +QGraphicsGridLayoutObject::QGraphicsGridLayoutObject(QObject *parent) +: QObject(parent) +{ +} + +QGraphicsGridLayoutObject::~QGraphicsGridLayoutObject() +{ +} + +void QGraphicsGridLayoutObject::addWidget(QGraphicsWidget *wid) +{ +//use attached properties +if (QObject *obj = attachedProperties.value(qobject_cast(wid))) { + int row = static_cast(obj)->row(); + int column = static_cast(obj)->column(); + int rowSpan = static_cast(obj)->rowSpan(); + int columnSpan = static_cast(obj)->columnSpan(); + if (row == -1 || column == -1) { + qWarning() << "Must set row and column for an item in a grid layout"; + return; + } + addItem(wid, row, column, rowSpan, columnSpan); +} +} + +void QGraphicsGridLayoutObject::addLayoutItem(QGraphicsLayoutItem *item) +{ +//use attached properties +if (GridLayoutAttached *obj = attachedProperties.value(item)) { + int row = obj->row(); + int column = obj->column(); + int rowSpan = obj->rowSpan(); + int columnSpan = obj->columnSpan(); + Qt::Alignment alignment = obj->alignment(); + if (row == -1 || column == -1) { + qWarning() << "Must set row and column for an item in a grid layout"; + return; + } + if(obj->rowSpacing() != -1) + setRowSpacing(row, obj->rowSpacing()); + if(obj->columnSpacing() != -1) + setColumnSpacing(column, obj->columnSpacing()); + if(obj->rowStretchFactor() != -1) + setRowStretchFactor(row, obj->rowStretchFactor()); + if(obj->columnStretchFactor() != -1) + setColumnStretchFactor(column, obj->columnStretchFactor()); + if(obj->rowPreferredHeight() != -1) + setRowPreferredHeight(row, obj->rowPreferredHeight()); + if(obj->rowMaximumHeight() != -1) + setRowMaximumHeight(row, obj->rowMaximumHeight()); + if(obj->rowMinimumHeight() != -1) + setRowMinimumHeight(row, obj->rowMinimumHeight()); + if(obj->rowFixedHeight() != -1) + setRowFixedHeight(row, obj->rowFixedHeight()); + if(obj->columnPreferredWidth() != -1) + setColumnPreferredWidth(row, obj->columnPreferredWidth()); + if(obj->columnMaximumWidth() != -1) + setColumnMaximumWidth(row, obj->columnMaximumWidth()); + if(obj->columnMinimumWidth() != -1) + setColumnMinimumWidth(row, obj->columnMinimumWidth()); + if(obj->columnFixedWidth() != -1) + setColumnFixedWidth(row, obj->columnFixedWidth()); + addItem(item, row, column, rowSpan, columnSpan); + if (alignment != -1) + setAlignment(item,alignment); + QObject::connect(obj, SIGNAL(alignmentChanged(QGraphicsLayoutItem*,Qt::Alignment)), + this, SLOT(updateAlignment(QGraphicsLayoutItem*,Qt::Alignment))); + //### need to disconnect when widget is removed? +} +} + +//### is there a better way to do this? +void QGraphicsGridLayoutObject::clearChildren() +{ +for (int i = 0; i < count(); ++i) + removeAt(i); +} + +qreal QGraphicsGridLayoutObject::spacing() const +{ +if (verticalSpacing() == horizontalSpacing()) + return verticalSpacing(); +return -1; //### +} + +qreal QGraphicsGridLayoutObject::contentsMargin() const +{ + qreal a,b,c,d; + getContentsMargins(&a, &b, &c, &d); + if(a==b && a==c && a==d) + return a; + return -1; +} + +void QGraphicsGridLayoutObject::setContentsMargin(qreal m) +{ + setContentsMargins(m,m,m,m); +} + + +void QGraphicsGridLayoutObject::updateAlignment(QGraphicsLayoutItem *item, Qt::Alignment alignment) +{ +QGraphicsGridLayout::setAlignment(item, alignment); +} + +QHash QGraphicsGridLayoutObject::attachedProperties; +GridLayoutAttached *QGraphicsGridLayoutObject::qmlAttachedProperties(QObject *obj) +{ +// ### This is not allowed - you must attach to any object +if (!qobject_cast(obj)) + return 0; +GridLayoutAttached *rv = new GridLayoutAttached(obj); +attachedProperties.insert(qobject_cast(obj), rv); +return rv; +} + +QT_END_NAMESPACE diff --git a/examples/declarative/layouts/graphicsLayouts/graphicslayouts.pro b/examples/declarative/layouts/graphicsLayouts/graphicslayouts.pro new file mode 100644 index 0000000..e5d91b2 --- /dev/null +++ b/examples/declarative/layouts/graphicsLayouts/graphicslayouts.pro @@ -0,0 +1,13 @@ +TEMPLATE = app +TARGET = graphicslayouts +QT += declarative + +SOURCES += \ + graphicslayouts.cpp \ + main.cpp + +HEADERS += \ + graphicslayouts_p.h + +RESOURCES += \ + graphicslayouts.qrc diff --git a/examples/declarative/layouts/graphicsLayouts/graphicslayouts.qml b/examples/declarative/layouts/graphicsLayouts/graphicslayouts.qml new file mode 100644 index 0000000..fcd78d5 --- /dev/null +++ b/examples/declarative/layouts/graphicsLayouts/graphicslayouts.qml @@ -0,0 +1,77 @@ +import Qt 4.7 +import GraphicsLayouts 4.7 + +Item { + id: resizable + + width: 800 + height: 400 + + QGraphicsWidget { + size.width: parent.width/2 + size.height: parent.height + + layout: QGraphicsLinearLayout { + LayoutItem { + minimumSize: "100x100" + maximumSize: "300x300" + preferredSize: "100x100" + Rectangle { color: "yellow"; anchors.fill: parent } + } + LayoutItem { + minimumSize: "100x100" + maximumSize: "400x400" + preferredSize: "200x200" + Rectangle { color: "green"; anchors.fill: parent } + } + } + } + QGraphicsWidget { + x: parent.width/2 + size.width: parent.width/2 + size.height: parent.height + + layout: QGraphicsGridLayout { + LayoutItem { + QGraphicsGridLayout.row: 0 + QGraphicsGridLayout.column: 0 + minimumSize: "100x100" + maximumSize: "300x300" + preferredSize: "100x100" + Rectangle { color: "red"; anchors.fill: parent } + } + LayoutItem { + QGraphicsGridLayout.row: 1 + QGraphicsGridLayout.column: 0 + minimumSize: "100x100" + maximumSize: "200x200" + preferredSize: "100x100" + Rectangle { color: "orange"; anchors.fill: parent } + } + LayoutItem { + QGraphicsGridLayout.row: 2 + QGraphicsGridLayout.column: 0 + minimumSize: "100x100" + maximumSize: "300x300" + preferredSize: "200x200" + Rectangle { color: "yellow"; anchors.fill: parent } + } + LayoutItem { + QGraphicsGridLayout.row: 0 + QGraphicsGridLayout.column: 1 + minimumSize: "100x100" + maximumSize: "200x200" + preferredSize: "200x200" + Rectangle { color: "green"; anchors.fill: parent } + } + LayoutItem { + QGraphicsGridLayout.row: 1 + QGraphicsGridLayout.column: 1 + minimumSize: "100x100" + maximumSize: "400x400" + preferredSize: "200x200" + Rectangle { color: "blue"; anchors.fill: parent } + } + } + } +} diff --git a/examples/declarative/layouts/graphicsLayouts/graphicslayouts.qrc b/examples/declarative/layouts/graphicsLayouts/graphicslayouts.qrc new file mode 100644 index 0000000..a199f8d --- /dev/null +++ b/examples/declarative/layouts/graphicsLayouts/graphicslayouts.qrc @@ -0,0 +1,5 @@ + + + graphicslayouts.qml + + diff --git a/examples/declarative/layouts/graphicsLayouts/graphicslayouts_p.h b/examples/declarative/layouts/graphicsLayouts/graphicslayouts_p.h new file mode 100644 index 0000000..ea9c614 --- /dev/null +++ b/examples/declarative/layouts/graphicsLayouts/graphicslayouts_p.h @@ -0,0 +1,303 @@ +/**************************************************************************** +** +** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). +** All rights reserved. +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the QtDeclarative module of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** No Commercial Usage +** This file contains pre-release code and may not be distributed. +** You may use this file in accordance with the terms and conditions +** contained in the Technology Preview License Agreement accompanying +** this package. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 2.1 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 2.1 requirements +** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** In addition, as a special exception, Nokia gives you certain additional +** rights. These rights are described in the Nokia Qt LGPL Exception +** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +** +** If you have questions regarding the use of this file, please contact +** Nokia at qt-info@nokia.com. +** +** +** +** +** +** +** +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +#ifndef GRAPHICSLAYOUTS_H +#define GRAPHICSLAYOUTS_H + +#include +#include +#include + +QT_BEGIN_HEADER + +QT_BEGIN_NAMESPACE + +QT_MODULE(Declarative) + +class QGraphicsLinearLayoutStretchItemObject : public QObject, public QGraphicsLayoutItem +{ + Q_OBJECT + Q_INTERFACES(QGraphicsLayoutItem) +public: + QGraphicsLinearLayoutStretchItemObject(QObject *parent = 0); + + virtual QSizeF sizeHint(Qt::SizeHint, const QSizeF &) const; +}; + +class LinearLayoutAttached; +class QGraphicsLinearLayoutObject : public QObject, public QGraphicsLinearLayout +{ + Q_OBJECT + Q_INTERFACES(QGraphicsLayout QGraphicsLayoutItem) + + Q_PROPERTY(QDeclarativeListProperty children READ children) + Q_PROPERTY(Qt::Orientation orientation READ orientation WRITE setOrientation) + Q_PROPERTY(qreal spacing READ spacing WRITE setSpacing) + Q_PROPERTY(qreal contentsMargin READ contentsMargin WRITE setContentsMargin) + Q_CLASSINFO("DefaultProperty", "children") +public: + QGraphicsLinearLayoutObject(QObject * = 0); + ~QGraphicsLinearLayoutObject(); + + QDeclarativeListProperty children() { return QDeclarativeListProperty(this, 0, children_append, children_count, children_at, children_clear); } + + static LinearLayoutAttached *qmlAttachedProperties(QObject *); + + qreal contentsMargin() const; + void setContentsMargin(qreal); + +private Q_SLOTS: + void updateStretch(QGraphicsLayoutItem*,int); + void updateSpacing(QGraphicsLayoutItem*,int); + void updateAlignment(QGraphicsLayoutItem*,Qt::Alignment); + +private: + friend class LinearLayoutAttached; + void clearChildren(); + void insertLayoutItem(int, QGraphicsLayoutItem *); + static QHash attachedProperties; + + static void children_append(QDeclarativeListProperty *prop, QGraphicsLayoutItem *item) { + static_cast(prop->object)->insertLayoutItem(-1, item); + } + + static void children_clear(QDeclarativeListProperty *prop) { + static_cast(prop->object)->clearChildren(); + } + + static int children_count(QDeclarativeListProperty *prop) { + return static_cast(prop->object)->count(); + } + + static QGraphicsLayoutItem *children_at(QDeclarativeListProperty *prop, int index) { + return static_cast(prop->object)->itemAt(index); + } +}; + +class GridLayoutAttached; +class QGraphicsGridLayoutObject : public QObject, public QGraphicsGridLayout +{ + Q_OBJECT + Q_INTERFACES(QGraphicsLayout QGraphicsLayoutItem) + + Q_PROPERTY(QDeclarativeListProperty children READ children) + Q_PROPERTY(qreal spacing READ spacing WRITE setSpacing) + Q_PROPERTY(qreal contentsMargin READ contentsMargin WRITE setContentsMargin) + Q_PROPERTY(qreal verticalSpacing READ verticalSpacing WRITE setVerticalSpacing) + Q_PROPERTY(qreal horizontalSpacing READ horizontalSpacing WRITE setHorizontalSpacing) + Q_CLASSINFO("DefaultProperty", "children") +public: + QGraphicsGridLayoutObject(QObject * = 0); + ~QGraphicsGridLayoutObject(); + + QDeclarativeListProperty children() { return QDeclarativeListProperty(this, 0, children_append, children_count, children_at, children_clear); } + + qreal spacing() const; + qreal contentsMargin() const; + void setContentsMargin(qreal); + + static GridLayoutAttached *qmlAttachedProperties(QObject *); + +private Q_SLOTS: + void updateAlignment(QGraphicsLayoutItem*,Qt::Alignment); + +private: + friend class GraphicsLayoutAttached; + void addWidget(QGraphicsWidget *); + void clearChildren(); + void addLayoutItem(QGraphicsLayoutItem *); + static QHash attachedProperties; + + static void children_append(QDeclarativeListProperty *prop, QGraphicsLayoutItem *item) { + static_cast(prop->object)->addLayoutItem(item); + } + + static void children_clear(QDeclarativeListProperty *prop) { + static_cast(prop->object)->clearChildren(); + } + + static int children_count(QDeclarativeListProperty *prop) { + return static_cast(prop->object)->count(); + } + + static QGraphicsLayoutItem *children_at(QDeclarativeListProperty *prop, int index) { + return static_cast(prop->object)->itemAt(index); + } +}; + +class LinearLayoutAttached : public QObject +{ + Q_OBJECT + + Q_PROPERTY(int stretchFactor READ stretchFactor WRITE setStretchFactor NOTIFY stretchChanged) + Q_PROPERTY(Qt::Alignment alignment READ alignment WRITE setAlignment NOTIFY alignmentChanged) + Q_PROPERTY(int spacing READ spacing WRITE setSpacing NOTIFY spacingChanged) +public: + LinearLayoutAttached(QObject *parent); + + int stretchFactor() const { return _stretch; } + void setStretchFactor(int f); + Qt::Alignment alignment() const { return _alignment; } + void setAlignment(Qt::Alignment a); + int spacing() const { return _spacing; } + void setSpacing(int s); + +Q_SIGNALS: + void stretchChanged(QGraphicsLayoutItem*,int); + void alignmentChanged(QGraphicsLayoutItem*,Qt::Alignment); + void spacingChanged(QGraphicsLayoutItem*,int); + +private: + int _stretch; + Qt::Alignment _alignment; + int _spacing; +}; + +class GridLayoutAttached : public QObject +{ + Q_OBJECT + + Q_PROPERTY(int row READ row WRITE setRow) + Q_PROPERTY(int column READ column WRITE setColumn) + Q_PROPERTY(int rowSpan READ rowSpan WRITE setRowSpan) + Q_PROPERTY(int columnSpan READ columnSpan WRITE setColumnSpan) + Q_PROPERTY(Qt::Alignment alignment READ alignment WRITE setAlignment) + Q_PROPERTY(int rowStretchFactor READ rowStretchFactor WRITE setRowStretchFactor) + Q_PROPERTY(int columnStretchFactor READ columnStretchFactor WRITE setColumnStretchFactor) + Q_PROPERTY(int rowSpacing READ rowSpacing WRITE setRowSpacing) + Q_PROPERTY(int columnSpacing READ columnSpacing WRITE setColumnSpacing) + Q_PROPERTY(int rowPreferredHeight READ rowPreferredHeight WRITE setRowPreferredHeight) + Q_PROPERTY(int rowMinimumHeight READ rowMinimumHeight WRITE setRowMinimumHeight) + Q_PROPERTY(int rowMaximumHeight READ rowMaximumHeight WRITE setRowMaximumHeight) + Q_PROPERTY(int rowFixedHeight READ rowFixedHeight WRITE setRowFixedHeight) + Q_PROPERTY(int columnPreferredWidth READ columnPreferredWidth WRITE setColumnPreferredWidth) + Q_PROPERTY(int columnMaximumWidth READ columnMaximumWidth WRITE setColumnMaximumWidth) + Q_PROPERTY(int columnMinimumWidth READ columnMinimumWidth WRITE setColumnMinimumWidth) + Q_PROPERTY(int columnFixedWidth READ columnFixedWidth WRITE setColumnFixedWidth) + +public: + GridLayoutAttached(QObject *parent); + + int row() const { return _row; } + void setRow(int r); + + int column() const { return _column; } + void setColumn(int c); + + int rowSpan() const { return _rowspan; } + void setRowSpan(int rs); + + int columnSpan() const { return _colspan; } + void setColumnSpan(int cs); + + Qt::Alignment alignment() const { return _alignment; } + void setAlignment(Qt::Alignment a); + + int rowStretchFactor() const { return _rowstretch; } + void setRowStretchFactor(int f); + int columnStretchFactor() const { return _colstretch; } + void setColumnStretchFactor(int f); + + int rowSpacing() const { return _rowspacing; } + void setRowSpacing(int s); + int columnSpacing() const { return _colspacing; } + void setColumnSpacing(int s); + + int rowPreferredHeight() const { return _rowprefheight; } + void setRowPreferredHeight(int s) { _rowprefheight = s; } + + int rowMaximumHeight() const { return _rowmaxheight; } + void setRowMaximumHeight(int s) { _rowmaxheight = s; } + + int rowMinimumHeight() const { return _rowminheight; } + void setRowMinimumHeight(int s) { _rowminheight = s; } + + int rowFixedHeight() const { return _rowfixheight; } + void setRowFixedHeight(int s) { _rowfixheight = s; } + + int columnPreferredWidth() const { return _colprefwidth; } + void setColumnPreferredWidth(int s) { _colprefwidth = s; } + + int columnMaximumWidth() const { return _colmaxwidth; } + void setColumnMaximumWidth(int s) { _colmaxwidth = s; } + + int columnMinimumWidth() const { return _colminwidth; } + void setColumnMinimumWidth(int s) { _colminwidth = s; } + + int columnFixedWidth() const { return _colfixwidth; } + void setColumnFixedWidth(int s) { _colfixwidth = s; } + +Q_SIGNALS: + void alignmentChanged(QGraphicsLayoutItem*,Qt::Alignment); + +private: + int _row; + int _column; + int _rowspan; + int _colspan; + Qt::Alignment _alignment; + int _rowstretch; + int _colstretch; + int _rowspacing; + int _colspacing; + int _rowprefheight; + int _rowmaxheight; + int _rowminheight; + int _rowfixheight; + int _colprefwidth; + int _colmaxwidth; + int _colminwidth; + int _colfixwidth; +}; + +QT_END_NAMESPACE + +QML_DECLARE_INTERFACE(QGraphicsLayoutItem) +QML_DECLARE_INTERFACE(QGraphicsLayout) +QML_DECLARE_TYPE(QGraphicsLinearLayoutStretchItemObject) +QML_DECLARE_TYPE(QGraphicsLinearLayoutObject) +QML_DECLARE_TYPEINFO(QGraphicsLinearLayoutObject, QML_HAS_ATTACHED_PROPERTIES) +QML_DECLARE_TYPE(QGraphicsGridLayoutObject) +QML_DECLARE_TYPEINFO(QGraphicsGridLayoutObject, QML_HAS_ATTACHED_PROPERTIES) + +QT_END_HEADER + +#endif // GRAPHICSLAYOUTS_H diff --git a/examples/declarative/layouts/graphicsLayouts/main.cpp b/examples/declarative/layouts/graphicsLayouts/main.cpp new file mode 100644 index 0000000..89b69bf --- /dev/null +++ b/examples/declarative/layouts/graphicsLayouts/main.cpp @@ -0,0 +1,60 @@ +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** All rights reserved. +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the plugins of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** No Commercial Usage +** This file contains pre-release code and may not be distributed. +** You may use this file in accordance with the terms and conditions +** contained in the Technology Preview License Agreement accompanying +** this package. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 2.1 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 2.1 requirements +** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** In addition, as a special exception, Nokia gives you certain additional +** rights. These rights are described in the Nokia Qt LGPL Exception +** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +** +** If you have questions regarding the use of this file, please contact +** Nokia at qt-info@nokia.com. +** +** +** +** +** +** +** +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +#include +#include +#include "graphicslayouts_p.h" +#include + +int main(int argc, char* argv[]) +{ + QApplication app(argc, argv); + QDeclarativeView view; + qmlRegisterInterface("QGraphicsLayoutItem"); + qmlRegisterInterface("QGraphicsLayout"); + qmlRegisterType("GraphicsLayouts",4,7,"QGraphicsLinearLayoutStretchItem"); + qmlRegisterType("GraphicsLayouts",4,7,"QGraphicsLinearLayout"); + qmlRegisterType("GraphicsLayouts",4,7,"QGraphicsGridLayout"); + view.setSource(QUrl(":graphicslayouts.qml")); + view.show(); + return app.exec(); +}; + diff --git a/examples/declarative/layouts/layoutItem/layoutItem.pro b/examples/declarative/layouts/layoutItem/layoutItem.pro new file mode 100644 index 0000000..4a3fc73 --- /dev/null +++ b/examples/declarative/layouts/layoutItem/layoutItem.pro @@ -0,0 +1,13 @@ +###################################################################### +# Automatically generated by qmake (2.01a) Tue May 4 13:36:26 2010 +###################################################################### + +TEMPLATE = app +TARGET = +DEPENDPATH += . +INCLUDEPATH += . +QT += declarative + +# Input +SOURCES += main.cpp +RESOURCES += layoutItem.qrc diff --git a/examples/declarative/layouts/layoutItem/layoutItem.qml b/examples/declarative/layouts/layoutItem/layoutItem.qml new file mode 100644 index 0000000..9b9db22 --- /dev/null +++ b/examples/declarative/layouts/layoutItem/layoutItem.qml @@ -0,0 +1,16 @@ +import Qt 4.7 +import Qt.widgets 4.7 + +LayoutItem {//Sized by the layout + id: resizable + minimumSize: "100x100" + maximumSize: "300x300" + preferredSize: "100x100" + Rectangle { color: "yellow"; anchors.fill: parent } + Rectangle { + width: 100; height: 100; + anchors.top: parent.top; + anchors.right: parent.right; + color: "green"; + } +} diff --git a/examples/declarative/layouts/layoutItem/layoutItem.qrc b/examples/declarative/layouts/layoutItem/layoutItem.qrc new file mode 100644 index 0000000..deb0fba --- /dev/null +++ b/examples/declarative/layouts/layoutItem/layoutItem.qrc @@ -0,0 +1,5 @@ + + + layoutItem.qml + + diff --git a/examples/declarative/layouts/layoutItem/main.cpp b/examples/declarative/layouts/layoutItem/main.cpp new file mode 100644 index 0000000..a104251 --- /dev/null +++ b/examples/declarative/layouts/layoutItem/main.cpp @@ -0,0 +1,73 @@ +/**************************************************************************** +** +** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). +** All rights reserved. +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the examples of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** No Commercial Usage +** This file contains pre-release code and may not be distributed. +** You may use this file in accordance with the terms and conditions +** contained in the Technology Preview License Agreement accompanying +** this package. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 2.1 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 2.1 requirements +** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** In addition, as a special exception, Nokia gives you certain additional +** rights. These rights are described in the Nokia Qt LGPL Exception +** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +** +** If you have questions regarding the use of this file, please contact +** Nokia at qt-info@nokia.com. +** +** +** +** +** +** +** +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +#include +#include +#include +#include +#include +#include +#include + +/* This example demonstrates using a LayoutItem to let QML snippets integrate + nicely with existing QGraphicsView applications designed with GraphicsLayouts +*/ +int main(int argc, char* argv[]) +{ + QApplication app(argc, argv); + //Set up a graphics scene with a QGraphicsWidget and Layout + QGraphicsView view; + QGraphicsScene scene; + QGraphicsWidget *widget = new QGraphicsWidget(); + QGraphicsLinearLayout *layout = new QGraphicsLinearLayout(); + widget->setLayout(layout); + scene.addItem(widget); + view.setScene(&scene); + //Add the QML snippet into the layout + QDeclarativeEngine engine; + QDeclarativeComponent c(&engine, QUrl(":layoutItem.qml")); + QGraphicsLayoutItem* obj = qobject_cast(c.create()); + layout->addItem(obj); + + widget->setGeometry(QRectF(0,0, 400,400)); + view.show(); + return app.exec(); +} diff --git a/examples/declarative/layouts/layouts.qml b/examples/declarative/layouts/layouts.qml deleted file mode 100644 index 391eab7..0000000 --- a/examples/declarative/layouts/layouts.qml +++ /dev/null @@ -1,29 +0,0 @@ -import Qt 4.7 -import Qt.widgets 4.7 - -Item { - id: resizable - - width: 400 - height: 400 - - QGraphicsWidget { - size.width: parent.width - size.height: parent.height - - layout: QGraphicsLinearLayout { - LayoutItem { - minimumSize: "100x100" - maximumSize: "300x300" - preferredSize: "100x100" - Rectangle { color: "yellow"; anchors.fill: parent } - } - LayoutItem { - minimumSize: "100x100" - maximumSize: "400x400" - preferredSize: "200x200" - Rectangle { color: "green"; anchors.fill: parent } - } - } - } -} diff --git a/examples/declarative/layouts/layouts.qmlproject b/examples/declarative/layouts/layouts.qmlproject deleted file mode 100644 index d4909f8..0000000 --- a/examples/declarative/layouts/layouts.qmlproject +++ /dev/null @@ -1,16 +0,0 @@ -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/positioners.qml b/examples/declarative/layouts/positioners.qml deleted file mode 100644 index 3703b59..0000000 --- a/examples/declarative/layouts/positioners.qml +++ /dev/null @@ -1,213 +0,0 @@ -import Qt 4.7 - -Rectangle { - id: page - width: 420; height: 420 - - Column { - id: layout1 - y: 0 - move: Transition { - NumberAnimation { properties: "y"; easing.type: "OutBounce" } - } - add: Transition { - NumberAnimation { properties: "y"; easing.type: "OutQuad" } - } - - Rectangle { color: "red"; width: 100; height: 50; border.color: "black"; radius: 15 } - - Rectangle { - id: blueV1 - width: 100; height: 50 - color: "lightsteelblue" - border.color: "black" - radius: 15 - Behavior on opacity { NumberAnimation {} } - } - - Rectangle { color: "green"; width: 100; height: 50; border.color: "black"; radius: 15 } - - Rectangle { - id: blueV2 - width: 100; height: 50 - color: "lightsteelblue" - border.color: "black" - radius: 15 - Behavior on opacity { NumberAnimation {} } - } - - Rectangle { color: "orange"; width: 100; height: 50; border.color: "black"; radius: 15 } - } - - Row { - id: layout2 - y: 300 - move: Transition { - NumberAnimation { properties: "x"; easing.type: "OutBounce" } - } - add: Transition { - NumberAnimation { properties: "x"; easing.type: "OutQuad" } - } - - Rectangle { color: "red"; width: 50; height: 100; border.color: "black"; radius: 15 } - - Rectangle { - id: blueH1 - width: 50; height: 100 - color: "lightsteelblue" - border.color: "black" - radius: 15 - Behavior on opacity { NumberAnimation {} } - } - - Rectangle { color: "green"; width: 50; height: 100; border.color: "black"; radius: 15 } - - Rectangle { - id: blueH2 - width: 50; height: 100 - color: "lightsteelblue" - border.color: "black" - radius: 15 - Behavior on opacity { NumberAnimation {} } - } - - Rectangle { color: "orange"; width: 50; height: 100; border.color: "black"; radius: 15 } - } - - Button { - x: 135; y: 90 - text: "Remove" - icon: "del.png" - - onClicked: { - blueH2.opacity = 0 - blueH1.opacity = 0 - blueV1.opacity = 0 - blueV2.opacity = 0 - blueG1.opacity = 0 - blueG2.opacity = 0 - blueG3.opacity = 0 - blueF1.opacity = 0 - blueF2.opacity = 0 - blueF3.opacity = 0 - } - } - - Button { - x: 145; y: 140 - text: "Add" - icon: "add.png" - - onClicked: { - blueH2.opacity = 1 - blueH1.opacity = 1 - blueV1.opacity = 1 - blueV2.opacity = 1 - blueG1.opacity = 1 - blueG2.opacity = 1 - blueG3.opacity = 1 - blueF1.opacity = 1 - blueF2.opacity = 1 - blueF3.opacity = 1 - } - } - - Grid { - x: 260; y: 0 - columns: 3 - - move: Transition { - NumberAnimation { properties: "x,y"; easing.type: "OutBounce" } - } - - add: Transition { - NumberAnimation { properties: "x,y"; easing.type: "OutBounce" } - } - - Rectangle { color: "red"; width: 50; height: 50; border.color: "black"; radius: 15 } - - Rectangle { - id: blueG1 - width: 50; height: 50 - color: "lightsteelblue" - border.color: "black" - radius: 15 - Behavior on opacity { NumberAnimation {} } - } - - Rectangle { color: "green"; width: 50; height: 50; border.color: "black"; radius: 15 } - - Rectangle { - id: blueG2 - width: 50; height: 50 - color: "lightsteelblue" - border.color: "black" - radius: 15 - Behavior on opacity { NumberAnimation {} } - } - - Rectangle { color: "orange"; width: 50; height: 50; border.color: "black"; radius: 15 } - - Rectangle { - id: blueG3 - width: 50; height: 50 - color: "lightsteelblue" - border.color: "black" - radius: 15 - Behavior on opacity { NumberAnimation {} } - } - - Rectangle { color: "red"; width: 50; height: 50; border.color: "black"; radius: 15 } - Rectangle { color: "green"; width: 50; height: 50; border.color: "black"; radius: 15 } - Rectangle { color: "orange"; width: 50; height: 50; border.color: "black"; radius: 15 } - } - - Flow { - id: layout4 - x: 260; y: 250; width: 150 - - move: Transition { - NumberAnimation { properties: "x,y"; easing.type: "OutBounce" } - } - - add: Transition { - NumberAnimation { properties: "x,y"; easing.type: "OutBounce" } - } - - Rectangle { color: "red"; width: 50; height: 50; border.color: "black"; radius: 15 } - - Rectangle { - id: blueF1 - width: 60; height: 50 - color: "lightsteelblue" - border.color: "black" - radius: 15 - Behavior on opacity { NumberAnimation {} } - } - - Rectangle { color: "green"; width: 30; height: 50; border.color: "black"; radius: 15 } - - Rectangle { - id: blueF2 - width: 60; height: 50 - color: "lightsteelblue" - border.color: "black" - radius: 15 - Behavior on opacity { NumberAnimation {} } - } - - Rectangle { color: "orange"; width: 50; height: 50; border.color: "black"; radius: 15 } - - Rectangle { - id: blueF3 - width: 40; height: 50 - color: "lightsteelblue" - border.color: "black" - radius: 15 - Behavior on opacity { NumberAnimation {} } - } - - Rectangle { color: "red"; width: 80; height: 50; border.color: "black"; radius: 15 } - } - -} diff --git a/examples/declarative/layouts/positioners/Button.qml b/examples/declarative/layouts/positioners/Button.qml new file mode 100644 index 0000000..0f08893 --- /dev/null +++ b/examples/declarative/layouts/positioners/Button.qml @@ -0,0 +1,22 @@ +import Qt 4.7 + +Rectangle { border.color: "black"; color: "steelblue"; radius: 5; width: pix.width + textelement.width + 13; height: pix.height + 10; id: page + property string text + property string icon + signal clicked + + Image { id: pix; x: 5; y:5; source: parent.icon} + Text { id: textelement; text: page.text; color: "white"; x:pix.width+pix.x+3; anchors.verticalCenter: pix.verticalCenter;} + MouseArea{ id:mr; anchors.fill: parent; onClicked: {parent.focus = true; page.clicked()}} + + states: + State{ name:"pressed"; when:mr.pressed + PropertyChanges {target:textelement; x: 5} + PropertyChanges {target:pix; x:textelement.x+textelement.width + 3} + } + + transitions: + Transition{ + NumberAnimation { properties:"x,left"; easing.type:"InOutQuad"; duration:200 } + } +} diff --git a/examples/declarative/layouts/positioners/add.png b/examples/declarative/layouts/positioners/add.png new file mode 100644 index 0000000..f29d84b Binary files /dev/null and b/examples/declarative/layouts/positioners/add.png differ diff --git a/examples/declarative/layouts/positioners/del.png b/examples/declarative/layouts/positioners/del.png new file mode 100644 index 0000000..1d753a3 Binary files /dev/null and b/examples/declarative/layouts/positioners/del.png differ diff --git a/examples/declarative/layouts/positioners/positioners.qml b/examples/declarative/layouts/positioners/positioners.qml new file mode 100644 index 0000000..3703b59 --- /dev/null +++ b/examples/declarative/layouts/positioners/positioners.qml @@ -0,0 +1,213 @@ +import Qt 4.7 + +Rectangle { + id: page + width: 420; height: 420 + + Column { + id: layout1 + y: 0 + move: Transition { + NumberAnimation { properties: "y"; easing.type: "OutBounce" } + } + add: Transition { + NumberAnimation { properties: "y"; easing.type: "OutQuad" } + } + + Rectangle { color: "red"; width: 100; height: 50; border.color: "black"; radius: 15 } + + Rectangle { + id: blueV1 + width: 100; height: 50 + color: "lightsteelblue" + border.color: "black" + radius: 15 + Behavior on opacity { NumberAnimation {} } + } + + Rectangle { color: "green"; width: 100; height: 50; border.color: "black"; radius: 15 } + + Rectangle { + id: blueV2 + width: 100; height: 50 + color: "lightsteelblue" + border.color: "black" + radius: 15 + Behavior on opacity { NumberAnimation {} } + } + + Rectangle { color: "orange"; width: 100; height: 50; border.color: "black"; radius: 15 } + } + + Row { + id: layout2 + y: 300 + move: Transition { + NumberAnimation { properties: "x"; easing.type: "OutBounce" } + } + add: Transition { + NumberAnimation { properties: "x"; easing.type: "OutQuad" } + } + + Rectangle { color: "red"; width: 50; height: 100; border.color: "black"; radius: 15 } + + Rectangle { + id: blueH1 + width: 50; height: 100 + color: "lightsteelblue" + border.color: "black" + radius: 15 + Behavior on opacity { NumberAnimation {} } + } + + Rectangle { color: "green"; width: 50; height: 100; border.color: "black"; radius: 15 } + + Rectangle { + id: blueH2 + width: 50; height: 100 + color: "lightsteelblue" + border.color: "black" + radius: 15 + Behavior on opacity { NumberAnimation {} } + } + + Rectangle { color: "orange"; width: 50; height: 100; border.color: "black"; radius: 15 } + } + + Button { + x: 135; y: 90 + text: "Remove" + icon: "del.png" + + onClicked: { + blueH2.opacity = 0 + blueH1.opacity = 0 + blueV1.opacity = 0 + blueV2.opacity = 0 + blueG1.opacity = 0 + blueG2.opacity = 0 + blueG3.opacity = 0 + blueF1.opacity = 0 + blueF2.opacity = 0 + blueF3.opacity = 0 + } + } + + Button { + x: 145; y: 140 + text: "Add" + icon: "add.png" + + onClicked: { + blueH2.opacity = 1 + blueH1.opacity = 1 + blueV1.opacity = 1 + blueV2.opacity = 1 + blueG1.opacity = 1 + blueG2.opacity = 1 + blueG3.opacity = 1 + blueF1.opacity = 1 + blueF2.opacity = 1 + blueF3.opacity = 1 + } + } + + Grid { + x: 260; y: 0 + columns: 3 + + move: Transition { + NumberAnimation { properties: "x,y"; easing.type: "OutBounce" } + } + + add: Transition { + NumberAnimation { properties: "x,y"; easing.type: "OutBounce" } + } + + Rectangle { color: "red"; width: 50; height: 50; border.color: "black"; radius: 15 } + + Rectangle { + id: blueG1 + width: 50; height: 50 + color: "lightsteelblue" + border.color: "black" + radius: 15 + Behavior on opacity { NumberAnimation {} } + } + + Rectangle { color: "green"; width: 50; height: 50; border.color: "black"; radius: 15 } + + Rectangle { + id: blueG2 + width: 50; height: 50 + color: "lightsteelblue" + border.color: "black" + radius: 15 + Behavior on opacity { NumberAnimation {} } + } + + Rectangle { color: "orange"; width: 50; height: 50; border.color: "black"; radius: 15 } + + Rectangle { + id: blueG3 + width: 50; height: 50 + color: "lightsteelblue" + border.color: "black" + radius: 15 + Behavior on opacity { NumberAnimation {} } + } + + Rectangle { color: "red"; width: 50; height: 50; border.color: "black"; radius: 15 } + Rectangle { color: "green"; width: 50; height: 50; border.color: "black"; radius: 15 } + Rectangle { color: "orange"; width: 50; height: 50; border.color: "black"; radius: 15 } + } + + Flow { + id: layout4 + x: 260; y: 250; width: 150 + + move: Transition { + NumberAnimation { properties: "x,y"; easing.type: "OutBounce" } + } + + add: Transition { + NumberAnimation { properties: "x,y"; easing.type: "OutBounce" } + } + + Rectangle { color: "red"; width: 50; height: 50; border.color: "black"; radius: 15 } + + Rectangle { + id: blueF1 + width: 60; height: 50 + color: "lightsteelblue" + border.color: "black" + radius: 15 + Behavior on opacity { NumberAnimation {} } + } + + Rectangle { color: "green"; width: 30; height: 50; border.color: "black"; radius: 15 } + + Rectangle { + id: blueF2 + width: 60; height: 50 + color: "lightsteelblue" + border.color: "black" + radius: 15 + Behavior on opacity { NumberAnimation {} } + } + + Rectangle { color: "orange"; width: 50; height: 50; border.color: "black"; radius: 15 } + + Rectangle { + id: blueF3 + width: 40; height: 50 + color: "lightsteelblue" + border.color: "black" + radius: 15 + Behavior on opacity { NumberAnimation {} } + } + + Rectangle { color: "red"; width: 80; height: 50; border.color: "black"; radius: 15 } + } + +} diff --git a/examples/declarative/layouts/positioners/positioners.qmlproject b/examples/declarative/layouts/positioners/positioners.qmlproject new file mode 100644 index 0000000..e526217 --- /dev/null +++ b/examples/declarative/layouts/positioners/positioners.qmlproject @@ -0,0 +1,18 @@ +/* File generated by QtCreator */ + +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/positioners/positioners.qmlproject.user b/examples/declarative/layouts/positioners/positioners.qmlproject.user new file mode 100644 index 0000000..593479d --- /dev/null +++ b/examples/declarative/layouts/positioners/positioners.qmlproject.user @@ -0,0 +1,41 @@ + + + + ProjectExplorer.Project.ActiveTarget + 0 + + + ProjectExplorer.Project.EditorSettings + + UTF-8 + + + + ProjectExplorer.Project.Target.0 + + QML Runtime + QmlProjectManager.QmlTarget + -1 + 0 + 0 + + QML Runtime + QmlProjectManager.QmlRunConfiguration + 127.0.0.1 + 3768 + positioners.qml + + + + 1 + + + + ProjectExplorer.Project.TargetCount + 1 + + + ProjectExplorer.Project.Updater.FileVersion + 4 + + diff --git a/src/imports/imports.pro b/src/imports/imports.pro index ecde0cc..1754908 100644 --- a/src/imports/imports.pro +++ b/src/imports/imports.pro @@ -1,6 +1,6 @@ TEMPLATE = subdirs -SUBDIRS += widgets particles +SUBDIRS += particles contains(QT_CONFIG, webkit): SUBDIRS += webkit contains(QT_CONFIG, mediaservices): SUBDIRS += multimedia diff --git a/src/imports/widgets/graphicslayouts.cpp b/src/imports/widgets/graphicslayouts.cpp deleted file mode 100644 index 25cf994..0000000 --- a/src/imports/widgets/graphicslayouts.cpp +++ /dev/null @@ -1,366 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). -** All rights reserved. -** Contact: Nokia Corporation (qt-info@nokia.com) -** -** This file is part of the QtDeclarative module of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** No Commercial Usage -** This file contains pre-release code and may not be distributed. -** You may use this file in accordance with the terms and conditions -** contained in the Technology Preview License Agreement accompanying -** this package. -** -** GNU Lesser General Public License Usage -** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 2.1 as published by the Free Software -** Foundation and appearing in the file LICENSE.LGPL included in the -** packaging of this file. Please review the following information to -** ensure the GNU Lesser General Public License version 2.1 requirements -** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. -** -** In addition, as a special exception, Nokia gives you certain additional -** rights. These rights are described in the Nokia Qt LGPL Exception -** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. -** -** If you have questions regarding the use of this file, please contact -** Nokia at qt-info@nokia.com. -** -** -** -** -** -** -** -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -#include "graphicslayouts_p.h" - -#include -#include - -QT_BEGIN_NAMESPACE - -LinearLayoutAttached::LinearLayoutAttached(QObject *parent) -: QObject(parent), _stretch(1), _alignment(Qt::AlignCenter), _spacing(0) -{ -} - -void LinearLayoutAttached::setStretchFactor(int f) -{ - if (_stretch == f) - return; - - _stretch = f; - emit stretchChanged(reinterpret_cast(parent()), _stretch); -} - -void LinearLayoutAttached::setSpacing(int s) -{ - if (_spacing == s) - return; - - _spacing = s; - emit spacingChanged(reinterpret_cast(parent()), _spacing); -} - -void LinearLayoutAttached::setAlignment(Qt::Alignment a) -{ - if (_alignment == a) - return; - - _alignment = a; - emit alignmentChanged(reinterpret_cast(parent()), _alignment); -} - -QGraphicsLinearLayoutStretchItemObject::QGraphicsLinearLayoutStretchItemObject(QObject *parent) - : QObject(parent) -{ -} - -QSizeF QGraphicsLinearLayoutStretchItemObject::sizeHint(Qt::SizeHint which, const QSizeF &constraint) const -{ -Q_UNUSED(which); -Q_UNUSED(constraint); -return QSizeF(); -} - - -QGraphicsLinearLayoutObject::QGraphicsLinearLayoutObject(QObject *parent) -: QObject(parent) -{ -} - -QGraphicsLinearLayoutObject::~QGraphicsLinearLayoutObject() -{ -} - -void QGraphicsLinearLayoutObject::insertLayoutItem(int index, QGraphicsLayoutItem *item) -{ -insertItem(index, item); - -//connect attached properties -if (LinearLayoutAttached *obj = attachedProperties.value(item)) { - setStretchFactor(item, obj->stretchFactor()); - setAlignment(item, obj->alignment()); - updateSpacing(item, obj->spacing()); - QObject::connect(obj, SIGNAL(stretchChanged(QGraphicsLayoutItem*,int)), - this, SLOT(updateStretch(QGraphicsLayoutItem*,int))); - QObject::connect(obj, SIGNAL(alignmentChanged(QGraphicsLayoutItem*,Qt::Alignment)), - this, SLOT(updateAlignment(QGraphicsLayoutItem*,Qt::Alignment))); - QObject::connect(obj, SIGNAL(spacingChanged(QGraphicsLayoutItem*,int)), - this, SLOT(updateSpacing(QGraphicsLayoutItem*,int))); - //### need to disconnect when widget is removed? -} -} - -//### is there a better way to do this? -void QGraphicsLinearLayoutObject::clearChildren() -{ -for (int i = 0; i < count(); ++i) - removeAt(i); -} - -qreal QGraphicsLinearLayoutObject::contentsMargin() const -{ - qreal a,b,c,d; - getContentsMargins(&a, &b, &c, &d); - if(a==b && a==c && a==d) - return a; - return -1; -} - -void QGraphicsLinearLayoutObject::setContentsMargin(qreal m) -{ - setContentsMargins(m,m,m,m); -} - -void QGraphicsLinearLayoutObject::updateStretch(QGraphicsLayoutItem *item, int stretch) -{ -QGraphicsLinearLayout::setStretchFactor(item, stretch); -} - -void QGraphicsLinearLayoutObject::updateSpacing(QGraphicsLayoutItem* item, int spacing) -{ - for(int i=0; i < count(); i++){ - if(itemAt(i) == item){ //I do not see the reverse function, which is why we must loop over all items - QGraphicsLinearLayout::setItemSpacing(i, spacing); - return; - } - } -} - -void QGraphicsLinearLayoutObject::updateAlignment(QGraphicsLayoutItem *item, Qt::Alignment alignment) -{ -QGraphicsLinearLayout::setAlignment(item, alignment); -} - -QHash QGraphicsLinearLayoutObject::attachedProperties; -LinearLayoutAttached *QGraphicsLinearLayoutObject::qmlAttachedProperties(QObject *obj) -{ -// ### This is not allowed - you must attach to any object -if (!qobject_cast(obj)) - return 0; -LinearLayoutAttached *rv = new LinearLayoutAttached(obj); -attachedProperties.insert(qobject_cast(obj), rv); -return rv; -} - -////////////////////////////////////////////////////////////////////////////////////////////////////// -// QGraphicsGridLayout-related classes -////////////////////////////////////////////////////////////////////////////////////////////////////// -GridLayoutAttached::GridLayoutAttached(QObject *parent) -: QObject(parent), _row(-1), _column(-1), _rowspan(1), _colspan(1), _alignment(-1), _rowstretch(-1), - _colstretch(-1), _rowspacing(-1), _colspacing(-1), _rowprefheight(-1), _rowmaxheight(-1), _rowminheight(-1), - _rowfixheight(-1), _colprefwidth(-1), _colmaxwidth(-1), _colminwidth(-1), _colfixwidth(-1) -{ -} - -void GridLayoutAttached::setRow(int r) -{ - if (_row == r) - return; - - _row = r; - //emit rowChanged(reinterpret_cast(parent()), _row); -} - -void GridLayoutAttached::setColumn(int c) -{ - if (_column == c) - return; - - _column = c; - //emit columnChanged(reinterpret_cast(parent()), _column); -} - -void GridLayoutAttached::setRowSpan(int rs) -{ - if (_rowspan == rs) - return; - - _rowspan = rs; - //emit rowSpanChanged(reinterpret_cast(parent()), _rowSpan); -} - -void GridLayoutAttached::setColumnSpan(int cs) -{ - if (_colspan == cs) - return; - - _colspan = cs; - //emit columnSpanChanged(reinterpret_cast(parent()), _columnSpan); -} - -void GridLayoutAttached::setAlignment(Qt::Alignment a) -{ - if (_alignment == a) - return; - - _alignment = a; - emit alignmentChanged(reinterpret_cast(parent()), _alignment); -} - -void GridLayoutAttached::setRowStretchFactor(int f) -{ - _rowstretch = f; -} - -void GridLayoutAttached::setColumnStretchFactor(int f) -{ - _colstretch = f; -} - -void GridLayoutAttached::setRowSpacing(int s) -{ - _rowspacing = s; -} - -void GridLayoutAttached::setColumnSpacing(int s) -{ - _colspacing = s; -} - - -QGraphicsGridLayoutObject::QGraphicsGridLayoutObject(QObject *parent) -: QObject(parent) -{ -} - -QGraphicsGridLayoutObject::~QGraphicsGridLayoutObject() -{ -} - -void QGraphicsGridLayoutObject::addWidget(QGraphicsWidget *wid) -{ -//use attached properties -if (QObject *obj = attachedProperties.value(qobject_cast(wid))) { - int row = static_cast(obj)->row(); - int column = static_cast(obj)->column(); - int rowSpan = static_cast(obj)->rowSpan(); - int columnSpan = static_cast(obj)->columnSpan(); - if (row == -1 || column == -1) { - qWarning() << "Must set row and column for an item in a grid layout"; - return; - } - addItem(wid, row, column, rowSpan, columnSpan); -} -} - -void QGraphicsGridLayoutObject::addLayoutItem(QGraphicsLayoutItem *item) -{ -//use attached properties -if (GridLayoutAttached *obj = attachedProperties.value(item)) { - int row = obj->row(); - int column = obj->column(); - int rowSpan = obj->rowSpan(); - int columnSpan = obj->columnSpan(); - Qt::Alignment alignment = obj->alignment(); - if (row == -1 || column == -1) { - qWarning() << "Must set row and column for an item in a grid layout"; - return; - } - if(obj->rowSpacing() != -1) - setRowSpacing(row, obj->rowSpacing()); - if(obj->columnSpacing() != -1) - setColumnSpacing(column, obj->columnSpacing()); - if(obj->rowStretchFactor() != -1) - setRowStretchFactor(row, obj->rowStretchFactor()); - if(obj->columnStretchFactor() != -1) - setColumnStretchFactor(column, obj->columnStretchFactor()); - if(obj->rowPreferredHeight() != -1) - setRowPreferredHeight(row, obj->rowPreferredHeight()); - if(obj->rowMaximumHeight() != -1) - setRowMaximumHeight(row, obj->rowMaximumHeight()); - if(obj->rowMinimumHeight() != -1) - setRowMinimumHeight(row, obj->rowMinimumHeight()); - if(obj->rowFixedHeight() != -1) - setRowFixedHeight(row, obj->rowFixedHeight()); - if(obj->columnPreferredWidth() != -1) - setColumnPreferredWidth(row, obj->columnPreferredWidth()); - if(obj->columnMaximumWidth() != -1) - setColumnMaximumWidth(row, obj->columnMaximumWidth()); - if(obj->columnMinimumWidth() != -1) - setColumnMinimumWidth(row, obj->columnMinimumWidth()); - if(obj->columnFixedWidth() != -1) - setColumnFixedWidth(row, obj->columnFixedWidth()); - addItem(item, row, column, rowSpan, columnSpan); - if (alignment != -1) - setAlignment(item,alignment); - QObject::connect(obj, SIGNAL(alignmentChanged(QGraphicsLayoutItem*,Qt::Alignment)), - this, SLOT(updateAlignment(QGraphicsLayoutItem*,Qt::Alignment))); - //### need to disconnect when widget is removed? -} -} - -//### is there a better way to do this? -void QGraphicsGridLayoutObject::clearChildren() -{ -for (int i = 0; i < count(); ++i) - removeAt(i); -} - -qreal QGraphicsGridLayoutObject::spacing() const -{ -if (verticalSpacing() == horizontalSpacing()) - return verticalSpacing(); -return -1; //### -} - -qreal QGraphicsGridLayoutObject::contentsMargin() const -{ - qreal a,b,c,d; - getContentsMargins(&a, &b, &c, &d); - if(a==b && a==c && a==d) - return a; - return -1; -} - -void QGraphicsGridLayoutObject::setContentsMargin(qreal m) -{ - setContentsMargins(m,m,m,m); -} - - -void QGraphicsGridLayoutObject::updateAlignment(QGraphicsLayoutItem *item, Qt::Alignment alignment) -{ -QGraphicsGridLayout::setAlignment(item, alignment); -} - -QHash QGraphicsGridLayoutObject::attachedProperties; -GridLayoutAttached *QGraphicsGridLayoutObject::qmlAttachedProperties(QObject *obj) -{ -// ### This is not allowed - you must attach to any object -if (!qobject_cast(obj)) - return 0; -GridLayoutAttached *rv = new GridLayoutAttached(obj); -attachedProperties.insert(qobject_cast(obj), rv); -return rv; -} - -QT_END_NAMESPACE diff --git a/src/imports/widgets/graphicslayouts_p.h b/src/imports/widgets/graphicslayouts_p.h deleted file mode 100644 index ea9c614..0000000 --- a/src/imports/widgets/graphicslayouts_p.h +++ /dev/null @@ -1,303 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). -** All rights reserved. -** Contact: Nokia Corporation (qt-info@nokia.com) -** -** This file is part of the QtDeclarative module of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** No Commercial Usage -** This file contains pre-release code and may not be distributed. -** You may use this file in accordance with the terms and conditions -** contained in the Technology Preview License Agreement accompanying -** this package. -** -** GNU Lesser General Public License Usage -** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 2.1 as published by the Free Software -** Foundation and appearing in the file LICENSE.LGPL included in the -** packaging of this file. Please review the following information to -** ensure the GNU Lesser General Public License version 2.1 requirements -** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. -** -** In addition, as a special exception, Nokia gives you certain additional -** rights. These rights are described in the Nokia Qt LGPL Exception -** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. -** -** If you have questions regarding the use of this file, please contact -** Nokia at qt-info@nokia.com. -** -** -** -** -** -** -** -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -#ifndef GRAPHICSLAYOUTS_H -#define GRAPHICSLAYOUTS_H - -#include -#include -#include - -QT_BEGIN_HEADER - -QT_BEGIN_NAMESPACE - -QT_MODULE(Declarative) - -class QGraphicsLinearLayoutStretchItemObject : public QObject, public QGraphicsLayoutItem -{ - Q_OBJECT - Q_INTERFACES(QGraphicsLayoutItem) -public: - QGraphicsLinearLayoutStretchItemObject(QObject *parent = 0); - - virtual QSizeF sizeHint(Qt::SizeHint, const QSizeF &) const; -}; - -class LinearLayoutAttached; -class QGraphicsLinearLayoutObject : public QObject, public QGraphicsLinearLayout -{ - Q_OBJECT - Q_INTERFACES(QGraphicsLayout QGraphicsLayoutItem) - - Q_PROPERTY(QDeclarativeListProperty children READ children) - Q_PROPERTY(Qt::Orientation orientation READ orientation WRITE setOrientation) - Q_PROPERTY(qreal spacing READ spacing WRITE setSpacing) - Q_PROPERTY(qreal contentsMargin READ contentsMargin WRITE setContentsMargin) - Q_CLASSINFO("DefaultProperty", "children") -public: - QGraphicsLinearLayoutObject(QObject * = 0); - ~QGraphicsLinearLayoutObject(); - - QDeclarativeListProperty children() { return QDeclarativeListProperty(this, 0, children_append, children_count, children_at, children_clear); } - - static LinearLayoutAttached *qmlAttachedProperties(QObject *); - - qreal contentsMargin() const; - void setContentsMargin(qreal); - -private Q_SLOTS: - void updateStretch(QGraphicsLayoutItem*,int); - void updateSpacing(QGraphicsLayoutItem*,int); - void updateAlignment(QGraphicsLayoutItem*,Qt::Alignment); - -private: - friend class LinearLayoutAttached; - void clearChildren(); - void insertLayoutItem(int, QGraphicsLayoutItem *); - static QHash attachedProperties; - - static void children_append(QDeclarativeListProperty *prop, QGraphicsLayoutItem *item) { - static_cast(prop->object)->insertLayoutItem(-1, item); - } - - static void children_clear(QDeclarativeListProperty *prop) { - static_cast(prop->object)->clearChildren(); - } - - static int children_count(QDeclarativeListProperty *prop) { - return static_cast(prop->object)->count(); - } - - static QGraphicsLayoutItem *children_at(QDeclarativeListProperty *prop, int index) { - return static_cast(prop->object)->itemAt(index); - } -}; - -class GridLayoutAttached; -class QGraphicsGridLayoutObject : public QObject, public QGraphicsGridLayout -{ - Q_OBJECT - Q_INTERFACES(QGraphicsLayout QGraphicsLayoutItem) - - Q_PROPERTY(QDeclarativeListProperty children READ children) - Q_PROPERTY(qreal spacing READ spacing WRITE setSpacing) - Q_PROPERTY(qreal contentsMargin READ contentsMargin WRITE setContentsMargin) - Q_PROPERTY(qreal verticalSpacing READ verticalSpacing WRITE setVerticalSpacing) - Q_PROPERTY(qreal horizontalSpacing READ horizontalSpacing WRITE setHorizontalSpacing) - Q_CLASSINFO("DefaultProperty", "children") -public: - QGraphicsGridLayoutObject(QObject * = 0); - ~QGraphicsGridLayoutObject(); - - QDeclarativeListProperty children() { return QDeclarativeListProperty(this, 0, children_append, children_count, children_at, children_clear); } - - qreal spacing() const; - qreal contentsMargin() const; - void setContentsMargin(qreal); - - static GridLayoutAttached *qmlAttachedProperties(QObject *); - -private Q_SLOTS: - void updateAlignment(QGraphicsLayoutItem*,Qt::Alignment); - -private: - friend class GraphicsLayoutAttached; - void addWidget(QGraphicsWidget *); - void clearChildren(); - void addLayoutItem(QGraphicsLayoutItem *); - static QHash attachedProperties; - - static void children_append(QDeclarativeListProperty *prop, QGraphicsLayoutItem *item) { - static_cast(prop->object)->addLayoutItem(item); - } - - static void children_clear(QDeclarativeListProperty *prop) { - static_cast(prop->object)->clearChildren(); - } - - static int children_count(QDeclarativeListProperty *prop) { - return static_cast(prop->object)->count(); - } - - static QGraphicsLayoutItem *children_at(QDeclarativeListProperty *prop, int index) { - return static_cast(prop->object)->itemAt(index); - } -}; - -class LinearLayoutAttached : public QObject -{ - Q_OBJECT - - Q_PROPERTY(int stretchFactor READ stretchFactor WRITE setStretchFactor NOTIFY stretchChanged) - Q_PROPERTY(Qt::Alignment alignment READ alignment WRITE setAlignment NOTIFY alignmentChanged) - Q_PROPERTY(int spacing READ spacing WRITE setSpacing NOTIFY spacingChanged) -public: - LinearLayoutAttached(QObject *parent); - - int stretchFactor() const { return _stretch; } - void setStretchFactor(int f); - Qt::Alignment alignment() const { return _alignment; } - void setAlignment(Qt::Alignment a); - int spacing() const { return _spacing; } - void setSpacing(int s); - -Q_SIGNALS: - void stretchChanged(QGraphicsLayoutItem*,int); - void alignmentChanged(QGraphicsLayoutItem*,Qt::Alignment); - void spacingChanged(QGraphicsLayoutItem*,int); - -private: - int _stretch; - Qt::Alignment _alignment; - int _spacing; -}; - -class GridLayoutAttached : public QObject -{ - Q_OBJECT - - Q_PROPERTY(int row READ row WRITE setRow) - Q_PROPERTY(int column READ column WRITE setColumn) - Q_PROPERTY(int rowSpan READ rowSpan WRITE setRowSpan) - Q_PROPERTY(int columnSpan READ columnSpan WRITE setColumnSpan) - Q_PROPERTY(Qt::Alignment alignment READ alignment WRITE setAlignment) - Q_PROPERTY(int rowStretchFactor READ rowStretchFactor WRITE setRowStretchFactor) - Q_PROPERTY(int columnStretchFactor READ columnStretchFactor WRITE setColumnStretchFactor) - Q_PROPERTY(int rowSpacing READ rowSpacing WRITE setRowSpacing) - Q_PROPERTY(int columnSpacing READ columnSpacing WRITE setColumnSpacing) - Q_PROPERTY(int rowPreferredHeight READ rowPreferredHeight WRITE setRowPreferredHeight) - Q_PROPERTY(int rowMinimumHeight READ rowMinimumHeight WRITE setRowMinimumHeight) - Q_PROPERTY(int rowMaximumHeight READ rowMaximumHeight WRITE setRowMaximumHeight) - Q_PROPERTY(int rowFixedHeight READ rowFixedHeight WRITE setRowFixedHeight) - Q_PROPERTY(int columnPreferredWidth READ columnPreferredWidth WRITE setColumnPreferredWidth) - Q_PROPERTY(int columnMaximumWidth READ columnMaximumWidth WRITE setColumnMaximumWidth) - Q_PROPERTY(int columnMinimumWidth READ columnMinimumWidth WRITE setColumnMinimumWidth) - Q_PROPERTY(int columnFixedWidth READ columnFixedWidth WRITE setColumnFixedWidth) - -public: - GridLayoutAttached(QObject *parent); - - int row() const { return _row; } - void setRow(int r); - - int column() const { return _column; } - void setColumn(int c); - - int rowSpan() const { return _rowspan; } - void setRowSpan(int rs); - - int columnSpan() const { return _colspan; } - void setColumnSpan(int cs); - - Qt::Alignment alignment() const { return _alignment; } - void setAlignment(Qt::Alignment a); - - int rowStretchFactor() const { return _rowstretch; } - void setRowStretchFactor(int f); - int columnStretchFactor() const { return _colstretch; } - void setColumnStretchFactor(int f); - - int rowSpacing() const { return _rowspacing; } - void setRowSpacing(int s); - int columnSpacing() const { return _colspacing; } - void setColumnSpacing(int s); - - int rowPreferredHeight() const { return _rowprefheight; } - void setRowPreferredHeight(int s) { _rowprefheight = s; } - - int rowMaximumHeight() const { return _rowmaxheight; } - void setRowMaximumHeight(int s) { _rowmaxheight = s; } - - int rowMinimumHeight() const { return _rowminheight; } - void setRowMinimumHeight(int s) { _rowminheight = s; } - - int rowFixedHeight() const { return _rowfixheight; } - void setRowFixedHeight(int s) { _rowfixheight = s; } - - int columnPreferredWidth() const { return _colprefwidth; } - void setColumnPreferredWidth(int s) { _colprefwidth = s; } - - int columnMaximumWidth() const { return _colmaxwidth; } - void setColumnMaximumWidth(int s) { _colmaxwidth = s; } - - int columnMinimumWidth() const { return _colminwidth; } - void setColumnMinimumWidth(int s) { _colminwidth = s; } - - int columnFixedWidth() const { return _colfixwidth; } - void setColumnFixedWidth(int s) { _colfixwidth = s; } - -Q_SIGNALS: - void alignmentChanged(QGraphicsLayoutItem*,Qt::Alignment); - -private: - int _row; - int _column; - int _rowspan; - int _colspan; - Qt::Alignment _alignment; - int _rowstretch; - int _colstretch; - int _rowspacing; - int _colspacing; - int _rowprefheight; - int _rowmaxheight; - int _rowminheight; - int _rowfixheight; - int _colprefwidth; - int _colmaxwidth; - int _colminwidth; - int _colfixwidth; -}; - -QT_END_NAMESPACE - -QML_DECLARE_INTERFACE(QGraphicsLayoutItem) -QML_DECLARE_INTERFACE(QGraphicsLayout) -QML_DECLARE_TYPE(QGraphicsLinearLayoutStretchItemObject) -QML_DECLARE_TYPE(QGraphicsLinearLayoutObject) -QML_DECLARE_TYPEINFO(QGraphicsLinearLayoutObject, QML_HAS_ATTACHED_PROPERTIES) -QML_DECLARE_TYPE(QGraphicsGridLayoutObject) -QML_DECLARE_TYPEINFO(QGraphicsGridLayoutObject, QML_HAS_ATTACHED_PROPERTIES) - -QT_END_HEADER - -#endif // GRAPHICSLAYOUTS_H diff --git a/src/imports/widgets/qmldir b/src/imports/widgets/qmldir deleted file mode 100644 index 6f19878..0000000 --- a/src/imports/widgets/qmldir +++ /dev/null @@ -1 +0,0 @@ -plugin widgets diff --git a/src/imports/widgets/widgets.cpp b/src/imports/widgets/widgets.cpp deleted file mode 100644 index 20de1fe..0000000 --- a/src/imports/widgets/widgets.cpp +++ /dev/null @@ -1,71 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). -** All rights reserved. -** Contact: Nokia Corporation (qt-info@nokia.com) -** -** This file is part of the plugins of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** No Commercial Usage -** This file contains pre-release code and may not be distributed. -** You may use this file in accordance with the terms and conditions -** contained in the Technology Preview License Agreement accompanying -** this package. -** -** GNU Lesser General Public License Usage -** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 2.1 as published by the Free Software -** Foundation and appearing in the file LICENSE.LGPL included in the -** packaging of this file. Please review the following information to -** ensure the GNU Lesser General Public License version 2.1 requirements -** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. -** -** In addition, as a special exception, Nokia gives you certain additional -** rights. These rights are described in the Nokia Qt LGPL Exception -** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. -** -** If you have questions regarding the use of this file, please contact -** Nokia at qt-info@nokia.com. -** -** -** -** -** -** -** -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -#include -#include -#include - -#include "graphicslayouts_p.h" -#include -QT_BEGIN_NAMESPACE - -class QWidgetsQmlModule : public QDeclarativeExtensionPlugin -{ - Q_OBJECT -public: - virtual void registerTypes(const char *uri) - { - Q_ASSERT(QLatin1String(uri) == QLatin1String("Qt.widgets")); - - qmlRegisterInterface("QGraphicsLayoutItem"); - qmlRegisterInterface("QGraphicsLayout"); - qmlRegisterType(uri,4,7,"QGraphicsLinearLayoutStretchItem"); - qmlRegisterType(uri,4,7,"QGraphicsLinearLayout"); - qmlRegisterType(uri,4,7,"QGraphicsGridLayout"); - } -}; - -QT_END_NAMESPACE - -#include "widgets.moc" - -Q_EXPORT_PLUGIN2(qtwidgetsqmlmodule, QT_PREPEND_NAMESPACE(QWidgetsQmlModule)); - diff --git a/src/imports/widgets/widgets.pro b/src/imports/widgets/widgets.pro deleted file mode 100644 index 234ff1e..0000000 --- a/src/imports/widgets/widgets.pro +++ /dev/null @@ -1,30 +0,0 @@ -TARGET = widgets -TARGETPATH = Qt/widgets -include(../qimportbase.pri) - -QT += declarative - -SOURCES += \ - graphicslayouts.cpp \ - widgets.cpp - -HEADERS += \ - graphicslayouts_p.h - -QTDIR_build:DESTDIR = $$QT_BUILD_TREE/imports/$$TARGETPATH -target.path = $$[QT_INSTALL_IMPORTS]/$$TARGETPATH - -qmldir.files += $$PWD/qmldir -qmldir.path += $$[QT_INSTALL_IMPORTS]/$$TARGETPATH - -symbian:{ - load(data_caging_paths) - include($$QT_SOURCE_TREE/demos/symbianpkgrules.pri) - - importFiles.sources = widgets.dll qmldir - importFiles.path = $$QT_IMPORTS_BASE_DIR/$$TARGETPATH - - DEPLOYMENT = importFiles -} - -INSTALLS += target qmldir diff --git a/tests/auto/declarative/qdeclarativelayoutitem/data/layoutItem.qml b/tests/auto/declarative/qdeclarativelayoutitem/data/layoutItem.qml new file mode 100644 index 0000000..ee881a2 --- /dev/null +++ b/tests/auto/declarative/qdeclarativelayoutitem/data/layoutItem.qml @@ -0,0 +1,9 @@ +import Qt 4.7 + +LayoutItem {//Sized by the layout + id: resizable + objectName: "resizable" + minimumSize: "100x100" + maximumSize: "300x300" + preferredSize: "200x200" +} diff --git a/tests/auto/declarative/qdeclarativelayoutitem/qdeclarativelayoutitem.pro b/tests/auto/declarative/qdeclarativelayoutitem/qdeclarativelayoutitem.pro new file mode 100644 index 0000000..eeb784d --- /dev/null +++ b/tests/auto/declarative/qdeclarativelayoutitem/qdeclarativelayoutitem.pro @@ -0,0 +1,8 @@ +load(qttest_p4) +contains(QT_CONFIG,declarative): QT += declarative gui +macx:CONFIG -= app_bundle + +SOURCES += tst_qdeclarativelayoutitem.cpp + +# Define SRCDIR equal to test's source directory +DEFINES += SRCDIR=\\\"$$PWD\\\" diff --git a/tests/auto/declarative/qdeclarativelayoutitem/tst_qdeclarativelayoutitem.cpp b/tests/auto/declarative/qdeclarativelayoutitem/tst_qdeclarativelayoutitem.cpp new file mode 100644 index 0000000..2207635 --- /dev/null +++ b/tests/auto/declarative/qdeclarativelayoutitem/tst_qdeclarativelayoutitem.cpp @@ -0,0 +1,115 @@ +/**************************************************************************** +** +** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). +** All rights reserved. +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the test suite of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** No Commercial Usage +** This file contains pre-release code and may not be distributed. +** You may use this file in accordance with the terms and conditions +** contained in the Technology Preview License Agreement accompanying +** this package. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 2.1 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 2.1 requirements +** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** In addition, as a special exception, Nokia gives you certain additional +** rights. These rights are described in the Nokia Qt LGPL Exception +** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +** +** If you have questions regarding the use of this file, please contact +** Nokia at qt-info@nokia.com. +** +** +** +** +** +** +** +** +** $QT_END_LICENSE$ +** +****************************************************************************/ +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include "../../../shared/util.h" + +class tst_qdeclarativelayoutitem : public QObject +{ + Q_OBJECT +public: + tst_qdeclarativelayoutitem(); + +private slots: + void test_resizing(); +}; + +tst_qdeclarativelayoutitem::tst_qdeclarativelayoutitem() +{ +} + +void tst_qdeclarativelayoutitem::test_resizing() +{ + //Create Layout (must be done in C++) + QGraphicsView view; + QGraphicsScene scene; + QGraphicsWidget *widget = new QGraphicsWidget(); + QGraphicsLinearLayout *layout = new QGraphicsLinearLayout(); + widget->setLayout(layout); + scene.addItem(widget); + view.setScene(&scene); + //Add the QML snippet into the layout + QDeclarativeEngine engine; + QDeclarativeComponent c(&engine, QUrl(SRCDIR "/data/layoutItem.qml")); + QDeclarativeLayoutItem* obj = static_cast(c.create()); + layout->addItem(obj); + layout->setContentsMargins(0,0,0,0); + widget->setContentsMargins(0,0,0,0); + view.show(); + + QVERIFY(obj!= 0); + + widget->setGeometry(QRectF(0,0, 400,400)); + QCOMPARE(obj->width(), 300.0); + QCOMPARE(obj->height(), 300.0); + + widget->setGeometry(QRectF(0,0, 300,300)); + QCOMPARE(obj->width(), 300.0); + QCOMPARE(obj->height(), 300.0); + + widget->setGeometry(QRectF(0,0, 200,200)); + QCOMPARE(obj->width(), 200.0); + QCOMPARE(obj->height(), 200.0); + + widget->setGeometry(QRectF(0,0, 100,100)); + QCOMPARE(obj->width(), 100.0); + QCOMPARE(obj->height(), 100.0); + + widget->setGeometry(QRectF(0,0, 40,40)); + QCOMPARE(obj->width(), 100.0); + QCOMPARE(obj->height(), 100.0); + + widget->setGeometry(QRectF(0,0, 412,112)); + QCOMPARE(obj->width(), 300.0); + QCOMPARE(obj->height(), 112.0); +} + + +QTEST_MAIN(tst_qdeclarativelayoutitem) + +#include "tst_qdeclarativelayoutitem.moc" diff --git a/tests/auto/declarative/qdeclarativelayouts/data/layouts.qml b/tests/auto/declarative/qdeclarativelayouts/data/layouts.qml deleted file mode 100644 index 0538738..0000000 --- a/tests/auto/declarative/qdeclarativelayouts/data/layouts.qml +++ /dev/null @@ -1,31 +0,0 @@ -import Qt 4.7 -import Qt.widgets 4.7 - -Item { - id: resizable - width:300 - height:300 - QGraphicsWidget { - x : resizable.x - y : resizable.y - width : resizable.width - height : resizable.height - layout: QGraphicsLinearLayout { - spacing: 0 - LayoutItem { - objectName: "left" - minimumSize: "100x100" - maximumSize: "300x300" - preferredSize: "100x100" - Rectangle { objectName: "yellowRect"; color: "yellow"; anchors.fill: parent } - } - LayoutItem { - objectName: "right" - minimumSize: "100x100" - maximumSize: "400x400" - preferredSize: "200x200" - Rectangle { objectName: "greenRect"; color: "green"; anchors.fill: parent } - } - } - } -} diff --git a/tests/auto/declarative/qdeclarativelayouts/qdeclarativelayouts.pro b/tests/auto/declarative/qdeclarativelayouts/qdeclarativelayouts.pro deleted file mode 100644 index a2065f4..0000000 --- a/tests/auto/declarative/qdeclarativelayouts/qdeclarativelayouts.pro +++ /dev/null @@ -1,10 +0,0 @@ -load(qttest_p4) -contains(QT_CONFIG,declarative): QT += declarative -SOURCES += tst_qdeclarativelayouts.cpp -macx:CONFIG -= app_bundle - -# Define SRCDIR equal to test's source directory -DEFINES += SRCDIR=\\\"$$PWD\\\" - -CONFIG += parallel_test - diff --git a/tests/auto/declarative/qdeclarativelayouts/tst_qdeclarativelayouts.cpp b/tests/auto/declarative/qdeclarativelayouts/tst_qdeclarativelayouts.cpp deleted file mode 100644 index 412c3b7..0000000 --- a/tests/auto/declarative/qdeclarativelayouts/tst_qdeclarativelayouts.cpp +++ /dev/null @@ -1,147 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). -** All rights reserved. -** Contact: Nokia Corporation (qt-info@nokia.com) -** -** This file is part of the test suite of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** No Commercial Usage -** This file contains pre-release code and may not be distributed. -** You may use this file in accordance with the terms and conditions -** contained in the Technology Preview License Agreement accompanying -** this package. -** -** GNU Lesser General Public License Usage -** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 2.1 as published by the Free Software -** Foundation and appearing in the file LICENSE.LGPL included in the -** packaging of this file. Please review the following information to -** ensure the GNU Lesser General Public License version 2.1 requirements -** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. -** -** In addition, as a special exception, Nokia gives you certain additional -** rights. These rights are described in the Nokia Qt LGPL Exception -** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. -** -** If you have questions regarding the use of this file, please contact -** Nokia at qt-info@nokia.com. -** -** -** -** -** -** -** -** -** $QT_END_LICENSE$ -** -****************************************************************************/ -#include -#include -#include -#include -#include -#include - -class tst_QDeclarativeLayouts : public QObject -{ - Q_OBJECT -public: - tst_QDeclarativeLayouts(); - -private slots: - void test_qml();//GraphicsLayout set up in Qml - void test_cpp();//GraphicsLayout set up in C++ - -private: - QDeclarativeView *createView(const QString &filename); -}; - -tst_QDeclarativeLayouts::tst_QDeclarativeLayouts() -{ -} - -void tst_QDeclarativeLayouts::test_qml() -{ - QDeclarativeView *canvas = createView(SRCDIR "/data/layouts.qml"); - - qApp->processEvents(); - QDeclarativeLayoutItem *left = static_cast(canvas->rootObject()->findChild("left")); - QVERIFY(left != 0); - - QDeclarativeLayoutItem *right = static_cast(canvas->rootObject()->findChild("right")); - QVERIFY(right != 0); - - qreal l = QApplication::style()->pixelMetric(QStyle::PM_LayoutLeftMargin); - qreal r = QApplication::style()->pixelMetric(QStyle::PM_LayoutRightMargin); - qreal t = QApplication::style()->pixelMetric(QStyle::PM_LayoutTopMargin); - qreal b = QApplication::style()->pixelMetric(QStyle::PM_LayoutBottomMargin); - QVERIFY2(l == r && r == t && t == b, "Test assumes equal margins."); - qreal gvMargin = l; - - QDeclarativeItem *rootItem = qobject_cast(canvas->rootObject()); - QVERIFY(rootItem != 0); - - //Preferred Size - rootItem->setWidth(300 + 2*gvMargin); - rootItem->setHeight(300 + 2*gvMargin); - - QCOMPARE(left->x(), gvMargin); - QCOMPARE(left->y(), gvMargin); - QCOMPARE(left->width(), 100.0); - QCOMPARE(left->height(), 300.0); - - QCOMPARE(right->x(), 100.0 + gvMargin); - QCOMPARE(right->y(), 0.0 + gvMargin); - QCOMPARE(right->width(), 200.0); - QCOMPARE(right->height(), 300.0); - - //Minimum Size - rootItem->setWidth(10+2*gvMargin); - rootItem->setHeight(10+2*gvMargin); - - QCOMPARE(left->x(), gvMargin); - QCOMPARE(left->width(), 100.0); - QCOMPARE(left->height(), 100.0); - - QCOMPARE(right->x(), 100.0 + gvMargin); - QCOMPARE(right->width(), 100.0); - QCOMPARE(right->height(), 100.0); - - //Between preferred and Maximum Size - /*Note that if set to maximum size (or above) GraphicsLinearLayout behavior - is to shrink them down to preferred size. So the exact maximum size can't - be used*/ - rootItem->setWidth(670 + 2*gvMargin); - rootItem->setHeight(300 + 2*gvMargin); - - QCOMPARE(left->x(), gvMargin); - QCOMPARE(left->width(), 270.0); - QCOMPARE(left->height(), 300.0); - - QCOMPARE(right->x(), 270.0 + gvMargin); - QCOMPARE(right->width(), 400.0); - QCOMPARE(right->height(), 300.0); - - delete canvas; -} - -void tst_QDeclarativeLayouts::test_cpp() -{ - //TODO: This test! -} - -QDeclarativeView *tst_QDeclarativeLayouts::createView(const QString &filename) -{ - QDeclarativeView *canvas = new QDeclarativeView(0); - canvas->setSource(QUrl::fromLocalFile(filename)); - - return canvas; -} - - -QTEST_MAIN(tst_QDeclarativeLayouts) - -#include "tst_qdeclarativelayouts.moc" -- cgit v0.12 From 39e992988f21553df7e839f36ced75ca5bf8588c Mon Sep 17 00:00:00 2001 From: Yann Bodson Date: Wed, 5 May 2010 18:06:20 +1000 Subject: Fix i18n example. Add french translation to photoviewer demo. --- .../photoviewer/PhotoViewerCore/AlbumDelegate.qml | 2 +- demos/declarative/photoviewer/i18n/base.ts | 30 +++++++++++++++++++++ demos/declarative/photoviewer/i18n/qml_fr.qm | Bin 0 -> 268 bytes demos/declarative/photoviewer/i18n/qml_fr.ts | 30 +++++++++++++++++++++ demos/declarative/photoviewer/photoviewer.qml | 6 ++--- examples/declarative/i18n/i18n.qml | 30 ++++++++++++--------- 6 files changed, 81 insertions(+), 17 deletions(-) create mode 100644 demos/declarative/photoviewer/i18n/base.ts create mode 100644 demos/declarative/photoviewer/i18n/qml_fr.qm create mode 100644 demos/declarative/photoviewer/i18n/qml_fr.ts diff --git a/demos/declarative/photoviewer/PhotoViewerCore/AlbumDelegate.qml b/demos/declarative/photoviewer/PhotoViewerCore/AlbumDelegate.qml index 142735f..71d3cdc 100644 --- a/demos/declarative/photoviewer/PhotoViewerCore/AlbumDelegate.qml +++ b/demos/declarative/photoviewer/PhotoViewerCore/AlbumDelegate.qml @@ -56,7 +56,7 @@ Component { Tag { anchors { horizontalCenter: parent.horizontalCenter; bottom: parent.bottom; bottomMargin: 10 } - frontLabel: tag; backLabel: "Delete"; flipped: mainWindow.editMode + frontLabel: tag; backLabel: qsTr("Remove"); flipped: mainWindow.editMode onTagChanged: rssModel.tags = tag onBackClicked: if (mainWindow.editMode) photosModel.remove(index); } diff --git a/demos/declarative/photoviewer/i18n/base.ts b/demos/declarative/photoviewer/i18n/base.ts new file mode 100644 index 0000000..1accfd2 --- /dev/null +++ b/demos/declarative/photoviewer/i18n/base.ts @@ -0,0 +1,30 @@ + + + + + AlbumDelegate + + + Remove + + + + + photoviewer + + + Add + + + + + Edit + + + + + Back + + + + diff --git a/demos/declarative/photoviewer/i18n/qml_fr.qm b/demos/declarative/photoviewer/i18n/qml_fr.qm new file mode 100644 index 0000000..c24fcbc Binary files /dev/null and b/demos/declarative/photoviewer/i18n/qml_fr.qm differ diff --git a/demos/declarative/photoviewer/i18n/qml_fr.ts b/demos/declarative/photoviewer/i18n/qml_fr.ts new file mode 100644 index 0000000..9f892db --- /dev/null +++ b/demos/declarative/photoviewer/i18n/qml_fr.ts @@ -0,0 +1,30 @@ + + + + + AlbumDelegate + + + Remove + Supprimer + + + + photoviewer + + + Add + Ajouter + + + + Edit + Éditer + + + + Back + Retour + + + diff --git a/demos/declarative/photoviewer/photoviewer.qml b/demos/declarative/photoviewer/photoviewer.qml index 4094294..e384f46 100644 --- a/demos/declarative/photoviewer/photoviewer.qml +++ b/demos/declarative/photoviewer/photoviewer.qml @@ -27,7 +27,7 @@ Rectangle { Column { spacing: 20; anchors { bottom: parent.bottom; right: parent.right; rightMargin: 20; bottomMargin: 20 } Button { - id: newButton; label: "New"; rotation: 3 + id: newButton; label: qsTr("Add"); rotation: 3 anchors.horizontalCenter: parent.horizontalCenter onClicked: { mainWindow.editMode = false @@ -36,7 +36,7 @@ Rectangle { } } Button { - id: deleteButton; label: "Delete"; rotation: -2; + id: deleteButton; label: qsTr("Edit"); rotation: -2; onClicked: mainWindow.editMode = !mainWindow.editMode anchors.horizontalCenter: parent.horizontalCenter } @@ -49,7 +49,7 @@ Rectangle { ListView { anchors.fill: parent; model: albumVisualModel.parts.browser; interactive: false } - Button { id: backButton; label: "Back"; rotation: 3; x: parent.width - backButton.width - 6; y: -backButton.height - 8 } + Button { id: backButton; label: qsTr("Back"); rotation: 3; x: parent.width - backButton.width - 6; y: -backButton.height - 8 } Rectangle { id: photosShade; color: 'black'; width: parent.width; height: parent.height; opacity: 0; visible: opacity != 0.0 } diff --git a/examples/declarative/i18n/i18n.qml b/examples/declarative/i18n/i18n.qml index 3b1279a..c3030b2 100644 --- a/examples/declarative/i18n/i18n.qml +++ b/examples/declarative/i18n/i18n.qml @@ -6,8 +6,9 @@ import Qt 4.7 // // The files are created/updated by running: // -// lupdate i18n.qml -ts i18n/*.ts +// lupdate i18n.qml -ts i18n/base.ts // +// Translations for new languages are created by copying i18n/base.ts to i18n/qml_.ts // The .ts files can then be edited with Linguist: // // linguist i18n/qml_fr.ts @@ -16,18 +17,21 @@ import Qt 4.7 // // lrelease i18n/*.ts // -// Translations for new languages are created by copying i18n/base.ts to i18n/qml_.ts -// and editing the result with Linguist. -// -Column { - Text { - text: "If a translation is available for the system language (eg. Franch) then the string below will translated (eg. 'Bonjour'). Otherwise is will show 'Hello'." - width: 200 - wrapMode: Text.WordWrap - } - Text { - text: qsTr("Hello") - font.pointSize: 25 +Rectangle { + width: 640; height: 480 + + Column { + anchors.fill: parent; spacing: 20 + + Text { + text: "If a translation is available for the system language (eg. French) then the string below will translated (eg. 'Bonjour'). Otherwise is will show 'Hello'." + width: parent.width; wrapMode: Text.WordWrap + } + + Text { + text: qsTr("Hello") + font.pointSize: 25; anchors.horizontalCenter: parent.horizontalCenter + } } } -- cgit v0.12 From 87f7444d2af1299460bdbfc1cbfa903ea504b7e3 Mon Sep 17 00:00:00 2001 From: aavit Date: Wed, 5 May 2010 10:20:03 +0200 Subject: Fixes regression: SVG image loading would fail from QBuffer with pos!=0 Was introduced with 2fe059c. Also now updates pos() as expected after reading in these cases. Autotest added to catch issues where pos != 0, or wrong pos after read. Reviewed-by: Kim --- src/plugins/imageformats/svg/qsvgiohandler.cpp | 10 ++-- tests/auto/qimagereader/tst_qimagereader.cpp | 63 +++++++++++++++++++++++++- 2 files changed, 69 insertions(+), 4 deletions(-) diff --git a/src/plugins/imageformats/svg/qsvgiohandler.cpp b/src/plugins/imageformats/svg/qsvgiohandler.cpp index 8155569..7b8463d 100644 --- a/src/plugins/imageformats/svg/qsvgiohandler.cpp +++ b/src/plugins/imageformats/svg/qsvgiohandler.cpp @@ -82,15 +82,19 @@ bool QSvgIOHandlerPrivate::load(QIODevice *device) if (q->format().isEmpty()) q->canRead(); + // # The SVG renderer doesn't handle trailing, unrelated data, so we must + // assume that all available data in the device is to be read. bool res = false; QBuffer *buf = qobject_cast(device); if (buf) { - res = r.load(buf->data()); + const QByteArray &ba = buf->data(); + res = r.load(QByteArray::fromRawData(ba.constData() + buf->pos(), ba.size() - buf->pos())); + buf->seek(ba.size()); } else if (q->format() == "svgz") { - res = r.load(device->readAll()); // ### can't stream svgz + res = r.load(device->readAll()); } else { xmlReader.setDevice(device); - res = r.load(&xmlReader); //### doesn't leave pos() correctly + res = r.load(&xmlReader); } if (res) { diff --git a/tests/auto/qimagereader/tst_qimagereader.cpp b/tests/auto/qimagereader/tst_qimagereader.cpp index 1b4c502..aadee5b 100644 --- a/tests/auto/qimagereader/tst_qimagereader.cpp +++ b/tests/auto/qimagereader/tst_qimagereader.cpp @@ -114,6 +114,9 @@ private slots: void readFromFileAfterJunk_data(); void readFromFileAfterJunk(); + void devicePosition_data(); + void devicePosition(); + void setBackgroundColor_data(); void setBackgroundColor(); @@ -1117,7 +1120,7 @@ void tst_QImageReader::readFromFileAfterJunk() QByteArray imageData = imageFile.readAll(); QVERIFY(!imageData.isNull()); - int iterations = 10; + int iterations = 3; if (format == "ppm" || format == "pbm" || format == "pgm" || format == "svg" || format == "svgz") iterations = 1; @@ -1147,6 +1150,64 @@ void tst_QImageReader::readFromFileAfterJunk() } } +void tst_QImageReader::devicePosition_data() +{ + QTest::addColumn("fileName"); + QTest::addColumn("format"); + + QTest::newRow("pbm") << QString("image.pbm") << QByteArray("pbm"); + QTest::newRow("pgm") << QString("image.pgm") << QByteArray("pgm"); + QTest::newRow("ppm-1") << QString("image.ppm") << QByteArray("ppm"); +#ifdef QTEST_HAVE_JPEG + QTest::newRow("jpeg-1") << QString("beavis.jpg") << QByteArray("jpeg"); + QTest::newRow("jpeg-2") << QString("YCbCr_cmyk.jpg") << QByteArray("jpeg"); + QTest::newRow("jpeg-3") << QString("YCbCr_rgb.jpg") << QByteArray("jpeg"); +#endif +#if defined QTEST_HAVE_GIF + QTest::newRow("gif-1") << QString("earth.gif") << QByteArray("gif"); +#endif + QTest::newRow("xbm") << QString("gnus.xbm") << QByteArray("xbm"); + QTest::newRow("xpm") << QString("marble.xpm") << QByteArray("xpm"); + QTest::newRow("bmp-1") << QString("colorful.bmp") << QByteArray("bmp"); + QTest::newRow("bmp-2") << QString("font.bmp") << QByteArray("bmp"); + QTest::newRow("png") << QString("kollada.png") << QByteArray("png"); +// QTest::newRow("mng-1") << QString("images/ball.mng") << QByteArray("mng"); +// QTest::newRow("mng-2") << QString("images/fire.mng") << QByteArray("mng"); +#if defined QTEST_HAVE_SVG + QTest::newRow("svg") << QString("rect.svg") << QByteArray("svg"); + QTest::newRow("svgz") << QString("rect.svgz") << QByteArray("svgz"); +#endif +} + +void tst_QImageReader::devicePosition() +{ + QFETCH(QString, fileName); + QFETCH(QByteArray, format); + + QImage expected(prefix + fileName); + QVERIFY(!expected.isNull()); + + QFile imageFile(prefix + fileName); + QVERIFY(imageFile.open(QFile::ReadOnly)); + QByteArray imageData = imageFile.readAll(); + QVERIFY(!imageData.isNull()); + int imageDataSize = imageData.size(); + + const char *preStr = "prebeef\n"; + int preLen = qstrlen(preStr); + imageData.prepend(preStr); + if (format != "svg" && format != "svgz") // Doesn't handle trailing data + imageData.append("\npostbeef"); + QBuffer buf(&imageData); + buf.open(QIODevice::ReadOnly); + buf.seek(preLen); + QImageReader reader(&buf, format); + QCOMPARE(expected, reader.read()); + if (format != "ppm" && format != "gif") // Known not to work + QCOMPARE(buf.pos(), qint64(preLen+imageDataSize)); +} + + void tst_QImageReader::description_data() { QTest::addColumn("fileName"); -- cgit v0.12 From 0e5924bc207d7de29b28fb223a2027d5d2d694fa Mon Sep 17 00:00:00 2001 From: Martin Smith Date: Wed, 5 May 2010 10:37:08 +0200 Subject: qdoc: Removed [module name] from class ref pages. The module name is now a breadcrumb. --- tools/qdoc3/htmlgenerator.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/tools/qdoc3/htmlgenerator.cpp b/tools/qdoc3/htmlgenerator.cpp index 801e199..3120473 100644 --- a/tools/qdoc3/htmlgenerator.cpp +++ b/tools/qdoc3/htmlgenerator.cpp @@ -1243,6 +1243,8 @@ void HtmlGenerator::generateClassLikeNode(const InnerNode *inner, subtitleText << "(" << Atom(Atom::AutoLink, fullTitle) << ")" << Atom(Atom::LineBreak); +#if 0 + // No longer used because the modeule name is a breadcrumb. QString fixedModule = inner->moduleName(); if (fixedModule == "Qt3SupportLight") fixedModule = "Qt3Support"; @@ -1263,6 +1265,7 @@ void HtmlGenerator::generateClassLikeNode(const InnerNode *inner, subtitleText << "]"; } } +#endif generateHeader(title, inner, marker); sections = marker->sections(inner, CodeMarker::Summary, CodeMarker::Okay); -- cgit v0.12 From a976ba471d35fd57857b05cee5fdb4d6aa64c961 Mon Sep 17 00:00:00 2001 From: Peter Hartmann Date: Wed, 5 May 2010 10:15:20 +0200 Subject: correct misleading note in configure on Windows the option given in the note would not work if used as described. Reviewed-by: Zeno Albisser Task-number: QTBUG-2089 --- configure.exe | Bin 1319424 -> 1318912 bytes tools/configure/configureapp.cpp | 2 +- 2 files changed, 1 insertion(+), 1 deletion(-) diff --git a/configure.exe b/configure.exe index 35116ff..161fa1d 100755 Binary files a/configure.exe and b/configure.exe differ diff --git a/tools/configure/configureapp.cpp b/tools/configure/configureapp.cpp index bfa7445..79864f8 100644 --- a/tools/configure/configureapp.cpp +++ b/tools/configure/configureapp.cpp @@ -3457,7 +3457,7 @@ void Configure::displayConfig() cout << "NOTE: When linking against OpenSSL, you can override the default" << endl; cout << "library names through OPENSSL_LIBS." << endl; cout << "For example:" << endl; - cout << " configure -openssl-linked OPENSSL_LIBS='-lssleay32 -llibeay32'" << endl; + cout << " configure -openssl-linked OPENSSL_LIBS=\"-lssleay32 -llibeay32\"" << endl; } if( dictionary[ "ZLIB_FORCED" ] == "yes" ) { QString which_zlib = "supplied"; -- cgit v0.12 From 6b02a101cb96dee4bc574ebec1f91c9243f278fb Mon Sep 17 00:00:00 2001 From: Jens Bache-Wiig Date: Wed, 5 May 2010 11:19:00 +0200 Subject: Some minor code cleanup Removes unused code from gkt and cleanlooks. Reviewed-by: Trust Me --- src/gui/styles/qcleanlooksstyle.cpp | 3 --- src/gui/styles/qgtkstyle.cpp | 17 ----------------- 2 files changed, 20 deletions(-) diff --git a/src/gui/styles/qcleanlooksstyle.cpp b/src/gui/styles/qcleanlooksstyle.cpp index ba24d97..d9f7df0 100644 --- a/src/gui/styles/qcleanlooksstyle.cpp +++ b/src/gui/styles/qcleanlooksstyle.cpp @@ -1397,7 +1397,6 @@ void QCleanlooksStyle::drawControl(ControlElement element, const QStyleOption *o dark.lighter(135), 60); QColor highlight = option->palette.highlight().color(); - QColor highlightText = option->palette.highlightedText().color(); switch(element) { case CE_RadioButton: //fall through @@ -2723,7 +2722,6 @@ void QCleanlooksStyle::drawComplexControl(ComplexControl control, const QStyleOp { // Fill title bar gradient QColor titlebarColor = QColor(active ? highlight: palette.background().color()); - QColor titleBarGradientStop(active ? highlight.darker(150): palette.background().color().darker(120)); QLinearGradient gradient(option->rect.center().x(), option->rect.top(), option->rect.center().x(), option->rect.bottom()); @@ -2986,7 +2984,6 @@ void QCleanlooksStyle::drawComplexControl(ComplexControl control, const QStyleOp painter->fillRect(option->rect, option->palette.background()); - QRect rect = scrollBar->rect; QRect scrollBarSubLine = proxy()->subControlRect(control, scrollBar, SC_ScrollBarSubLine, widget); QRect scrollBarAddLine = proxy()->subControlRect(control, scrollBar, SC_ScrollBarAddLine, widget); QRect scrollBarSlider = proxy()->subControlRect(control, scrollBar, SC_ScrollBarSlider, widget); diff --git a/src/gui/styles/qgtkstyle.cpp b/src/gui/styles/qgtkstyle.cpp index 0988fd8..6c8d561 100644 --- a/src/gui/styles/qgtkstyle.cpp +++ b/src/gui/styles/qgtkstyle.cpp @@ -1163,7 +1163,6 @@ void QGtkStyle::drawPrimitive(PrimitiveElement element, if (const QStyleOptionTabBarBase *tbb = qstyleoption_cast(option)) { QRect tabRect = tbb->rect; - QRegion region(tabRect); painter->save(); painter->setPen(QPen(option->palette.dark().color().dark(110), 0)); switch (tbb->shape) { @@ -1245,8 +1244,6 @@ void QGtkStyle::drawComplexControl(ComplexControl control, const QStyleOptionCom else alphaCornerColor = mergedColors(option->palette.background().color(), darkOutline); - QPalette palette = option->palette; - switch (control) { case CC_TitleBar: @@ -1333,11 +1330,8 @@ void QGtkStyle::drawComplexControl(ComplexControl control, const QStyleOptionCom bool isEnabled = (comboBox->state & State_Enabled); bool focus = isEnabled && (comboBox->state & State_HasFocus); - QColor buttonShadow = option->palette.dark().color(); GtkStateType state = gtkPainter.gtkState(option); int appears_as_list = !proxy()->styleHint(QStyle::SH_ComboBox_Popup, comboBox, widget); - QPixmap cache; - QString pixmapName; QStyleOptionComboBox comboBoxCopy = *comboBox; comboBoxCopy.rect = option->rect; @@ -1345,8 +1339,6 @@ void QGtkStyle::drawComplexControl(ComplexControl control, const QStyleOptionCom QRect rect = option->rect; QRect arrowButtonRect = proxy()->subControlRect(CC_ComboBox, &comboBoxCopy, SC_ComboBoxArrow, widget); - QRect editRect = proxy()->subControlRect(CC_ComboBox, &comboBoxCopy, - SC_ComboBoxEditField, widget); GtkShadowType shadow = (option->state & State_Sunken || option->state & State_On ) ? GTK_SHADOW_IN : GTK_SHADOW_OUT; @@ -1414,9 +1406,6 @@ void QGtkStyle::drawComplexControl(ComplexControl control, const QStyleOptionCom else if (option->state & State_MouseOver && comboBox->activeSubControls & SC_ComboBoxArrow) buttonState = GTK_STATE_PRELIGHT; - QRect buttonrect = QRect(gtkToggleButton->allocation.x, gtkToggleButton->allocation.y, - gtkToggleButton->allocation.width, gtkToggleButton->allocation.height); - Q_ASSERT(gtkToggleButton); gtkCachedPainter.paintBox( gtkToggleButton, "button", arrowButtonRect, buttonState, shadow, gtkToggleButton->style, buttonPath.toString() + @@ -1436,8 +1425,6 @@ void QGtkStyle::drawComplexControl(ComplexControl control, const QStyleOptionCom if (focus) GTK_WIDGET_UNSET_FLAGS(gtkToggleButton, GTK_HAS_FOCUS); - QHashableLatin1Literal buttonPath = comboBox->editable ? QHashableLatin1Literal("GtkComboBoxEntry.GtkToggleButton") - : QHashableLatin1Literal("GtkComboBox.GtkToggleButton"); // Draw the separator between label and arrows QHashableLatin1Literal vSeparatorPath = comboBox->editable @@ -2557,7 +2544,6 @@ void QGtkStyle::drawControl(ControlElement element, d->gtkWidget("GtkMenu.GtkMenuItem"); style = gtkPainter.getStyle(gtkMenuItem); - QColor borderColor = option->palette.background().color().darker(160); QColor shadow = option->palette.dark().color(); if (menuItem->menuItemType == QStyleOptionMenuItem::Separator) { @@ -2782,8 +2768,6 @@ void QGtkStyle::drawControl(ControlElement element, // Arrow if (menuItem->menuItemType == QStyleOptionMenuItem::SubMenu) {// draw sub menu arrow - QPoint buttonShift(pixelMetric(PM_ButtonShiftHorizontal, option, widget), - proxy()->pixelMetric(PM_ButtonShiftVertical, option, widget)); QFontMetrics fm(menuitem->font); int arrow_size = fm.ascent() + fm.descent() - 2 * gtkMenuItem->style->ythickness; @@ -3130,7 +3114,6 @@ QRect QGtkStyle::subControlRect(ComplexControl control, const QStyleOptionComple case CC_ComboBox: if (const QStyleOptionComboBox *box = qstyleoption_cast(option)) { // We employ the gtk widget to position arrows and separators for us - QString comboBoxPath = box->editable ? QLS("GtkComboBoxEntry") : QLS("GtkComboBox"); GtkWidget *gtkCombo = box->editable ? d->gtkWidget("GtkComboBoxEntry") : d->gtkWidget("GtkComboBox"); d->gtk_widget_set_direction(gtkCombo, (option->direction == Qt::RightToLeft) ? GTK_TEXT_DIR_RTL : GTK_TEXT_DIR_LTR); -- cgit v0.12 From 95a69f37ec156a2506b140e5e349bb7f68e112a5 Mon Sep 17 00:00:00 2001 From: Markus Goetz Date: Mon, 26 Apr 2010 14:33:05 +0200 Subject: QHostInfo: Immediately delete aborted lookup requests. Reviewed-by: Thiago --- src/network/kernel/qhostinfo.cpp | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/src/network/kernel/qhostinfo.cpp b/src/network/kernel/qhostinfo.cpp index f287630..fd39347 100644 --- a/src/network/kernel/qhostinfo.cpp +++ b/src/network/kernel/qhostinfo.cpp @@ -596,6 +596,23 @@ void QHostInfoLookupManager::abortLookup(int id) return; QMutexLocker locker(&this->mutex); + + // is postponed? delete and return + for (int i = 0; i < postponedLookups.length(); i++) { + if (postponedLookups.at(i)->id == id) { + delete postponedLookups.takeAt(i); + return; + } + } + + // is scheduled? delete and return + for (int i = 0; i < scheduledLookups.length(); i++) { + if (scheduledLookups.at(i)->id == id) { + delete scheduledLookups.takeAt(i); + return; + } + } + if (!abortedLookups.contains(id)) abortedLookups.append(id); } -- cgit v0.12 From ff2b6ddfd2763b6b365c7466d51a1e2374e4bd4b Mon Sep 17 00:00:00 2001 From: Markus Goetz Date: Wed, 5 May 2010 12:37:21 +0200 Subject: QHostInfo: Emit postponed lookup results when finishing current Reviewed-by: Thiago --- src/network/kernel/qhostinfo.cpp | 12 ++++++++++++ src/network/kernel/qhostinfo_p.h | 2 ++ 2 files changed, 14 insertions(+) diff --git a/src/network/kernel/qhostinfo.cpp b/src/network/kernel/qhostinfo.cpp index fd39347..28a6c84 100644 --- a/src/network/kernel/qhostinfo.cpp +++ b/src/network/kernel/qhostinfo.cpp @@ -471,6 +471,18 @@ void QHostInfoRunnable::run() hostInfo.setLookupId(id); resultEmitter.emitResultsReady(hostInfo); + // now also iterate through the postponed ones + QMutableListIterator iterator(manager->postponedLookups); + while (iterator.hasNext()) { + QHostInfoRunnable* postponed = iterator.next(); + if (toBeLookedUp == postponed->toBeLookedUp) { + // we can now emit + iterator.remove(); + hostInfo.setLookupId(postponed->id); + postponed->resultEmitter.emitResultsReady(hostInfo); + } + } + manager->lookupFinished(this); // thread goes back to QThreadPool diff --git a/src/network/kernel/qhostinfo_p.h b/src/network/kernel/qhostinfo_p.h index e11766b..af270d8 100644 --- a/src/network/kernel/qhostinfo_p.h +++ b/src/network/kernel/qhostinfo_p.h @@ -173,6 +173,8 @@ public: bool wasAborted(int id); QHostInfoCache cache; + + friend class QHostInfoRunnable; protected: QList currentLookups; // in progress QList postponedLookups; // postponed because in progress for same host -- cgit v0.12 From 260212083c19e76e8e53dfe2ae44de70003769d7 Mon Sep 17 00:00:00 2001 From: Markus Goetz Date: Wed, 5 May 2010 14:13:24 +0200 Subject: QHostInfo: Avoid one tiny copy of QHostInfo object when emitting Thanks rittk! Reviewed-by: Olivier --- src/network/kernel/qhostinfo_p.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/network/kernel/qhostinfo_p.h b/src/network/kernel/qhostinfo_p.h index af270d8..85d14c2 100644 --- a/src/network/kernel/qhostinfo_p.h +++ b/src/network/kernel/qhostinfo_p.h @@ -84,7 +84,7 @@ public Q_SLOTS: } Q_SIGNALS: - void resultsReady(const QHostInfo info); + void resultsReady(const QHostInfo &info); }; // needs to be QObject because fromName calls tr() -- cgit v0.12 From 6bc32600d2367e78ddc39dd93694e01d4d75958d Mon Sep 17 00:00:00 2001 From: "Bradley T. Hughes" Date: Wed, 5 May 2010 13:59:31 +0200 Subject: Don't leak QVistaHelper from QWizard The default QObject constructor was not called, meaning the vista helper was never registered as a child of the QWizard (and therefore never deleted when the QWizard was destructed). Task-number: QTBUG-10203 Reviewed-by: olivier --- src/gui/dialogs/qwizard_win.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/gui/dialogs/qwizard_win.cpp b/src/gui/dialogs/qwizard_win.cpp index 1390b21..e406cba 100644 --- a/src/gui/dialogs/qwizard_win.cpp +++ b/src/gui/dialogs/qwizard_win.cpp @@ -237,7 +237,8 @@ void QVistaBackButton::paintEvent(QPaintEvent *) */ QVistaHelper::QVistaHelper(QWizard *wizard) - : pressed(false) + : QObject(wizard) + , pressed(false) , wizard(wizard) , backButton_(0) { -- cgit v0.12 From c7ba0460fe21647181d2ff8c812ddea0e74a2768 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B8rn=20Erik=20Nilsen?= Date: Tue, 4 May 2010 15:41:42 +0200 Subject: Pack Graphics View booleans in quint32 bit fields. Reduces the memory footprint of a typical GV application by 27 * sizeof(bool). Nothing revolutionary, but you know, every byte counts :-) Reviewed-by: Jan-Arve --- src/gui/graphicsview/qgraphicsscene.cpp | 16 ++++++------- src/gui/graphicsview/qgraphicsscene_p.h | 40 ++++++++++++++++----------------- src/gui/graphicsview/qgraphicsview.cpp | 17 +++++++------- src/gui/graphicsview/qgraphicsview_p.h | 29 +++++++++++++----------- 4 files changed, 53 insertions(+), 49 deletions(-) diff --git a/src/gui/graphicsview/qgraphicsscene.cpp b/src/gui/graphicsview/qgraphicsscene.cpp index 0d4e48a..36fd5c8 100644 --- a/src/gui/graphicsview/qgraphicsscene.cpp +++ b/src/gui/graphicsview/qgraphicsscene.cpp @@ -290,13 +290,19 @@ QGraphicsScenePrivate::QGraphicsScenePrivate() updateAll(false), calledEmitUpdated(false), processDirtyItemsEmitted(false), - selectionChanging(0), needSortTopLevelItems(true), holesInTopLevelSiblingIndex(false), topLevelSequentialOrdering(true), scenePosDescendantsUpdatePending(false), stickyFocus(false), hasFocus(false), + lastMouseGrabberItemHasImplicitMouseGrab(false), + allItemsIgnoreHoverEvents(true), + allItemsUseDefaultCursor(true), + painterStateProtection(true), + sortCacheEnabled(false), + allItemsIgnoreTouchEvents(true), + selectionChanging(0), rectAdjust(2), focusItem(0), lastFocusItem(0), @@ -306,16 +312,10 @@ QGraphicsScenePrivate::QGraphicsScenePrivate() activationRefCount(0), childExplicitActivation(0), lastMouseGrabberItem(0), - lastMouseGrabberItemHasImplicitMouseGrab(false), dragDropItem(0), enterWidget(0), lastDropAction(Qt::IgnoreAction), - allItemsIgnoreHoverEvents(true), - allItemsUseDefaultCursor(true), - painterStateProtection(true), - sortCacheEnabled(false), - style(0), - allItemsIgnoreTouchEvents(true) + style(0) { } diff --git a/src/gui/graphicsview/qgraphicsscene_p.h b/src/gui/graphicsview/qgraphicsscene_p.h index 0a85f0e..77bf450 100644 --- a/src/gui/graphicsview/qgraphicsscene_p.h +++ b/src/gui/graphicsview/qgraphicsscene_p.h @@ -97,24 +97,36 @@ public: int lastItemCount; QRectF sceneRect; - bool hasSceneRect; - bool dirtyGrowingItemsBoundingRect; + + quint32 hasSceneRect : 1; + quint32 dirtyGrowingItemsBoundingRect : 1; + quint32 updateAll : 1; + quint32 calledEmitUpdated : 1; + quint32 processDirtyItemsEmitted : 1; + quint32 needSortTopLevelItems : 1; + quint32 holesInTopLevelSiblingIndex : 1; + quint32 topLevelSequentialOrdering : 1; + quint32 scenePosDescendantsUpdatePending : 1; + quint32 stickyFocus : 1; + quint32 hasFocus : 1; + quint32 lastMouseGrabberItemHasImplicitMouseGrab : 1; + quint32 allItemsIgnoreHoverEvents : 1; + quint32 allItemsUseDefaultCursor : 1; + quint32 painterStateProtection : 1; + quint32 sortCacheEnabled : 1; // for compatibility + quint32 allItemsIgnoreTouchEvents : 1; + quint32 padding : 15; + QRectF growingItemsBoundingRect; void _q_emitUpdated(); QList updatedRects; - bool updateAll; - bool calledEmitUpdated; - bool processDirtyItemsEmitted; QPainterPath selectionArea; int selectionChanging; QSet selectedItems; QVector unpolishedItems; QList topLevelItems; - bool needSortTopLevelItems; - bool holesInTopLevelSiblingIndex; - bool topLevelSequentialOrdering; QMap movingItemsInitialPositions; void registerTopLevelItem(QGraphicsItem *item); @@ -125,7 +137,6 @@ public: void _q_processDirtyItems(); QSet scenePosItems; - bool scenePosDescendantsUpdatePending; void setScenePosItemEnabled(QGraphicsItem *item, bool enabled); void registerScenePosItem(QGraphicsItem *item); void unregisterScenePosItem(QGraphicsItem *item); @@ -136,9 +147,6 @@ public: QBrush backgroundBrush; QBrush foregroundBrush; - quint32 stickyFocus : 1; - quint32 hasFocus : 1; - quint32 padding : 30; quint32 rectAdjust; QGraphicsItem *focusItem; QGraphicsItem *lastFocusItem; @@ -155,7 +163,6 @@ public: void removePopup(QGraphicsWidget *widget, bool itemIsDying = false); QGraphicsItem *lastMouseGrabberItem; - bool lastMouseGrabberItemHasImplicitMouseGrab; QList mouseGrabberItems; void grabMouse(QGraphicsItem *item, bool implicit = false); void ungrabMouse(QGraphicsItem *item, bool itemIsDying = false); @@ -172,8 +179,6 @@ public: QList cachedItemsUnderMouse; QList hoverItems; QPointF lastSceneMousePos; - bool allItemsIgnoreHoverEvents; - bool allItemsUseDefaultCursor; void enableMouseTrackingOnViews(); QMap mouseGrabberButtonDownPos; QMap mouseGrabberButtonDownScenePos; @@ -187,8 +192,6 @@ public: void addView(QGraphicsView *view); void removeView(QGraphicsView *view); - bool painterStateProtection; - QMultiMap sceneEventFilters; void installSceneEventFilter(QGraphicsItem *watched, QGraphicsItem *filter); void removeSceneEventFilter(QGraphicsItem *watched, QGraphicsItem *filter); @@ -210,8 +213,6 @@ public: void mousePressEventHandler(QGraphicsSceneMouseEvent *mouseEvent); QGraphicsWidget *windowForItem(const QGraphicsItem *item) const; - bool sortCacheEnabled; // for compatibility - void drawItemHelper(QGraphicsItem *item, QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget, bool painterStateProtection); @@ -295,7 +296,6 @@ public: int findClosestTouchPointId(const QPointF &scenePos); void touchEventHandler(QTouchEvent *touchEvent); bool sendTouchBeginEvent(QGraphicsItem *item, QTouchEvent *touchEvent); - bool allItemsIgnoreTouchEvents; void enableTouchEventsOnViews(); QList cachedTargetItems; diff --git a/src/gui/graphicsview/qgraphicsview.cpp b/src/gui/graphicsview/qgraphicsview.cpp index 0bba7e9..96d5ba1 100644 --- a/src/gui/graphicsview/qgraphicsview.cpp +++ b/src/gui/graphicsview/qgraphicsview.cpp @@ -327,16 +327,20 @@ QGraphicsViewPrivate::QGraphicsViewPrivate() dragMode(QGraphicsView::NoDrag), sceneInteractionAllowed(true), hasSceneRect(false), connectedToScene(false), - mousePressButton(Qt::NoButton), + useLastMouseEvent(false), identityMatrix(true), dirtyScroll(true), accelerateScrolling(true), + keepLastCenterPoint(true), + transforming(false), + handScrolling(false), + mustAllocateStyleOptions(false), + mustResizeBackgroundPixmap(true), + fullUpdatePending(true), + mousePressButton(Qt::NoButton), leftIndent(0), topIndent(0), lastMouseEvent(QEvent::None, QPoint(), Qt::NoButton, 0, 0), - useLastMouseEvent(false), - keepLastCenterPoint(true), alignment(Qt::AlignCenter), - transforming(false), transformationAnchor(QGraphicsView::AnchorViewCenter), resizeAnchor(QGraphicsView::NoAnchor), viewportUpdateMode(QGraphicsView::MinimalViewportUpdate), optimizationFlags(0), @@ -345,14 +349,11 @@ QGraphicsViewPrivate::QGraphicsViewPrivate() rubberBanding(false), rubberBandSelectionMode(Qt::IntersectsItemShape), #endif - handScrolling(false), handScrollMotions(0), cacheMode(0), - mustAllocateStyleOptions(false), - mustResizeBackgroundPixmap(true), + handScrollMotions(0), cacheMode(0), #ifndef QT_NO_CURSOR hasStoredOriginalCursor(false), #endif lastDragDropEvent(0), - fullUpdatePending(true), updateSceneSlotReimplementedChecked(false) { styleOptions.reserve(QGRAPHICSVIEW_PREALLOC_STYLE_OPTIONS); diff --git a/src/gui/graphicsview/qgraphicsview_p.h b/src/gui/graphicsview/qgraphicsview_p.h index aeff28a..1239ca4 100644 --- a/src/gui/graphicsview/qgraphicsview_p.h +++ b/src/gui/graphicsview/qgraphicsview_p.h @@ -77,11 +77,24 @@ public: QPainter::RenderHints renderHints; QGraphicsView::DragMode dragMode; - bool sceneInteractionAllowed; + + quint32 sceneInteractionAllowed : 1; + quint32 hasSceneRect : 1; + quint32 connectedToScene : 1; + quint32 useLastMouseEvent : 1; + quint32 identityMatrix : 1; + quint32 dirtyScroll : 1; + quint32 accelerateScrolling : 1; + quint32 keepLastCenterPoint : 1; + quint32 transforming : 1; + quint32 handScrolling : 1; + quint32 mustAllocateStyleOptions : 1; + quint32 mustResizeBackgroundPixmap : 1; + quint32 fullUpdatePending : 1; + quint32 padding : 19; + QRectF sceneRect; - bool hasSceneRect; void updateLastCenterPoint(); - bool connectedToScene; qint64 horizontalScroll() const; qint64 verticalScroll() const; @@ -98,26 +111,20 @@ public: QPoint dirtyScrollOffset; Qt::MouseButton mousePressButton; QTransform matrix; - bool identityMatrix; qint64 scrollX, scrollY; - bool dirtyScroll; void updateScroll(); - bool accelerateScrolling; qreal leftIndent; qreal topIndent; // Replaying mouse events QMouseEvent lastMouseEvent; - bool useLastMouseEvent; void replayLastMouseEvent(); void storeMouseEvent(QMouseEvent *event); void mouseMoveEventHandler(QMouseEvent *event); QPointF lastCenterPoint; - bool keepLastCenterPoint; Qt::Alignment alignment; - bool transforming; QGraphicsView::ViewportAnchor transformationAnchor; QGraphicsView::ViewportAnchor resizeAnchor; @@ -131,20 +138,17 @@ public: bool rubberBanding; Qt::ItemSelectionMode rubberBandSelectionMode; #endif - bool handScrolling; int handScrollMotions; QGraphicsView::CacheMode cacheMode; QVector styleOptions; - bool mustAllocateStyleOptions; QStyleOptionGraphicsItem *allocStyleOptionsArray(int numItems); void freeStyleOptionsArray(QStyleOptionGraphicsItem *array); QBrush backgroundBrush; QBrush foregroundBrush; QPixmap backgroundPixmap; - bool mustResizeBackgroundPixmap; QRegion backgroundPixmapExposed; #ifndef QT_NO_CURSOR @@ -161,7 +165,6 @@ public: QRect mapToViewRect(const QGraphicsItem *item, const QRectF &rect) const; QRegion mapToViewRegion(const QGraphicsItem *item, const QRectF &rect) const; - bool fullUpdatePending; QRegion dirtyRegion; QRect dirtyBoundingRect; void processPendingUpdates(); -- cgit v0.12 From 66f1a007291209781801a2d3d5f4009bb1963955 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B8rn=20Erik=20Nilsen?= Date: Wed, 5 May 2010 14:02:54 +0200 Subject: Fixes crash in QGraphicsItem::mouseMove for untransformable items. Caused by: 253b87180e0a6c5db0feaaed7e321139c4ff1643 Reviewed-by: Yoann --- src/gui/graphicsview/qgraphicsitem.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/gui/graphicsview/qgraphicsitem.cpp b/src/gui/graphicsview/qgraphicsitem.cpp index 81138d9..b8c240a 100644 --- a/src/gui/graphicsview/qgraphicsitem.cpp +++ b/src/gui/graphicsview/qgraphicsitem.cpp @@ -7132,7 +7132,11 @@ void QGraphicsItem::mouseMoveEvent(QGraphicsSceneMouseEvent *event) // calculate their diff by mapping viewport coordinates // directly to parent coordinates. // COMBINE - QTransform viewToParentTransform = (item->d_func()->transformData->computedFullTransform().translate(item->d_ptr->pos.x(), item->d_ptr->pos.y())) + QTransform itemTransform; + if (item->d_ptr->transformData) + itemTransform = item->d_ptr->transformData->computedFullTransform(); + itemTransform.translate(item->d_ptr->pos.x(), item->d_ptr->pos.y()); + QTransform viewToParentTransform = itemTransform * (item->sceneTransform() * view->viewportTransform()).inverted(); currentParentPos = viewToParentTransform.map(QPointF(view->mapFromGlobal(event->screenPos()))); buttonDownParentPos = viewToParentTransform.map(QPointF(view->mapFromGlobal(event->buttonDownScreenPos(Qt::LeftButton)))); -- cgit v0.12 From c1c7dbf2a066868503dfabcd7113856fa6d2e457 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B8rn=20Erik=20Nilsen?= Date: Tue, 4 May 2010 13:14:10 +0200 Subject: Performance issue with QGraphicsItem::ItemClipsChildrenToShape. If the child rect is bigger than the parent rect and parent has the ItemClipsChildrenToShape flag set, then by updating the child, the whole child rect is marked as dirty, resulting in a much larger update area than required. This has a major impact on performance in Orbit/HB, where e.g. item-views typically consist of a container item that clips its children/items to shape. See attached video in QTBUG-9024. Auto test included. Task-number: QTBUG-9024 --- src/gui/graphicsview/qgraphicsitem.cpp | 20 ++++++++- src/gui/graphicsview/qgraphicsitem_p.h | 1 + src/gui/graphicsview/qgraphicsscene.cpp | 14 +++++- src/gui/graphicsview/qgraphicsview.cpp | 59 +++++++++++++++++++++++++- src/gui/graphicsview/qgraphicsview_p.h | 6 ++- tests/auto/qgraphicsview/tst_qgraphicsview.cpp | 57 +++++++++++++++++++++++++ 6 files changed, 152 insertions(+), 5 deletions(-) diff --git a/src/gui/graphicsview/qgraphicsitem.cpp b/src/gui/graphicsview/qgraphicsitem.cpp index b8c240a..65edb2a 100644 --- a/src/gui/graphicsview/qgraphicsitem.cpp +++ b/src/gui/graphicsview/qgraphicsitem.cpp @@ -1812,7 +1812,7 @@ void QGraphicsItem::setFlags(GraphicsItemFlags flags) const quint32 geomChangeFlagsMask = (ItemClipsChildrenToShape | ItemClipsToShape | ItemIgnoresTransformations | ItemIsSelectable); bool fullUpdate = (quint32(flags) & geomChangeFlagsMask) != (d_ptr->flags & geomChangeFlagsMask); if (fullUpdate) - d_ptr->paintedViewBoundingRectsNeedRepaint = 1; + d_ptr->updatePaintedViewBoundingRects(/*children=*/true); // Keep the old flags to compare the diff. GraphicsItemFlags oldFlags = GraphicsItemFlags(d_ptr->flags); @@ -5432,6 +5432,24 @@ void QGraphicsItemPrivate::removeExtraItemCache() unsetExtra(ExtraCacheData); } +void QGraphicsItemPrivate::updatePaintedViewBoundingRects(bool updateChildren) +{ + if (!scene) + return; + + for (int i = 0; i < scene->d_func()->views.size(); ++i) { + QGraphicsViewPrivate *viewPrivate = scene->d_func()->views.at(i)->d_func(); + QRect rect = paintedViewBoundingRects.value(viewPrivate->viewport); + rect.translate(viewPrivate->dirtyScrollOffset); + viewPrivate->updateRect(rect); + } + + if (updateChildren) { + for (int i = 0; i < children.size(); ++i) + children.at(i)->d_ptr->updatePaintedViewBoundingRects(true); + } +} + // Traverses all the ancestors up to the top-level and updates the pointer to // always point to the top-most item that has a dirty scene transform. // It then backtracks to the top-most dirty item and start calculating the diff --git a/src/gui/graphicsview/qgraphicsitem_p.h b/src/gui/graphicsview/qgraphicsitem_p.h index 569a329..e812f29 100644 --- a/src/gui/graphicsview/qgraphicsitem_p.h +++ b/src/gui/graphicsview/qgraphicsitem_p.h @@ -377,6 +377,7 @@ public: QGraphicsItemCache *extraItemCache() const; void removeExtraItemCache(); + void updatePaintedViewBoundingRects(bool updateChildren); void ensureSceneTransformRecursive(QGraphicsItem **topMostDirtyItem); inline void ensureSceneTransform() { diff --git a/src/gui/graphicsview/qgraphicsscene.cpp b/src/gui/graphicsview/qgraphicsscene.cpp index 36fd5c8..dfba7c9 100644 --- a/src/gui/graphicsview/qgraphicsscene.cpp +++ b/src/gui/graphicsview/qgraphicsscene.cpp @@ -5116,9 +5116,15 @@ void QGraphicsScenePrivate::processDirtyItemsRecursive(QGraphicsItem *item, bool // Process children. if (itemHasChildren && item->d_ptr->dirtyChildren) { + const bool itemClipsChildrenToShape = item->d_ptr->flags & QGraphicsItem::ItemClipsChildrenToShape; + if (itemClipsChildrenToShape) { + // Make sure child updates are clipped to the item's bounding rect. + for (int i = 0; i < views.size(); ++i) + views.at(i)->d_func()->setUpdateClip(item); + } if (!dirtyAncestorContainsChildren) { dirtyAncestorContainsChildren = item->d_ptr->fullUpdatePending - && (item->d_ptr->flags & QGraphicsItem::ItemClipsChildrenToShape); + && itemClipsChildrenToShape; } const bool allChildrenDirty = item->d_ptr->allChildrenDirty; const bool parentIgnoresVisible = item->d_ptr->ignoreVisible; @@ -5141,6 +5147,12 @@ void QGraphicsScenePrivate::processDirtyItemsRecursive(QGraphicsItem *item, bool } processDirtyItemsRecursive(child, dirtyAncestorContainsChildren, opacity); } + + if (itemClipsChildrenToShape) { + // Reset updateClip. + for (int i = 0; i < views.size(); ++i) + views.at(i)->d_func()->setUpdateClip(0); + } } else if (wasDirtyParentSceneTransform) { item->d_ptr->invalidateChildrenSceneTransform(); } diff --git a/src/gui/graphicsview/qgraphicsview.cpp b/src/gui/graphicsview/qgraphicsview.cpp index 96d5ba1..0f951ef 100644 --- a/src/gui/graphicsview/qgraphicsview.cpp +++ b/src/gui/graphicsview/qgraphicsview.cpp @@ -337,6 +337,7 @@ QGraphicsViewPrivate::QGraphicsViewPrivate() mustAllocateStyleOptions(false), mustResizeBackgroundPixmap(true), fullUpdatePending(true), + hasUpdateClip(false), mousePressButton(Qt::NoButton), leftIndent(0), topIndent(0), lastMouseEvent(QEvent::None, QPoint(), Qt::NoButton, 0, 0), @@ -880,6 +881,52 @@ static inline void QRect_unite(QRect *rect, const QRect &other) } } +/* + Calling this function results in update rects being clipped to the item's + bounding rect. Note that updates prior to this function call is not clipped. + The clip is removed by passing 0. +*/ +void QGraphicsViewPrivate::setUpdateClip(QGraphicsItem *item) +{ + Q_Q(QGraphicsView); + // We simply ignore the request if the update mode is either FullViewportUpdate + // or NoViewportUpdate; in that case there's no point in clipping anything. + if (!item || viewportUpdateMode == QGraphicsView::NoViewportUpdate + || viewportUpdateMode == QGraphicsView::FullViewportUpdate) { + hasUpdateClip = false; + return; + } + + // Calculate the clip (item's bounding rect in view coordinates). + // Optimized version of: + // QRect clip = item->deviceTransform(q->viewportTransform()) + // .mapRect(item->boundingRect()).toAlignedRect(); + QRect clip; + if (item->d_ptr->itemIsUntransformable()) { + QTransform xform = item->deviceTransform(q->viewportTransform()); + clip = xform.mapRect(item->boundingRect()).toAlignedRect(); + } else if (item->d_ptr->sceneTransformTranslateOnly && identityMatrix) { + QRectF r(item->boundingRect()); + r.translate(item->d_ptr->sceneTransform.dx() - horizontalScroll(), + item->d_ptr->sceneTransform.dy() - verticalScroll()); + clip = r.toAlignedRect(); + } else if (!q->isTransformed()) { + clip = item->d_ptr->sceneTransform.mapRect(item->boundingRect()).toAlignedRect(); + } else { + QTransform xform = item->d_ptr->sceneTransform; + xform *= q->viewportTransform(); + clip = xform.mapRect(item->boundingRect()).toAlignedRect(); + } + + if (hasUpdateClip) { + // Intersect with old clip. + updateClip &= clip; + } else { + updateClip = clip; + hasUpdateClip = true; + } +} + bool QGraphicsViewPrivate::updateRegion(const QRectF &rect, const QTransform &xform) { if (rect.isEmpty()) @@ -910,6 +957,8 @@ bool QGraphicsViewPrivate::updateRegion(const QRectF &rect, const QTransform &xf viewRect.adjust(-1, -1, 1, 1); else viewRect.adjust(-2, -2, 2, 2); + if (hasUpdateClip) + viewRect &= updateClip; dirtyRegion += viewRect; } @@ -931,7 +980,10 @@ bool QGraphicsViewPrivate::updateRect(const QRect &r) viewport->update(); break; case QGraphicsView::BoundingRectViewportUpdate: - QRect_unite(&dirtyBoundingRect, r); + if (hasUpdateClip) + QRect_unite(&dirtyBoundingRect, r & updateClip); + else + QRect_unite(&dirtyBoundingRect, r); if (containsViewport(dirtyBoundingRect, viewport->width(), viewport->height())) { fullUpdatePending = true; viewport->update(); @@ -939,7 +991,10 @@ bool QGraphicsViewPrivate::updateRect(const QRect &r) break; case QGraphicsView::SmartViewportUpdate: // ### DEPRECATE case QGraphicsView::MinimalViewportUpdate: - dirtyRegion += r; + if (hasUpdateClip) + dirtyRegion += r & updateClip; + else + dirtyRegion += r; break; default: break; diff --git a/src/gui/graphicsview/qgraphicsview_p.h b/src/gui/graphicsview/qgraphicsview_p.h index 1239ca4..7bd9ecb 100644 --- a/src/gui/graphicsview/qgraphicsview_p.h +++ b/src/gui/graphicsview/qgraphicsview_p.h @@ -91,7 +91,8 @@ public: quint32 mustAllocateStyleOptions : 1; quint32 mustResizeBackgroundPixmap : 1; quint32 fullUpdatePending : 1; - quint32 padding : 19; + quint32 hasUpdateClip : 1; + quint32 padding : 18; QRectF sceneRect; void updateLastCenterPoint(); @@ -102,6 +103,7 @@ public: QRectF mapRectToScene(const QRect &rect) const; QRectF mapRectFromScene(const QRectF &rect) const; + QRect updateClip; QPointF mousePressItemPoint; QPointF mousePressScenePoint; QPoint mousePressViewPoint; @@ -195,6 +197,8 @@ public: #endif } + void setUpdateClip(QGraphicsItem *); + inline bool updateRectF(const QRectF &rect) { if (rect.isEmpty()) diff --git a/tests/auto/qgraphicsview/tst_qgraphicsview.cpp b/tests/auto/qgraphicsview/tst_qgraphicsview.cpp index 1df9a37..b8df7f6 100644 --- a/tests/auto/qgraphicsview/tst_qgraphicsview.cpp +++ b/tests/auto/qgraphicsview/tst_qgraphicsview.cpp @@ -218,6 +218,7 @@ private slots: void update(); void update2_data(); void update2(); + void update_ancestorClipsChildrenToShape(); void inputMethodSensitivity(); void inputContextReset(); void indirectPainting(); @@ -3758,6 +3759,62 @@ void tst_QGraphicsView::update2() #endif } +void tst_QGraphicsView::update_ancestorClipsChildrenToShape() +{ + QGraphicsScene scene(-150, -150, 300, 300); + + /* + Add three rects: + + +------------------+ + | child | + | +--------------+ | + | | parent | | + | | +-----------+ | + | | |grandParent| | + | | +-----------+ | + | +--------------+ | + +------------------+ + + ... where both the parent and the grand parent clips children to shape. + */ + QApplication::processEvents(); // Get rid of pending update. + + QGraphicsRectItem *grandParent = static_cast(scene.addRect(0, 0, 50, 50)); + grandParent->setBrush(Qt::black); + grandParent->setFlag(QGraphicsItem::ItemClipsChildrenToShape); + + QGraphicsRectItem *parent = static_cast(scene.addRect(-50, -50, 100, 100)); + parent->setBrush(QColor(0, 0, 255, 125)); + parent->setParentItem(grandParent); + parent->setFlag(QGraphicsItem::ItemClipsChildrenToShape); + + QGraphicsRectItem *child = static_cast(scene.addRect(-100, -100, 200, 200)); + child->setBrush(QColor(255, 0, 0, 125)); + child->setParentItem(parent); + + CustomView view(&scene); + view.show(); + QTest::qWaitForWindowShown(&view); + QTRY_VERIFY(view.painted); + + view.lastUpdateRegions.clear(); + view.painted = false; + + // Call child->update() and make sure the updated area is within the ancestors' clip. + QRectF expected = child->deviceTransform(view.viewportTransform()).mapRect(child->boundingRect()); + expected &= grandParent->deviceTransform(view.viewportTransform()).mapRect(grandParent->boundingRect()); + + child->update(); + QTRY_VERIFY(view.painted); + +#ifndef QT_MAC_USE_COCOA //cocoa doesn't support drawing regions + QTRY_VERIFY(view.painted); + QCOMPARE(view.lastUpdateRegions.size(), 1); + QCOMPARE(view.lastUpdateRegions.at(0), QRegion(expected.toAlignedRect())); +#endif +} + class FocusItem : public QGraphicsRectItem { public: -- cgit v0.12 From bfbf4d4ccdfb4cf35592c61674f6bffc28932787 Mon Sep 17 00:00:00 2001 From: Daniel Molkentin Date: Wed, 5 May 2010 13:57:29 +0200 Subject: Fix build key on Windows with MinGW. Also, rebuilt configure.exe Reviewed-by: Thiago Macieira --- configure.exe | Bin 1318912 -> 1318912 bytes tools/configure/configureapp.cpp | 2 +- 2 files changed, 1 insertion(+), 1 deletion(-) diff --git a/configure.exe b/configure.exe index 161fa1d..69e98dd 100755 Binary files a/configure.exe and b/configure.exe differ diff --git a/tools/configure/configureapp.cpp b/tools/configure/configureapp.cpp index 79864f8..e264426 100644 --- a/tools/configure/configureapp.cpp +++ b/tools/configure/configureapp.cpp @@ -2373,7 +2373,7 @@ void Configure::generateBuildKey() + buildSymbianKey + "\"\n" "#else\n" // Debug builds - "# if (defined(_DEBUG) || defined(DEBUG))\n" + "# if (!QT_NO_DEBUG)\n" "# if (defined(WIN64) || defined(_WIN64) || defined(__WIN64__))\n" + build64Key.arg("debug") + "\"\n" "# else\n" -- cgit v0.12 From b4bbb3d79a59c1225e1de58b6625f24de7df2013 Mon Sep 17 00:00:00 2001 From: Martin Smith Date: Wed, 5 May 2010 15:26:47 +0200 Subject: doc: Began reorganization of the top doc page. Much more to come. --- doc/src/frameworks-technologies/animation.qdoc | 1 + .../frameworks-technologies/eventsandfilters.qdoc | 3 ++- doc/src/frameworks-technologies/graphicsview.qdoc | 1 + .../model-view-programming.qdoc | 1 + doc/src/frameworks-technologies/threads.qdoc | 1 + doc/src/objectmodel/metaobjects.qdoc | 3 ++- doc/src/objectmodel/object.qdoc | 3 ++- doc/src/objectmodel/objecttrees.qdoc | 3 ++- doc/src/objectmodel/properties.qdoc | 3 ++- doc/src/objectmodel/signalsandslots.qdoc | 3 ++- doc/src/overviews.qdoc | 23 ++++++++++++++++++++++ doc/src/painting-and-printing/paintsystem.qdoc | 1 + doc/src/widgets-and-layouts/layout.qdoc | 1 + doc/src/widgets-and-layouts/styles.qdoc | 1 + doc/src/widgets-and-layouts/widgets.qdoc | 1 + doc/src/windows-and-dialogs/dialogs.qdoc | 1 + doc/src/windows-and-dialogs/mainwindow.qdoc | 1 + tools/qdoc3/test/qt-html-templates.qdocconf | 19 ++++++------------ 18 files changed, 51 insertions(+), 19 deletions(-) diff --git a/doc/src/frameworks-technologies/animation.qdoc b/doc/src/frameworks-technologies/animation.qdoc index 5548b57..dc705ba 100644 --- a/doc/src/frameworks-technologies/animation.qdoc +++ b/doc/src/frameworks-technologies/animation.qdoc @@ -47,6 +47,7 @@ /*! \page animation-overview.html \title The Animation Framework + \ingroup qt-gui-concepts \brief An overview of the Animation Framework diff --git a/doc/src/frameworks-technologies/eventsandfilters.qdoc b/doc/src/frameworks-technologies/eventsandfilters.qdoc index 96ee18c..0cd60b8 100644 --- a/doc/src/frameworks-technologies/eventsandfilters.qdoc +++ b/doc/src/frameworks-technologies/eventsandfilters.qdoc @@ -54,7 +54,8 @@ /*! \page eventsandfilters.html - \title Events and Event Filters + \title The Event System + \ingroup qt-basic-concepts \brief A guide to event handling in Qt. \ingroup frameworks-technologies diff --git a/doc/src/frameworks-technologies/graphicsview.qdoc b/doc/src/frameworks-technologies/graphicsview.qdoc index 6844aed..95b3182 100644 --- a/doc/src/frameworks-technologies/graphicsview.qdoc +++ b/doc/src/frameworks-technologies/graphicsview.qdoc @@ -47,6 +47,7 @@ /*! \page graphicsview.html \title The Graphics View Framework + \ingroup qt-gui-concepts \brief An overview of the Graphics View framework for interactive 2D graphics. diff --git a/doc/src/frameworks-technologies/model-view-programming.qdoc b/doc/src/frameworks-technologies/model-view-programming.qdoc index 7568981..e02f1eb 100644 --- a/doc/src/frameworks-technologies/model-view-programming.qdoc +++ b/doc/src/frameworks-technologies/model-view-programming.qdoc @@ -50,6 +50,7 @@ \startpage index.html Qt Reference Documentation \title Model/View Programming + \ingroup qt-gui-concepts \brief A guide to the extensible model/view architecture used by Qt's item view classes. diff --git a/doc/src/frameworks-technologies/threads.qdoc b/doc/src/frameworks-technologies/threads.qdoc index fd6bebb..f7dde59 100644 --- a/doc/src/frameworks-technologies/threads.qdoc +++ b/doc/src/frameworks-technologies/threads.qdoc @@ -47,6 +47,7 @@ /*! \page threads.html \title Thread Support in Qt + \ingroup qt-basic-concepts \brief A detailed discussion of thread handling in Qt. \ingroup frameworks-technologies diff --git a/doc/src/objectmodel/metaobjects.qdoc b/doc/src/objectmodel/metaobjects.qdoc index c1b0ea6..e891183 100644 --- a/doc/src/objectmodel/metaobjects.qdoc +++ b/doc/src/objectmodel/metaobjects.qdoc @@ -41,7 +41,8 @@ /*! \page metaobjects.html - \title Meta-Object System + \title The Meta-Object System + \ingroup qt-basic-concepts \brief An overview of Qt's meta-object system and introspection capabilities. \keyword meta-object diff --git a/doc/src/objectmodel/object.qdoc b/doc/src/objectmodel/object.qdoc index 2f06004..e0ba6ed 100644 --- a/doc/src/objectmodel/object.qdoc +++ b/doc/src/objectmodel/object.qdoc @@ -41,7 +41,8 @@ /*! \page object.html - \title Qt Object Model + \title Object Model + \ingroup qt-basic-concepts \brief A description of the powerful features made possible by Qt's dynamic object model. \ingroup frameworks-technologies diff --git a/doc/src/objectmodel/objecttrees.qdoc b/doc/src/objectmodel/objecttrees.qdoc index 11824ae..97d646a 100644 --- a/doc/src/objectmodel/objecttrees.qdoc +++ b/doc/src/objectmodel/objecttrees.qdoc @@ -41,7 +41,8 @@ /*! \page objecttrees.html - \title Object Trees and Object Ownership + \title Object Trees & Ownership + \ingroup qt-basic-concepts \brief Information about the parent-child pattern used to describe object ownership in Qt. diff --git a/doc/src/objectmodel/properties.qdoc b/doc/src/objectmodel/properties.qdoc index a807caf..bc9554c 100644 --- a/doc/src/objectmodel/properties.qdoc +++ b/doc/src/objectmodel/properties.qdoc @@ -41,7 +41,8 @@ /*! \page properties.html - \title Qt's Property System + \title The Property System + \ingroup qt-basic-concepts \brief An overview of Qt's property system. Qt provides a sophisticated property system similar to the ones diff --git a/doc/src/objectmodel/signalsandslots.qdoc b/doc/src/objectmodel/signalsandslots.qdoc index 0f3f618..f33badf 100644 --- a/doc/src/objectmodel/signalsandslots.qdoc +++ b/doc/src/objectmodel/signalsandslots.qdoc @@ -41,7 +41,8 @@ /*! \page signalsandslots.html - \title Signals and Slots + \title Signals & Slots + \ingroup qt-basic-concepts \brief An overview of Qt's signals and slots inter-object communication mechanism. diff --git a/doc/src/overviews.qdoc b/doc/src/overviews.qdoc index 7302e30..bc994af 100644 --- a/doc/src/overviews.qdoc +++ b/doc/src/overviews.qdoc @@ -48,6 +48,29 @@ */ /*! + \group qt-basic-concepts + \title Qt Basic Concepts + + \brief The basic concepts of the Qt cross-platform application and UI framework. + + Qt is a cross-platform application and UI framework for writing + web-enabled applications for desktop, mobile, and embedded + operating systems. These pages explain basic architectural + concepts of Qt: + + \generatelist {related} + */ + +/*! + \group qt-gui-concepts + \title Qt GUI Components + + \brief The Qt components for constructing graphical user intefaces. + + \generatelist {related} + */ + +/*! \group frameworks-technologies \title Frameworks and Technologies diff --git a/doc/src/painting-and-printing/paintsystem.qdoc b/doc/src/painting-and-printing/paintsystem.qdoc index 802751f..56b638c 100644 --- a/doc/src/painting-and-printing/paintsystem.qdoc +++ b/doc/src/painting-and-printing/paintsystem.qdoc @@ -61,6 +61,7 @@ /*! \page paintsystem.html \title The Paint System + \ingroup qt-gui-concepts \ingroup frameworks-technologies Qt's paint system enables painting on screen and print devices diff --git a/doc/src/widgets-and-layouts/layout.qdoc b/doc/src/widgets-and-layouts/layout.qdoc index 0cfde22..2ca202f 100644 --- a/doc/src/widgets-and-layouts/layout.qdoc +++ b/doc/src/widgets-and-layouts/layout.qdoc @@ -47,6 +47,7 @@ /*! \page layout.html \title Layout Management + \ingroup qt-gui-concepts \brief A tour of the standard layout managers and an introduction to custom layouts. diff --git a/doc/src/widgets-and-layouts/styles.qdoc b/doc/src/widgets-and-layouts/styles.qdoc index 9a28715..b4bec8c 100644 --- a/doc/src/widgets-and-layouts/styles.qdoc +++ b/doc/src/widgets-and-layouts/styles.qdoc @@ -48,6 +48,7 @@ /*! \page style-reference.html \title Implementing Styles and Style Aware Widgets + \ingroup qt-gui-concepts \brief An overview of styles and the styling of widgets. \ingroup frameworks-technologies diff --git a/doc/src/widgets-and-layouts/widgets.qdoc b/doc/src/widgets-and-layouts/widgets.qdoc index 7bd27b6..ac0bf77 100644 --- a/doc/src/widgets-and-layouts/widgets.qdoc +++ b/doc/src/widgets-and-layouts/widgets.qdoc @@ -42,6 +42,7 @@ /*! \page widgets-and-layouts.html \title Widgets and Layouts + \ingroup qt-gui-concepts \ingroup frameworks-technologies diff --git a/doc/src/windows-and-dialogs/dialogs.qdoc b/doc/src/windows-and-dialogs/dialogs.qdoc index acee0c5..0b0a842 100644 --- a/doc/src/windows-and-dialogs/dialogs.qdoc +++ b/doc/src/windows-and-dialogs/dialogs.qdoc @@ -52,6 +52,7 @@ /*! \page dialogs.html \title Dialog Windows + \ingroup qt-gui-concepts \brief An overview over dialog windows. \previouspage The Application Main Window diff --git a/doc/src/windows-and-dialogs/mainwindow.qdoc b/doc/src/windows-and-dialogs/mainwindow.qdoc index 6adfa75..b282dab 100644 --- a/doc/src/windows-and-dialogs/mainwindow.qdoc +++ b/doc/src/windows-and-dialogs/mainwindow.qdoc @@ -47,6 +47,7 @@ /*! \page application-windows.html \title Application Windows and Dialogs + \ingroup qt-gui-concepts \ingroup frameworks-technologies \nextpage The Application Main Window diff --git a/tools/qdoc3/test/qt-html-templates.qdocconf b/tools/qdoc3/test/qt-html-templates.qdocconf index 00af376..48ecd2c 100644 --- a/tools/qdoc3/test/qt-html-templates.qdocconf +++ b/tools/qdoc3/test/qt-html-templates.qdocconf @@ -50,7 +50,7 @@ HTML.postheader = "
    \n" \ "
  • All classes
  • \n" \ "
  • All functions
  • \n" \ "
  • All namespaces
  • \n" \ - "
  • Platform specifics
  • \n" \ + "
  • QML elements
  • \n" \ " \n" \ "
    \n" \ "
    \n" \ @@ -58,24 +58,17 @@ HTML.postheader = "
    \n" \ "
    \n" \ "
    \n" \ "

    \n" \ - " API Topics

    \n" \ + " Qt Topics

    \n" \ "
    \n" \ " \n " \ " " \ " \n" \ "
    \n" \ "
    \n" \ @@ -83,7 +76,7 @@ HTML.postheader = "
    \n" \ "
    \n" \ "
    \n" \ "

    \n" \ - " API Examples

    \n" \ + " Qt Examples\n" \ "
    \n" \ " \n " \ - " " \ - "
    \n" \ "
    \n" \ @@ -58,17 +54,20 @@ HTML.postheader = "
    \n" \ "
    \n" \ "
    \n" \ "

    \n" \ - " Qt Topics

    \n" \ + " API Topics\n" \ "
    \n" \ - " \n " \ - " " \ - "
    \n" \ "
    \n" \ @@ -76,18 +75,14 @@ HTML.postheader = "
    \n" \ "
    \n" \ "
    \n" \ "

    \n" \ - " Qt Examples

    \n" \ + " API Examples\n" \ "
    \n" \ - " \n " \ - " " \ - "
    \n" \ "
    \n" \ -- cgit v0.12 From db64d17f233f92ce7a425271ee60586bd846705d Mon Sep 17 00:00:00 2001 From: Thiago Macieira Date: Wed, 5 May 2010 16:34:38 +0200 Subject: whitespace fixes --- tests/auto/qnetworkreply/tst_qnetworkreply.cpp | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/tests/auto/qnetworkreply/tst_qnetworkreply.cpp b/tests/auto/qnetworkreply/tst_qnetworkreply.cpp index ff79c09..db8548d 100644 --- a/tests/auto/qnetworkreply/tst_qnetworkreply.cpp +++ b/tests/auto/qnetworkreply/tst_qnetworkreply.cpp @@ -522,8 +522,8 @@ public: active->connectToHost("127.0.0.1", server.serverPort()); #ifndef Q_OS_SYMBIAN // need more time as working with embedded - // device and testing from emualtor - // things tend to get slower + // device and testing from emualtor + // things tend to get slower if (!active->waitForConnected(1000)) return false; @@ -929,7 +929,7 @@ void tst_QNetworkReply::invalidProtocol() void tst_QNetworkReply::getFromData_data() { - QTest::addColumn("request"); + QTest::addColumn("request"); QTest::addColumn("expected"); QTest::addColumn("mimeType"); @@ -1025,7 +1025,7 @@ void tst_QNetworkReply::getFromData() void tst_QNetworkReply::getFromFile() { - // create the file: + // create the file: QTemporaryFile file(QDir::currentPath() + "/temp-XXXXXX"); file.setAutoRemove(true); QVERIFY(file.open()); @@ -1077,7 +1077,7 @@ void tst_QNetworkReply::getFromFileSpecial_data() void tst_QNetworkReply::getFromFileSpecial() { - QFETCH(QString, fileName); + QFETCH(QString, fileName); QFETCH(QString, url); // open the resource so we can find out its size @@ -1107,7 +1107,7 @@ void tst_QNetworkReply::getFromFtp_data() void tst_QNetworkReply::getFromFtp() { - QFETCH(QString, referenceName); + QFETCH(QString, referenceName); QFETCH(QString, url); QFile reference(referenceName); @@ -1136,7 +1136,7 @@ void tst_QNetworkReply::getFromHttp_data() void tst_QNetworkReply::getFromHttp() { - QFETCH(QString, referenceName); + QFETCH(QString, referenceName); QFETCH(QString, url); QFile reference(referenceName); @@ -3456,8 +3456,8 @@ void tst_QNetworkReply::downloadProgress_data() QTest::newRow("big") << 4096; #else // it can run even with 4096 - // but it takes lot time - //especially on emulator + // but it takes lot time + //especially on emulator QTest::newRow("big") << 1024; #endif } @@ -3646,7 +3646,7 @@ void tst_QNetworkReply::receiveCookiesFromHttp_data() void tst_QNetworkReply::receiveCookiesFromHttp() { - QFETCH(QString, cookieString); + QFETCH(QString, cookieString); QByteArray data = cookieString.toLatin1() + '\n'; QUrl url("http://" + QtNetworkSettings::serverName() + "/qtest/cgi-bin/set-cookie.cgi"); -- cgit v0.12 From e41217d6d2e592e79a9a8a83c9e49491d66ad18e Mon Sep 17 00:00:00 2001 From: Thiago Macieira Date: Wed, 5 May 2010 16:36:10 +0200 Subject: tst_qnetworkreply: add a test for getting from SMB Reviewed-By: Markus Goetz --- tests/auto/qnetworkreply/smb-file.txt | 1 + tests/auto/qnetworkreply/tst_qnetworkreply.cpp | 3 +++ 2 files changed, 4 insertions(+) create mode 100644 tests/auto/qnetworkreply/smb-file.txt diff --git a/tests/auto/qnetworkreply/smb-file.txt b/tests/auto/qnetworkreply/smb-file.txt new file mode 100644 index 0000000..73c3ac2 --- /dev/null +++ b/tests/auto/qnetworkreply/smb-file.txt @@ -0,0 +1 @@ +This is 34 bytes. Do not change... \ No newline at end of file diff --git a/tests/auto/qnetworkreply/tst_qnetworkreply.cpp b/tests/auto/qnetworkreply/tst_qnetworkreply.cpp index db8548d..9d942bf 100644 --- a/tests/auto/qnetworkreply/tst_qnetworkreply.cpp +++ b/tests/auto/qnetworkreply/tst_qnetworkreply.cpp @@ -1073,6 +1073,9 @@ void tst_QNetworkReply::getFromFileSpecial_data() QTest::newRow("resource") << ":/resource" << "qrc:/resource"; QTest::newRow("search-path") << "srcdir:/rfc3252.txt" << "srcdir:/rfc3252.txt"; QTest::newRow("bigfile-path") << "srcdir:/bigfile" << "srcdir:/bigfile"; +#ifdef Q_OS_WIN + QTest::newRow("smb-path") << "srcdir:/smb-file.txt" << "file://" + QtNetworkSettings::winServerName() + "/testshare/test.pri"; +#endif } void tst_QNetworkReply::getFromFileSpecial() -- cgit v0.12 From a2f797b52c4274a62a7cf1f0939aca1429afe211 Mon Sep 17 00:00:00 2001 From: Thiago Macieira Date: Wed, 5 May 2010 16:48:21 +0200 Subject: Improve QUrl handling of local file paths Add QUrl::isLocalFile for a faster and more consistent checking of whether the URL is local or not. Improve the documentation to indicate that QUrl always treats SMB-like file paths as local, even if the system cannot open them (non-Windows). Add a test to ensure that "FILE:/a.txt" is considered local too (RFC 3986 requires schemes to be interpreted in case-insensitive fashion). Remove broken code that supported empty schemes as local file paths. Reviewed-by: Markus Goetz --- src/corelib/io/qurl.cpp | 73 +++++++++++++++++++++++++++++++------------- src/corelib/io/qurl.h | 1 + tests/auto/qurl/tst_qurl.cpp | 11 ++++++- 3 files changed, 62 insertions(+), 23 deletions(-) diff --git a/src/corelib/io/qurl.cpp b/src/corelib/io/qurl.cpp index 4e580dd..7b5bfed 100644 --- a/src/corelib/io/qurl.cpp +++ b/src/corelib/io/qurl.cpp @@ -5970,19 +5970,22 @@ bool QUrl::isDetached() const /*! - Returns a QUrl representation of \a localFile, interpreted as a - local file. + Returns a QUrl representation of \a localFile, interpreted as a local + file. This function accepts paths separated by slashes as well as the + native separator for this platform. - \sa toLocalFile() + This function also accepts paths with a doubled leading slash (or + backslash) to indicate a remote file, as in + "//servername/path/to/file.txt". Note that only certain platforms can + actually open this file using QFile::open(). + + \sa toLocalFile(), isLocalFile(), QDir::toNativeSeparators */ QUrl QUrl::fromLocalFile(const QString &localFile) { QUrl url; url.setScheme(QLatin1String("file")); - QString deslashified = localFile; - deslashified.replace(QLatin1Char('\\'), QLatin1Char('/')); - - + QString deslashified = QDir::toNativeSeparators(localFile); // magic for drives on windows if (deslashified.length() > 1 && deslashified.at(1) == QLatin1Char(':') && deslashified.at(0) != QLatin1Char('/')) { @@ -6001,35 +6004,61 @@ QUrl QUrl::fromLocalFile(const QString &localFile) } /*! - Returns the path of this URL formatted as a local file path. + Returns the path of this URL formatted as a local file path. The path + returned will use forward slashes, even if it was originally created + from one with backslashes. - \sa fromLocalFile() + If this URL contains a non-empty hostname, it will be encoded in the + returned value in the form found on SMB networks (for example, + "//servername/path/to/file.txt"). + + \sa fromLocalFile(), isLocalFile() */ QString QUrl::toLocalFile() const { - if (!d) return QString(); - if (!QURL_HASFLAG(d->stateFlags, QUrlPrivate::Parsed)) d->parse(); + // the call to isLocalFile() also ensures that we're parsed + if (!isLocalFile()) + return QString(); QString tmp; QString ourPath = path(); - if (d->scheme.isEmpty() || QString::compare(d->scheme, QLatin1String("file"), Qt::CaseInsensitive) == 0) { - // magic for shared drive on windows - if (!d->host.isEmpty()) { - tmp = QLatin1String("//") + d->host + (ourPath.length() > 0 && ourPath.at(0) != QLatin1Char('/') - ? QLatin1Char('/') + ourPath : ourPath); - } else { - tmp = ourPath; - // magic for drives on windows - if (ourPath.length() > 2 && ourPath.at(0) == QLatin1Char('/') && ourPath.at(2) == QLatin1Char(':')) - tmp.remove(0, 1); - } + // magic for shared drive on windows + if (!d->host.isEmpty()) { + tmp = QLatin1String("//") + d->host + (ourPath.length() > 0 && ourPath.at(0) != QLatin1Char('/') + ? QLatin1Char('/') + ourPath : ourPath); + } else { + tmp = ourPath; + // magic for drives on windows + if (ourPath.length() > 2 && ourPath.at(0) == QLatin1Char('/') && ourPath.at(2) == QLatin1Char(':')) + tmp.remove(0, 1); } return tmp; } /*! + \since 4.7 + Returns true if this URL is pointing to a local file path. A URL is a + local file path if the scheme is "file". + + Note that this function considers URLs with hostnames to be local file + paths, even if the eventual file path cannot be opened with + QFile::open(). + + \sa fromLocalFile(), toLocalFile() +*/ +bool QUrl::isLocalFile() const +{ + if (!d) return false; + if (!QURL_HASFLAG(d->stateFlags, QUrlPrivate::Parsed)) d->parse(); + + if (d->scheme.compare(QLatin1String("file"), Qt::CaseInsensitive) != 0) + return false; // not file + return true; +} + +/*! Returns true if this URL is a parent of \a childUrl. \a childUrl is a child of this URL if the two URLs share the same scheme and authority, and this URL's path is a parent of the path of \a childUrl. diff --git a/src/corelib/io/qurl.h b/src/corelib/io/qurl.h index 6f8331a..162aa7c 100644 --- a/src/corelib/io/qurl.h +++ b/src/corelib/io/qurl.h @@ -183,6 +183,7 @@ public: static QUrl fromLocalFile(const QString &localfile); QString toLocalFile() const; + bool isLocalFile() const; QString toString(FormattingOptions options = None) const; diff --git a/tests/auto/qurl/tst_qurl.cpp b/tests/auto/qurl/tst_qurl.cpp index fa42adc..67bf0c1 100644 --- a/tests/auto/qurl/tst_qurl.cpp +++ b/tests/auto/qurl/tst_qurl.cpp @@ -314,6 +314,7 @@ void tst_QUrl::constructing() QUrl buildUNC; + buildUNC.setScheme(QString::fromLatin1("file")); buildUNC.setHost(QString::fromLatin1("somehost")); buildUNC.setPath(QString::fromLatin1("somepath")); QCOMPARE(buildUNC.toLocalFile(), QString::fromLatin1("//somehost/somepath")); @@ -1757,7 +1758,15 @@ void tst_QUrl::toLocalFile_data() QTest::newRow("data7") << QString::fromLatin1("file://somehost/") << QString::fromLatin1("//somehost/"); QTest::newRow("data8") << QString::fromLatin1("file://somehost") << QString::fromLatin1("//somehost"); QTest::newRow("data9") << QString::fromLatin1("file:////somehost/somedir/somefile") << QString::fromLatin1("//somehost/somedir/somefile"); - + QTest::newRow("data10") << QString::fromLatin1("FILE:/a.txt") << QString::fromLatin1("/a.txt"); + + // and some that result in empty (i.e., not local) + QTest::newRow("xdata0") << QString::fromLatin1("/a.txt") << QString(); + QTest::newRow("xdata1") << QString::fromLatin1("//a.txt") << QString(); + QTest::newRow("xdata2") << QString::fromLatin1("///a.txt") << QString(); + QTest::newRow("xdata3") << QString::fromLatin1("foo:/a.txt") << QString(); + QTest::newRow("xdata4") << QString::fromLatin1("foo://a.txt") << QString(); + QTest::newRow("xdata5") << QString::fromLatin1("foo:///a.txt") << QString(); } void tst_QUrl::toLocalFile() -- cgit v0.12 From ebddf7a8739d7f4aaa7d9cb8a41a14eebb65e4f4 Mon Sep 17 00:00:00 2001 From: Thiago Macieira Date: Wed, 5 May 2010 16:51:41 +0200 Subject: Use QUrl::isLocalFile and fix the scheme checking in local URLs. RFC 3986 requires that schemes be compared case-insensitively, so "QRC:/" is allowed for Qt resources. Also document the use of file engines and search paths. Reviewed-by: Markus Goetz --- src/network/access/qnetworkaccessfilebackend.cpp | 11 ++++++++--- src/network/access/qnetworkaccessmanager.cpp | 11 +++++------ tests/auto/qnetworkreply/tst_qnetworkreply.cpp | 6 ++++++ 3 files changed, 19 insertions(+), 9 deletions(-) diff --git a/src/network/access/qnetworkaccessfilebackend.cpp b/src/network/access/qnetworkaccessfilebackend.cpp index 4560153..710c258 100644 --- a/src/network/access/qnetworkaccessfilebackend.cpp +++ b/src/network/access/qnetworkaccessfilebackend.cpp @@ -65,10 +65,15 @@ QNetworkAccessFileBackendFactory::create(QNetworkAccessManager::Operation op, } QUrl url = request.url(); - if (url.scheme() == QLatin1String("qrc") || !url.toLocalFile().isEmpty()) + if (url.scheme().compare(QLatin1String("qrc"), Qt::CaseInsensitive) == 0 || url.isLocalFile()) { return new QNetworkAccessFileBackend; - else if (!url.isEmpty() && url.authority().isEmpty()) { - // check if QFile could, in theory, open this URL + } else if (!url.scheme().isEmpty() && url.authority().isEmpty()) { + // check if QFile could, in theory, open this URL via the file engines + // it has to be in the format: + // prefix:path/to/file + // or prefix:/path/to/file + // + // this construct here must match the one below in open() QFileInfo fi(url.toString(QUrl::RemoveAuthority | QUrl::RemoveFragment | QUrl::RemoveQuery)); if (fi.exists() || (op == QNetworkAccessManager::PutOperation && fi.dir().exists())) return new QNetworkAccessFileBackend; diff --git a/src/network/access/qnetworkaccessmanager.cpp b/src/network/access/qnetworkaccessmanager.cpp index 1c7661d..10fdc6f 100644 --- a/src/network/access/qnetworkaccessmanager.cpp +++ b/src/network/access/qnetworkaccessmanager.cpp @@ -907,21 +907,20 @@ QNetworkReply *QNetworkAccessManager::createRequest(QNetworkAccessManager::Opera { Q_D(QNetworkAccessManager); + bool isLocalFile = req.url().isLocalFile(); + // fast path for GET on file:// URLs - // Also if the scheme is empty we consider it a file. // The QNetworkAccessFileBackend will right now only be used // for PUT or qrc:// if ((op == QNetworkAccessManager::GetOperation || op == QNetworkAccessManager::HeadOperation) - && (req.url().scheme() == QLatin1String("file") - || req.url().scheme().isEmpty())) { + && isLocalFile) { return new QFileNetworkReply(this, req, op); } #ifndef QT_NO_BEARERMANAGEMENT // Return a disabled network reply if network access is disabled. // Except if the scheme is empty or file://. - if (!d->networkAccessible && !(req.url().scheme() == QLatin1String("file") || - req.url().scheme().isEmpty())) { + if (!d->networkAccessible && !isLocalFile) { return new QDisabledNetworkReply(this, req, op); } @@ -963,7 +962,7 @@ QNetworkReply *QNetworkAccessManager::createRequest(QNetworkAccessManager::Opera QUrl url = request.url(); QNetworkReplyImpl *reply = new QNetworkReplyImpl(this); #ifndef QT_NO_BEARERMANAGEMENT - if (req.url().scheme() != QLatin1String("file") && !req.url().scheme().isEmpty()) { + if (!isLocalFile) { connect(this, SIGNAL(networkSessionConnected()), reply, SLOT(_q_networkSessionConnected())); } diff --git a/tests/auto/qnetworkreply/tst_qnetworkreply.cpp b/tests/auto/qnetworkreply/tst_qnetworkreply.cpp index 9d942bf..c4d458f 100644 --- a/tests/auto/qnetworkreply/tst_qnetworkreply.cpp +++ b/tests/auto/qnetworkreply/tst_qnetworkreply.cpp @@ -1166,6 +1166,12 @@ void tst_QNetworkReply::getErrors_data() QTest::addColumn("httpStatusCode"); QTest::addColumn("dataIsEmpty"); + // empties + QTest::newRow("empty-url") << QString() << int(QNetworkReply::ProtocolUnknownError) << 0 << true; + QTest::newRow("empty-scheme-host") << SRCDIR "/rfc3252.txt" << int(QNetworkReply::ProtocolUnknownError) << 0 << true; + QTest::newRow("empty-scheme") << "//" + QtNetworkSettings::winServerName() + "/testshare/test.pri" + << int(QNetworkReply::ProtocolUnknownError) << 0 << true; + // file: errors QTest::newRow("file-host") << "file://this-host-doesnt-exist.troll.no/foo.txt" #if !defined Q_OS_WIN -- cgit v0.12 From a9fb306a1cf1308a3f8b9bb12ed01aed1f6f6f8d Mon Sep 17 00:00:00 2001 From: Thiago Macieira Date: Wed, 5 May 2010 16:55:02 +0200 Subject: [QNAM FTP] Check for the "ftp" scheme case-insensitively --- src/network/access/qnetworkaccessftpbackend.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/network/access/qnetworkaccessftpbackend.cpp b/src/network/access/qnetworkaccessftpbackend.cpp index 1a59011..da336d0 100644 --- a/src/network/access/qnetworkaccessftpbackend.cpp +++ b/src/network/access/qnetworkaccessftpbackend.cpp @@ -77,7 +77,7 @@ QNetworkAccessFtpBackendFactory::create(QNetworkAccessManager::Operation op, } QUrl url = request.url(); - if (url.scheme() == QLatin1String("ftp")) + if (url.scheme().compare(QLatin1String("ftp"), Qt::CaseInsensitive) == 0) return new QNetworkAccessFtpBackend; return 0; } -- cgit v0.12 From b017f89f844c09354b50a45fd49fcdcee4f72e43 Mon Sep 17 00:00:00 2001 From: Simon Hausmann Date: Wed, 5 May 2010 17:28:45 +0200 Subject: Updated WebKit to 992e57ee469bd8c6a2afef6b15896a161ab8aeb3 Fixes integrated since the last import: || || [Qt] Enable JIT for QtWebKit on Symbian || || || Media queries empty values || || || View modes names in CSSValueKeywords.in || Also disabled QtMultimedia support for HTML 5 Audio/Video elements and removed WebGL support. --- src/3rdparty/webkit/.tag | 2 +- src/3rdparty/webkit/JavaScriptCore/ChangeLog | 12 + src/3rdparty/webkit/JavaScriptCore/wtf/Platform.h | 3 + src/3rdparty/webkit/VERSION | 2 +- src/3rdparty/webkit/WebCore/ChangeLog | 56 ++ src/3rdparty/webkit/WebCore/WebCore.pro | 13 +- .../webkit/WebCore/css/CSSValueKeywords.in | 5 +- .../webkit/WebCore/css/MediaQueryEvaluator.cpp | 3 + src/3rdparty/webkit/WebCore/css/MediaQueryExp.cpp | 2 + src/3rdparty/webkit/WebCore/css/MediaQueryExp.h | 3 + .../webkit/WebCore/generated/CSSValueKeywords.c | 843 +++++++++++---------- .../webkit/WebCore/generated/CSSValueKeywords.h | 325 ++++---- .../webkit/WebCore/platform/qt/RenderThemeQt.cpp | 2 +- src/3rdparty/webkit/WebKit/qt/Api/qwebsettings.cpp | 1 - src/3rdparty/webkit/WebKit/qt/Api/qwebsettings.h | 1 - 15 files changed, 675 insertions(+), 598 deletions(-) diff --git a/src/3rdparty/webkit/.tag b/src/3rdparty/webkit/.tag index b6feeb1..d0dcced 100644 --- a/src/3rdparty/webkit/.tag +++ b/src/3rdparty/webkit/.tag @@ -1 +1 @@ -992e57ee469bd8c6a2afef6b15896a161ab8aeb3 +e4b73bb0b173f21db8f0de3dae885a8a71282996 diff --git a/src/3rdparty/webkit/JavaScriptCore/ChangeLog b/src/3rdparty/webkit/JavaScriptCore/ChangeLog index eb22ea0..1439ae0 100644 --- a/src/3rdparty/webkit/JavaScriptCore/ChangeLog +++ b/src/3rdparty/webkit/JavaScriptCore/ChangeLog @@ -1,3 +1,15 @@ +2010-05-02 Laszlo Gombos + + Reviewed by Eric Seidel. + + [Qt] Enable JIT for QtWebKit on Symbian + https://bugs.webkit.org/show_bug.cgi?id=38339 + + JIT on Symbian has been stable for quite some time, it + is time to turn it on by default. + + * wtf/Platform.h: + 2010-04-28 Simon Hausmann , Kent Hansen Reviewed by Darin Adler. diff --git a/src/3rdparty/webkit/JavaScriptCore/wtf/Platform.h b/src/3rdparty/webkit/JavaScriptCore/wtf/Platform.h index 96ed9bd..c582905 100644 --- a/src/3rdparty/webkit/JavaScriptCore/wtf/Platform.h +++ b/src/3rdparty/webkit/JavaScriptCore/wtf/Platform.h @@ -939,6 +939,8 @@ on MinGW. See https://bugs.webkit.org/show_bug.cgi?id=29268 */ #define ENABLE_JIT 1 #elif CPU(ARM_TRADITIONAL) && OS(LINUX) #define ENABLE_JIT 1 +#elif CPU(ARM_TRADITIONAL) && OS(SYMBIAN) && COMPILER(RVCT) + #define ENABLE_JIT 1 #endif #endif /* PLATFORM(QT) */ @@ -1008,6 +1010,7 @@ on MinGW. See https://bugs.webkit.org/show_bug.cgi?id=29268 */ || (CPU(X86) && OS(LINUX) && GCC_VERSION >= 40100) \ || (CPU(X86_64) && OS(LINUX) && GCC_VERSION >= 40100) \ || (CPU(ARM_TRADITIONAL) && OS(LINUX)) \ + || (CPU(ARM_TRADITIONAL) && OS(SYMBIAN) && COMPILER(RVCT)) \ || (CPU(MIPS) && OS(LINUX)) #define ENABLE_YARR 1 #define ENABLE_YARR_JIT 1 diff --git a/src/3rdparty/webkit/VERSION b/src/3rdparty/webkit/VERSION index c3d6314..d4036b4 100644 --- a/src/3rdparty/webkit/VERSION +++ b/src/3rdparty/webkit/VERSION @@ -4,4 +4,4 @@ This is a snapshot of the Qt port of WebKit from and has the sha1 checksum - 3f0f51f4c87e65bfe04165c6af4c00934b0ca1e2 + 992e57ee469bd8c6a2afef6b15896a161ab8aeb3 diff --git a/src/3rdparty/webkit/WebCore/ChangeLog b/src/3rdparty/webkit/WebCore/ChangeLog index 05fc2af..37fa8e4 100644 --- a/src/3rdparty/webkit/WebCore/ChangeLog +++ b/src/3rdparty/webkit/WebCore/ChangeLog @@ -1,3 +1,59 @@ +2010-05-03 Tor Arne Vestbø + + Reviewed by Simon Hausmann. + + [Qt] Fix rendering of