forked from qt-creator/qt-creator
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: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Alessandro Portale <alessandro.portale@nokia.com>
This commit is contained in:
committed by
Alessandro Portale
parent
4bf5f4bd94
commit
31904563bb
@@ -0,0 +1,16 @@
|
|||||||
|
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) {
|
switch (componentSet) {
|
||||||
case Symbian10Components:
|
case Symbian10Components:
|
||||||
return QLatin1String("symbian10");
|
return QLatin1String("symbian10");
|
||||||
|
case QtQuick11Components:
|
||||||
|
return QLatin1String("qtquick11");
|
||||||
case QtQuick10Components:
|
case QtQuick10Components:
|
||||||
default:
|
default:
|
||||||
return QLatin1String("qtquick10");
|
return QLatin1String("qtquick10");
|
||||||
|
|||||||
@@ -117,6 +117,7 @@ public:
|
|||||||
|
|
||||||
enum ComponentSet {
|
enum ComponentSet {
|
||||||
QtQuick10Components,
|
QtQuick10Components,
|
||||||
|
QtQuick11Components,
|
||||||
Symbian10Components
|
Symbian10Components
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -92,6 +92,8 @@ bool QtQuickAppWizardDialog::validateCurrentPage()
|
|||||||
if (m_componentOptionsPage->componentSet() == QtQuickApp::Symbian10Components) {
|
if (m_componentOptionsPage->componentSet() == QtQuickApp::Symbian10Components) {
|
||||||
setIgnoreGenericOptionsPage(true);
|
setIgnoreGenericOptionsPage(true);
|
||||||
targetsPage()->setMinimumQtVersion(QtSupport::QtVersionNumber(4, 7, 3));
|
targetsPage()->setMinimumQtVersion(QtSupport::QtVersionNumber(4, 7, 3));
|
||||||
|
} else if (m_componentOptionsPage->componentSet() == QtQuickApp::QtQuick11Components) {
|
||||||
|
targetsPage()->setMinimumQtVersion(QtSupport::QtVersionNumber(4, 7, 4));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return AbstractMobileAppWizardDialog::validateCurrentPage();
|
return AbstractMobileAppWizardDialog::validateCurrentPage();
|
||||||
@@ -130,8 +132,7 @@ Core::BaseFileWizardParameters QtQuickAppWizard::parameters()
|
|||||||
"mobile target platforms. For example, you can create signed "
|
"mobile target platforms. For example, you can create signed "
|
||||||
"Symbian Installation System (SIS) packages for this type of "
|
"Symbian Installation System (SIS) packages for this type of "
|
||||||
"projects. Moreover, you can select to use a set of premade "
|
"projects. Moreover, you can select to use a set of premade "
|
||||||
"UI components in your Qt Quick application. "
|
"UI components in your Qt Quick application."));
|
||||||
"To utilize the components, Qt 4.7.3 or newer is required."));
|
|
||||||
parameters.setCategory(QLatin1String(QtSupport::Constants::QML_WIZARD_CATEGORY));
|
parameters.setCategory(QLatin1String(QtSupport::Constants::QML_WIZARD_CATEGORY));
|
||||||
parameters.setDisplayCategory(QCoreApplication::translate(QtSupport::Constants::QML_WIZARD_TR_SCOPE,
|
parameters.setDisplayCategory(QCoreApplication::translate(QtSupport::Constants::QML_WIZARD_TR_SCOPE,
|
||||||
QtSupport::Constants::QML_WIZARD_TR_CATEGORY));
|
QtSupport::Constants::QML_WIZARD_TR_CATEGORY));
|
||||||
|
|||||||
@@ -63,7 +63,8 @@ QtQuickComponentSetOptionsPage::QtQuickComponentSetOptionsPage(QWidget *parent)
|
|||||||
{
|
{
|
||||||
m_d->ui.setupUi(this);
|
m_d->ui.setupUi(this);
|
||||||
m_d->ui.buttonGroup->setId(m_d->ui.qtquick10RadioButton, 0);
|
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)));
|
connect(m_d->ui.buttonGroup, SIGNAL(buttonClicked(int)), this, SLOT(radioButtonChecked(int)));
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -75,7 +76,8 @@ QtQuickComponentSetOptionsPage::~QtQuickComponentSetOptionsPage()
|
|||||||
QtQuickApp::ComponentSet QtQuickComponentSetOptionsPage::componentSet() const
|
QtQuickApp::ComponentSet QtQuickComponentSetOptionsPage::componentSet() const
|
||||||
{
|
{
|
||||||
switch (m_d->ui.buttonGroup->checkedId()) {
|
switch (m_d->ui.buttonGroup->checkedId()) {
|
||||||
case 1: return QtQuickApp::Symbian10Components;
|
case 1: return QtQuickApp::QtQuick11Components;
|
||||||
|
case 2: return QtQuickApp::Symbian10Components;
|
||||||
case 0:
|
case 0:
|
||||||
default: return QtQuickApp::QtQuick10Components;
|
default: return QtQuickApp::QtQuick10Components;
|
||||||
}
|
}
|
||||||
@@ -85,6 +87,7 @@ void QtQuickComponentSetOptionsPage::setComponentSet(QtQuickApp::ComponentSet co
|
|||||||
{
|
{
|
||||||
switch (componentSet) {
|
switch (componentSet) {
|
||||||
case QtQuickApp::Symbian10Components: m_d->ui.symbian10RadioButton->click(); break;
|
case QtQuickApp::Symbian10Components: m_d->ui.symbian10RadioButton->click(); break;
|
||||||
|
case QtQuickApp::QtQuick11Components: m_d->ui.qtquick11RadioButton->click(); break;
|
||||||
case QtQuickApp::QtQuick10Components:
|
case QtQuickApp::QtQuick10Components:
|
||||||
default: m_d->ui.qtquick10RadioButton->click(); break;
|
default: m_d->ui.qtquick10RadioButton->click(); break;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -32,23 +32,33 @@
|
|||||||
<item>
|
<item>
|
||||||
<widget class="QRadioButton" name="qtquick10RadioButton">
|
<widget class="QRadioButton" name="qtquick10RadioButton">
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>QtQuick 1.0</string>
|
<string notr="true">QtQuick 1.0</string>
|
||||||
</property>
|
</property>
|
||||||
<property name="checked">
|
<property name="checked">
|
||||||
<bool>true</bool>
|
<bool>true</bool>
|
||||||
</property>
|
</property>
|
||||||
<attribute name="buttonGroup">
|
<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>
|
</attribute>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item>
|
<item>
|
||||||
<widget class="QRadioButton" name="symbian10RadioButton">
|
<widget class="QRadioButton" name="symbian10RadioButton">
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>com.nokia.symbian 1.0</string>
|
<string notr="true">com.nokia.symbian 1.0</string>
|
||||||
</property>
|
</property>
|
||||||
<attribute name="buttonGroup">
|
<attribute name="buttonGroup">
|
||||||
<string>buttonGroup</string>
|
<string notr="true">buttonGroup</string>
|
||||||
</attribute>
|
</attribute>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
@@ -71,7 +81,7 @@
|
|||||||
<item>
|
<item>
|
||||||
<widget class="QStackedWidget" name="descriptionStackedWidget">
|
<widget class="QStackedWidget" name="descriptionStackedWidget">
|
||||||
<property name="currentIndex">
|
<property name="currentIndex">
|
||||||
<number>1</number>
|
<number>0</number>
|
||||||
</property>
|
</property>
|
||||||
<widget class="QWidget" name="qtquick10DescriptionWidget">
|
<widget class="QWidget" name="qtquick10DescriptionWidget">
|
||||||
<layout class="QGridLayout" name="gridLayout">
|
<layout class="QGridLayout" name="gridLayout">
|
||||||
@@ -92,6 +102,25 @@ Requires Qt 4.7.1 or newer.</string>
|
|||||||
</item>
|
</item>
|
||||||
</layout>
|
</layout>
|
||||||
</widget>
|
</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">
|
<widget class="QWidget" name="symbian10DescriptionWidget">
|
||||||
<layout class="QGridLayout" name="gridLayout_3">
|
<layout class="QGridLayout" name="gridLayout_3">
|
||||||
<item row="0" column="0">
|
<item row="0" column="0">
|
||||||
|
|||||||
Reference in New Issue
Block a user