diff options
Diffstat (limited to 'src/plugins/qmldesigner/qtquickplugin')
8 files changed, 802 insertions, 117 deletions
diff --git a/src/plugins/qmldesigner/qtquickplugin/qtquickplugin.qrc b/src/plugins/qmldesigner/qtquickplugin/qtquickplugin.qrc index 3293af8962..b2dcfce06a 100644 --- a/src/plugins/qmldesigner/qtquickplugin/qtquickplugin.qrc +++ b/src/plugins/qmldesigner/qtquickplugin/qtquickplugin.qrc @@ -32,10 +32,16 @@ <file>images/text-input-icon16.png</file> <file>images/webview-icon16.png</file> <file>source/listview.qml</file> + <file>source/listviewv2.qml</file> <file>source/gridview.qml</file> + <file>source/gridviewv2.qml</file> <file>source/pathview.qml</file> + <file>source/pathviewv2.qml</file> <file>source/text.qml</file> + <file>source/textv2.qml</file> <file>source/textedit.qml</file> + <file>source/texteditv2.qml</file> <file>source/textinput.qml</file> + <file>source/textinputv2.qml</file> </qresource> </RCC> diff --git a/src/plugins/qmldesigner/qtquickplugin/quick.metainfo b/src/plugins/qmldesigner/qtquickplugin/quick.metainfo index be74404a75..a891ed2117 100644 --- a/src/plugins/qmldesigner/qtquickplugin/quick.metainfo +++ b/src/plugins/qmldesigner/qtquickplugin/quick.metainfo @@ -1,117 +1,454 @@ -<metainfo> - <node name="QtQuick.Item" icon=":/qtquickplugin/images/item-icon16.png"> - <itemlibraryentry name="Item" category="Qt Quick - Basic" libraryIcon=":/qtquickplugin/images/item-icon.png" version="1.0"> - <property name="width" type="int" value="200"/> - <property name="height" type="int" value="200"/> - </itemlibraryentry> - </node> - <node name="QtQuick.Rectangle" icon=":/qtquickplugin/images/rect-icon16.png"> - <itemlibraryentry name="Rectangle" category="Qt Quick - Basic" libraryIcon=":/qtquickplugin/images/rect-icon.png" version="1.0"> - <property name="color" type="QColor" value="#ffffff"/> - <property name="width" type="int" value="200"/> - <property name="height" type="int" value="200"/> - </itemlibraryentry> - </node> - <node name="QtQuick.Text" icon=":/qtquickplugin/images/text-icon16.png"> - <itemlibraryentry name="Text" category="Qt Quick - Basic" libraryIcon=":/qtquickplugin/images/text-icon.png" version="1.0"> - <qml source=":/qtquickplugin/source/text.qml"/> - </itemlibraryentry> - </node> - <node name="QtQuick.TextEdit" icon=":/qtquickplugin/images/text-edit-icon16.png"> - <itemlibraryentry name="Text Edit" category="Qt Quick - Basic" libraryIcon=":/qtquickplugin/images/text-edit-icon.png" version="1.0"> - <qml source=":/qtquickplugin/source/textedit.qml"/> - </itemlibraryentry> - </node> - <node name="QtQuick.TextInput" icon=":/qtquickplugin/images/text-input-icon16.png"> - <itemlibraryentry name="Text Input" category="Qt Quick - Basic" libraryIcon=":/qtquickplugin/images/text-input-icon.png" version="1.0"> - <qml source=":/qtquickplugin/source/textinput.qml"/> - </itemlibraryentry> - </node> - <node name="QtQuick.MouseArea" icon=":/qtquickplugin/images/mouse-area-icon16.png"> - <itemlibraryentry name="Mouse Area" category="Qt Quick - Basic" libraryIcon=":/qtquickplugin/images/mouse-area-icon.png" version="1.0"> - <property name="width" type="int" value="100"/> - <property name="height" type="int" value="100"/> - </itemlibraryentry> - </node> - <node name="QtQuick.Image" icon=":/qtquickplugin/images/image-icon16.png"> - <itemlibraryentry name="Image" category="Qt Quick - Basic" libraryIcon=":/qtquickplugin/images/image-icon.png" version="1.0"> - <property name="width" type="int" value="100"/> - <property name="height" type="int" value="100"/> - <property name="source" type="QUrl" value="qrc:/qtquickplugin/images/template_image.png"/> - </itemlibraryentry> - </node> - <node name="QtQuick.BorderImage" icon=":/qtquickplugin/images/border-image-icon16.png"> - <itemlibraryentry name="Border Image" category="Qt Quick - Basic" libraryIcon=":/qtquickplugin/images/border-image-icon.png" version="1.0"> - <property name="width" type="int" value="100"/> - <property name="height" type="int" value="100"/> - <property name="source" type="QUrl" value="qrc:/qtquickplugin/images/template_image.png"/> - </itemlibraryentry> - </node> - <node name="QtQuick.Flickable" icon=":/qtquickplugin/images/flickable-icon16.png"> - <itemlibraryentry name="Flickable" category="Qt Quick - Basic" libraryIcon=":/qtquickplugin/images/flickable-icon.png" version="1.0"> - <property name="width" type="int" value="300"/> - <property name="height" type="int" value="300"/> - </itemlibraryentry> - </node> - <node name="QtQuick.Flipable" icon=":/qtquickplugin/images/flipable-icon16.png"> - <itemlibraryentry name="Flipable" category="Qt Quick - Basic" libraryIcon=":/qtquickplugin/images/flipable-icon.png" version="1.0"> - <property name="width" type="int" value="300"/> - <property name="height" type="int" value="300"/> - </itemlibraryentry> - </node> - <node name="QtQuick.GridView" icon=":/qtquickplugin/images/gridview-icon16.png"> - <itemlibraryentry name="Grid View" category="Qt Quick - Views" libraryIcon=":/qtquickplugin/images/gridview-icon.png" version="1.0"> - <qml source=":/qtquickplugin/source/gridview.qml"/> - </itemlibraryentry> - </node> - - <node name="QtQuick.ListView" icon=":/qtquickplugin/images/listview-icon16.png"> - <itemlibraryentry name="List View" category="Qt Quick - Views" libraryIcon=":/qtquickplugin/images/listview-icon.png" version="1.0"> - <qml source=":/qtquickplugin/source/listview.qml"/> - </itemlibraryentry> - </node> - - <node name="QtQuick.PathView" icon=":/qtquickplugin/images/pathview-icon16.png"> - <itemlibraryentry name="Path View" category="Qt Quick - Views" libraryIcon=":/qtquickplugin/images/pathview-icon.png" version="1.0"> - <qml source=":/qtquickplugin/source/pathview.qml"/> - </itemlibraryentry> - </node> - - <node name="QtQuick.FocusScope" icon=":/qtquickplugin/images/focusscope-icon16.png"> - <itemlibraryentry name="Focus Scope" category="Qt Quick - Basic" libraryIcon=":/qtquickplugin/images/focusscope-icon.png" version="1.0"> - <property name="width" type="int" value="100"/> - <property name="height" type="int" value="100"/> - </itemlibraryentry> - </node> - <node name="QtWebKit.WebView" icon=":/qtquickplugin/images/webview-icon16.png"> - <itemlibraryentry name="Web View" category="Qt Quick - Basic" libraryIcon=":/qtquickplugin/images/webview-icon.png" version="1.0" requiredImport="QtWebKit" forceImport="true"> - <property name="width" type="int" value="300"/> - <property name="height" type="int" value="300"/> - <property name="url" type="QString" value="qrc:/qtquickplugin/html/welcome.html"/> - </itemlibraryentry> - </node> - <node name="QtQuick.Row" icon=":/qtquickplugin/images/item-icon16.png"> - <itemlibraryentry name="Row" category="Qt Quick - Positioner" libraryIcon=":/qtquickplugin/images/item-icon.png" version="1.0"> - <property name="width" type="int" value="400"/> - <property name="height" type="int" value="200"/> - </itemlibraryentry> - </node> - <node name="QtQuick.Column" icon=":/qtquickplugin/images/item-icon16.png"> - <itemlibraryentry name="Column" category="Qt Quick - Positioner" libraryIcon=":/qtquickplugin/images/item-icon.png" version="1.0"> - <property name="width" type="int" value="200"/> - <property name="height" type="int" value="400"/> - </itemlibraryentry> - </node> - <node name="QtQuick.Grid" icon=":/qtquickplugin/images/item-icon16.png"> - <itemlibraryentry name="Grid" category="Qt Quick - Positioner" libraryIcon=":/qtquickplugin/images/item-icon.png" version="1.0"> - <property name="width" type="int" value="400"/> - <property name="height" type="int" value="400"/> - </itemlibraryentry> - </node> - <node name="QtQuick.Flow" icon=":/qtquickplugin/images/item-icon16.png"> - <itemlibraryentry name="Flow" category="Qt Quick - Positioner" libraryIcon=":/qtquickplugin/images/item-icon.png" version="1.0"> - <property name="width" type="int" value="400"/> - <property name="height" type="int" value="400"/> - </itemlibraryentry> - </node> - </metainfo> +MetaInfo { + + Type { + name: "QtQuick.Item" + icon: ":/qtquickplugin/images/item-icon16.png" + + ItemLibraryEntry { + name: "Item" + category: "Qt Quick - Basic" + libraryIcon: ":/qtquickplugin/images/item-icon.png" + version: "1.0" + + Property { name: "width"; type: "int"; value: 200; } + Property { name: "height"; type: "int"; value: 200; } + } + + ItemLibraryEntry { + name: "Item" + category: "Qt Quick - Basic" + libraryIcon: ":/qtquickplugin/images/item-icon.png" + version: "2.0" + + Property { name: "width"; type: "int"; value: 200; } + Property { name: "height"; type: "int"; value: 200; } + } + } + + Type { + name: "QtQuick.Rectangle" + icon: ":/qtquickplugin/images/rect-icon16.png" + + ItemLibraryEntry { + name: "Rectangle" + category: "Qt Quick - Basic" + libraryIcon: ":/qtquickplugin/images/rect-icon.png" + version: "1.0" + + Property { name: "width"; type: "int"; value: 200; } + Property { name: "height"; type: "int"; value: 200; } + Property { name: "color"; type: "QColor"; value: "#ffffff"; } + + } + + ItemLibraryEntry { + name: "Rectangle" + category: "Qt Quick - Basic" + libraryIcon: ":/qtquickplugin/images/rect-icon.png" + version: "2.0" + + Property { name: "width"; type: "int"; value: 200; } + Property { name: "height"; type: "int"; value: 200; } + Property { name: "color"; type: "QColor"; value: "#ffffff"; } + } + } + + Type { + name: "QtQuick.Text" + icon: ":/qtquickplugin/images/text-icon16.png" + + ItemLibraryEntry { + name: "Text" + category: "Qt Quick - Basic" + libraryIcon: ":/qtquickplugin/images/text-icon.png" + version: "1.0" + + QmlSource { source: ":/qtquickplugin/source/text.qml" } + } + + ItemLibraryEntry { + name: "Text" + category: "Qt Quick - Basic" + libraryIcon: ":/qtquickplugin/images/text-icon.png" + version: "2.0" + + QmlSource { source: ":/qtquickplugin/source/textv2.qml" } + } + } + + Type { + name: "QtQuick.TextEdit" + icon: ":/qtquickplugin/images/text-edit-icon16.png" + + ItemLibraryEntry { + name: "Text Edit" + category: "Qt Quick - Basic" + libraryIcon: ":/qtquickplugin/images/text-edit-icon.png" + version: "1.0" + + QmlSource { source: ":/qtquickplugin/source/textedit.qml" } + } + + ItemLibraryEntry { + name: "Text Edit" + category: "Qt Quick - Basic" + libraryIcon: ":/qtquickplugin/images/text-edit-icon.png" + version: "2.0" + + QmlSource { source: ":/qtquickplugin/source/texteditv2.qml" } + } + } + + Type { + name: "QtQuick.TextInput" + icon: ":/qtquickplugin/images/text-input-icon16.png" + + ItemLibraryEntry { + name: "Text Input" + category: "Qt Quick - Basic" + libraryIcon: ":/qtquickplugin/images/text-edit-icon.png" + version: "1.0" + + QmlSource { source: ":/qtquickplugin/source/textinput.qml" } + } + + ItemLibraryEntry { + name: "Text Input" + category: "Qt Quick - Basic" + libraryIcon: ":/qtquickplugin/images/text-input-icon.png" + version: "2.0" + + QmlSource { source: ":/qtquickplugin/source/textinput.qml" } + } + } + + Type { + name: "QtQuick.MouseArea" + icon: ":/qtquickplugin/images/mouse-area-icon16.png" + + ItemLibraryEntry { + name: "MouseArea" + category: "Qt Quick - Basic" + libraryIcon: ":/qtquickplugin/images/mouse-area-icon.png" + version: "1.0" + + Property { name: "width"; type: "int"; value: 100; } + Property { name: "height"; type: "int"; value: 100; } + + } + + ItemLibraryEntry { + name: "MouseArea" + category: "Qt Quick - Basic" + libraryIcon: ":/qtquickplugin/images/mouse-area-icon.png" + version: "2.0" + + Property { name: "width"; type: "int"; value: 100; } + Property { name: "height"; type: "int"; value: 100; } + } + } + + Type { + name: "QtQuick.Image" + icon: ":/qtquickplugin/images/image-icon16.png" + + ItemLibraryEntry { + name: "Image" + category: "Qt Quick - Basic" + libraryIcon: ":/qtquickplugin/images/image-icon.png" + version: "1.0" + + Property { name: "width"; type: "int"; value: 100; } + Property { name: "height"; type: "int"; value: 100; } + Property { name: "source"; type: "QUrl"; value:"qrc:/qtquickplugin/images/template_image.png"; } + } + + ItemLibraryEntry { + name: "Image" + category: "Qt Quick - Basic" + libraryIcon: ":/qtquickplugin/images/image-icon.png" + version: "2.0" + + Property { name: "width"; type: "int"; value: 100; } + Property { name: "height"; type: "int"; value: 100; } + Property { name: "source"; type: "QUrl"; value:"qrc:/qtquickplugin/images/template_image.png"; } + } + } + + Type { + name: "QtQuick.BorderImage" + icon: ":/qtquickplugin/images/border-image-icon16.png" + + ItemLibraryEntry { + name: "Border Image" + category: "Qt Quick - Basic" + libraryIcon: ":/qtquickplugin/images/border-image-icon.png" + version: "1.0" + + Property { name: "width"; type: "int"; value: 100; } + Property { name: "height"; type: "int"; value: 100; } + Property { name: "source"; type: "QUrl"; value:"qrc:/qtquickplugin/images/template_image.png"; } + } + + ItemLibraryEntry { + name: "Border Image" + category: "Qt Quick - Basic" + libraryIcon: ":/qtquickplugin/images/border-image-icon.png" + version: "2.0" + + Property { name: "width"; type: "int"; value: 100; } + Property { name: "height"; type: "int"; value: 100; } + Property { name: "source"; type: "QUrl"; value:"qrc:/qtquickplugin/images/template_image.png"; } + } + } + + Type { + name: "QtQuick.Flickable" + icon: ":/qtquickplugin/images/flickable-icon16.png" + + ItemLibraryEntry { + name: "Flickable" + category: "Qt Quick - Basic" + libraryIcon: ":/qtquickplugin/images/flickable-icon.png" + version: "1.0" + + Property { name: "width"; type: "int"; value: 300; } + Property { name: "height"; type: "int"; value: 300; } + } + + ItemLibraryEntry { + name: "Flickable" + category: "Qt Quick - Basic" + libraryIcon: ":/qtquickplugin/images/flickable-icon.png" + version: "2.0" + + Property { name: "width"; type: "int"; value: 300; } + Property { name: "height"; type: "int"; value: 300; } + } + } + + Type { + name: "QtQuick.Flipable" + icon: ":/qtquickplugin/images/flipable-icon16.png" + + ItemLibraryEntry { + name: "Flipable" + category: "Qt Quick - Basic" + libraryIcon: ":/qtquickplugin/images/flipable-icon.png" + version: "1.0" + + Property { name: "width"; type: "int"; value: 200; } + Property { name: "height"; type: "int"; value: 200; } + } + + ItemLibraryEntry { + name: "Flipable" + category: "Qt Quick - Basic" + libraryIcon: ":/qtquickplugin/images/flipable-icon.png" + version: "2.0" + + Property { name: "width"; type: "int"; value: 200; } + Property { name: "height"; type: "int"; value: 200; } + } + } + + Type { + name: "QtQuick.GridView" + icon: ":/qtquickplugin/images/gridview-icon16.png" + + ItemLibraryEntry { + name: "Grid View" + category: "Qt Quick - Views" + libraryIcon: ":/qtquickplugin/images/gridview-icon.png" + version: "1.0" + + QmlSource { source: ":/qtquickplugin/source/gridview.qml" } + } + + ItemLibraryEntry { + name: "Grid View" + category: "Qt Quick - Views" + libraryIcon: ":/qtquickplugin/images/gridview-icon.png" + version: "2.0" + + QmlSource { source: ":/qtquickplugin/source/gridviewv2.qml" } + } + } + + Type { + name: "QtQuick.ListView" + icon: ":/qtquickplugin/images/listview-icon16.png" + + ItemLibraryEntry { + name: "List View" + category: "Qt Quick - Views" + libraryIcon: ":/qtquickplugin/images/pathview-icon.png" + version: "1.0" + + QmlSource { source: ":/qtquickplugin/source/listview.qml" } + } + + ItemLibraryEntry { + name: "List View" + category: "Qt Quick - Views" + libraryIcon: ":/qtquickplugin/images/pathview-icon.png" + version: "2.0" + + QmlSource { source: ":/qtquickplugin/source/listviewv2.qml" } + } + } + + Type { + name: "QtQuick.PathView" + icon: ":/qtquickplugin/images/pathview-icon16.png" + + ItemLibraryEntry { + name: "Path View" + category: "Qt Quick - Views" + libraryIcon: ":/qtquickplugin/images/pathview-icon.png" + version: "1.0" + + QmlSource { source: ":/qtquickplugin/source/pathview.qml" } + } + + ItemLibraryEntry { + name: "Path View" + category: "Qt Quick - Views" + libraryIcon: ":/qtquickplugin/images/pathview-icon.png" + version: "2.0" + + QmlSource { source: ":/qtquickplugin/source/pathviewv2.qml" } + } + } + + Type { + name: "QtQuick.FocusScope" + icon: ":/qtquickplugin/images/focusscope-icon16.png" + + ItemLibraryEntry { + name: "Focus Scope" + category: "Qt Quick - Basic" + libraryIcon: ":/qtquickplugin/images/focusscope-icon.png" + version: "1.0" + + Property { name: "width"; type: "int"; value: 100; } + Property { name: "height"; type: "int"; value: 100; } + } + + ItemLibraryEntry { + name: "Focus Scope" + category: "Qt Quick - Basic" + libraryIcon: ":/qtquickplugin/images/focusscope-icon.png" + version: "2.0" + + Property { name: "width"; type: "int"; value: 100; } + Property { name: "height"; type: "int"; value: 100; } + } + } + + Type { + name: "QtWebKit.WebView" + icon: ":/qtquickplugin/images/webview-icon16.png" + + ItemLibraryEntry { + name: "Web View" + category: "Qt Quick - Basic" + libraryIcon: ":/qtquickplugin/webview-icon.png" + version: "1.0" + requiredImport: "QtWebKit" + forceImport: "true" + + Property { name: "width"; type: "int"; value: 300; } + Property { name: "height"; type: "int"; value: 300; } + Property { name: "url"; type: "QString"; value: "qrc:/qtquickplugin/html/welcome.html" } + } + + ItemLibraryEntry { + name: "Web View" + category: "Qt Quick - Basic" + libraryIcon: ":/qtquickplugin/images/webview-icon.png" + version: "2.0" + requiredImport: "QtWebKit" + forceImport: "true" + + Property { name: "width"; type: "int"; value: 300; } + Property { name: "height"; type: "int"; value: 300; } + Property { name: "url"; type: "QString"; value: "qrc:/qtquickplugin/html/welcome.html" } + } + } + + Type { + name: "QtQuick.Column" + icon: ":/qtquickplugin/images/item-icon16.png" + + ItemLibraryEntry { + name: "Column" + category: "Qt Quick - Positioner" + libraryIcon: ":/qtquickplugin/images/item-icon.png" + version: "1.0" + + Property { name: "width"; type: "int"; value: 200; } + Property { name: "height"; type: "int"; value: 400; } + } + + ItemLibraryEntry { + name: "Column" + category: "Qt Quick - Positioner" + libraryIcon: ":/qtquickplugin/images/item-icon.png" + version: "2.0" + + Property { name: "width"; type: "int"; value: 200; } + Property { name: "height"; type: "int"; value: 400; } + } + } + + Type { + name: "QtQuick.Grid" + icon: ":/qtquickplugin/images/item-icon16.png" + + ItemLibraryEntry { + name: "Grid" + category: "Qt Quick - Positioner" + libraryIcon: ":/qtquickplugin/images/item-icon.png" + version: "1.0" + + Property { name: "width"; type: "int"; value: 400; } + Property { name: "height"; type: "int"; value: 400; } + } + + ItemLibraryEntry { + name: "Grid" + category: "Qt Quick - Positioner" + libraryIcon: ":/qtquickplugin/images/item-icon.png" + version: "2.0" + + Property { name: "width"; type: "int"; value: 400; } + Property { name: "height"; type: "int"; value: 400; } + } + } + + Type { + name: "QtQuick.Flow" + icon: ":/qtquickplugin/images/item-icon16.png" + + ItemLibraryEntry { + name: "Flow" + category: "Qt Quick - Positioner" + libraryIcon: ":/qtquickplugin/images/item-icon.png" + version: "1.0" + + Property { name: "width"; type: "int"; value: 400; } + Property { name: "height"; type: "int"; value: 400; } + } + + ItemLibraryEntry { + name: "Flow" + category: "Qt Quick - Positioner" + libraryIcon: ":/qtquickplugin/images/item-icon.png" + version: "2.0" + + Property { name: "width"; type: "int"; value: 400; } + Property { name: "height"; type: "int"; value: 400; } + } + } +} diff --git a/src/plugins/qmldesigner/qtquickplugin/source/gridviewv2.qml b/src/plugins/qmldesigner/qtquickplugin/source/gridviewv2.qml new file mode 100644 index 0000000000..9532a65daf --- /dev/null +++ b/src/plugins/qmldesigner/qtquickplugin/source/gridviewv2.qml @@ -0,0 +1,87 @@ +/**************************************************************************** +** +** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies). +** Contact: http://www.qt-project.org/legal +** +** This file is part of Qt Creator. +** +** Commercial License Usage +** Licensees holding valid commercial Qt licenses may use this file in +** accordance with the commercial license agreement provided with the +** Software or, alternatively, in accordance with the terms contained in +** a written agreement between you and Digia. For licensing terms and +** conditions see http://qt.digia.com/licensing. For further information +** use the contact form at http://qt.digia.com/contact-us. +** +** 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, Digia gives you certain additional +** rights. These rights are described in the Digia Qt LGPL Exception +** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +** +****************************************************************************/ + +import QtQuick 2.0 + +GridView { + width: 140 + height: 140 + cellWidth: 70 + cellHeight: 70 + + model: ListModel { + + ListElement { + name: "Grey" + colorCode: "grey" + + } + + ListElement { + name: "Red" + colorCode: "red" + + } + + ListElement { + name: "Blue" + colorCode: "blue" + + } + + ListElement { + name: "Green" + colorCode: "green" + + } + } + + delegate: Item { + height: 50 + x: 5 + + Column { + spacing: 5 + Rectangle { + width: 40 + height: 40 + color: colorCode + anchors.horizontalCenter: parent.horizontalCenter + } + + Text { + x: 5 + text: name + anchors.horizontalCenter: parent.horizontalCenter + font.bold: true + } + + } + } +} diff --git a/src/plugins/qmldesigner/qtquickplugin/source/listviewv2.qml b/src/plugins/qmldesigner/qtquickplugin/source/listviewv2.qml new file mode 100644 index 0000000000..70338dfde1 --- /dev/null +++ b/src/plugins/qmldesigner/qtquickplugin/source/listviewv2.qml @@ -0,0 +1,68 @@ +/**************************************************************************** +** +** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies). +** Contact: http://www.qt-project.org/legal +** +** This file is part of Qt Creator. +** +** Commercial License Usage +** Licensees holding valid commercial Qt licenses may use this file in +** accordance with the commercial license agreement provided with the +** Software or, alternatively, in accordance with the terms contained in +** a written agreement between you and Digia. For licensing terms and +** conditions see http://qt.digia.com/licensing. For further information +** use the contact form at http://qt.digia.com/contact-us. +** +** 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, Digia gives you certain additional +** rights. These rights are described in the Digia Qt LGPL Exception +** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +** +****************************************************************************/ + +import QtQuick 2.0 + +ListView { + width: 110 + height: 160 + model: ListModel { + ListElement { + name: "Grey" + colorCode: "grey" + } + ListElement { + name: "Red" + colorCode: "red" + } + ListElement { + name: "Blue" + colorCode: "blue" + } + ListElement { + name: "Green" + colorCode: "green" + } + } + + delegate: Item { + height: 40 + x: 5 + Row { + id: row1 + spacing: 10 + Rectangle { width: 40; height: 40; color: colorCode; } + Text { + text: name + anchors.verticalCenter: parent.verticalCenter + font.bold: true + } + } + } +} diff --git a/src/plugins/qmldesigner/qtquickplugin/source/pathviewv2.qml b/src/plugins/qmldesigner/qtquickplugin/source/pathviewv2.qml new file mode 100644 index 0000000000..97fbf887a5 --- /dev/null +++ b/src/plugins/qmldesigner/qtquickplugin/source/pathviewv2.qml @@ -0,0 +1,78 @@ +/**************************************************************************** +** +** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies). +** Contact: http://www.qt-project.org/legal +** +** This file is part of Qt Creator. +** +** Commercial License Usage +** Licensees holding valid commercial Qt licenses may use this file in +** accordance with the commercial license agreement provided with the +** Software or, alternatively, in accordance with the terms contained in +** a written agreement between you and Digia. For licensing terms and +** conditions see http://qt.digia.com/licensing. For further information +** use the contact form at http://qt.digia.com/contact-us. +** +** 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, Digia gives you certain additional +** rights. These rights are described in the Digia Qt LGPL Exception +** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +** +****************************************************************************/ + +import QtQuick 2.0 + +PathView { + width: 250 + height: 130 + + path: Path { + startX: 120 + startY: 100 + PathQuad { x: 120; y: 25; controlX: 260; controlY: 75 } + PathQuad { x: 120; y: 100; controlX: -20; controlY: 75 } + } + model: ListModel { + ListElement { + name: "Grey" + colorCode: "grey" + } + ListElement { + name: "Red" + colorCode: "red" + } + ListElement { + name: "Blue" + colorCode: "blue" + } + ListElement { + name: "Green" + colorCode: "green" + } + } + delegate: Component { + Column { + spacing: 5 + Rectangle { + width: 40 + height: 40 + color: colorCode + anchors.horizontalCenter: parent.horizontalCenter + } + Text { + x: 5 + text: name + anchors.horizontalCenter: parent.horizontalCenter + font.bold: true + } + } + } +} + diff --git a/src/plugins/qmldesigner/qtquickplugin/source/texteditv2.qml b/src/plugins/qmldesigner/qtquickplugin/source/texteditv2.qml new file mode 100644 index 0000000000..6c72cb2e7b --- /dev/null +++ b/src/plugins/qmldesigner/qtquickplugin/source/texteditv2.qml @@ -0,0 +1,37 @@ +/**************************************************************************** +** +** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies). +** Contact: http://www.qt-project.org/legal +** +** This file is part of Qt Creator. +** +** Commercial License Usage +** Licensees holding valid commercial Qt licenses may use this file in +** accordance with the commercial license agreement provided with the +** Software or, alternatively, in accordance with the terms contained in +** a written agreement between you and Digia. For licensing terms and +** conditions see http://qt.digia.com/licensing. For further information +** use the contact form at http://qt.digia.com/contact-us. +** +** 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, Digia gives you certain additional +** rights. These rights are described in the Digia Qt LGPL Exception +** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +** +****************************************************************************/ + +import QtQuick 2.0 + +TextEdit { + width: 80 + height: 20 + text: qsTr("text edit") + font.pixelSize: 12 +} diff --git a/src/plugins/qmldesigner/qtquickplugin/source/textinputv2.qml b/src/plugins/qmldesigner/qtquickplugin/source/textinputv2.qml new file mode 100644 index 0000000000..0a4772bc88 --- /dev/null +++ b/src/plugins/qmldesigner/qtquickplugin/source/textinputv2.qml @@ -0,0 +1,37 @@ +/**************************************************************************** +** +** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies). +** Contact: http://www.qt-project.org/legal +** +** This file is part of Qt Creator. +** +** Commercial License Usage +** Licensees holding valid commercial Qt licenses may use this file in +** accordance with the commercial license agreement provided with the +** Software or, alternatively, in accordance with the terms contained in +** a written agreement between you and Digia. For licensing terms and +** conditions see http://qt.digia.com/licensing. For further information +** use the contact form at http://qt.digia.com/contact-us. +** +** 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, Digia gives you certain additional +** rights. These rights are described in the Digia Qt LGPL Exception +** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +** +****************************************************************************/ + +import QtQuick 2.0 + +TextInput { + width: 80 + height: 20 + text: qsTr("text") + font.pixelSize: 12 +} diff --git a/src/plugins/qmldesigner/qtquickplugin/source/textv2.qml b/src/plugins/qmldesigner/qtquickplugin/source/textv2.qml new file mode 100644 index 0000000000..40d59d7145 --- /dev/null +++ b/src/plugins/qmldesigner/qtquickplugin/source/textv2.qml @@ -0,0 +1,35 @@ +/**************************************************************************** +** +** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies). +** Contact: http://www.qt-project.org/legal +** +** This file is part of Qt Creator. +** +** Commercial License Usage +** Licensees holding valid commercial Qt licenses may use this file in +** accordance with the commercial license agreement provided with the +** Software or, alternatively, in accordance with the terms contained in +** a written agreement between you and Digia. For licensing terms and +** conditions see http://qt.digia.com/licensing. For further information +** use the contact form at http://qt.digia.com/contact-us. +** +** 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, Digia gives you certain additional +** rights. These rights are described in the Digia Qt LGPL Exception +** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +** +****************************************************************************/ + +import QtQuick 2.0 + +Text { + text: qsTr("text") + font.pixelSize: 12 +} |