aboutsummaryrefslogtreecommitdiffstats
path: root/examples/tutorials/gettingStartedQml/filedialog
diff options
context:
space:
mode:
Diffstat (limited to 'examples/tutorials/gettingStartedQml/filedialog')
-rw-r--r--examples/tutorials/gettingStartedQml/filedialog/dialogPlugin.cpp4
-rw-r--r--examples/tutorials/gettingStartedQml/filedialog/dialogPlugin.h8
-rw-r--r--examples/tutorials/gettingStartedQml/filedialog/directory.cpp16
-rw-r--r--examples/tutorials/gettingStartedQml/filedialog/directory.h8
-rw-r--r--examples/tutorials/gettingStartedQml/filedialog/file.cpp2
-rw-r--r--examples/tutorials/gettingStartedQml/filedialog/file.h2
-rw-r--r--examples/tutorials/gettingStartedQml/filedialog/filedialog.pro2
7 files changed, 21 insertions, 21 deletions
diff --git a/examples/tutorials/gettingStartedQml/filedialog/dialogPlugin.cpp b/examples/tutorials/gettingStartedQml/filedialog/dialogPlugin.cpp
index 6bc3d4d006..c8538958ac 100644
--- a/examples/tutorials/gettingStartedQml/filedialog/dialogPlugin.cpp
+++ b/examples/tutorials/gettingStartedQml/filedialog/dialogPlugin.cpp
@@ -3,7 +3,7 @@
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** Contact: http://www.qt-project.org/
**
-** This file is part of the QtDeclarative module of the Qt Toolkit.
+** This file is part of the QtQml module of the Qt Toolkit.
**
** $QT_BEGIN_LICENSE:BSD$
** You may use this file under the terms of the BSD license as follows:
@@ -41,7 +41,7 @@
#include "dialogPlugin.h"
#include "directory.h"
#include "file.h"
-#include <QtDeclarative/qdeclarative.h>
+#include <QtQml/qqml.h>
void DialogPlugin::registerTypes(const char *uri)
{
diff --git a/examples/tutorials/gettingStartedQml/filedialog/dialogPlugin.h b/examples/tutorials/gettingStartedQml/filedialog/dialogPlugin.h
index 03bdc1a6e4..1aed6abc8e 100644
--- a/examples/tutorials/gettingStartedQml/filedialog/dialogPlugin.h
+++ b/examples/tutorials/gettingStartedQml/filedialog/dialogPlugin.h
@@ -3,7 +3,7 @@
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** Contact: http://www.qt-project.org/
**
-** This file is part of the QtDeclarative module of the Qt Toolkit.
+** This file is part of the QtQml module of the Qt Toolkit.
**
** $QT_BEGIN_LICENSE:BSD$
** You may use this file under the terms of the BSD license as follows:
@@ -41,14 +41,14 @@
#ifndef DIALOGPLUGIN_H
#define DIALOGPLUGIN_H
-#include <QtDeclarative/QDeclarativeExtensionPlugin>
+#include <QtQml/QQmlExtensionPlugin>
-class DialogPlugin : public QDeclarativeExtensionPlugin
+class DialogPlugin : public QQmlExtensionPlugin
{
Q_OBJECT
public:
- //registerTypes is inherited from QDeclarativeExtensionPlugin
+ //registerTypes is inherited from QQmlExtensionPlugin
void registerTypes(const char *uri);
};
diff --git a/examples/tutorials/gettingStartedQml/filedialog/directory.cpp b/examples/tutorials/gettingStartedQml/filedialog/directory.cpp
index 3253327cb4..eadc11e52f 100644
--- a/examples/tutorials/gettingStartedQml/filedialog/directory.cpp
+++ b/examples/tutorials/gettingStartedQml/filedialog/directory.cpp
@@ -3,7 +3,7 @@
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** Contact: http://www.qt-project.org/
**
-** This file is part of the QtDeclarative module of the Qt Toolkit.
+** This file is part of the QtQml module of the Qt Toolkit.
**
** $QT_BEGIN_LICENSE:BSD$
** You may use this file under the terms of the BSD license as follows:
@@ -72,7 +72,7 @@ int Directory::filesCount() const
/*
Function called to append data onto list property
*/
-void appendFiles(QDeclarativeListProperty<File> * property, File * file)
+void appendFiles(QQmlListProperty<File> * property, File * file)
{
Q_UNUSED(property);
Q_UNUSED(file);
@@ -82,7 +82,7 @@ void appendFiles(QDeclarativeListProperty<File> * property, File * file)
/*
Function called to retrieve file in the list using an index
*/
-File* fileAt(QDeclarativeListProperty<File> * property, int index)
+File* fileAt(QQmlListProperty<File> * property, int index)
{
return static_cast< QList<File *> *>(property->data)->at(index);
}
@@ -90,7 +90,7 @@ File* fileAt(QDeclarativeListProperty<File> * property, int index)
/*
Returns the number of files in the list
*/
-int filesSize(QDeclarativeListProperty<File> * property)
+int filesSize(QQmlListProperty<File> * property)
{
return static_cast< QList<File *> *>(property->data)->size();
}
@@ -98,18 +98,18 @@ int filesSize(QDeclarativeListProperty<File> * property)
/*
Function called to empty the list property contents
*/
-void clearFilesPtr(QDeclarativeListProperty<File> *property)
+void clearFilesPtr(QQmlListProperty<File> *property)
{
return static_cast< QList<File *> *>(property->data)->clear();
}
/*
-Returns the list of files as a QDeclarativeListProperty.
+Returns the list of files as a QQmlListProperty.
*/
-QDeclarativeListProperty<File> Directory::files()
+QQmlListProperty<File> Directory::files()
{
refresh();
- return QDeclarativeListProperty<File>( this, &m_fileList, &appendFiles, &filesSize, &fileAt, &clearFilesPtr );
+ return QQmlListProperty<File>( this, &m_fileList, &appendFiles, &filesSize, &fileAt, &clearFilesPtr );
}
/*
diff --git a/examples/tutorials/gettingStartedQml/filedialog/directory.h b/examples/tutorials/gettingStartedQml/filedialog/directory.h
index 04317707c3..30d6751bd2 100644
--- a/examples/tutorials/gettingStartedQml/filedialog/directory.h
+++ b/examples/tutorials/gettingStartedQml/filedialog/directory.h
@@ -3,7 +3,7 @@
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** Contact: http://www.qt-project.org/
**
-** This file is part of the QtDeclarative module of the Qt Toolkit.
+** This file is part of the QtQml module of the Qt Toolkit.
**
** $QT_BEGIN_LICENSE:BSD$
** You may use this file under the terms of the BSD license as follows:
@@ -46,7 +46,7 @@
#include <QDir>
#include <QStringList>
#include <QTextStream>
-#include <QDeclarativeListProperty>
+#include <QQmlListProperty>
#include <QObject>
class Directory : public QObject {
@@ -57,7 +57,7 @@ class Directory : public QObject {
Q_PROPERTY(int filesCount READ filesCount)
//list property containing file names as QString
- Q_PROPERTY(QDeclarativeListProperty<File> files READ files CONSTANT )
+ Q_PROPERTY(QQmlListProperty<File> files READ files CONSTANT )
//file name of the text file to read/write
Q_PROPERTY(QString filename READ filename WRITE setFilename NOTIFY filenameChanged)
@@ -72,7 +72,7 @@ class Directory : public QObject {
int filesCount() const;
QString filename() const;
QString fileContent() const;
- QDeclarativeListProperty<File> files();
+ QQmlListProperty<File> files();
//properties' write functions
void setFilename(const QString &str);
diff --git a/examples/tutorials/gettingStartedQml/filedialog/file.cpp b/examples/tutorials/gettingStartedQml/filedialog/file.cpp
index 120486315b..e3b22027f5 100644
--- a/examples/tutorials/gettingStartedQml/filedialog/file.cpp
+++ b/examples/tutorials/gettingStartedQml/filedialog/file.cpp
@@ -3,7 +3,7 @@
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** Contact: http://www.qt-project.org/
**
-** This file is part of the QtDeclarative module of the Qt Toolkit.
+** This file is part of the QtQml module of the Qt Toolkit.
**
** $QT_BEGIN_LICENSE:BSD$
** You may use this file under the terms of the BSD license as follows:
diff --git a/examples/tutorials/gettingStartedQml/filedialog/file.h b/examples/tutorials/gettingStartedQml/filedialog/file.h
index 6b8806ee32..d13638b414 100644
--- a/examples/tutorials/gettingStartedQml/filedialog/file.h
+++ b/examples/tutorials/gettingStartedQml/filedialog/file.h
@@ -3,7 +3,7 @@
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** Contact: http://www.qt-project.org/
**
-** This file is part of the QtDeclarative module of the Qt Toolkit.
+** This file is part of the QtQml module of the Qt Toolkit.
**
** $QT_BEGIN_LICENSE:BSD$
** You may use this file under the terms of the BSD license as follows:
diff --git a/examples/tutorials/gettingStartedQml/filedialog/filedialog.pro b/examples/tutorials/gettingStartedQml/filedialog/filedialog.pro
index d85787d00c..85edb40257 100644
--- a/examples/tutorials/gettingStartedQml/filedialog/filedialog.pro
+++ b/examples/tutorials/gettingStartedQml/filedialog/filedialog.pro
@@ -1,6 +1,6 @@
TEMPLATE = lib
CONFIG += qt plugin
-QT += declarative
+QT += qml
DESTDIR += ../plugins
OBJECTS_DIR = tmp