diff options
Diffstat (limited to 'examples/declarative/cppextensions')
15 files changed, 69 insertions, 19 deletions
diff --git a/examples/declarative/cppextensions/cppextensions.pro b/examples/declarative/cppextensions/cppextensions.pro index caa6092..33762fe 100644 --- a/examples/declarative/cppextensions/cppextensions.pro +++ b/examples/declarative/cppextensions/cppextensions.pro @@ -3,8 +3,8 @@ TEMPLATE = subdirs SUBDIRS += \ imageprovider \ plugins \ - proxyviewer \ - proxywidgets \ + networkaccessmanagerfactory \ + qwidgets \ qgraphicslayouts \ referenceexamples diff --git a/examples/declarative/cppextensions/proxyviewer/main.cpp b/examples/declarative/cppextensions/networkaccessmanagerfactory/main.cpp index b82d2c9..4ecbb5c 100644 --- a/examples/declarative/cppextensions/proxyviewer/main.cpp +++ b/examples/declarative/cppextensions/networkaccessmanagerfactory/main.cpp @@ -53,7 +53,7 @@ create a QNetworkAccessManager with a proxy. Usage: - proxyviewer [-host <proxy> -port <port>] [file] + networkaccessmanagerfactory [-host <proxy> -port <port>] [file] */ static QString proxyHost; @@ -93,7 +93,7 @@ int main(int argc, char ** argv) } else if (arg[0] != '-') { source = QUrl::fromLocalFile(arg); } else { - qWarning() << "Usage: proxyviewer [-host <proxy> -port <port>] [file]"; + qWarning() << "Usage: networkaccessmanagerfactory [-host <proxy> -port <port>] [file]"; exit(1); } } diff --git a/examples/declarative/cppextensions/proxyviewer/proxyviewer.pro b/examples/declarative/cppextensions/networkaccessmanagerfactory/networkaccessmanagerfactory.pro index b6bfa7f..74d8db3 100644 --- a/examples/declarative/cppextensions/proxyviewer/proxyviewer.pro +++ b/examples/declarative/cppextensions/networkaccessmanagerfactory/networkaccessmanagerfactory.pro @@ -1,9 +1,9 @@ TEMPLATE = app -TARGET = proxyviewer +TARGET = networkaccessmanagerfactory DEPENDPATH += . INCLUDEPATH += . QT += declarative network # Input SOURCES += main.cpp -RESOURCES += proxyviewer.qrc +RESOURCES += networkaccessmanagerfactory.qrc diff --git a/examples/declarative/cppextensions/proxywidgets/proxywidgets.qmlproject b/examples/declarative/cppextensions/networkaccessmanagerfactory/networkaccessmanagerfactory.qmlproject index d4909f8..d4909f8 100644 --- a/examples/declarative/cppextensions/proxywidgets/proxywidgets.qmlproject +++ b/examples/declarative/cppextensions/networkaccessmanagerfactory/networkaccessmanagerfactory.qmlproject diff --git a/examples/declarative/cppextensions/proxyviewer/proxyviewer.qrc b/examples/declarative/cppextensions/networkaccessmanagerfactory/networkaccessmanagerfactory.qrc index 17e9301..17e9301 100644 --- a/examples/declarative/cppextensions/proxyviewer/proxyviewer.qrc +++ b/examples/declarative/cppextensions/networkaccessmanagerfactory/networkaccessmanagerfactory.qrc diff --git a/examples/declarative/cppextensions/proxyviewer/view.qml b/examples/declarative/cppextensions/networkaccessmanagerfactory/view.qml index 7f1bdef..7f1bdef 100644 --- a/examples/declarative/cppextensions/proxyviewer/view.qml +++ b/examples/declarative/cppextensions/networkaccessmanagerfactory/view.qml diff --git a/examples/declarative/cppextensions/proxywidgets/README b/examples/declarative/cppextensions/proxywidgets/README deleted file mode 100644 index f50fa22..0000000 --- a/examples/declarative/cppextensions/proxywidgets/README +++ /dev/null @@ -1,4 +0,0 @@ -To run: - - make install - qml proxywidgets.qml diff --git a/examples/declarative/cppextensions/qgraphicslayouts/graphicsLayouts/graphicsLayouts.qmlproject b/examples/declarative/cppextensions/qgraphicslayouts/graphicsLayouts/graphicsLayouts.qmlproject new file mode 100644 index 0000000..d4909f8 --- /dev/null +++ b/examples/declarative/cppextensions/qgraphicslayouts/graphicsLayouts/graphicsLayouts.qmlproject @@ -0,0 +1,16 @@ +import QmlProject 1.0 + +Project { + /* Include .qml, .js, and image files from current directory and subdirectories */ + QmlFiles { + directory: "." + } + JavaScriptFiles { + directory: "." + } + ImageFiles { + directory: "." + } + /* List of plugin directories passed to QML runtime */ + // importPaths: [ " ../exampleplugin " ] +} diff --git a/examples/declarative/cppextensions/qgraphicslayouts/layoutItem/layoutItem.qmlproject b/examples/declarative/cppextensions/qgraphicslayouts/layoutItem/layoutItem.qmlproject new file mode 100644 index 0000000..d4909f8 --- /dev/null +++ b/examples/declarative/cppextensions/qgraphicslayouts/layoutItem/layoutItem.qmlproject @@ -0,0 +1,16 @@ +import QmlProject 1.0 + +Project { + /* Include .qml, .js, and image files from current directory and subdirectories */ + QmlFiles { + directory: "." + } + JavaScriptFiles { + directory: "." + } + ImageFiles { + directory: "." + } + /* List of plugin directories passed to QML runtime */ + // importPaths: [ " ../exampleplugin " ] +} diff --git a/examples/declarative/cppextensions/proxywidgets/ProxyWidgets/qmldir b/examples/declarative/cppextensions/qwidgets/QWidgets/qmldir index e55267c..e55267c 100644 --- a/examples/declarative/cppextensions/proxywidgets/ProxyWidgets/qmldir +++ b/examples/declarative/cppextensions/qwidgets/QWidgets/qmldir diff --git a/examples/declarative/cppextensions/qwidgets/README b/examples/declarative/cppextensions/qwidgets/README new file mode 100644 index 0000000..e2f1b2b --- /dev/null +++ b/examples/declarative/cppextensions/qwidgets/README @@ -0,0 +1,6 @@ +This example shows how to embed QWidget-based objects into QML. + +To run: + + make install + qml qwidgets.qml diff --git a/examples/declarative/cppextensions/proxywidgets/proxywidgets.cpp b/examples/declarative/cppextensions/qwidgets/qwidgets.cpp index 067eb2c..228f9f1 100644 --- a/examples/declarative/cppextensions/proxywidgets/proxywidgets.cpp +++ b/examples/declarative/cppextensions/qwidgets/qwidgets.cpp @@ -82,7 +82,7 @@ private: QPushButton *widget; }; -class ProxyWidgetsPlugin : public QDeclarativeExtensionPlugin +class QWidgetsPlugin : public QDeclarativeExtensionPlugin { Q_OBJECT public: @@ -92,6 +92,6 @@ public: } }; -#include "proxywidgets.moc" +#include "qwidgets.moc" -Q_EXPORT_PLUGIN2(proxywidgetsplugin, ProxyWidgetsPlugin); +Q_EXPORT_PLUGIN2(qwidgetsplugin, QWidgetsPlugin); diff --git a/examples/declarative/cppextensions/proxywidgets/proxywidgets.pro b/examples/declarative/cppextensions/qwidgets/qwidgets.pro index cb07d80..37f313d 100644 --- a/examples/declarative/cppextensions/proxywidgets/proxywidgets.pro +++ b/examples/declarative/cppextensions/qwidgets/qwidgets.pro @@ -1,12 +1,12 @@ TEMPLATE = lib -DESTDIR = ProxyWidgets -TARGET = proxywidgetsplugin +DESTDIR = QWidgets +TARGET = qwidgetsplugin CONFIG += qt plugin QT += declarative -SOURCES += proxywidgets.cpp +SOURCES += qwidgets.cpp -sources.files += proxywidgets.pro proxywidgets.cpp proxywidgets.qml +sources.files += qwidgets.pro qwidgets.cpp qwidgets.qml sources.path += $$[QT_INSTALL_EXAMPLES]/declarative/plugins @@ -18,4 +18,4 @@ symbian: include($$QT_SOURCE_TREE/examples/symbianpkgrules.pri) symbian:{ TARGET.EPOCALLOWDLLDATA = 1 -}
\ No newline at end of file +} diff --git a/examples/declarative/cppextensions/proxywidgets/proxywidgets.qml b/examples/declarative/cppextensions/qwidgets/qwidgets.qml index 88de37f..47f9573 100644 --- a/examples/declarative/cppextensions/proxywidgets/proxywidgets.qml +++ b/examples/declarative/cppextensions/qwidgets/qwidgets.qml @@ -1,5 +1,5 @@ import Qt 4.7 -import "ProxyWidgets" 1.0 +import "QWidgets" 1.0 Rectangle { id: window diff --git a/examples/declarative/cppextensions/qwidgets/qwidgets.qmlproject b/examples/declarative/cppextensions/qwidgets/qwidgets.qmlproject new file mode 100644 index 0000000..d4909f8 --- /dev/null +++ b/examples/declarative/cppextensions/qwidgets/qwidgets.qmlproject @@ -0,0 +1,16 @@ +import QmlProject 1.0 + +Project { + /* Include .qml, .js, and image files from current directory and subdirectories */ + QmlFiles { + directory: "." + } + JavaScriptFiles { + directory: "." + } + ImageFiles { + directory: "." + } + /* List of plugin directories passed to QML runtime */ + // importPaths: [ " ../exampleplugin " ] +} |