From 3b10c17e34bd6da6278600f57a0ecafe5eb58431 Mon Sep 17 00:00:00 2001 From: Caroline Chao Date: Mon, 10 Jun 2013 09:38:28 +0200 Subject: Move doc from the index to the overview page Cleanup the links. And doc fix in TableViewStyle.qml Change-Id: Id61fcff49af79f35f68696900142bb200ae18042 Reviewed-by: Jens Bache-Wiig Reviewed-by: Nico Vertriest --- src/controls/doc/src/qtquickcontrols-index.qdoc | 74 ++------------------ src/controls/doc/src/qtquickcontrols-overview.qdoc | 79 +++++++++++++++++++++- src/controls/qquickstack.cpp | 1 - 3 files changed, 82 insertions(+), 72 deletions(-) (limited to 'src/controls') diff --git a/src/controls/doc/src/qtquickcontrols-index.qdoc b/src/controls/doc/src/qtquickcontrols-index.qdoc index 5c22276e..96f2a670 100644 --- a/src/controls/doc/src/qtquickcontrols-index.qdoc +++ b/src/controls/doc/src/qtquickcontrols-index.qdoc @@ -36,56 +36,7 @@ The module is new in Qt 5.1 and requires \l{Qt Quick} 2.1. - \image qtquickcontrols-example-gallery.png - - \section1 Getting Started - - The QML types can be imported into your application using the following import statement in your \c {.qml} file. - - \code - import QtQuick.Controls 1.0 - \endcode - - A basic example of a QML file that makes use of controls is shown here: - - \code - import QtQuick.Controls 1.0 - - ApplicationWindow { - title: "My Application" - - Button { - text: "Push Me" - anchors.centerIn: parent - } - } - \endcode - - \section2 Setting Up Controls from C++ - - While we traditionally have used a QQuickView window to display QML files - in a C++ application, doing this means you can only set window properties from C++. - - With Qt Quick Controls, declare an ApplicationWindow as the root item of your application and launch it by using the - QQmlApplicationEngine instead. This ensures that you can control top level window properties from QML. - - A basic example of a source file that makes use of controls is shown here: - - \code - #include - #include - - int main(int argc, char *argv[]) - { - QApplication app(argc, argv); - QQmlApplicationEngine engine("main.qml"); - return app.exec(); - } - \endcode - - \note We are using QApplication and not QGuiApplication in this example. - Though you can use QGuiApplication instead, doing this will eliminate platform-dependent styling. - This is because it is relying on the widget module to provide the native look and feel. + Visit the \l{Qt Quick Controls Overview} page to get started. \section1 Application Window Components used to describe the basic window properties of an application. @@ -105,29 +56,12 @@ \section1 Related information - \section2 Guides \list + \li \l{Qt Quick} \li \l{Qt Quick Controls Overview} - \endlist - - \section2 Reference - \list \li \l{Qt Quick Controls QML Types}{Qt Quick Controls QML Types} - \endlist - - \section2 Examples - \list \li \l{Qt Quick Controls Examples} + \li \l{Qt Quick Controls Styles} + \li \l{Qt Quick Layouts} \endlist - - \section2 Styles - \list - \li \l {Qt Quick Controls Styles} - \endlist - - \section2 Layouts - \list - \li \l {Qt Quick Layouts} - \endlist - */ diff --git a/src/controls/doc/src/qtquickcontrols-overview.qdoc b/src/controls/doc/src/qtquickcontrols-overview.qdoc index 82da0b22..4eb6892f 100644 --- a/src/controls/doc/src/qtquickcontrols-overview.qdoc +++ b/src/controls/doc/src/qtquickcontrols-overview.qdoc @@ -28,5 +28,82 @@ /*! \page qtquickcontrols-overview.html \title Qt Quick Controls Overview - \brief A set of APIs for working with ... + \brief A set of UI controls to create user interfaces in Qt Quick + + The Qt Quick Controls provide a set of UI controls to create user interfaces + in Qt Quick. + + \section1 Getting Started + + The QML types can be imported into your application using the following import statement in your \c {.qml} file. + + \code + import QtQuick.Controls 1.0 + \endcode + + \section1 Creating a basic example + + A basic example of a QML file that makes use of controls is shown here: + + \code + import QtQuick.Controls 1.0 + + ApplicationWindow { + title: "My Application" + + Button { + text: "Push Me" + anchors.centerIn: parent + } + } + \endcode + + For an overview of the controls provided by \l{Qt Quick Controls}, you can look at + the \l{Qt Quick Controls - Gallery}{Gallery} example. + + \image qtquickcontrols-example-gallery.png + + \section1 Setting Up Controls from C++ + + Although we have traditionally used a QQuickView window to display QML files + in a C++ application, doing this means you can only set window properties from C++. + + With Qt Quick Controls, declare an ApplicationWindow as the root item of your application and launch it by using the + QQmlApplicationEngine instead. This ensures that you can control top level window properties from QML. + + A basic example of a source file that makes use of controls is shown here: + + \code + #include + #include + + int main(int argc, char *argv[]) + { + QApplication app(argc, argv); + QQmlApplicationEngine engine("main.qml"); + return app.exec(); + } + \endcode + + \note We are using QApplication and not QGuiApplication in this example. + Though you can use QGuiApplication instead, doing this will eliminate platform-dependent styling. + This is because it is relying on the widget module to provide the native look and feel. + + \section2 Using C++ Data From QML + + If you need to register a C++ class to use from QML, you can call, for example, + qmlRegisterType() before declaring your QQmlApplicationEngine. You can find the list + of all registering functions \l{QQmlEngine}{here}. + + If you need to expose data to QML components, you need to set them + to the context of the current QML engine. See QQmlContext for more + information. + + \section1 Related information + + \list + \li \l{Qt Quick} + \li \l{Qt Quick Controls} + \li \l{Qt Quick Controls Examples} + \endlist */ diff --git a/src/controls/qquickstack.cpp b/src/controls/qquickstack.cpp index ecf873d7..c949ffeb 100644 --- a/src/controls/qquickstack.cpp +++ b/src/controls/qquickstack.cpp @@ -47,7 +47,6 @@ QT_BEGIN_NAMESPACE \qmltype Stack \instantiates QQuickStack \inqmlmodule QtQuick.Controls 1.0 - \ingroup views \brief Provides attached properties for items pushed onto a StackView. The Stack type provides attached properties for items pushed onto a \l StackView. -- cgit v1.2.1 From 41e13d3746c8b7b5cd550091c63fd8ab066422cf Mon Sep 17 00:00:00 2001 From: Caroline Chao Date: Tue, 11 Jun 2013 09:13:44 +0200 Subject: Add qml/js files in resource files To make deployment of Qt Quick Controls based applications easier. Task-number: QTBUG-31565 Change-Id: I0b8af2864ef0dc9121eed3189ced64712bdb3d20 Reviewed-by: Friedemann Kleint Reviewed-by: Jens Bache-Wiig --- src/controls/Button.qml | 1 + src/controls/CheckBox.qml | 1 + src/controls/ComboBox.qml | 1 + src/controls/MenuBar.qml | 1 + src/controls/ProgressBar.qml | 1 + src/controls/RadioButton.qml | 1 + src/controls/Slider.qml | 1 + src/controls/SpinBox.qml | 1 + src/controls/StackView.qml | 2 +- src/controls/StatusBar.qml | 1 + src/controls/TabView.qml | 1 + src/controls/TextField.qml | 2 +- src/controls/ToolBar.qml | 1 + src/controls/ToolButton.qml | 1 + src/controls/controls.pro | 5 ++++- src/controls/plugin.cpp | 28 ++++++++++++++++++++++++++++ src/controls/qmldir | 26 -------------------------- src/controls/resources.qrc | 30 ++++++++++++++++++++++++++++++ 18 files changed, 76 insertions(+), 29 deletions(-) create mode 100644 src/controls/resources.qrc (limited to 'src/controls') diff --git a/src/controls/Button.qml b/src/controls/Button.qml index 0a3cb131..efafe26b 100644 --- a/src/controls/Button.qml +++ b/src/controls/Button.qml @@ -41,6 +41,7 @@ import QtQuick 2.1 import QtQuick.Controls 1.0 import QtQuick.Controls.Private 1.0 +import QtQuick.Controls.Styles 1.0 /*! \qmltype Button diff --git a/src/controls/CheckBox.qml b/src/controls/CheckBox.qml index 48d5e8b2..9d6f5dfe 100644 --- a/src/controls/CheckBox.qml +++ b/src/controls/CheckBox.qml @@ -41,6 +41,7 @@ import QtQuick 2.1 import QtQuick.Controls 1.0 import QtQuick.Controls.Private 1.0 +import QtQuick.Controls.Styles 1.0 /*! \qmltype CheckBox diff --git a/src/controls/ComboBox.qml b/src/controls/ComboBox.qml index 9282c58d..b65e749a 100644 --- a/src/controls/ComboBox.qml +++ b/src/controls/ComboBox.qml @@ -41,6 +41,7 @@ import QtQuick 2.1 import QtQuick.Controls 1.0 import QtQuick.Controls.Private 1.0 +import QtQuick.Controls.Styles 1.0 /*! \qmltype ComboBox diff --git a/src/controls/MenuBar.qml b/src/controls/MenuBar.qml index 65af1c12..566c814f 100644 --- a/src/controls/MenuBar.qml +++ b/src/controls/MenuBar.qml @@ -42,6 +42,7 @@ import QtQuick 2.1 import QtQuick.Controls 1.0 import QtQuick.Controls.Styles 1.0 import QtQuick.Controls.Private 1.0 +import QtQuick.Controls.Styles 1.0 /*! \qmltype MenuBar diff --git a/src/controls/ProgressBar.qml b/src/controls/ProgressBar.qml index e472e66e..2270ff49 100644 --- a/src/controls/ProgressBar.qml +++ b/src/controls/ProgressBar.qml @@ -41,6 +41,7 @@ import QtQuick 2.1 import QtQuick.Controls 1.0 import QtQuick.Controls.Private 1.0 +import QtQuick.Controls.Styles 1.0 /*! \qmltype ProgressBar diff --git a/src/controls/RadioButton.qml b/src/controls/RadioButton.qml index fde08817..305e464c 100644 --- a/src/controls/RadioButton.qml +++ b/src/controls/RadioButton.qml @@ -41,6 +41,7 @@ import QtQuick 2.1 import QtQuick.Controls 1.0 import QtQuick.Controls.Private 1.0 +import QtQuick.Controls.Styles 1.0 /*! \qmltype RadioButton diff --git a/src/controls/Slider.qml b/src/controls/Slider.qml index 64dcfff1..9fee75e6 100644 --- a/src/controls/Slider.qml +++ b/src/controls/Slider.qml @@ -41,6 +41,7 @@ import QtQuick 2.1 import QtQuick.Controls 1.0 import QtQuick.Controls.Private 1.0 +import QtQuick.Controls.Styles 1.0 /*! \qmltype Slider diff --git a/src/controls/SpinBox.qml b/src/controls/SpinBox.qml index b1f87cec..06ec64ce 100644 --- a/src/controls/SpinBox.qml +++ b/src/controls/SpinBox.qml @@ -41,6 +41,7 @@ import QtQuick 2.1 import QtQuick.Controls 1.0 import QtQuick.Controls.Private 1.0 +import QtQuick.Controls.Styles 1.0 /*! \qmltype SpinBox diff --git a/src/controls/StackView.qml b/src/controls/StackView.qml index 9559ea87..623a1026 100644 --- a/src/controls/StackView.qml +++ b/src/controls/StackView.qml @@ -41,7 +41,7 @@ import QtQuick 2.1 import QtQuick.Controls 1.0 import QtQuick.Controls.Private 1.0 -import "Private/StackView.js" as JSArray +import "../private/StackView.js" as JSArray /*! \qmltype StackView diff --git a/src/controls/StatusBar.qml b/src/controls/StatusBar.qml index 85cc6681..62b81807 100644 --- a/src/controls/StatusBar.qml +++ b/src/controls/StatusBar.qml @@ -41,6 +41,7 @@ import QtQuick 2.1 import QtQuick.Controls 1.0 import QtQuick.Controls.Private 1.0 +import QtQuick.Controls.Styles 1.0 /*! \qmltype StatusBar diff --git a/src/controls/TabView.qml b/src/controls/TabView.qml index 6319d72c..503a203e 100644 --- a/src/controls/TabView.qml +++ b/src/controls/TabView.qml @@ -41,6 +41,7 @@ import QtQuick 2.1 import QtQuick.Controls 1.0 import QtQuick.Controls.Private 1.0 +import QtQuick.Controls.Styles 1.0 /*! \qmltype TabView diff --git a/src/controls/TextField.qml b/src/controls/TextField.qml index 32b2d4fb..b7e6996e 100644 --- a/src/controls/TextField.qml +++ b/src/controls/TextField.qml @@ -41,7 +41,7 @@ import QtQuick 2.1 import QtQuick.Controls 1.0 import QtQuick.Controls.Private 1.0 -import "Styles" +import QtQuick.Controls.Styles 1.0 /*! \qmltype TextField diff --git a/src/controls/ToolBar.qml b/src/controls/ToolBar.qml index b73a6f3e..cadea5c7 100644 --- a/src/controls/ToolBar.qml +++ b/src/controls/ToolBar.qml @@ -41,6 +41,7 @@ import QtQuick 2.1 import QtQuick.Controls 1.0 import QtQuick.Controls.Private 1.0 +import QtQuick.Controls.Styles 1.0 /*! \qmltype ToolBar diff --git a/src/controls/ToolButton.qml b/src/controls/ToolButton.qml index 3c1eab1a..3cf32789 100644 --- a/src/controls/ToolButton.qml +++ b/src/controls/ToolButton.qml @@ -41,6 +41,7 @@ import QtQuick 2.1 import QtQuick.Controls 1.0 import QtQuick.Controls.Private 1.0 +import QtQuick.Controls.Styles 1.0 /*! \qmltype ToolButton diff --git a/src/controls/controls.pro b/src/controls/controls.pro index fbda88fc..fad8f2d9 100644 --- a/src/controls/controls.pro +++ b/src/controls/controls.pro @@ -5,7 +5,7 @@ QT += qml quick gui-private core-private QMAKE_DOCS = $$PWD/doc/qtquickcontrols.qdocconf -QML_FILES = \ +OTHER_FILES = \ ApplicationWindow.qml \ Button.qml \ CheckBox.qml \ @@ -37,3 +37,6 @@ include(plugin.pri) CONFIG += no_cxx_module load(qml_plugin) + +RESOURCES += \ + resources.qrc diff --git a/src/controls/plugin.cpp b/src/controls/plugin.cpp index 1b255302..71cc3196 100644 --- a/src/controls/plugin.cpp +++ b/src/controls/plugin.cpp @@ -98,6 +98,34 @@ void QtQuickControlsPlugin::registerTypes(const char *uri) QLatin1String("Do not create objects of type MenuBase")); qmlRegisterUncreatableType(uri, 1, 0, "Stack", QLatin1String("Do not create objects of type Stack")); + + // Controls in resources file + qmlRegisterType(QUrl("qrc:/controls/ApplicationWindow.qml"), uri, 1, 0, "ApplicationWindow"); + qmlRegisterType(QUrl("qrc:/controls/Button.qml"), uri, 1, 0, "Button"); + qmlRegisterType(QUrl("qrc:/controls/CheckBox.qml"), uri, 1, 0, "CheckBox"); + qmlRegisterType(QUrl("qrc:/controls/ComboBox.qml"), uri, 1, 0, "ComboBox"); + qmlRegisterType(QUrl("qrc:/controls/GroupBox.qml"), uri, 1, 0, "GroupBox"); + qmlRegisterType(QUrl("qrc:/controls/Label.qml"), uri, 1, 0, "Label"); + qmlRegisterType(QUrl("qrc:/controls/Menu.qml"), uri, 1, 0, "Menu"); + qmlRegisterType(QUrl("qrc:/controls/MenuBar.qml"), uri, 1, 0, "MenuBar"); + qmlRegisterType(QUrl("qrc:/controls/ProgressBar.qml"), uri, 1, 0, "ProgressBar"); + qmlRegisterType(QUrl("qrc:/controls/RadioButton.qml"), uri, 1, 0, "RadioButton"); + qmlRegisterType(QUrl("qrc:/controls/ScrollView.qml"), uri, 1, 0, "ScrollView"); + qmlRegisterType(QUrl("qrc:/controls/Slider.qml"), uri, 1, 0, "Slider"); + qmlRegisterType(QUrl("qrc:/controls/SpinBox.qml"), uri, 1, 0, "SpinBox"); + qmlRegisterType(QUrl("qrc:/controls/SplitView.qml"), uri, 1, 0, "SplitView"); + qmlRegisterType(QUrl("qrc:/controls/StackView.qml"), uri, 1, 0, "StackView"); + qmlRegisterType(QUrl("qrc:/controls/StackViewDelegate.qml"), uri, 1, 0, "StackViewDelegate"); + qmlRegisterType(QUrl("qrc:/controls/StackViewTransition.qml"), uri, 1, 0, "StackViewTransition"); + qmlRegisterType(QUrl("qrc:/controls/StatusBar.qml"), uri, 1, 0, "StatusBar"); + qmlRegisterType(QUrl("qrc:/controls/Tab.qml"), uri, 1, 0, "Tab"); + qmlRegisterType(QUrl("qrc:/controls/TableView.qml"), uri, 1, 0, "TableView"); + qmlRegisterType(QUrl("qrc:/controls/TableViewColumn.qml"), uri, 1, 0, "TableViewColumn"); + qmlRegisterType(QUrl("qrc:/controls/TextField.qml"), uri, 1, 0, "TextField"); + qmlRegisterType(QUrl("qrc:/controls/TabView.qml"), uri, 1, 0, "TabView"); + qmlRegisterType(QUrl("qrc:/controls/TextArea.qml"), uri, 1, 0, "TextArea"); + qmlRegisterType(QUrl("qrc:/controls/ToolBar.qml"), uri, 1, 0, "ToolBar"); + qmlRegisterType(QUrl("qrc:/controls/ToolButton.qml"), uri, 1, 0, "ToolButton"); } void QtQuickControlsPlugin::initializeEngine(QQmlEngine *engine, const char *uri) diff --git a/src/controls/qmldir b/src/controls/qmldir index c243360c..41d4d512 100644 --- a/src/controls/qmldir +++ b/src/controls/qmldir @@ -1,28 +1,2 @@ module QtQuick.Controls plugin qtquickcontrolsplugin -ApplicationWindow 1.0 ApplicationWindow.qml -Button 1.0 Button.qml -CheckBox 1.0 CheckBox.qml -ComboBox 1.0 ComboBox.qml -GroupBox 1.0 GroupBox.qml -Label 1.0 Label.qml -MenuBar 1.0 MenuBar.qml -Menu 1.0 Menu.qml -StackView 1.0 StackView.qml -ProgressBar 1.0 ProgressBar.qml -RadioButton 1.0 RadioButton.qml -ScrollView 1.0 ScrollView.qml -Slider 1.0 Slider.qml -SpinBox 1.0 SpinBox.qml -SplitView 1.0 SplitView.qml -StackViewDelegate 1.0 StackViewDelegate.qml -StackViewTransition 1.0 StackViewTransition.qml -StatusBar 1.0 StatusBar.qml -Tab 1.0 Tab.qml -TabView 1.0 TabView.qml -TableView 1.0 TableView.qml -TableViewColumn 1.0 TableViewColumn.qml -TextArea 1.0 TextArea.qml -TextField 1.0 TextField.qml -ToolBar 1.0 ToolBar.qml -ToolButton 1.0 ToolButton.qml diff --git a/src/controls/resources.qrc b/src/controls/resources.qrc new file mode 100644 index 00000000..5cf71c61 --- /dev/null +++ b/src/controls/resources.qrc @@ -0,0 +1,30 @@ + + + ApplicationWindow.qml + Button.qml + CheckBox.qml + ComboBox.qml + GroupBox.qml + Label.qml + Menu.qml + MenuBar.qml + ProgressBar.qml + RadioButton.qml + ScrollView.qml + Slider.qml + SpinBox.qml + SplitView.qml + StackView.qml + StackViewDelegate.qml + StackViewTransition.qml + StatusBar.qml + Tab.qml + TableView.qml + TableViewColumn.qml + TabView.qml + TextArea.qml + TextField.qml + ToolBar.qml + ToolButton.qml + + -- cgit v1.2.1 From 03c7e64ef5f3dfd10d61fd2473fb9f09b124c6e6 Mon Sep 17 00:00:00 2001 From: Caroline Chao Date: Fri, 14 Jun 2013 15:01:34 +0200 Subject: Revert "Add qml/js files in resource files" We need to investigate more this solution. Deployment issue for Qt Quick Controls will be a known limitation in 5.1.0. This reverts commit 41e13d3746c8b7b5cd550091c63fd8ab066422cf. Change-Id: I501be7494bdbdfbb799d31c612d0c20e7f87ffc7 Reviewed-by: Friedemann Kleint Reviewed-by: Jens Bache-Wiig Reviewed-by: Liang Qi --- src/controls/Button.qml | 1 - src/controls/CheckBox.qml | 1 - src/controls/ComboBox.qml | 1 - src/controls/MenuBar.qml | 1 - src/controls/ProgressBar.qml | 1 - src/controls/RadioButton.qml | 1 - src/controls/Slider.qml | 1 - src/controls/SpinBox.qml | 1 - src/controls/StackView.qml | 2 +- src/controls/StatusBar.qml | 1 - src/controls/TabView.qml | 1 - src/controls/TextField.qml | 2 +- src/controls/ToolBar.qml | 1 - src/controls/ToolButton.qml | 1 - src/controls/controls.pro | 5 +---- src/controls/plugin.cpp | 28 ---------------------------- src/controls/qmldir | 26 ++++++++++++++++++++++++++ src/controls/resources.qrc | 30 ------------------------------ 18 files changed, 29 insertions(+), 76 deletions(-) delete mode 100644 src/controls/resources.qrc (limited to 'src/controls') diff --git a/src/controls/Button.qml b/src/controls/Button.qml index efafe26b..0a3cb131 100644 --- a/src/controls/Button.qml +++ b/src/controls/Button.qml @@ -41,7 +41,6 @@ import QtQuick 2.1 import QtQuick.Controls 1.0 import QtQuick.Controls.Private 1.0 -import QtQuick.Controls.Styles 1.0 /*! \qmltype Button diff --git a/src/controls/CheckBox.qml b/src/controls/CheckBox.qml index 9d6f5dfe..48d5e8b2 100644 --- a/src/controls/CheckBox.qml +++ b/src/controls/CheckBox.qml @@ -41,7 +41,6 @@ import QtQuick 2.1 import QtQuick.Controls 1.0 import QtQuick.Controls.Private 1.0 -import QtQuick.Controls.Styles 1.0 /*! \qmltype CheckBox diff --git a/src/controls/ComboBox.qml b/src/controls/ComboBox.qml index b65e749a..9282c58d 100644 --- a/src/controls/ComboBox.qml +++ b/src/controls/ComboBox.qml @@ -41,7 +41,6 @@ import QtQuick 2.1 import QtQuick.Controls 1.0 import QtQuick.Controls.Private 1.0 -import QtQuick.Controls.Styles 1.0 /*! \qmltype ComboBox diff --git a/src/controls/MenuBar.qml b/src/controls/MenuBar.qml index 566c814f..65af1c12 100644 --- a/src/controls/MenuBar.qml +++ b/src/controls/MenuBar.qml @@ -42,7 +42,6 @@ import QtQuick 2.1 import QtQuick.Controls 1.0 import QtQuick.Controls.Styles 1.0 import QtQuick.Controls.Private 1.0 -import QtQuick.Controls.Styles 1.0 /*! \qmltype MenuBar diff --git a/src/controls/ProgressBar.qml b/src/controls/ProgressBar.qml index 2270ff49..e472e66e 100644 --- a/src/controls/ProgressBar.qml +++ b/src/controls/ProgressBar.qml @@ -41,7 +41,6 @@ import QtQuick 2.1 import QtQuick.Controls 1.0 import QtQuick.Controls.Private 1.0 -import QtQuick.Controls.Styles 1.0 /*! \qmltype ProgressBar diff --git a/src/controls/RadioButton.qml b/src/controls/RadioButton.qml index 305e464c..fde08817 100644 --- a/src/controls/RadioButton.qml +++ b/src/controls/RadioButton.qml @@ -41,7 +41,6 @@ import QtQuick 2.1 import QtQuick.Controls 1.0 import QtQuick.Controls.Private 1.0 -import QtQuick.Controls.Styles 1.0 /*! \qmltype RadioButton diff --git a/src/controls/Slider.qml b/src/controls/Slider.qml index 9fee75e6..64dcfff1 100644 --- a/src/controls/Slider.qml +++ b/src/controls/Slider.qml @@ -41,7 +41,6 @@ import QtQuick 2.1 import QtQuick.Controls 1.0 import QtQuick.Controls.Private 1.0 -import QtQuick.Controls.Styles 1.0 /*! \qmltype Slider diff --git a/src/controls/SpinBox.qml b/src/controls/SpinBox.qml index 06ec64ce..b1f87cec 100644 --- a/src/controls/SpinBox.qml +++ b/src/controls/SpinBox.qml @@ -41,7 +41,6 @@ import QtQuick 2.1 import QtQuick.Controls 1.0 import QtQuick.Controls.Private 1.0 -import QtQuick.Controls.Styles 1.0 /*! \qmltype SpinBox diff --git a/src/controls/StackView.qml b/src/controls/StackView.qml index 623a1026..9559ea87 100644 --- a/src/controls/StackView.qml +++ b/src/controls/StackView.qml @@ -41,7 +41,7 @@ import QtQuick 2.1 import QtQuick.Controls 1.0 import QtQuick.Controls.Private 1.0 -import "../private/StackView.js" as JSArray +import "Private/StackView.js" as JSArray /*! \qmltype StackView diff --git a/src/controls/StatusBar.qml b/src/controls/StatusBar.qml index 62b81807..85cc6681 100644 --- a/src/controls/StatusBar.qml +++ b/src/controls/StatusBar.qml @@ -41,7 +41,6 @@ import QtQuick 2.1 import QtQuick.Controls 1.0 import QtQuick.Controls.Private 1.0 -import QtQuick.Controls.Styles 1.0 /*! \qmltype StatusBar diff --git a/src/controls/TabView.qml b/src/controls/TabView.qml index 503a203e..6319d72c 100644 --- a/src/controls/TabView.qml +++ b/src/controls/TabView.qml @@ -41,7 +41,6 @@ import QtQuick 2.1 import QtQuick.Controls 1.0 import QtQuick.Controls.Private 1.0 -import QtQuick.Controls.Styles 1.0 /*! \qmltype TabView diff --git a/src/controls/TextField.qml b/src/controls/TextField.qml index b7e6996e..32b2d4fb 100644 --- a/src/controls/TextField.qml +++ b/src/controls/TextField.qml @@ -41,7 +41,7 @@ import QtQuick 2.1 import QtQuick.Controls 1.0 import QtQuick.Controls.Private 1.0 -import QtQuick.Controls.Styles 1.0 +import "Styles" /*! \qmltype TextField diff --git a/src/controls/ToolBar.qml b/src/controls/ToolBar.qml index cadea5c7..b73a6f3e 100644 --- a/src/controls/ToolBar.qml +++ b/src/controls/ToolBar.qml @@ -41,7 +41,6 @@ import QtQuick 2.1 import QtQuick.Controls 1.0 import QtQuick.Controls.Private 1.0 -import QtQuick.Controls.Styles 1.0 /*! \qmltype ToolBar diff --git a/src/controls/ToolButton.qml b/src/controls/ToolButton.qml index 3cf32789..3c1eab1a 100644 --- a/src/controls/ToolButton.qml +++ b/src/controls/ToolButton.qml @@ -41,7 +41,6 @@ import QtQuick 2.1 import QtQuick.Controls 1.0 import QtQuick.Controls.Private 1.0 -import QtQuick.Controls.Styles 1.0 /*! \qmltype ToolButton diff --git a/src/controls/controls.pro b/src/controls/controls.pro index fad8f2d9..fbda88fc 100644 --- a/src/controls/controls.pro +++ b/src/controls/controls.pro @@ -5,7 +5,7 @@ QT += qml quick gui-private core-private QMAKE_DOCS = $$PWD/doc/qtquickcontrols.qdocconf -OTHER_FILES = \ +QML_FILES = \ ApplicationWindow.qml \ Button.qml \ CheckBox.qml \ @@ -37,6 +37,3 @@ include(plugin.pri) CONFIG += no_cxx_module load(qml_plugin) - -RESOURCES += \ - resources.qrc diff --git a/src/controls/plugin.cpp b/src/controls/plugin.cpp index 71cc3196..1b255302 100644 --- a/src/controls/plugin.cpp +++ b/src/controls/plugin.cpp @@ -98,34 +98,6 @@ void QtQuickControlsPlugin::registerTypes(const char *uri) QLatin1String("Do not create objects of type MenuBase")); qmlRegisterUncreatableType(uri, 1, 0, "Stack", QLatin1String("Do not create objects of type Stack")); - - // Controls in resources file - qmlRegisterType(QUrl("qrc:/controls/ApplicationWindow.qml"), uri, 1, 0, "ApplicationWindow"); - qmlRegisterType(QUrl("qrc:/controls/Button.qml"), uri, 1, 0, "Button"); - qmlRegisterType(QUrl("qrc:/controls/CheckBox.qml"), uri, 1, 0, "CheckBox"); - qmlRegisterType(QUrl("qrc:/controls/ComboBox.qml"), uri, 1, 0, "ComboBox"); - qmlRegisterType(QUrl("qrc:/controls/GroupBox.qml"), uri, 1, 0, "GroupBox"); - qmlRegisterType(QUrl("qrc:/controls/Label.qml"), uri, 1, 0, "Label"); - qmlRegisterType(QUrl("qrc:/controls/Menu.qml"), uri, 1, 0, "Menu"); - qmlRegisterType(QUrl("qrc:/controls/MenuBar.qml"), uri, 1, 0, "MenuBar"); - qmlRegisterType(QUrl("qrc:/controls/ProgressBar.qml"), uri, 1, 0, "ProgressBar"); - qmlRegisterType(QUrl("qrc:/controls/RadioButton.qml"), uri, 1, 0, "RadioButton"); - qmlRegisterType(QUrl("qrc:/controls/ScrollView.qml"), uri, 1, 0, "ScrollView"); - qmlRegisterType(QUrl("qrc:/controls/Slider.qml"), uri, 1, 0, "Slider"); - qmlRegisterType(QUrl("qrc:/controls/SpinBox.qml"), uri, 1, 0, "SpinBox"); - qmlRegisterType(QUrl("qrc:/controls/SplitView.qml"), uri, 1, 0, "SplitView"); - qmlRegisterType(QUrl("qrc:/controls/StackView.qml"), uri, 1, 0, "StackView"); - qmlRegisterType(QUrl("qrc:/controls/StackViewDelegate.qml"), uri, 1, 0, "StackViewDelegate"); - qmlRegisterType(QUrl("qrc:/controls/StackViewTransition.qml"), uri, 1, 0, "StackViewTransition"); - qmlRegisterType(QUrl("qrc:/controls/StatusBar.qml"), uri, 1, 0, "StatusBar"); - qmlRegisterType(QUrl("qrc:/controls/Tab.qml"), uri, 1, 0, "Tab"); - qmlRegisterType(QUrl("qrc:/controls/TableView.qml"), uri, 1, 0, "TableView"); - qmlRegisterType(QUrl("qrc:/controls/TableViewColumn.qml"), uri, 1, 0, "TableViewColumn"); - qmlRegisterType(QUrl("qrc:/controls/TextField.qml"), uri, 1, 0, "TextField"); - qmlRegisterType(QUrl("qrc:/controls/TabView.qml"), uri, 1, 0, "TabView"); - qmlRegisterType(QUrl("qrc:/controls/TextArea.qml"), uri, 1, 0, "TextArea"); - qmlRegisterType(QUrl("qrc:/controls/ToolBar.qml"), uri, 1, 0, "ToolBar"); - qmlRegisterType(QUrl("qrc:/controls/ToolButton.qml"), uri, 1, 0, "ToolButton"); } void QtQuickControlsPlugin::initializeEngine(QQmlEngine *engine, const char *uri) diff --git a/src/controls/qmldir b/src/controls/qmldir index 41d4d512..c243360c 100644 --- a/src/controls/qmldir +++ b/src/controls/qmldir @@ -1,2 +1,28 @@ module QtQuick.Controls plugin qtquickcontrolsplugin +ApplicationWindow 1.0 ApplicationWindow.qml +Button 1.0 Button.qml +CheckBox 1.0 CheckBox.qml +ComboBox 1.0 ComboBox.qml +GroupBox 1.0 GroupBox.qml +Label 1.0 Label.qml +MenuBar 1.0 MenuBar.qml +Menu 1.0 Menu.qml +StackView 1.0 StackView.qml +ProgressBar 1.0 ProgressBar.qml +RadioButton 1.0 RadioButton.qml +ScrollView 1.0 ScrollView.qml +Slider 1.0 Slider.qml +SpinBox 1.0 SpinBox.qml +SplitView 1.0 SplitView.qml +StackViewDelegate 1.0 StackViewDelegate.qml +StackViewTransition 1.0 StackViewTransition.qml +StatusBar 1.0 StatusBar.qml +Tab 1.0 Tab.qml +TabView 1.0 TabView.qml +TableView 1.0 TableView.qml +TableViewColumn 1.0 TableViewColumn.qml +TextArea 1.0 TextArea.qml +TextField 1.0 TextField.qml +ToolBar 1.0 ToolBar.qml +ToolButton 1.0 ToolButton.qml diff --git a/src/controls/resources.qrc b/src/controls/resources.qrc deleted file mode 100644 index 5cf71c61..00000000 --- a/src/controls/resources.qrc +++ /dev/null @@ -1,30 +0,0 @@ - - - ApplicationWindow.qml - Button.qml - CheckBox.qml - ComboBox.qml - GroupBox.qml - Label.qml - Menu.qml - MenuBar.qml - ProgressBar.qml - RadioButton.qml - ScrollView.qml - Slider.qml - SpinBox.qml - SplitView.qml - StackView.qml - StackViewDelegate.qml - StackViewTransition.qml - StatusBar.qml - Tab.qml - TableView.qml - TableViewColumn.qml - TabView.qml - TextArea.qml - TextField.qml - ToolBar.qml - ToolButton.qml - - -- cgit v1.2.1 From f5f818e3adfa9d39c4955ffe34443027427a7f74 Mon Sep 17 00:00:00 2001 From: Topi Reinio Date: Mon, 17 Jun 2013 13:08:46 +0200 Subject: Doc: Fix QCH filter attributes for Qt Quick Controls/Styles Fix typos in filter attibutes, preventing filtering from working in Assistant. Task-number: QTBUG-31796 Change-Id: I21c91b43881cd73ae7df4203922085e7c9f93e8f Reviewed-by: Caroline Chao Reviewed-by: Jerome Pasion --- src/controls/doc/qtquickcontrols.qdocconf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/controls') diff --git a/src/controls/doc/qtquickcontrols.qdocconf b/src/controls/doc/qtquickcontrols.qdocconf index ab321a74..44fd86ca 100644 --- a/src/controls/doc/qtquickcontrols.qdocconf +++ b/src/controls/doc/qtquickcontrols.qdocconf @@ -14,7 +14,7 @@ qhp.QtQuickControls.indexTitle = Qt Quick Controls qhp.QtQuickControls.indexRoot = #qhp.QtQuickControls.extraFiles = style/qtquickcontrols.css -qhp.QtQuickControls.filterAttributes = qtcontrols $QT_VERSION qtrefdoc +qhp.QtQuickControls.filterAttributes = qtquickcontrols $QT_VERSION qtrefdoc qhp.QtQuickControls.customFilters.Qt.name = QtQuickControls $QT_VERSION qhp.QtQuickControls.customFilters.Qt.filterAttributes = qtquickcontrols $QT_VERSION -- cgit v1.2.1