summaryrefslogtreecommitdiffstats
path: root/demos
diff options
context:
space:
mode:
Diffstat (limited to 'demos')
-rw-r--r--demos/declarative/flickr/common/ImageDetails.qml1
-rw-r--r--demos/declarative/flickr/common/Loading.qml2
-rw-r--r--demos/declarative/flickr/mobile/GridDelegate.qml2
-rw-r--r--demos/declarative/flickr/mobile/ImageDetails.qml2
-rw-r--r--demos/declarative/flickr/mobile/ListDelegate.qml4
-rw-r--r--demos/declarative/minehunt/Description.qml34
-rw-r--r--demos/declarative/minehunt/MinehuntCore/Explosion.qml (renamed from demos/declarative/minehunt/Explosion.qml)0
-rw-r--r--demos/declarative/minehunt/MinehuntCore/pics/No-Ones-Laughing-3.jpg (renamed from demos/declarative/minehunt/pics/No-Ones-Laughing-3.jpg)bin30730 -> 30730 bytes
-rw-r--r--demos/declarative/minehunt/MinehuntCore/pics/back.png (renamed from demos/declarative/minehunt/pics/back.png)bin558 -> 558 bytes
-rw-r--r--demos/declarative/minehunt/MinehuntCore/pics/bomb-color.png (renamed from demos/declarative/minehunt/pics/bomb-color.png)bin284 -> 284 bytes
-rw-r--r--demos/declarative/minehunt/MinehuntCore/pics/bomb.png (renamed from demos/declarative/minehunt/pics/bomb.png)bin535 -> 535 bytes
-rw-r--r--demos/declarative/minehunt/MinehuntCore/pics/face-sad.png (renamed from demos/declarative/minehunt/pics/face-sad.png)bin14844 -> 14844 bytes
-rw-r--r--demos/declarative/minehunt/MinehuntCore/pics/face-smile-big.png (renamed from demos/declarative/minehunt/pics/face-smile-big.png)bin13810 -> 13810 bytes
-rw-r--r--demos/declarative/minehunt/MinehuntCore/pics/face-smile.png (renamed from demos/declarative/minehunt/pics/face-smile.png)bin15408 -> 15408 bytes
-rw-r--r--demos/declarative/minehunt/MinehuntCore/pics/flag-color.png (renamed from demos/declarative/minehunt/pics/flag-color.png)bin219 -> 219 bytes
-rw-r--r--demos/declarative/minehunt/MinehuntCore/pics/flag.png (renamed from demos/declarative/minehunt/pics/flag.png)bin196 -> 196 bytes
-rw-r--r--demos/declarative/minehunt/MinehuntCore/pics/front.png (renamed from demos/declarative/minehunt/pics/front.png)bin580 -> 580 bytes
-rw-r--r--demos/declarative/minehunt/MinehuntCore/pics/star.png (renamed from demos/declarative/minehunt/pics/star.png)bin2677 -> 2677 bytes
-rw-r--r--demos/declarative/minehunt/MinehuntCore/qmldir2
-rw-r--r--demos/declarative/minehunt/README3
-rw-r--r--demos/declarative/minehunt/minehunt.cpp (renamed from demos/declarative/minehunt/main.cpp)126
-rw-r--r--demos/declarative/minehunt/minehunt.pro16
-rw-r--r--demos/declarative/minehunt/minehunt.qml26
-rw-r--r--demos/declarative/minehunt/test.qml13
-rw-r--r--demos/declarative/samegame/SamegameCore/BoomBlock.qml (renamed from demos/declarative/samegame/content/BoomBlock.qml)6
-rw-r--r--demos/declarative/samegame/SamegameCore/Button.qml (renamed from demos/declarative/samegame/content/Button.qml)0
-rw-r--r--demos/declarative/samegame/SamegameCore/Dialog.qml (renamed from demos/declarative/samegame/content/Dialog.qml)2
-rw-r--r--demos/declarative/samegame/SamegameCore/pics/background.png (renamed from demos/declarative/samegame/content/pics/background.png)bin313930 -> 313930 bytes
-rw-r--r--demos/declarative/samegame/SamegameCore/pics/blueStar.png (renamed from demos/declarative/samegame/content/pics/blueStar.png)bin278 -> 278 bytes
-rw-r--r--demos/declarative/samegame/SamegameCore/pics/blueStone.png (renamed from demos/declarative/samegame/content/pics/blueStone.png)bin3054 -> 3054 bytes
-rw-r--r--demos/declarative/samegame/SamegameCore/pics/greenStar.png (renamed from demos/declarative/samegame/content/pics/greenStar.png)bin273 -> 273 bytes
-rw-r--r--demos/declarative/samegame/SamegameCore/pics/greenStone.png (renamed from demos/declarative/samegame/content/pics/greenStone.png)bin2932 -> 2932 bytes
-rw-r--r--demos/declarative/samegame/SamegameCore/pics/redStar.png (renamed from demos/declarative/samegame/content/pics/redStar.png)bin274 -> 274 bytes
-rw-r--r--demos/declarative/samegame/SamegameCore/pics/redStone.png (renamed from demos/declarative/samegame/content/pics/redStone.png)bin2902 -> 2902 bytes
-rw-r--r--demos/declarative/samegame/SamegameCore/pics/star.png (renamed from demos/declarative/samegame/content/pics/star.png)bin262 -> 262 bytes
-rw-r--r--demos/declarative/samegame/SamegameCore/pics/yellowStone.png (renamed from demos/declarative/samegame/content/pics/yellowStone.png)bin3056 -> 3056 bytes
-rw-r--r--demos/declarative/samegame/SamegameCore/qmldir (renamed from demos/declarative/samegame/content/qmldir)0
-rwxr-xr-xdemos/declarative/samegame/SamegameCore/samegame.js (renamed from demos/declarative/samegame/content/samegame.js)2
-rw-r--r--demos/declarative/samegame/samegame.qml8
-rw-r--r--demos/declarative/snake/content/Cookie.qml2
-rw-r--r--demos/declarative/snake/content/Link.qml8
-rw-r--r--demos/declarative/snake/content/Skull.qml6
-rw-r--r--demos/declarative/snake/content/snake.js4
-rw-r--r--demos/declarative/snake/snake.qml6
-rw-r--r--demos/declarative/twitter/TwitterCore/AuthView.qml (renamed from demos/declarative/twitter/content/AuthView.qml)0
-rw-r--r--demos/declarative/twitter/TwitterCore/Button.qml (renamed from demos/declarative/twitter/content/Button.qml)0
-rw-r--r--demos/declarative/twitter/TwitterCore/FatDelegate.qml (renamed from demos/declarative/twitter/content/FatDelegate.qml)2
-rw-r--r--demos/declarative/twitter/TwitterCore/HomeTitleBar.qml (renamed from demos/declarative/twitter/content/HomeTitleBar.qml)0
-rw-r--r--demos/declarative/twitter/TwitterCore/Loading.qml (renamed from demos/declarative/twitter/content/Loading.qml)2
-rw-r--r--demos/declarative/twitter/TwitterCore/MultiTitleBar.qml (renamed from demos/declarative/twitter/content/MultiTitleBar.qml)0
-rw-r--r--demos/declarative/twitter/TwitterCore/RssModel.qml (renamed from demos/declarative/twitter/content/RssModel.qml)0
-rw-r--r--demos/declarative/twitter/TwitterCore/TitleBar.qml (renamed from demos/declarative/twitter/content/TitleBar.qml)0
-rw-r--r--demos/declarative/twitter/TwitterCore/ToolBar.qml (renamed from demos/declarative/twitter/content/ToolBar.qml)0
-rw-r--r--demos/declarative/twitter/TwitterCore/UserModel.qml (renamed from demos/declarative/twitter/content/UserModel.qml)0
-rw-r--r--demos/declarative/twitter/TwitterCore/images/gloss.png (renamed from demos/declarative/twitter/content/images/gloss.png)bin1236 -> 1236 bytes
-rw-r--r--demos/declarative/twitter/TwitterCore/images/lineedit.png (renamed from demos/declarative/twitter/content/images/lineedit.png)bin1415 -> 1415 bytes
-rw-r--r--demos/declarative/twitter/TwitterCore/images/lineedit.sci (renamed from demos/declarative/twitter/content/images/lineedit.sci)0
-rw-r--r--demos/declarative/twitter/TwitterCore/images/loading.png (renamed from demos/declarative/twitter/content/images/loading.png)bin813 -> 813 bytes
-rw-r--r--demos/declarative/twitter/TwitterCore/images/stripes.png (renamed from demos/declarative/twitter/content/images/stripes.png)bin257 -> 257 bytes
-rw-r--r--demos/declarative/twitter/TwitterCore/images/titlebar.png (renamed from demos/declarative/twitter/content/images/titlebar.png)bin1436 -> 1436 bytes
-rw-r--r--demos/declarative/twitter/TwitterCore/images/titlebar.sci (renamed from demos/declarative/twitter/content/images/titlebar.sci)0
-rw-r--r--demos/declarative/twitter/TwitterCore/images/toolbutton.png (renamed from demos/declarative/twitter/content/images/toolbutton.png)bin2550 -> 2550 bytes
-rw-r--r--demos/declarative/twitter/TwitterCore/images/toolbutton.sci (renamed from demos/declarative/twitter/content/images/toolbutton.sci)0
-rw-r--r--demos/declarative/twitter/TwitterCore/qmldir10
-rw-r--r--demos/declarative/twitter/twitter.qml6
-rw-r--r--demos/declarative/webbrowser/content/FlickableWebView.qml2
-rw-r--r--demos/declarative/webbrowser/content/fieldtext/FieldText.qml2
-rw-r--r--demos/declarative/webbrowser/webbrowser.qml1
68 files changed, 114 insertions, 186 deletions
diff --git a/demos/declarative/flickr/common/ImageDetails.qml b/demos/declarative/flickr/common/ImageDetails.qml
index 9604f10..862eeb1 100644
--- a/demos/declarative/flickr/common/ImageDetails.qml
+++ b/demos/declarative/flickr/common/ImageDetails.qml
@@ -1,4 +1,5 @@
import Qt 4.6
+import org.webkit 1.0
Flipable {
id: container
diff --git a/demos/declarative/flickr/common/Loading.qml b/demos/declarative/flickr/common/Loading.qml
index 174cd21..938a080 100644
--- a/demos/declarative/flickr/common/Loading.qml
+++ b/demos/declarative/flickr/common/Loading.qml
@@ -2,7 +2,7 @@ import Qt 4.6
Image {
id: loading; source: "pics/loading.png"; transformOrigin: "Center"
- rotation: NumberAnimation {
+ NumberAnimation on rotation {
from: 0; to: 360; running: loading.visible == true; repeat: true; duration: 900
}
}
diff --git a/demos/declarative/flickr/mobile/GridDelegate.qml b/demos/declarative/flickr/mobile/GridDelegate.qml
index 7634573..291d874 100644
--- a/demos/declarative/flickr/mobile/GridDelegate.qml
+++ b/demos/declarative/flickr/mobile/GridDelegate.qml
@@ -23,7 +23,7 @@
Item {
anchors.centerIn: parent
scale: 0.0
- scale: Behavior { NumberAnimation { easing.type: "InOutQuad"} }
+ Behavior on scale { NumberAnimation { easing.type: "InOutQuad"} }
id: scaleMe
Rectangle { height: 79; width: 79; id: blackRect; anchors.centerIn: parent; color: "black"; smooth: true }
diff --git a/demos/declarative/flickr/mobile/ImageDetails.qml b/demos/declarative/flickr/mobile/ImageDetails.qml
index c51371c..2f4df8a 100644
--- a/demos/declarative/flickr/mobile/ImageDetails.qml
+++ b/demos/declarative/flickr/mobile/ImageDetails.qml
@@ -45,7 +45,7 @@ Flipable {
Text { color: "white"; elide: Text.ElideRight; text: "<b>Author:</b> " + container.photoAuthor }
Text { color: "white"; elide: Text.ElideRight; text: "<b>Published:</b> " + container.photoDate }
Text { color: "white"; elide: Text.ElideRight; text: container.photoTags == "" ? "" : "<b>Tags:</b> " }
- Text { color: "white"; elide: Text.ElideRight; elide: Text.ElideRight; text: container.photoTags }
+ Text { color: "white"; elide: Text.ElideRight; text: container.photoTags }
}
}
diff --git a/demos/declarative/flickr/mobile/ListDelegate.qml b/demos/declarative/flickr/mobile/ListDelegate.qml
index 75c4572..381664b 100644
--- a/demos/declarative/flickr/mobile/ListDelegate.qml
+++ b/demos/declarative/flickr/mobile/ListDelegate.qml
@@ -15,8 +15,8 @@ Component {
Column {
x: 92; width: wrapper.ListView.view.width - 95; y: 15; spacing: 2
Text { text: title; color: "white"; width: parent.width; font.bold: true; elide: Text.ElideRight; style: Text.Raised; styleColor: "black" }
- Text { text: photoAuthor; color: "white"; width: parent.width; elide: Text.ElideLeft; color: "#cccccc"; style: Text.Raised; styleColor: "black" }
- Text { text: photoDate; color: "white"; width: parent.width; elide: Text.ElideRight; color: "#cccccc"; style: Text.Raised; styleColor: "black" }
+ Text { text: photoAuthor; width: parent.width; elide: Text.ElideLeft; color: "#cccccc"; style: Text.Raised; styleColor: "black" }
+ Text { text: photoDate; width: parent.width; elide: Text.ElideRight; color: "#cccccc"; style: Text.Raised; styleColor: "black" }
}
}
}
diff --git a/demos/declarative/minehunt/Description.qml b/demos/declarative/minehunt/Description.qml
deleted file mode 100644
index cc4d3b2..0000000
--- a/demos/declarative/minehunt/Description.qml
+++ /dev/null
@@ -1,34 +0,0 @@
-import Qt 4.6
-
-Item {
- id: page
- height: myText.height + 20
- property var text
- MouseArea {
- anchors.fill: parent
- drag.target: page
- drag.axis: "XandYAxis"
- drag.minimumX: 0
- drag.maximumX: 1000
- drag.minimumY: 0
- drag.maximumY: 1000
- }
- Rectangle {
- radius: 10
- anchors.fill: parent
- color: "lightsteelblue"
- }
- Item {
- x: 10
- y: 10
- width: parent.width - 20
- height: parent.height - 20
- Text {
- id: myText
- text: page.text
- width: parent.width
- clip: true
- wrap: true
- }
- }
-}
diff --git a/demos/declarative/minehunt/Explosion.qml b/demos/declarative/minehunt/MinehuntCore/Explosion.qml
index e337c46..e337c46 100644
--- a/demos/declarative/minehunt/Explosion.qml
+++ b/demos/declarative/minehunt/MinehuntCore/Explosion.qml
diff --git a/demos/declarative/minehunt/pics/No-Ones-Laughing-3.jpg b/demos/declarative/minehunt/MinehuntCore/pics/No-Ones-Laughing-3.jpg
index 445567f..445567f 100644
--- a/demos/declarative/minehunt/pics/No-Ones-Laughing-3.jpg
+++ b/demos/declarative/minehunt/MinehuntCore/pics/No-Ones-Laughing-3.jpg
Binary files differ
diff --git a/demos/declarative/minehunt/pics/back.png b/demos/declarative/minehunt/MinehuntCore/pics/back.png
index f6b3f0b..f6b3f0b 100644
--- a/demos/declarative/minehunt/pics/back.png
+++ b/demos/declarative/minehunt/MinehuntCore/pics/back.png
Binary files differ
diff --git a/demos/declarative/minehunt/pics/bomb-color.png b/demos/declarative/minehunt/MinehuntCore/pics/bomb-color.png
index 61ad0a9..61ad0a9 100644
--- a/demos/declarative/minehunt/pics/bomb-color.png
+++ b/demos/declarative/minehunt/MinehuntCore/pics/bomb-color.png
Binary files differ
diff --git a/demos/declarative/minehunt/pics/bomb.png b/demos/declarative/minehunt/MinehuntCore/pics/bomb.png
index a992575..a992575 100644
--- a/demos/declarative/minehunt/pics/bomb.png
+++ b/demos/declarative/minehunt/MinehuntCore/pics/bomb.png
Binary files differ
diff --git a/demos/declarative/minehunt/pics/face-sad.png b/demos/declarative/minehunt/MinehuntCore/pics/face-sad.png
index cf00aaf..cf00aaf 100644
--- a/demos/declarative/minehunt/pics/face-sad.png
+++ b/demos/declarative/minehunt/MinehuntCore/pics/face-sad.png
Binary files differ
diff --git a/demos/declarative/minehunt/pics/face-smile-big.png b/demos/declarative/minehunt/MinehuntCore/pics/face-smile-big.png
index f9c2335..f9c2335 100644
--- a/demos/declarative/minehunt/pics/face-smile-big.png
+++ b/demos/declarative/minehunt/MinehuntCore/pics/face-smile-big.png
Binary files differ
diff --git a/demos/declarative/minehunt/pics/face-smile.png b/demos/declarative/minehunt/MinehuntCore/pics/face-smile.png
index 3d66d72..3d66d72 100644
--- a/demos/declarative/minehunt/pics/face-smile.png
+++ b/demos/declarative/minehunt/MinehuntCore/pics/face-smile.png
Binary files differ
diff --git a/demos/declarative/minehunt/pics/flag-color.png b/demos/declarative/minehunt/MinehuntCore/pics/flag-color.png
index aadad0f..aadad0f 100644
--- a/demos/declarative/minehunt/pics/flag-color.png
+++ b/demos/declarative/minehunt/MinehuntCore/pics/flag-color.png
Binary files differ
diff --git a/demos/declarative/minehunt/pics/flag.png b/demos/declarative/minehunt/MinehuntCore/pics/flag.png
index 39cde4d..39cde4d 100644
--- a/demos/declarative/minehunt/pics/flag.png
+++ b/demos/declarative/minehunt/MinehuntCore/pics/flag.png
Binary files differ
diff --git a/demos/declarative/minehunt/pics/front.png b/demos/declarative/minehunt/MinehuntCore/pics/front.png
index 834331b..834331b 100644
--- a/demos/declarative/minehunt/pics/front.png
+++ b/demos/declarative/minehunt/MinehuntCore/pics/front.png
Binary files differ
diff --git a/demos/declarative/minehunt/pics/star.png b/demos/declarative/minehunt/MinehuntCore/pics/star.png
index 3772359..3772359 100644
--- a/demos/declarative/minehunt/pics/star.png
+++ b/demos/declarative/minehunt/MinehuntCore/pics/star.png
Binary files differ
diff --git a/demos/declarative/minehunt/MinehuntCore/qmldir b/demos/declarative/minehunt/MinehuntCore/qmldir
new file mode 100644
index 0000000..862c396
--- /dev/null
+++ b/demos/declarative/minehunt/MinehuntCore/qmldir
@@ -0,0 +1,2 @@
+plugin minehunt
+Explosion 1.0 Explosion.qml
diff --git a/demos/declarative/minehunt/README b/demos/declarative/minehunt/README
new file mode 100644
index 0000000..7379dcf
--- /dev/null
+++ b/demos/declarative/minehunt/README
@@ -0,0 +1,3 @@
+To run, simply load the minehunt.qml file with the qml runtime.
+
+Note that on X11, this demo has problems with the native graphicssystem. If you are using the X11 window system, please pass -graphicssystem raster to the qml binary.
diff --git a/demos/declarative/minehunt/main.cpp b/demos/declarative/minehunt/minehunt.cpp
index e7a1d7c..89845ef 100644
--- a/demos/declarative/minehunt/main.cpp
+++ b/demos/declarative/minehunt/minehunt.cpp
@@ -38,21 +38,15 @@
** $QT_END_LICENSE$
**
****************************************************************************/
-#include "qdeclarativeengine.h"
-#include "qdeclarativecontext.h"
-#include "qdeclarative.h"
-#include <qdeclarativeitem.h>
-#include <qdeclarativeview.h>
-
-#include <QWidget>
-#include <QApplication>
-#include <QFile>
+
+#include <stdlib.h>
+#include <qdeclarativeextensionplugin.h>
+#include <qdeclarativecontext.h>
+#include <qdeclarativeengine.h>
+#include <qdeclarative.h>
+
#include <QTime>
#include <QTimer>
-#include <QVBoxLayout>
-#include <QFileInfo>
-
-QString fileName = "minehunt.qml";
class Tile : public QObject
{
@@ -91,17 +85,14 @@ private:
bool _flipped;
};
-QML_DECLARE_TYPE(Tile);
-
-class MyWidget : public QWidget
+class MinehuntGame : public QObject
{
-Q_OBJECT
+ Q_OBJECT
public:
- MyWidget(int = 370, int = 480, QWidget *parent=0, Qt::WindowFlags flags=0);
- ~MyWidget();
+ MinehuntGame();
Q_PROPERTY(QDeclarativeListProperty<Tile> tiles READ tiles CONSTANT);
- QDeclarativeListProperty<Tile> tiles() { return _tilesProperty; }
+ QDeclarativeListProperty<Tile> tiles() { return QDeclarativeListProperty<Tile>(this, _tiles); }
Q_PROPERTY(bool isPlaying READ isPlaying NOTIFY isPlayingChanged);
bool isPlaying() {return playing;}
@@ -133,10 +124,7 @@ private:
int getHint(int row, int col);
void setPlaying(bool b){if(b==playing) return; playing=b; emit isPlayingChanged();}
- QDeclarativeView *canvas;
-
QList<Tile *> _tiles;
- QDeclarativeListProperty<Tile> _tilesProperty;
int numCols;
int numRows;
bool playing;
@@ -146,11 +134,10 @@ private:
int nFlags;
};
-Q_DECLARE_METATYPE(QList<Tile*>)
-MyWidget::MyWidget(int width, int height, QWidget *parent, Qt::WindowFlags flags)
-: QWidget(parent, flags), canvas(0), numCols(9), numRows(9), playing(true), won(false)
+MinehuntGame::MinehuntGame()
+: numCols(9), numRows(9), playing(true), won(false)
{
- setObjectName("mainWidget");
+ setObjectName("mainObject");
srand(QTime(0,0,0).secsTo(QTime::currentTime()));
//initialize array
@@ -159,27 +146,9 @@ MyWidget::MyWidget(int width, int height, QWidget *parent, Qt::WindowFlags flags
}
reset();
- QVBoxLayout *vbox = new QVBoxLayout;
- vbox->setMargin(0);
- setLayout(vbox);
-
- canvas = new QDeclarativeView(this);
- canvas->setFixedSize(width, height);
- vbox->addWidget(canvas);
-
- _tilesProperty = QDeclarativeListProperty<Tile>(this, _tiles);
-
- QDeclarativeContext *ctxt = canvas->rootContext();
- ctxt->addDefaultObject(this);
-
- canvas->setSource(QUrl::fromLocalFile(fileName));
-}
-
-MyWidget::~MyWidget()
-{
}
-void MyWidget::setBoard()
+void MinehuntGame::setBoard()
{
foreach(Tile* t, _tiles){
t->setHasMine(false);
@@ -213,7 +182,7 @@ void MyWidget::setBoard()
setPlaying(true);
}
-void MyWidget::reset()
+void MinehuntGame::reset()
{
foreach(Tile* t, _tiles){
t->unflip();
@@ -225,7 +194,7 @@ void MyWidget::reset()
QTimer::singleShot(600,this, SLOT(setBoard()));
}
-int MyWidget::getHint(int row, int col)
+int MinehuntGame::getHint(int row, int col)
{
int hint = 0;
for (int c = col-1; c <= col+1; c++)
@@ -237,7 +206,7 @@ int MyWidget::getHint(int row, int col)
return hint;
}
-bool MyWidget::flip(int row, int col)
+bool MinehuntGame::flip(int row, int col)
{
if(!playing)
return false;
@@ -302,7 +271,7 @@ bool MyWidget::flip(int row, int col)
return true;
}
-bool MyWidget::flag(int row, int col)
+bool MinehuntGame::flag(int row, int col)
{
Tile *t = tile(row, col);
if(!t)
@@ -313,42 +282,33 @@ bool MyWidget::flag(int row, int col)
emit numFlagsChanged();
return true;
}
-/////////////////////////////////////////////////////////
-int main(int argc, char ** argv)
+QML_DECLARE_TYPE(Tile);
+QML_DECLARE_TYPE(MinehuntGame);
+
+class MinehuntExtensionPlugin : public QDeclarativeExtensionPlugin
{
-#ifdef Q_WS_X11
- // native on X11 is terrible for this demo.
- QApplication::setGraphicsSystem("raster");
-#endif
- QApplication app(argc, argv);
-
- bool frameless = false;
-
- int width = 370;
- int height = 480;
-
- QML_REGISTER_TYPE(0,0,0,Tile,Tile);
-
- for (int i = 1; i < argc; ++i) {
- QString arg = argv[i];
- if (arg == "-frameless") {
- frameless = true;
- } else if(arg == "-width" && i < (argc - 1)) {
- ++i;
- width = ::atoi(argv[i]);
- } else if(arg == "-height" && i < (argc - 1)) {
- ++i;
- height = ::atoi(argv[i]);
- } else if (arg[0] != '-') {
- fileName = arg;
- }
+ Q_OBJECT
+
+ public:
+ void registerTypes(const char *uri) {
+ Q_UNUSED(uri);
+ QML_REGISTER_TYPE(SameGameCore, 0, 1, Tile, Tile);
+ QML_REGISTER_TYPE(SameGameCore, 0, 1, Game, MinehuntGame);
}
- MyWidget wid(width, height, 0, frameless ? Qt::FramelessWindowHint : Qt::Widget);
- wid.show();
+ void initializeEngine(QDeclarativeEngine *engine, const char *uri) {
+ Q_UNUSED(uri);
- return app.exec();
-}
+ srand(QTime(0,0,0).secsTo(QTime::currentTime()));
+
+ MinehuntGame* game = new MinehuntGame();
+
+ engine->rootContext()->addDefaultObject(game);
+ }
+};
+
+#include "minehunt.moc"
+
+Q_EXPORT_PLUGIN(MinehuntExtensionPlugin);
-#include "main.moc"
diff --git a/demos/declarative/minehunt/minehunt.pro b/demos/declarative/minehunt/minehunt.pro
index 01791b1..a497b0f 100644
--- a/demos/declarative/minehunt/minehunt.pro
+++ b/demos/declarative/minehunt/minehunt.pro
@@ -1,9 +1,11 @@
-SOURCES = main.cpp
+TEMPLATE = lib
+TARGET = minehunt
+QT += declarative
+CONFIG += qt plugin
-QT += script declarative
-contains(QT_CONFIG, opengles2)|contains(QT_CONFIG, opengles1): QT += opengl
+TARGET = $$qtLibraryTarget($$TARGET)
+DESTDIR = MinehuntCore
+
+# Input
+SOURCES += minehunt.cpp
-target.path = $$[QT_INSTALL_EXAMPLES]/declarative/minehunt
-sources.files = $$SOURCES $$HEADERS $$RESOURCES $$FORMS minehunt.pro
-sources.path = $$[QT_INSTALL_EXAMPLES]/declarative/minehunt
-INSTALLS += target sources
diff --git a/demos/declarative/minehunt/minehunt.qml b/demos/declarative/minehunt/minehunt.qml
index 8a3cab1..9e99706 100644
--- a/demos/declarative/minehunt/minehunt.qml
+++ b/demos/declarative/minehunt/minehunt.qml
@@ -1,4 +1,5 @@
import Qt 4.6
+import MinehuntCore 1.0
Item {
id: field
@@ -24,15 +25,15 @@ Item {
angle: flipable.angle;
}
front: Image {
- source: "pics/front.png"
+ source: "MinehuntCore/pics/front.png"
width: 40
height: 40
Image {
anchors.horizontalCenter: parent.horizontalCenter
anchors.verticalCenter: parent.verticalCenter
- source: "pics/flag.png"
+ source: "MinehuntCore/pics/flag.png"
opacity: modelData.hasFlag
- opacity: Behavior {
+ Behavior on opacity {
NumberAnimation {
property: "opacity"
duration: 250
@@ -41,7 +42,7 @@ Item {
}
}
back: Image {
- source: "pics/back.png"
+ source: "MinehuntCore/pics/back.png"
width: 40
height: 40
Text {
@@ -55,7 +56,7 @@ Item {
Image {
anchors.horizontalCenter: parent.horizontalCenter
anchors.verticalCenter: parent.verticalCenter
- source: "pics/bomb.png"
+ source: "MinehuntCore/pics/bomb.png"
opacity: modelData.hasMine
}
Explosion {
@@ -120,16 +121,9 @@ Item {
}
]
Image {
- source: "pics/No-Ones-Laughing-3.jpg"
+ source: "MinehuntCore/pics/No-Ones-Laughing-3.jpg"
fillMode: Image.Tile
}
- Description {
- text: "Use the 'minehunt' executable to run this demo!"
- width: 300
- opacity: tiles?0:1
- anchors.horizontalCenter: parent.horizontalCenter
- anchors.verticalCenter: parent.verticalCenter
- }
Repeater {
id: repeater
model: tiles
@@ -156,7 +150,7 @@ Item {
Image {
// x: 100
// y: 20
- source: "pics/bomb-color.png"
+ source: "MinehuntCore/pics/bomb-color.png"
}
Text {
// x: 100
@@ -172,7 +166,7 @@ Item {
Image {
// x: 140
// y: 20
- source: "pics/flag-color.png"
+ source: "MinehuntCore/pics/flag-color.png"
}
Text {
// x: 140
@@ -187,7 +181,7 @@ Item {
y: 390
anchors.right: field.right
anchors.rightMargin: 20
- source: isPlaying ? 'pics/face-smile.png' : hasWon ? 'pics/face-smile-big.png': 'pics/face-sad.png'
+ source: isPlaying ? 'MinehuntCore/pics/face-smile.png' : hasWon ? 'MinehuntCore/pics/face-smile-big.png': 'MinehuntCore/pics/face-sad.png'
MouseArea {
anchors.fill: parent
onPressed: { reset() }
diff --git a/demos/declarative/minehunt/test.qml b/demos/declarative/minehunt/test.qml
deleted file mode 100644
index 11ed182..0000000
--- a/demos/declarative/minehunt/test.qml
+++ /dev/null
@@ -1,13 +0,0 @@
-import Qt 4.6
-
- Image {
- source: "pics/front.png"
- width: 40
- height: 40
- Image {
- anchors.horizontalCenter: parent.horizontalCenter
- anchors.verticalCenter: parent.verticalCenter
- source: "pics/flag.png"
- opacity: 1
- }
- }
diff --git a/demos/declarative/samegame/content/BoomBlock.qml b/demos/declarative/samegame/SamegameCore/BoomBlock.qml
index 723e62a..e48194a 100644
--- a/demos/declarative/samegame/content/BoomBlock.qml
+++ b/demos/declarative/samegame/SamegameCore/BoomBlock.qml
@@ -7,8 +7,8 @@ Item { id:block
property int targetX: 0
property int targetY: 0
- x: SpringFollow { enabled: spawned; source: targetX; spring: 2; damping: 0.2 }
- y: SpringFollow { source: targetY; spring: 2; damping: 0.2 }
+ SpringFollow on x { enabled: spawned; source: targetX; spring: 2; damping: 0.2 }
+ SpringFollow on y { source: targetY; spring: 2; damping: 0.2 }
Image { id: img
source: {
@@ -21,7 +21,7 @@ Item { id:block
}
}
opacity: 0
- opacity: Behavior { NumberAnimation { duration: 200 } }
+ Behavior on opacity { NumberAnimation { duration: 200 } }
anchors.fill: parent
}
diff --git a/demos/declarative/samegame/content/Button.qml b/demos/declarative/samegame/SamegameCore/Button.qml
index 6629302..6629302 100644
--- a/demos/declarative/samegame/content/Button.qml
+++ b/demos/declarative/samegame/SamegameCore/Button.qml
diff --git a/demos/declarative/samegame/content/Dialog.qml b/demos/declarative/samegame/SamegameCore/Dialog.qml
index 7769328..6d5d6b5 100644
--- a/demos/declarative/samegame/content/Dialog.qml
+++ b/demos/declarative/samegame/SamegameCore/Dialog.qml
@@ -14,7 +14,7 @@ Rectangle {
property Item text: myText
color: "white"; border.width: 1; width: myText.width + 20; height: myText.height + 40;
opacity: 0
- opacity: Behavior {
+ Behavior on opacity {
NumberAnimation { duration: 1000 }
}
Text { id: myText; anchors.centerIn: parent; text: "Hello World!" }
diff --git a/demos/declarative/samegame/content/pics/background.png b/demos/declarative/samegame/SamegameCore/pics/background.png
index 3734a27..3734a27 100644
--- a/demos/declarative/samegame/content/pics/background.png
+++ b/demos/declarative/samegame/SamegameCore/pics/background.png
Binary files differ
diff --git a/demos/declarative/samegame/content/pics/blueStar.png b/demos/declarative/samegame/SamegameCore/pics/blueStar.png
index ff9588f..ff9588f 100644
--- a/demos/declarative/samegame/content/pics/blueStar.png
+++ b/demos/declarative/samegame/SamegameCore/pics/blueStar.png
Binary files differ
diff --git a/demos/declarative/samegame/content/pics/blueStone.png b/demos/declarative/samegame/SamegameCore/pics/blueStone.png
index 20e43c7..20e43c7 100644
--- a/demos/declarative/samegame/content/pics/blueStone.png
+++ b/demos/declarative/samegame/SamegameCore/pics/blueStone.png
Binary files differ
diff --git a/demos/declarative/samegame/content/pics/greenStar.png b/demos/declarative/samegame/SamegameCore/pics/greenStar.png
index cd06854..cd06854 100644
--- a/demos/declarative/samegame/content/pics/greenStar.png
+++ b/demos/declarative/samegame/SamegameCore/pics/greenStar.png
Binary files differ
diff --git a/demos/declarative/samegame/content/pics/greenStone.png b/demos/declarative/samegame/SamegameCore/pics/greenStone.png
index b568a19..b568a19 100644
--- a/demos/declarative/samegame/content/pics/greenStone.png
+++ b/demos/declarative/samegame/SamegameCore/pics/greenStone.png
Binary files differ
diff --git a/demos/declarative/samegame/content/pics/redStar.png b/demos/declarative/samegame/SamegameCore/pics/redStar.png
index 0a4dffe..0a4dffe 100644
--- a/demos/declarative/samegame/content/pics/redStar.png
+++ b/demos/declarative/samegame/SamegameCore/pics/redStar.png
Binary files differ
diff --git a/demos/declarative/samegame/content/pics/redStone.png b/demos/declarative/samegame/SamegameCore/pics/redStone.png
index 36b09a2..36b09a2 100644
--- a/demos/declarative/samegame/content/pics/redStone.png
+++ b/demos/declarative/samegame/SamegameCore/pics/redStone.png
Binary files differ
diff --git a/demos/declarative/samegame/content/pics/star.png b/demos/declarative/samegame/SamegameCore/pics/star.png
index defbde5..defbde5 100644
--- a/demos/declarative/samegame/content/pics/star.png
+++ b/demos/declarative/samegame/SamegameCore/pics/star.png
Binary files differ
diff --git a/demos/declarative/samegame/content/pics/yellowStone.png b/demos/declarative/samegame/SamegameCore/pics/yellowStone.png
index b1ce762..b1ce762 100644
--- a/demos/declarative/samegame/content/pics/yellowStone.png
+++ b/demos/declarative/samegame/SamegameCore/pics/yellowStone.png
Binary files differ
diff --git a/demos/declarative/samegame/content/qmldir b/demos/declarative/samegame/SamegameCore/qmldir
index a8f8a98..a8f8a98 100644
--- a/demos/declarative/samegame/content/qmldir
+++ b/demos/declarative/samegame/SamegameCore/qmldir
diff --git a/demos/declarative/samegame/content/samegame.js b/demos/declarative/samegame/SamegameCore/samegame.js
index c0f10bd..1214b79 100755
--- a/demos/declarative/samegame/content/samegame.js
+++ b/demos/declarative/samegame/SamegameCore/samegame.js
@@ -4,7 +4,7 @@ var maxX = 10;//Nums are for gameCanvas.tileSize 40
var maxY = 15;
var maxIndex = maxX*maxY;
var board = new Array(maxIndex);
-var tileSrc = "content/BoomBlock.qml";
+var tileSrc = "SamegameCore/BoomBlock.qml";
var scoresURL = "http://qtfx-nokia.trolltech.com.au/samegame/scores.php";
var scoresURL = "";
var timer;
diff --git a/demos/declarative/samegame/samegame.qml b/demos/declarative/samegame/samegame.qml
index 50f6293..3b19cbe 100644
--- a/demos/declarative/samegame/samegame.qml
+++ b/demos/declarative/samegame/samegame.qml
@@ -1,5 +1,5 @@
import Qt 4.6
-import "content"
+import SamegameCore 1.0
Rectangle {
id: screen
@@ -12,7 +12,7 @@ Rectangle {
Image {
id: background
- anchors.fill: parent; source: "content/pics/background.png"
+ anchors.fill: parent; source: "SamegameCore/pics/background.png"
fillMode: Image.PreserveAspectCrop
smooth: true
}
@@ -22,7 +22,7 @@ Rectangle {
property int score: 0
property int tileSize: 40
- Script { source: "content/samegame.js" }
+ Script { source: "SamegameCore/samegame.js" }
z: 20; anchors.centerIn: parent
width: parent.width - (parent.width % getTileSize());
@@ -39,7 +39,7 @@ Rectangle {
Dialog {
id: scoreName; anchors.centerIn: parent; z: 22;
property int initialWidth: 0
- width: Behavior{NumberAnimation{} enabled: initialWidth!=0}
+ Behavior on width {NumberAnimation{} enabled: initialWidth!=0}
Text {
id: spacer
anchors.left: scoreName.left
diff --git a/demos/declarative/snake/content/Cookie.qml b/demos/declarative/snake/content/Cookie.qml
index 7f0aadf..0ea95cb 100644
--- a/demos/declarative/snake/content/Cookie.qml
+++ b/demos/declarative/snake/content/Cookie.qml
@@ -17,7 +17,7 @@ Item {
anchors.fill: parent
source: "pics/cookie.png"
opacity: 0
- opacity: Behavior { NumberAnimation { duration: 100 } }
+ Behavior on opacity { NumberAnimation { duration: 100 } }
Text {
font.bold: true
anchors.verticalCenter: parent.verticalCenter
diff --git a/demos/declarative/snake/content/Link.qml b/demos/declarative/snake/content/Link.qml
index 1b3f7bf..31ac4b9 100644
--- a/demos/declarative/snake/content/Link.qml
+++ b/demos/declarative/snake/content/Link.qml
@@ -13,8 +13,8 @@ Item { id:link
x: margin - 3 + gridSize * column
y: margin - 3 + gridSize * row
- x: Behavior { NumberAnimation { duration: spawned ? heartbeatInterval : 0} }
- y: Behavior { NumberAnimation { duration: spawned ? heartbeatInterval : 0 } }
+ Behavior on x { NumberAnimation { duration: spawned ? heartbeatInterval : 0} }
+ Behavior on y { NumberAnimation { duration: spawned ? heartbeatInterval : 0 } }
Item {
@@ -35,7 +35,7 @@ Item { id:link
id: actualImageRotation
origin.x: width/2; origin.y: height/2;
angle: rotation * 90
- angle: Behavior{ NumberAnimation { duration: spawned ? 200 : 0} }
+ Behavior on angle { NumberAnimation { duration: spawned ? 200 : 0} }
}
}
@@ -44,7 +44,7 @@ Item { id:link
}
opacity: 0
- opacity: Behavior { NumberAnimation { duration: 200 } }
+ Behavior on opacity { NumberAnimation { duration: 200 } }
}
diff --git a/demos/declarative/snake/content/Skull.qml b/demos/declarative/snake/content/Skull.qml
index 585e7d3..821996a 100644
--- a/demos/declarative/snake/content/Skull.qml
+++ b/demos/declarative/snake/content/Skull.qml
@@ -9,11 +9,11 @@ Image {
x: margin + column * gridSize + 2
y: margin + row * gridSize - 3
- x: Behavior { NumberAnimation { duration: spawned ? halfbeatInterval : 0} }
- y: Behavior { NumberAnimation { duration: spawned ? halfbeatInterval : 0 } }
+ Behavior on x { NumberAnimation { duration: spawned ? halfbeatInterval : 0} }
+ Behavior on y { NumberAnimation { duration: spawned ? halfbeatInterval : 0 } }
opacity: spawned ? 1 : 0
- opacity: Behavior { NumberAnimation { duration: 200 } }
+ Behavior on opacity { NumberAnimation { duration: 200 } }
source: "pics/skull.png"
width: 24
diff --git a/demos/declarative/snake/content/snake.js b/demos/declarative/snake/content/snake.js
index a65aebc..12176c7 100644
--- a/demos/declarative/snake/content/snake.js
+++ b/demos/declarative/snake/content/snake.js
@@ -54,7 +54,7 @@ function startNewGame()
} else {
if(linkComponent.isReady == false){
if(linkComponent.isError == true)
- print(linkComponent.errorString());
+ print(linkComponent.errorsString());
else
print("Still loading linkComponent");
continue;//TODO: Better error handling?
@@ -295,7 +295,7 @@ function createCookie(value) {
if(cookieComponent.isReady == false){
if(cookieComponent.isError == true)
- print(cookieComponent.errorString());
+ print(cookieComponent.errorsString());
else
print("Still loading cookieComponent");
return;//TODO: Better error handling?
diff --git a/demos/declarative/snake/snake.qml b/demos/declarative/snake/snake.qml
index 09b6b7f..f9d02c7 100644
--- a/demos/declarative/snake/snake.qml
+++ b/demos/declarative/snake/snake.qml
@@ -65,7 +65,7 @@ Rectangle {
anchors.fill: parent
anchors.horizontalCenter: parent.horizontalCenter
anchors.verticalCenter: parent.verticalCenter
- opacity: Behavior { NumberAnimation { duration: 500 } }
+ Behavior on opacity { NumberAnimation { duration: 500 } }
Text {
color: "white"
@@ -121,7 +121,7 @@ Rectangle {
Rectangle {
id: progressBar
opacity: 0
- opacity: Behavior { NumberAnimation { duration: 200 } }
+ Behavior on opacity { NumberAnimation { duration: 200 } }
color: "transparent"
border.width: 2
border.color: "#221edd"
@@ -137,7 +137,7 @@ Rectangle {
id: progressIndicator
color: "#221edd";
width: 0;
- width: Behavior { NumberAnimation { duration: startHeartbeatTimer.running ? 1000 : 0}}
+ Behavior on width { NumberAnimation { duration: startHeartbeatTimer.running ? 1000 : 0}}
height: 30;
}
}
diff --git a/demos/declarative/twitter/content/AuthView.qml b/demos/declarative/twitter/TwitterCore/AuthView.qml
index bcf4646..bcf4646 100644
--- a/demos/declarative/twitter/content/AuthView.qml
+++ b/demos/declarative/twitter/TwitterCore/AuthView.qml
diff --git a/demos/declarative/twitter/content/Button.qml b/demos/declarative/twitter/TwitterCore/Button.qml
index 4cba8c3..4cba8c3 100644
--- a/demos/declarative/twitter/content/Button.qml
+++ b/demos/declarative/twitter/TwitterCore/Button.qml
diff --git a/demos/declarative/twitter/content/FatDelegate.qml b/demos/declarative/twitter/TwitterCore/FatDelegate.qml
index 2b9288b..0f013e6 100644
--- a/demos/declarative/twitter/content/FatDelegate.qml
+++ b/demos/declarative/twitter/TwitterCore/FatDelegate.qml
@@ -37,7 +37,7 @@ Component {
+ '<a href="app://@'+userScreenName+'"><b>'+userScreenName + "</b></a> from " +source
+ "<br /><b>" + addTags(statusText) + "</b></html>";
textFormat: Qt.RichText
- color: "white"; color: "#cccccc"; style: Text.Raised; styleColor: "black"; wrap: true
+ color: "#cccccc"; style: Text.Raised; styleColor: "black"; wrap: true
anchors.left: whiteRect.right; anchors.right: blackRect.right; anchors.leftMargin: 6; anchors.rightMargin: 6
onLinkActivated: handleLink(link)
}
diff --git a/demos/declarative/twitter/content/HomeTitleBar.qml b/demos/declarative/twitter/TwitterCore/HomeTitleBar.qml
index a206c87..a206c87 100644
--- a/demos/declarative/twitter/content/HomeTitleBar.qml
+++ b/demos/declarative/twitter/TwitterCore/HomeTitleBar.qml
diff --git a/demos/declarative/twitter/content/Loading.qml b/demos/declarative/twitter/TwitterCore/Loading.qml
index 3151415..76bf64b 100644
--- a/demos/declarative/twitter/content/Loading.qml
+++ b/demos/declarative/twitter/TwitterCore/Loading.qml
@@ -2,7 +2,7 @@ import Qt 4.6
Image {
id: loading; source: "images/loading.png"; transformOrigin: "Center"
- rotation: NumberAnimation {
+ NumberAnimation on rotation {
from: 0; to: 360; running: loading.visible == true; repeat: true; duration: 900
}
}
diff --git a/demos/declarative/twitter/content/MultiTitleBar.qml b/demos/declarative/twitter/TwitterCore/MultiTitleBar.qml
index e0205b8..e0205b8 100644
--- a/demos/declarative/twitter/content/MultiTitleBar.qml
+++ b/demos/declarative/twitter/TwitterCore/MultiTitleBar.qml
diff --git a/demos/declarative/twitter/content/RssModel.qml b/demos/declarative/twitter/TwitterCore/RssModel.qml
index 9d88bb7..9d88bb7 100644
--- a/demos/declarative/twitter/content/RssModel.qml
+++ b/demos/declarative/twitter/TwitterCore/RssModel.qml
diff --git a/demos/declarative/twitter/content/TitleBar.qml b/demos/declarative/twitter/TwitterCore/TitleBar.qml
index 149aa82..149aa82 100644
--- a/demos/declarative/twitter/content/TitleBar.qml
+++ b/demos/declarative/twitter/TwitterCore/TitleBar.qml
diff --git a/demos/declarative/twitter/content/ToolBar.qml b/demos/declarative/twitter/TwitterCore/ToolBar.qml
index f96c767..f96c767 100644
--- a/demos/declarative/twitter/content/ToolBar.qml
+++ b/demos/declarative/twitter/TwitterCore/ToolBar.qml
diff --git a/demos/declarative/twitter/content/UserModel.qml b/demos/declarative/twitter/TwitterCore/UserModel.qml
index c146b84..c146b84 100644
--- a/demos/declarative/twitter/content/UserModel.qml
+++ b/demos/declarative/twitter/TwitterCore/UserModel.qml
diff --git a/demos/declarative/twitter/content/images/gloss.png b/demos/declarative/twitter/TwitterCore/images/gloss.png
index 5d370cd..5d370cd 100644
--- a/demos/declarative/twitter/content/images/gloss.png
+++ b/demos/declarative/twitter/TwitterCore/images/gloss.png
Binary files differ
diff --git a/demos/declarative/twitter/content/images/lineedit.png b/demos/declarative/twitter/TwitterCore/images/lineedit.png
index 2cc38dc..2cc38dc 100644
--- a/demos/declarative/twitter/content/images/lineedit.png
+++ b/demos/declarative/twitter/TwitterCore/images/lineedit.png
Binary files differ
diff --git a/demos/declarative/twitter/content/images/lineedit.sci b/demos/declarative/twitter/TwitterCore/images/lineedit.sci
index 054bff7..054bff7 100644
--- a/demos/declarative/twitter/content/images/lineedit.sci
+++ b/demos/declarative/twitter/TwitterCore/images/lineedit.sci
diff --git a/demos/declarative/twitter/content/images/loading.png b/demos/declarative/twitter/TwitterCore/images/loading.png
index 47a1589..47a1589 100644
--- a/demos/declarative/twitter/content/images/loading.png
+++ b/demos/declarative/twitter/TwitterCore/images/loading.png
Binary files differ
diff --git a/demos/declarative/twitter/content/images/stripes.png b/demos/declarative/twitter/TwitterCore/images/stripes.png
index 9f36727..9f36727 100644
--- a/demos/declarative/twitter/content/images/stripes.png
+++ b/demos/declarative/twitter/TwitterCore/images/stripes.png
Binary files differ
diff --git a/demos/declarative/twitter/content/images/titlebar.png b/demos/declarative/twitter/TwitterCore/images/titlebar.png
index 51c9008..51c9008 100644
--- a/demos/declarative/twitter/content/images/titlebar.png
+++ b/demos/declarative/twitter/TwitterCore/images/titlebar.png
Binary files differ
diff --git a/demos/declarative/twitter/content/images/titlebar.sci b/demos/declarative/twitter/TwitterCore/images/titlebar.sci
index 0418d94..0418d94 100644
--- a/demos/declarative/twitter/content/images/titlebar.sci
+++ b/demos/declarative/twitter/TwitterCore/images/titlebar.sci
diff --git a/demos/declarative/twitter/content/images/toolbutton.png b/demos/declarative/twitter/TwitterCore/images/toolbutton.png
index 1131001..1131001 100644
--- a/demos/declarative/twitter/content/images/toolbutton.png
+++ b/demos/declarative/twitter/TwitterCore/images/toolbutton.png
Binary files differ
diff --git a/demos/declarative/twitter/content/images/toolbutton.sci b/demos/declarative/twitter/TwitterCore/images/toolbutton.sci
index 9e4f965..9e4f965 100644
--- a/demos/declarative/twitter/content/images/toolbutton.sci
+++ b/demos/declarative/twitter/TwitterCore/images/toolbutton.sci
diff --git a/demos/declarative/twitter/TwitterCore/qmldir b/demos/declarative/twitter/TwitterCore/qmldir
new file mode 100644
index 0000000..8b56c56
--- /dev/null
+++ b/demos/declarative/twitter/TwitterCore/qmldir
@@ -0,0 +1,10 @@
+AuthView 1.0 AuthView.qml
+Button 1.0 Button.qml
+FatDelegate 1.0 FatDelegate.qml
+HomeTitleBar 1.0 HomeTitleBar.qml
+Loading 1.0 Loading.qml
+MultiTitleBar 1.0 MultiTitleBar.qml
+TitleBar 1.0 TitleBar.qml
+RssModel 1.0 RssModel.qml
+UserModel 1.0 UserModel.qml
+ToolBar 1.0 ToolBar.qml
diff --git a/demos/declarative/twitter/twitter.qml b/demos/declarative/twitter/twitter.qml
index b091b03..259f79a 100644
--- a/demos/declarative/twitter/twitter.qml
+++ b/demos/declarative/twitter/twitter.qml
@@ -1,5 +1,5 @@
import Qt 4.6
-import "content" as Twitter
+import TwitterCore 1.0 as Twitter
Item {
id: screen; width: 320; height: 480
@@ -28,14 +28,14 @@ Item {
id: background
anchors.fill: parent; color: "#343434";
- Image { source: "content/images/stripes.png"; fillMode: Image.Tile; anchors.fill: parent; opacity: 0.3 }
+ Image { source: "TwitterCore/images/stripes.png"; fillMode: Image.Tile; anchors.fill: parent; opacity: 0.3 }
Twitter.RssModel { id: rssModel }
Twitter.Loading { anchors.centerIn: parent; visible: rssModel.status==XmlListModel.Loading && state!='unauthed'}
Text {
width: 180
text: "Could not access twitter using this screen name and password pair.";
- color: "white"; color: "#cccccc"; style: Text.Raised; styleColor: "black"; wrap: true
+ color: "#cccccc"; style: Text.Raised; styleColor: "black"; wrap: true
visible: rssModel.status==XmlListModel.Error; anchors.centerIn: parent
}
diff --git a/demos/declarative/webbrowser/content/FlickableWebView.qml b/demos/declarative/webbrowser/content/FlickableWebView.qml
index 76a5813..30a5d78 100644
--- a/demos/declarative/webbrowser/content/FlickableWebView.qml
+++ b/demos/declarative/webbrowser/content/FlickableWebView.qml
@@ -1,4 +1,5 @@
import Qt 4.6
+import org.webkit 1.0
Flickable {
property alias title: webView.title
@@ -22,6 +23,7 @@ Flickable {
WebView {
id: webView
pixelCacheSize: 4000000
+ transformOrigin: Item.TopLeft
Script {
function fixUrl(url)
diff --git a/demos/declarative/webbrowser/content/fieldtext/FieldText.qml b/demos/declarative/webbrowser/content/fieldtext/FieldText.qml
index 19b6acc..d282209 100644
--- a/demos/declarative/webbrowser/content/fieldtext/FieldText.qml
+++ b/demos/declarative/webbrowser/content/fieldtext/FieldText.qml
@@ -85,7 +85,7 @@ Item {
font.bold: true
text: label
opacity: textEdit.text == '' ? 1 : 0
- opacity: Behavior {
+ Behavior on opacity {
NumberAnimation {
property: "opacity"
duration: 250
diff --git a/demos/declarative/webbrowser/webbrowser.qml b/demos/declarative/webbrowser/webbrowser.qml
index 6a427f4..b6cccb0 100644
--- a/demos/declarative/webbrowser/webbrowser.qml
+++ b/demos/declarative/webbrowser/webbrowser.qml
@@ -1,4 +1,5 @@
import Qt 4.6
+import org.webkit 1.0
import "content"