diff --git a/share/qtcreator/templates/qtquickapp/qml/app/meego10/MainPage.qml b/share/qtcreator/templates/qtquickapp/qml/app/meego10/MainPage.qml new file mode 100644 index 0000000000000000000000000000000000000000..b02ef34642afc063cf964af85343acb4d9b26171 --- /dev/null +++ b/share/qtcreator/templates/qtquickapp/qml/app/meego10/MainPage.qml @@ -0,0 +1,23 @@ +import QtQuick 1.1 +import com.meego 1.0 + +Page { + tools: commonTools + + Label { + id: label + anchors.centerIn: parent + text: qsTr("Hello world!") + visible: false + } + + Button{ + anchors { + horizontalCenter: parent.horizontalCenter + top: label.bottom + topMargin: 10 + } + text: qsTr("Click here!") + onClicked: label.visible = true + } +} diff --git a/share/qtcreator/templates/qtquickapp/qml/app/meego10/main.qml b/share/qtcreator/templates/qtquickapp/qml/app/meego10/main.qml new file mode 100644 index 0000000000000000000000000000000000000000..cb3a632b2938e3c3858e078c40d74d2bb12825d2 --- /dev/null +++ b/share/qtcreator/templates/qtquickapp/qml/app/meego10/main.qml @@ -0,0 +1,30 @@ +import QtQuick 1.1 +import com.meego 1.0 + +PageStackWindow { + id: appWindow + + initialPage: mainPage + + MainPage { + id: mainPage + } + + ToolBarLayout { + id: commonTools + visible: true + ToolIcon { + platformIconId: "toolbar-view-menu" + anchors.right: (parent === undefined) ? undefined : parent.right + onClicked: (myMenu.status == DialogStatus.Closed) ? myMenu.open() : myMenu.close() + } + } + + Menu { + id: myMenu + visualParent: pageStack + MenuLayout { + MenuItem { text: qsTr("Sample menu item") } + } + } +} diff --git a/share/qtcreator/templates/qtquickapp/qmlapplicationviewer/qmlapplicationviewer.cpp b/share/qtcreator/templates/qtquickapp/qmlapplicationviewer/qmlapplicationviewer.cpp index be7ce4ec06297340a6e01f3c7dfc63e149dd1069..f1a6b80b2a8de0ac612b9b2025e4ef3eb5c5f381 100644 --- a/share/qtcreator/templates/qtquickapp/qmlapplicationviewer/qmlapplicationviewer.cpp +++ b/share/qtcreator/templates/qtquickapp/qmlapplicationviewer/qmlapplicationviewer.cpp @@ -146,7 +146,7 @@ void QmlApplicationViewer::setOrientation(ScreenOrientation orientation) void QmlApplicationViewer::showExpanded() { -#ifdef Q_OS_SYMBIAN +#if defined(Q_OS_SYMBIAN) || defined(MEEGO_EDITION_HARMATTAN) showFullScreen(); #elif defined(Q_WS_MAEMO_5) showMaximized(); diff --git a/src/plugins/qt4projectmanager/qt-desktop/qt4desktoptargetfactory.cpp b/src/plugins/qt4projectmanager/qt-desktop/qt4desktoptargetfactory.cpp index b27b10139396365cc69a55f22b01d53a44a95653..194660850deecb87d41c7b925685c7465cab2981 100644 --- a/src/plugins/qt4projectmanager/qt-desktop/qt4desktoptargetfactory.cpp +++ b/src/plugins/qt4projectmanager/qt-desktop/qt4desktoptargetfactory.cpp @@ -163,6 +163,7 @@ QSet<QString> Qt4DesktopTargetFactory::targetFeatures(const QString & /*id*/) co features << Constants::SHADOWBUILD_TARGETFEATURE_ID; // how to check check whether they component set is really installed? features << Constants::QTQUICKCOMPONENTS_SYMBIAN_TARGETFEATURE_ID; + features << Constants::QTQUICKCOMPONENTS_MEEGO_TARGETFEATURE_ID; return features; } diff --git a/src/plugins/qt4projectmanager/qt-desktop/qt4simulatortargetfactory.cpp b/src/plugins/qt4projectmanager/qt-desktop/qt4simulatortargetfactory.cpp index ae0ce9ccb98c3b0f03b6d960ca277a0774db4cbb..6dadf5449ea86ff02fb7df3cbd54cc95ef717385 100644 --- a/src/plugins/qt4projectmanager/qt-desktop/qt4simulatortargetfactory.cpp +++ b/src/plugins/qt4projectmanager/qt-desktop/qt4simulatortargetfactory.cpp @@ -131,6 +131,7 @@ QSet<QString> Qt4SimulatorTargetFactory::targetFeatures(const QString & /*id*/) features << Constants::SHADOWBUILD_TARGETFEATURE_ID; // how to check check whether the component set is really installed? features << Constants::QTQUICKCOMPONENTS_SYMBIAN_TARGETFEATURE_ID; + features << Constants::QTQUICKCOMPONENTS_MEEGO_TARGETFEATURE_ID; return features; } diff --git a/src/plugins/qt4projectmanager/qt4projectmanagerconstants.h b/src/plugins/qt4projectmanager/qt4projectmanagerconstants.h index 5562ebb041968c7cef902511a42914c762ae1d85..f3a21193b12e9ceb0a4c616763c3ffa326358dc7 100644 --- a/src/plugins/qt4projectmanager/qt4projectmanagerconstants.h +++ b/src/plugins/qt4projectmanager/qt4projectmanagerconstants.h @@ -98,6 +98,8 @@ const char * const DESKTOP_TARGETFEATURE_ID = "Qt4ProjectManager.TargetFeature.D const char * const SHADOWBUILD_TARGETFEATURE_ID = "Qt4ProjectManager.TargetFeature.ShadowBuild"; const char * const QTQUICKCOMPONENTS_SYMBIAN_TARGETFEATURE_ID = "Qt4ProjectManager.TargetFeature.QtQuickComponentsSymbian"; +const char * const QTQUICKCOMPONENTS_MEEGO_TARGETFEATURE_ID + = "Qt4ProjectManager.TargetFeature.QtQuickComponentsMeego"; // Tool chains: diff --git a/src/plugins/qt4projectmanager/wizards/qtquickapp.cpp b/src/plugins/qt4projectmanager/wizards/qtquickapp.cpp index 548205fcd66f52fd9356be53a10a6a3024104d74..b6448213c4af5576ea8f8adb09157cd69aa3228f 100644 --- a/src/plugins/qt4projectmanager/wizards/qtquickapp.cpp +++ b/src/plugins/qt4projectmanager/wizards/qtquickapp.cpp @@ -349,7 +349,8 @@ Core::GeneratedFiles QtQuickApp::generateFiles(QString *errorMessage) const Core::GeneratedFiles files = AbstractMobileApp::generateFiles(errorMessage); if (!useExistingMainQml()) { files.append(file(generateFile(QtQuickAppGeneratedFileInfo::MainQmlFile, errorMessage), path(MainQml))); - if (componentSet() == QtQuickApp::Symbian10Components) + if ((componentSet() == QtQuickApp::Symbian10Components) + || (componentSet() == QtQuickApp::Meego10Components)) files.append(file(generateFile(QtQuickAppGeneratedFileInfo::MainPageQmlFile, errorMessage), path(MainPageQml))); files.last().setAttributes(Core::GeneratedFile::OpenEditorAttribute); } @@ -451,13 +452,15 @@ QString QtQuickApp::componentSetDir(ComponentSet componentSet) const switch (componentSet) { case Symbian10Components: return QLatin1String("symbian10"); + case Meego10Components: + return QLatin1String("meego10"); case QtQuick10Components: default: return QLatin1String("qtquick10"); } } -const int QtQuickApp::StubVersion = 12; +const int QtQuickApp::StubVersion = 13; } // namespace Internal } // namespace Qt4ProjectManager diff --git a/src/plugins/qt4projectmanager/wizards/qtquickapp.h b/src/plugins/qt4projectmanager/wizards/qtquickapp.h index 34b854272c12c9403c3cba1ca0b95829238b0b38..0cc39aba52c7bac8a155ec3e65f995671913e6b2 100644 --- a/src/plugins/qt4projectmanager/wizards/qtquickapp.h +++ b/src/plugins/qt4projectmanager/wizards/qtquickapp.h @@ -117,7 +117,8 @@ public: enum ComponentSet { QtQuick10Components, - Symbian10Components + Symbian10Components, + Meego10Components }; QtQuickApp(); diff --git a/src/plugins/qt4projectmanager/wizards/qtquickappwizard.cpp b/src/plugins/qt4projectmanager/wizards/qtquickappwizard.cpp index 380327cb467511de86d1986fd7888f02da014806..0c2d8a3e72e093bdd78a7c082a8f4496556d3e99 100644 --- a/src/plugins/qt4projectmanager/wizards/qtquickappwizard.cpp +++ b/src/plugins/qt4projectmanager/wizards/qtquickappwizard.cpp @@ -95,6 +95,11 @@ bool QtQuickAppWizardDialog::validateCurrentPage() QSet<QString> requiredFeatures; requiredFeatures << Constants::QTQUICKCOMPONENTS_SYMBIAN_TARGETFEATURE_ID; targetsPage()->setRequiredFeatures(requiredFeatures); + } else if (m_componentOptionsPage->componentSet() == QtQuickApp::Meego10Components) { + targetsPage()->setMinimumQtVersion(QtSupport::QtVersionNumber(4, 7, 4)); + QSet<QString> requiredFeatures; + requiredFeatures << Constants::QTQUICKCOMPONENTS_MEEGO_TARGETFEATURE_ID; + targetsPage()->setRequiredFeatures(requiredFeatures); } } return AbstractMobileAppWizardDialog::validateCurrentPage(); diff --git a/src/plugins/qt4projectmanager/wizards/qtquickappwizardpages.cpp b/src/plugins/qt4projectmanager/wizards/qtquickappwizardpages.cpp index 9a0884f94b2b4e3a9d332ed2305590140b8e74a8..ad5903e79d800a67172a69f576374b7210052595 100644 --- a/src/plugins/qt4projectmanager/wizards/qtquickappwizardpages.cpp +++ b/src/plugins/qt4projectmanager/wizards/qtquickappwizardpages.cpp @@ -64,6 +64,7 @@ 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.meego10RadioButton, 2); connect(m_d->ui.buttonGroup, SIGNAL(buttonClicked(int)), this, SLOT(radioButtonChecked(int))); } @@ -75,6 +76,7 @@ QtQuickComponentSetOptionsPage::~QtQuickComponentSetOptionsPage() QtQuickApp::ComponentSet QtQuickComponentSetOptionsPage::componentSet() const { switch (m_d->ui.buttonGroup->checkedId()) { + case 2: return QtQuickApp::Meego10Components; case 1: return QtQuickApp::Symbian10Components; case 0: default: return QtQuickApp::QtQuick10Components; @@ -84,6 +86,7 @@ QtQuickApp::ComponentSet QtQuickComponentSetOptionsPage::componentSet() const void QtQuickComponentSetOptionsPage::setComponentSet(QtQuickApp::ComponentSet componentSet) { switch (componentSet) { + case QtQuickApp::Meego10Components: m_d->ui.meego10RadioButton->click(); break; case QtQuickApp::Symbian10Components: m_d->ui.symbian10RadioButton->click(); break; case QtQuickApp::QtQuick10Components: default: m_d->ui.qtquick10RadioButton->click(); break; diff --git a/src/plugins/qt4projectmanager/wizards/qtquickcomponentsetoptionspage.ui b/src/plugins/qt4projectmanager/wizards/qtquickcomponentsetoptionspage.ui index 10b7944119f9e36b249f80c730939a9ae778bab2..cf514765ef32136f91827e27ef4e32962ed1be5d 100644 --- a/src/plugins/qt4projectmanager/wizards/qtquickcomponentsetoptionspage.ui +++ b/src/plugins/qt4projectmanager/wizards/qtquickcomponentsetoptionspage.ui @@ -52,6 +52,16 @@ </attribute> </widget> </item> + <item> + <widget class="QRadioButton" name="meego10RadioButton"> + <property name="text"> + <string>Qt Quick Components for Meego/Harmattan</string> + </property> + <attribute name="buttonGroup"> + <string>buttonGroup</string> + </attribute> + </widget> + </item> <item> <spacer name="verticalSpacer"> <property name="orientation"> @@ -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"> @@ -99,7 +109,26 @@ Requires Qt 4.7.1 or newer.</string> <property name="text"> <string>The Qt Quick Components for Symbian are a set of ready-made components that are designed with specific native appearance for the Symbian platform. -Requires Qt 4.7.3 or newer, and the component set installed for your Qt version / Symbian device.</string> +Requires Qt 4.7.3 or newer, and the component set installed for your Qt version.</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="meego10DescriptionWidget"> + <layout class="QGridLayout" name="gridLayout_4"> + <item row="0" column="0"> + <widget class="QLabel" name="meego1DescriptionLabel"> + <property name="text"> + <string>The Qt Quick Components for Meego/Harmattan are a set of ready-made components that are designed with specific native appearance for the Meego/Harmattan platform. + +Requires Qt 4.7.4 or newer, and the component set installed for your Qt version.</string> </property> <property name="alignment"> <set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop</set> diff --git a/src/plugins/remotelinux/qt4maemotargetfactory.cpp b/src/plugins/remotelinux/qt4maemotargetfactory.cpp index b8661d1c9928acfff3ffedec0bb143a564897033..0577ede5626d350cd0b8b82c51e85fe6696a8702 100644 --- a/src/plugins/remotelinux/qt4maemotargetfactory.cpp +++ b/src/plugins/remotelinux/qt4maemotargetfactory.cpp @@ -165,7 +165,8 @@ QSet<QString> Qt4MaemoTargetFactory::targetFeatures(const QString & /*id*/) cons #ifndef Q_OS_WIN features << Qt4ProjectManager::Constants::SHADOWBUILD_TARGETFEATURE_ID; #endif - + // how to check check whether the component set is really installed? + features << Qt4ProjectManager::Constants::QTQUICKCOMPONENTS_MEEGO_TARGETFEATURE_ID; return features; }