From a53253d89fc281d8754aeeaaa497cf42ce5d314e Mon Sep 17 00:00:00 2001 From: Alan Alpert <alan.alpert@nokia.com> Date: Tue, 24 Jul 2012 12:15:47 +1000 Subject: [PATCH] Clean up StocQt demo Rename, add cpp shell, add doc file, add project files. Task-number: QTBUG-26235 Change-Id: I51c2abefbadbadbadae0abdde5a52f857bcdb68b Reviewed-by: Yunqiao Yin <charles.yin@nokia.com> --- doc/src/images/qml-stocqt-demo-small.png | Bin 0 -> 2721 bytes examples/demos/demos.pro | 3 +- .../{stockchart => stocqt}/content/Button.qml | 0 .../content/DatePicker.qml | 0 .../content/StockChart.qml | 0 .../content/StockListModel.qml | 0 .../content/StockListView.qml | 0 .../content/StockModel.qml | 0 .../content/StockSettings.qml | 0 .../content/StockView.qml | 0 .../content/images/icon-calendar-anim.png | Bin .../content/images/icon-calendar.png | Bin .../content/images/icon-items.png | Bin .../content/images/icon-settings.png | Bin .../content/images/logo.png | Bin .../content/images/stock-selected.png | Bin .../content/images/wheel-touch.png | Bin .../content/images/wheel.png | Bin examples/demos/stocqt/main.cpp | 41 ++++++++++++++++++ examples/demos/stocqt/stocqt.pro | 9 ++++ examples/demos/stocqt/stocqt.qdoc | 39 +++++++++++++++++ .../main.qml => stocqt/stocqt.qml} | 0 examples/demos/stocqt/stocqt.qmlproject | 16 +++++++ 23 files changed, 107 insertions(+), 1 deletion(-) create mode 100644 doc/src/images/qml-stocqt-demo-small.png rename examples/demos/{stockchart => stocqt}/content/Button.qml (100%) rename examples/demos/{stockchart => stocqt}/content/DatePicker.qml (100%) rename examples/demos/{stockchart => stocqt}/content/StockChart.qml (100%) rename examples/demos/{stockchart => stocqt}/content/StockListModel.qml (100%) rename examples/demos/{stockchart => stocqt}/content/StockListView.qml (100%) rename examples/demos/{stockchart => stocqt}/content/StockModel.qml (100%) rename examples/demos/{stockchart => stocqt}/content/StockSettings.qml (100%) rename examples/demos/{stockchart => stocqt}/content/StockView.qml (100%) rename examples/demos/{stockchart => stocqt}/content/images/icon-calendar-anim.png (100%) rename examples/demos/{stockchart => stocqt}/content/images/icon-calendar.png (100%) rename examples/demos/{stockchart => stocqt}/content/images/icon-items.png (100%) rename examples/demos/{stockchart => stocqt}/content/images/icon-settings.png (100%) rename examples/demos/{stockchart => stocqt}/content/images/logo.png (100%) rename examples/demos/{stockchart => stocqt}/content/images/stock-selected.png (100%) rename examples/demos/{stockchart => stocqt}/content/images/wheel-touch.png (100%) rename examples/demos/{stockchart => stocqt}/content/images/wheel.png (100%) create mode 100644 examples/demos/stocqt/main.cpp create mode 100644 examples/demos/stocqt/stocqt.pro create mode 100644 examples/demos/stocqt/stocqt.qdoc rename examples/demos/{stockchart/main.qml => stocqt/stocqt.qml} (100%) create mode 100644 examples/demos/stocqt/stocqt.qmlproject diff --git a/doc/src/images/qml-stocqt-demo-small.png b/doc/src/images/qml-stocqt-demo-small.png new file mode 100644 index 0000000000000000000000000000000000000000..0f8a32f4f1b366f576402ebc83e5498ff783e447 GIT binary patch literal 2721 zcmcImXHXMb7ES^P1R}ztiGfIyCh!CaJX+94Q%FKD3gH2v3M5iP=P5N(giszOfb^nN z>Fv>^BS;Ayl`g%jAZ&Jbc4l|B{M$Qo?wK>^&bi<D?wxzTC_R)G1k3{l0058&+Uf>W zAM#gYxI&#fRjmi8j@IM;10x3N2w=cQQe#HEwz&s&J%wu4z`eQzO#lG=>jU+BMud!Q z@&N8e4{u0Y;LCv(;#=*gWOYTBcvPN(Gn0bA2!_olOsZwv5qLVTBYoU9VvGL4m0`%D zVlJ{~qE=zRuFYihP`~S$z-&@leNHB;SiC?AyOqkzrb*dkU8xo9YLosPnRh4XEPZis z*fFWHa`YCPwSIXcD4|pXd{e;y&>jzBh-Fv9=K-Dx(p`g!g?!Wo`h{Arn_7m+#)CYc z+3zo?KO4<H_<&sGeQ}(9KSc{X!e3GlREYlU)38&{o7=}NsCo9BPbif~xn@YsCbAN^ z_yY0u_QC^*4BI-A7cD@yE?}PptINlU(@I_zyB-L0H@mUA1j9S5!;i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*?94jOgfqO#e)xs28lOdPwbxKh(NXD&Yj+&L-T{6&@fMRjAQSJ)p= zbigHD$XMShwMF|?&Ij*ubz^%{Qy(jP_b724EeDB^)U?W|*VNu^-{AOSUi!n@jt}Oi zk4IGoQIR(w84NXz3p_myN^<Q#A`aaQsn_=WLLSyQx`XXvyB~sElA+NPp~LTdcAQf7 zX3bFY5GL7qsrbB3O@+qMNcs-z2wBO|<NfqgqO?2E3>(;^QKu9Sx+axSKD<X{YJ-<S zlu4+<_W(QZ3xv>;KAKH?O{$H#gK0zzRiv`nC4Jjr4(=;VQjsb6gxvjP{1QYM9Bn%A z3Yg?yqxrXQpH}PdieOaG<aE*aGfV9SvX;v(t833`{0q`^z&}OKSlA^qh$)h*=l6vS zM2o@ZMSu5<HI1d*e$H0)h*6D5k4(TD4)k$2WguWv{WXC4tc=Ya8RVbgBz}H78Fi4e zMRF|pP;DEA41S*+KH-0qj=lQdG{`@|{0DjRKT|Mfx+YA~D5hXVV_IZ%wtT`9!?z-w zR&rwBU~(pZynN1~OprA$F8(?1${rODZOo*^w0|X0lLAV-S~|YDP{s`6W~T4sO~kZX zM-ZyuBaUyA!;fuRG8ZY2B4<jyB9ok39CSMU_Wuvqr65hT?oLy5@j9J~TGZgCyOWti jFZ5r<**|qZd<iVCH&1YER?nbnOuz#TlzQ3y-=6&iAm#c{ literal 0 HcmV?d00001 diff --git a/examples/demos/demos.pro b/examples/demos/demos.pro index 1cc19cdf00..00fb8d8b88 100644 --- a/examples/demos/demos.pro +++ b/examples/demos/demos.pro @@ -2,4 +2,5 @@ TEMPLATE = subdirs SUBDIRS = calqlatr \ samegame \ tweetsearch \ - maroon + maroon \ + stocqt diff --git a/examples/demos/stockchart/content/Button.qml b/examples/demos/stocqt/content/Button.qml similarity index 100% rename from examples/demos/stockchart/content/Button.qml rename to examples/demos/stocqt/content/Button.qml diff --git a/examples/demos/stockchart/content/DatePicker.qml b/examples/demos/stocqt/content/DatePicker.qml similarity index 100% rename from examples/demos/stockchart/content/DatePicker.qml rename to examples/demos/stocqt/content/DatePicker.qml diff --git a/examples/demos/stockchart/content/StockChart.qml b/examples/demos/stocqt/content/StockChart.qml similarity index 100% rename from examples/demos/stockchart/content/StockChart.qml rename to examples/demos/stocqt/content/StockChart.qml diff --git a/examples/demos/stockchart/content/StockListModel.qml b/examples/demos/stocqt/content/StockListModel.qml similarity index 100% rename from examples/demos/stockchart/content/StockListModel.qml rename to examples/demos/stocqt/content/StockListModel.qml diff --git a/examples/demos/stockchart/content/StockListView.qml b/examples/demos/stocqt/content/StockListView.qml similarity index 100% rename from examples/demos/stockchart/content/StockListView.qml rename to examples/demos/stocqt/content/StockListView.qml diff --git a/examples/demos/stockchart/content/StockModel.qml b/examples/demos/stocqt/content/StockModel.qml similarity index 100% rename from examples/demos/stockchart/content/StockModel.qml rename to examples/demos/stocqt/content/StockModel.qml diff --git a/examples/demos/stockchart/content/StockSettings.qml b/examples/demos/stocqt/content/StockSettings.qml similarity index 100% rename from examples/demos/stockchart/content/StockSettings.qml rename to examples/demos/stocqt/content/StockSettings.qml diff --git a/examples/demos/stockchart/content/StockView.qml b/examples/demos/stocqt/content/StockView.qml similarity index 100% rename from examples/demos/stockchart/content/StockView.qml rename to examples/demos/stocqt/content/StockView.qml diff --git a/examples/demos/stockchart/content/images/icon-calendar-anim.png b/examples/demos/stocqt/content/images/icon-calendar-anim.png similarity index 100% rename from examples/demos/stockchart/content/images/icon-calendar-anim.png rename to examples/demos/stocqt/content/images/icon-calendar-anim.png diff --git a/examples/demos/stockchart/content/images/icon-calendar.png b/examples/demos/stocqt/content/images/icon-calendar.png similarity index 100% rename from examples/demos/stockchart/content/images/icon-calendar.png rename to examples/demos/stocqt/content/images/icon-calendar.png diff --git a/examples/demos/stockchart/content/images/icon-items.png b/examples/demos/stocqt/content/images/icon-items.png similarity index 100% rename from examples/demos/stockchart/content/images/icon-items.png rename to examples/demos/stocqt/content/images/icon-items.png diff --git a/examples/demos/stockchart/content/images/icon-settings.png b/examples/demos/stocqt/content/images/icon-settings.png similarity index 100% rename from examples/demos/stockchart/content/images/icon-settings.png rename to examples/demos/stocqt/content/images/icon-settings.png diff --git a/examples/demos/stockchart/content/images/logo.png b/examples/demos/stocqt/content/images/logo.png similarity index 100% rename from examples/demos/stockchart/content/images/logo.png rename to examples/demos/stocqt/content/images/logo.png diff --git a/examples/demos/stockchart/content/images/stock-selected.png b/examples/demos/stocqt/content/images/stock-selected.png similarity index 100% rename from examples/demos/stockchart/content/images/stock-selected.png rename to examples/demos/stocqt/content/images/stock-selected.png diff --git a/examples/demos/stockchart/content/images/wheel-touch.png b/examples/demos/stocqt/content/images/wheel-touch.png similarity index 100% rename from examples/demos/stockchart/content/images/wheel-touch.png rename to examples/demos/stocqt/content/images/wheel-touch.png diff --git a/examples/demos/stockchart/content/images/wheel.png b/examples/demos/stocqt/content/images/wheel.png similarity index 100% rename from examples/demos/stockchart/content/images/wheel.png rename to examples/demos/stocqt/content/images/wheel.png diff --git a/examples/demos/stocqt/main.cpp b/examples/demos/stocqt/main.cpp new file mode 100644 index 0000000000..c1cd949209 --- /dev/null +++ b/examples/demos/stocqt/main.cpp @@ -0,0 +1,41 @@ +/**************************************************************************** +** +** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). +** Contact: http://www.qt-project.org/ +** +** This file is part of the examples of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:BSD$ +** You may use this file under the terms of the BSD license as follows: +** +** "Redistribution and use in source and binary forms, with or without +** modification, are permitted provided that the following conditions are +** met: +** * Redistributions of source code must retain the above copyright +** notice, this list of conditions and the following disclaimer. +** * Redistributions in binary form must reproduce the above copyright +** notice, this list of conditions and the following disclaimer in +** the documentation and/or other materials provided with the +** distribution. +** * Neither the name of Nokia Corporation and its Subsidiary(-ies) nor +** the names of its contributors may be used to endorse or promote +** products derived from this software without specific prior written +** permission. +** +** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." +** +** $QT_END_LICENSE$ +** +****************************************************************************/ +#include "../../shared/shared.h" +DECLARATIVE_EXAMPLE_MAIN(stocqt) diff --git a/examples/demos/stocqt/stocqt.pro b/examples/demos/stocqt/stocqt.pro new file mode 100644 index 0000000000..74d27559d8 --- /dev/null +++ b/examples/demos/stocqt/stocqt.pro @@ -0,0 +1,9 @@ +TEMPLATE = app + +QT += qml quick +SOURCES += main.cpp + +target.path = $$[QT_INSTALL_EXAMPLES]/qtdeclarative/demos/stocqt +qml.files = stocqt.qml content +qml.path = $$[QT_INSTALL_EXAMPLES]/qtdeclarative/demos/stocqt +INSTALLS += target qml diff --git a/examples/demos/stocqt/stocqt.qdoc b/examples/demos/stocqt/stocqt.qdoc new file mode 100644 index 0000000000..eb03c073de --- /dev/null +++ b/examples/demos/stocqt/stocqt.qdoc @@ -0,0 +1,39 @@ +/**************************************************************************** +** +** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). +** Contact: http://www.qt-project.org/ +** +** This file is part of the documentation of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:FDL$ +** GNU Free Documentation License +** Alternatively, this file may be used under the terms of the GNU Free +** Documentation License version 1.3 as published by the Free Software +** Foundation and appearing in the file included in the packaging of +** this file. +** +** Other Usage +** Alternatively, this file may be used in accordance with the terms +** and conditions contained in a signed written agreement between you +** and Nokia. +** +** +** +** +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +/*! + \title QML Demo - StocQt + \example demos/StocQt + \brief This is an example stock chart viewer written in QML. + \image qml-stocqt-demo-small.png + + This demo implements a simple stock chart viewer, designed for portrait devices. + + This app requests online data, which it processes in javascript. It then paints a chart depiction of the data using + the Canvas imperative drawing API. +*/ + diff --git a/examples/demos/stockchart/main.qml b/examples/demos/stocqt/stocqt.qml similarity index 100% rename from examples/demos/stockchart/main.qml rename to examples/demos/stocqt/stocqt.qml diff --git a/examples/demos/stocqt/stocqt.qmlproject b/examples/demos/stocqt/stocqt.qmlproject new file mode 100644 index 0000000000..11ab78418a --- /dev/null +++ b/examples/demos/stocqt/stocqt.qmlproject @@ -0,0 +1,16 @@ +import QmlProject 1.1 + +Project { + mainFile: "stocqt.qml" + + /* Include .qml, .js, and image files from current directory and subdirectories */ + QmlFiles { + directory: "." + } + JavaScriptFiles { + directory: "." + } + ImageFiles { + directory: "." + } +} -- GitLab