Commit 31904563 authored by Kai Koehne's avatar Kai Koehne Committed by Alessandro Portale
Browse files

QtQuickApp wizard: Add option for QtQuick 1.1 module

Technically it's just one line in the generated file, but might
avoid people be confused on why there is only QtQuick 1.0 as an option.

Change-Id: I61fb4e82d8ee71fe6fddcd6845b4b48e78004e81
Reviewed-on: http://codereview.qt.nokia.com/625


Reviewed-by: default avatarQt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: default avatarAlessandro Portale <alessandro.portale@nokia.com>
parent 4bf5f4bd
import QtQuick 1.1
Rectangle {
width: 360
height: 360
Text {
text: qsTr("Hello World")
anchors.centerIn: parent
}
MouseArea {
anchors.fill: parent
onClicked: {
Qt.quit();
}
}
}
......@@ -451,6 +451,8 @@ QString QtQuickApp::componentSetDir(ComponentSet componentSet) const
switch (componentSet) {
case Symbian10Components:
return QLatin1String("symbian10");
case QtQuick11Components:
return QLatin1String("qtquick11");
case QtQuick10Components:
default:
return QLatin1String("qtquick10");
......
......@@ -117,6 +117,7 @@ public:
enum ComponentSet {
QtQuick10Components,
QtQuick11Components,
Symbian10Components
};
......
......@@ -92,6 +92,8 @@ bool QtQuickAppWizardDialog::validateCurrentPage()
if (m_componentOptionsPage->componentSet() == QtQuickApp::Symbian10Components) {
setIgnoreGenericOptionsPage(true);
targetsPage()->setMinimumQtVersion(QtSupport::QtVersionNumber(4, 7, 3));
} else if (m_componentOptionsPage->componentSet() == QtQuickApp::QtQuick11Components) {
targetsPage()->setMinimumQtVersion(QtSupport::QtVersionNumber(4, 7, 4));
}
}
return AbstractMobileAppWizardDialog::validateCurrentPage();
......@@ -130,8 +132,7 @@ Core::BaseFileWizardParameters QtQuickAppWizard::parameters()
"mobile target platforms. For example, you can create signed "
"Symbian Installation System (SIS) packages for this type of "
"projects. Moreover, you can select to use a set of premade "
"UI components in your Qt Quick application. "
"To utilize the components, Qt 4.7.3 or newer is required."));
"UI components in your Qt Quick application."));
parameters.setCategory(QLatin1String(QtSupport::Constants::QML_WIZARD_CATEGORY));
parameters.setDisplayCategory(QCoreApplication::translate(QtSupport::Constants::QML_WIZARD_TR_SCOPE,
QtSupport::Constants::QML_WIZARD_TR_CATEGORY));
......
......@@ -63,7 +63,8 @@ QtQuickComponentSetOptionsPage::QtQuickComponentSetOptionsPage(QWidget *parent)
{
m_d->ui.setupUi(this);
m_d->ui.buttonGroup->setId(m_d->ui.qtquick10RadioButton, 0);
m_d->ui.buttonGroup->setId(m_d->ui.symbian10RadioButton, 1);
m_d->ui.buttonGroup->setId(m_d->ui.qtquick11RadioButton, 1);
m_d->ui.buttonGroup->setId(m_d->ui.symbian10RadioButton, 2);
connect(m_d->ui.buttonGroup, SIGNAL(buttonClicked(int)), this, SLOT(radioButtonChecked(int)));
}
......@@ -75,7 +76,8 @@ QtQuickComponentSetOptionsPage::~QtQuickComponentSetOptionsPage()
QtQuickApp::ComponentSet QtQuickComponentSetOptionsPage::componentSet() const
{
switch (m_d->ui.buttonGroup->checkedId()) {
case 1: return QtQuickApp::Symbian10Components;
case 1: return QtQuickApp::QtQuick11Components;
case 2: return QtQuickApp::Symbian10Components;
case 0:
default: return QtQuickApp::QtQuick10Components;
}
......@@ -85,6 +87,7 @@ void QtQuickComponentSetOptionsPage::setComponentSet(QtQuickApp::ComponentSet co
{
switch (componentSet) {
case QtQuickApp::Symbian10Components: m_d->ui.symbian10RadioButton->click(); break;
case QtQuickApp::QtQuick11Components: m_d->ui.qtquick11RadioButton->click(); break;
case QtQuickApp::QtQuick10Components:
default: m_d->ui.qtquick10RadioButton->click(); break;
}
......
......@@ -32,23 +32,33 @@
<item>
<widget class="QRadioButton" name="qtquick10RadioButton">
<property name="text">
<string>QtQuick 1.0</string>
<string notr="true">QtQuick 1.0</string>
</property>
<property name="checked">
<bool>true</bool>
</property>
<attribute name="buttonGroup">
<string>buttonGroup</string>
<string notr="true">buttonGroup</string>
</attribute>
</widget>
</item>
<item>
<widget class="QRadioButton" name="qtquick11RadioButton">
<property name="text">
<string notr="true">QtQuick 1.1</string>
</property>
<attribute name="buttonGroup">
<string notr="true">buttonGroup</string>
</attribute>
</widget>
</item>
<item>
<widget class="QRadioButton" name="symbian10RadioButton">
<property name="text">
<string>com.nokia.symbian 1.0</string>
<string notr="true">com.nokia.symbian 1.0</string>
</property>
<attribute name="buttonGroup">
<string>buttonGroup</string>
<string notr="true">buttonGroup</string>
</attribute>
</widget>
</item>
......@@ -71,7 +81,7 @@
<item>
<widget class="QStackedWidget" name="descriptionStackedWidget">
<property name="currentIndex">
<number>1</number>
<number>0</number>
</property>
<widget class="QWidget" name="qtquick10DescriptionWidget">
<layout class="QGridLayout" name="gridLayout">
......@@ -92,6 +102,25 @@ Requires Qt 4.7.1 or newer.</string>
</item>
</layout>
</widget>
<widget class="QWidget" name="qtquick11DescriptionWidget">
<layout class="QGridLayout" name="gridLayout_4">
<item row="0" column="0">
<widget class="QLabel" name="qtquick11DescriptionLabel">
<property name="text">
<string>The QtQuick 1.1 namespace contains basic elements which allow you to write cross-platform applications with a custom look and feel.
Requires Qt 4.7.4 or newer.</string>
</property>
<property name="alignment">
<set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop</set>
</property>
<property name="wordWrap">
<bool>true</bool>
</property>
</widget>
</item>
</layout>
</widget>
<widget class="QWidget" name="symbian10DescriptionWidget">
<layout class="QGridLayout" name="gridLayout_3">
<item row="0" column="0">
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment