forked from qt-creator/qt-creator
Changing template/qmljsdbg-lib as suggested in QTCREATORBUG-2885
- Renaming the screen orientation enum and keys - Explicit constructors - Virtual destructors - Renamed some occurences of 'Qml' in comments to 'QML' - Adding descriptive comments to all generated files which should not be touched by the user. - Adding missing license headers to the qmljsdebugger sources Task-Number: QTCREATORBUG-2885 Reviewed-by: Friedemann Kleint Reviewed-by: dt
This commit is contained in:
@@ -1,3 +1,32 @@
|
||||
/**************************************************************************
|
||||
**
|
||||
** This file is part of Qt Creator
|
||||
**
|
||||
** Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
|
||||
**
|
||||
** Contact: Nokia Corporation (qt-info@nokia.com)
|
||||
**
|
||||
** Commercial Usage
|
||||
**
|
||||
** Licensees holding valid Qt Commercial licenses may use this file in
|
||||
** accordance with the Qt Commercial License Agreement provided with the
|
||||
** Software or, alternatively, in accordance with the terms contained in
|
||||
** a written agreement between you and Nokia.
|
||||
**
|
||||
** 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.
|
||||
**
|
||||
** If you are unsure which license is appropriate for your use, please
|
||||
** contact the sales department at http://qt.nokia.com/contact.
|
||||
**
|
||||
**************************************************************************/
|
||||
|
||||
#include "boundingrecthighlighter.h"
|
||||
#include "qdeclarativeviewobserver.h"
|
||||
#include "qmlobserverconstants.h"
|
||||
|
||||
@@ -1,3 +1,32 @@
|
||||
/**************************************************************************
|
||||
**
|
||||
** This file is part of Qt Creator
|
||||
**
|
||||
** Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
|
||||
**
|
||||
** Contact: Nokia Corporation (qt-info@nokia.com)
|
||||
**
|
||||
** Commercial Usage
|
||||
**
|
||||
** Licensees holding valid Qt Commercial licenses may use this file in
|
||||
** accordance with the Qt Commercial License Agreement provided with the
|
||||
** Software or, alternatively, in accordance with the terms contained in
|
||||
** a written agreement between you and Nokia.
|
||||
**
|
||||
** 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.
|
||||
**
|
||||
** If you are unsure which license is appropriate for your use, please
|
||||
** contact the sales department at http://qt.nokia.com/contact.
|
||||
**
|
||||
**************************************************************************/
|
||||
|
||||
#ifndef BOUNDINGRECTHIGHLIGHTER_H
|
||||
#define BOUNDINGRECTHIGHLIGHTER_H
|
||||
|
||||
|
||||
@@ -1,3 +1,32 @@
|
||||
/**************************************************************************
|
||||
**
|
||||
** This file is part of Qt Creator
|
||||
**
|
||||
** Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
|
||||
**
|
||||
** Contact: Nokia Corporation (qt-info@nokia.com)
|
||||
**
|
||||
** Commercial Usage
|
||||
**
|
||||
** Licensees holding valid Qt Commercial licenses may use this file in
|
||||
** accordance with the Qt Commercial License Agreement provided with the
|
||||
** Software or, alternatively, in accordance with the terms contained in
|
||||
** a written agreement between you and Nokia.
|
||||
**
|
||||
** 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.
|
||||
**
|
||||
** If you are unsure which license is appropriate for your use, please
|
||||
** contact the sales department at http://qt.nokia.com/contact.
|
||||
**
|
||||
**************************************************************************/
|
||||
|
||||
#include "colorpickertool.h"
|
||||
#include "qdeclarativeviewobserver.h"
|
||||
|
||||
|
||||
@@ -1,3 +1,32 @@
|
||||
/**************************************************************************
|
||||
**
|
||||
** This file is part of Qt Creator
|
||||
**
|
||||
** Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
|
||||
**
|
||||
** Contact: Nokia Corporation (qt-info@nokia.com)
|
||||
**
|
||||
** Commercial Usage
|
||||
**
|
||||
** Licensees holding valid Qt Commercial licenses may use this file in
|
||||
** accordance with the Qt Commercial License Agreement provided with the
|
||||
** Software or, alternatively, in accordance with the terms contained in
|
||||
** a written agreement between you and Nokia.
|
||||
**
|
||||
** 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.
|
||||
**
|
||||
** If you are unsure which license is appropriate for your use, please
|
||||
** contact the sales department at http://qt.nokia.com/contact.
|
||||
**
|
||||
**************************************************************************/
|
||||
|
||||
#ifndef COLORPICKERTOOL_H
|
||||
#define COLORPICKERTOOL_H
|
||||
|
||||
|
||||
@@ -1,3 +1,6 @@
|
||||
# This file is part of Qt Creator
|
||||
# It enables debugging of Qt Quick applications
|
||||
|
||||
INCLUDEPATH += $$PWD
|
||||
|
||||
HEADERS += \
|
||||
|
||||
@@ -1,3 +1,32 @@
|
||||
/**************************************************************************
|
||||
**
|
||||
** This file is part of Qt Creator
|
||||
**
|
||||
** Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
|
||||
**
|
||||
** Contact: Nokia Corporation (qt-info@nokia.com)
|
||||
**
|
||||
** Commercial Usage
|
||||
**
|
||||
** Licensees holding valid Qt Commercial licenses may use this file in
|
||||
** accordance with the Qt Commercial License Agreement provided with the
|
||||
** Software or, alternatively, in accordance with the terms contained in
|
||||
** a written agreement between you and Nokia.
|
||||
**
|
||||
** 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.
|
||||
**
|
||||
** If you are unsure which license is appropriate for your use, please
|
||||
** contact the sales department at http://qt.nokia.com/contact.
|
||||
**
|
||||
**************************************************************************/
|
||||
|
||||
#include <QLabel>
|
||||
#include <QIcon>
|
||||
#include <QAction>
|
||||
|
||||
@@ -1,3 +1,32 @@
|
||||
/**************************************************************************
|
||||
**
|
||||
** This file is part of Qt Creator
|
||||
**
|
||||
** Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
|
||||
**
|
||||
** Contact: Nokia Corporation (qt-info@nokia.com)
|
||||
**
|
||||
** Commercial Usage
|
||||
**
|
||||
** Licensees holding valid Qt Commercial licenses may use this file in
|
||||
** accordance with the Qt Commercial License Agreement provided with the
|
||||
** Software or, alternatively, in accordance with the terms contained in
|
||||
** a written agreement between you and Nokia.
|
||||
**
|
||||
** 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.
|
||||
**
|
||||
** If you are unsure which license is appropriate for your use, please
|
||||
** contact the sales department at http://qt.nokia.com/contact.
|
||||
**
|
||||
**************************************************************************/
|
||||
|
||||
#ifndef QMLTOOLBAR_H
|
||||
#define QMLTOOLBAR_H
|
||||
|
||||
|
||||
@@ -1,3 +1,32 @@
|
||||
/**************************************************************************
|
||||
**
|
||||
** This file is part of Qt Creator
|
||||
**
|
||||
** Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
|
||||
**
|
||||
** Contact: Nokia Corporation (qt-info@nokia.com)
|
||||
**
|
||||
** Commercial Usage
|
||||
**
|
||||
** Licensees holding valid Qt Commercial licenses may use this file in
|
||||
** accordance with the Qt Commercial License Agreement provided with the
|
||||
** Software or, alternatively, in accordance with the terms contained in
|
||||
** a written agreement between you and Nokia.
|
||||
**
|
||||
** 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.
|
||||
**
|
||||
** If you are unsure which license is appropriate for your use, please
|
||||
** contact the sales department at http://qt.nokia.com/contact.
|
||||
**
|
||||
**************************************************************************/
|
||||
|
||||
#include "subcomponenteditortool.h"
|
||||
#include "../qdeclarativeviewobserver_p.h"
|
||||
#include "subcomponentmasklayeritem.h"
|
||||
|
||||
@@ -1,3 +1,32 @@
|
||||
/**************************************************************************
|
||||
**
|
||||
** This file is part of Qt Creator
|
||||
**
|
||||
** Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
|
||||
**
|
||||
** Contact: Nokia Corporation (qt-info@nokia.com)
|
||||
**
|
||||
** Commercial Usage
|
||||
**
|
||||
** Licensees holding valid Qt Commercial licenses may use this file in
|
||||
** accordance with the Qt Commercial License Agreement provided with the
|
||||
** Software or, alternatively, in accordance with the terms contained in
|
||||
** a written agreement between you and Nokia.
|
||||
**
|
||||
** 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.
|
||||
**
|
||||
** If you are unsure which license is appropriate for your use, please
|
||||
** contact the sales department at http://qt.nokia.com/contact.
|
||||
**
|
||||
**************************************************************************/
|
||||
|
||||
#ifndef SUBCOMPONENTEDITORTOOL_H
|
||||
#define SUBCOMPONENTEDITORTOOL_H
|
||||
|
||||
|
||||
@@ -1,3 +1,32 @@
|
||||
/**************************************************************************
|
||||
**
|
||||
** This file is part of Qt Creator
|
||||
**
|
||||
** Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
|
||||
**
|
||||
** Contact: Nokia Corporation (qt-info@nokia.com)
|
||||
**
|
||||
** Commercial Usage
|
||||
**
|
||||
** Licensees holding valid Qt Commercial licenses may use this file in
|
||||
** accordance with the Qt Commercial License Agreement provided with the
|
||||
** Software or, alternatively, in accordance with the terms contained in
|
||||
** a written agreement between you and Nokia.
|
||||
**
|
||||
** 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.
|
||||
**
|
||||
** If you are unsure which license is appropriate for your use, please
|
||||
** contact the sales department at http://qt.nokia.com/contact.
|
||||
**
|
||||
**************************************************************************/
|
||||
|
||||
#include "subcomponentmasklayeritem.h"
|
||||
#include "qmlobserverconstants.h"
|
||||
#include "qdeclarativeviewobserver.h"
|
||||
|
||||
@@ -1,3 +1,32 @@
|
||||
/**************************************************************************
|
||||
**
|
||||
** This file is part of Qt Creator
|
||||
**
|
||||
** Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
|
||||
**
|
||||
** Contact: Nokia Corporation (qt-info@nokia.com)
|
||||
**
|
||||
** Commercial Usage
|
||||
**
|
||||
** Licensees holding valid Qt Commercial licenses may use this file in
|
||||
** accordance with the Qt Commercial License Agreement provided with the
|
||||
** Software or, alternatively, in accordance with the terms contained in
|
||||
** a written agreement between you and Nokia.
|
||||
**
|
||||
** 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.
|
||||
**
|
||||
** If you are unsure which license is appropriate for your use, please
|
||||
** contact the sales department at http://qt.nokia.com/contact.
|
||||
**
|
||||
**************************************************************************/
|
||||
|
||||
#ifndef SUBCOMPONENTMASKLAYERITEM_H
|
||||
#define SUBCOMPONENTMASKLAYERITEM_H
|
||||
|
||||
|
||||
@@ -1,3 +1,32 @@
|
||||
/**************************************************************************
|
||||
**
|
||||
** This file is part of Qt Creator
|
||||
**
|
||||
** Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
|
||||
**
|
||||
** Contact: Nokia Corporation (qt-info@nokia.com)
|
||||
**
|
||||
** Commercial Usage
|
||||
**
|
||||
** Licensees holding valid Qt Commercial licenses may use this file in
|
||||
** accordance with the Qt Commercial License Agreement provided with the
|
||||
** Software or, alternatively, in accordance with the terms contained in
|
||||
** a written agreement between you and Nokia.
|
||||
**
|
||||
** 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.
|
||||
**
|
||||
** If you are unsure which license is appropriate for your use, please
|
||||
** contact the sales department at http://qt.nokia.com/contact.
|
||||
**
|
||||
**************************************************************************/
|
||||
|
||||
#include "toolbarcolorbox.h"
|
||||
#include "qmlobserverconstants.h"
|
||||
|
||||
|
||||
@@ -1,3 +1,32 @@
|
||||
/**************************************************************************
|
||||
**
|
||||
** This file is part of Qt Creator
|
||||
**
|
||||
** Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
|
||||
**
|
||||
** Contact: Nokia Corporation (qt-info@nokia.com)
|
||||
**
|
||||
** Commercial Usage
|
||||
**
|
||||
** Licensees holding valid Qt Commercial licenses may use this file in
|
||||
** accordance with the Qt Commercial License Agreement provided with the
|
||||
** Software or, alternatively, in accordance with the terms contained in
|
||||
** a written agreement between you and Nokia.
|
||||
**
|
||||
** 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.
|
||||
**
|
||||
** If you are unsure which license is appropriate for your use, please
|
||||
** contact the sales department at http://qt.nokia.com/contact.
|
||||
**
|
||||
**************************************************************************/
|
||||
|
||||
#ifndef ToolBarColorBox_H
|
||||
#define ToolBarColorBox_H
|
||||
|
||||
|
||||
@@ -1,3 +1,32 @@
|
||||
/**************************************************************************
|
||||
**
|
||||
** This file is part of Qt Creator
|
||||
**
|
||||
** Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
|
||||
**
|
||||
** Contact: Nokia Corporation (qt-info@nokia.com)
|
||||
**
|
||||
** Commercial Usage
|
||||
**
|
||||
** Licensees holding valid Qt Commercial licenses may use this file in
|
||||
** accordance with the Qt Commercial License Agreement provided with the
|
||||
** Software or, alternatively, in accordance with the terms contained in
|
||||
** a written agreement between you and Nokia.
|
||||
**
|
||||
** 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.
|
||||
**
|
||||
** If you are unsure which license is appropriate for your use, please
|
||||
** contact the sales department at http://qt.nokia.com/contact.
|
||||
**
|
||||
**************************************************************************/
|
||||
|
||||
#include "zoomtool.h"
|
||||
#include "../qdeclarativeviewobserver_p.h"
|
||||
|
||||
|
||||
@@ -1,3 +1,32 @@
|
||||
/**************************************************************************
|
||||
**
|
||||
** This file is part of Qt Creator
|
||||
**
|
||||
** Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
|
||||
**
|
||||
** Contact: Nokia Corporation (qt-info@nokia.com)
|
||||
**
|
||||
** Commercial Usage
|
||||
**
|
||||
** Licensees holding valid Qt Commercial licenses may use this file in
|
||||
** accordance with the Qt Commercial License Agreement provided with the
|
||||
** Software or, alternatively, in accordance with the terms contained in
|
||||
** a written agreement between you and Nokia.
|
||||
**
|
||||
** 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.
|
||||
**
|
||||
** If you are unsure which license is appropriate for your use, please
|
||||
** contact the sales department at http://qt.nokia.com/contact.
|
||||
**
|
||||
**************************************************************************/
|
||||
|
||||
#ifndef ZOOMTOOL_H
|
||||
#define ZOOMTOOL_H
|
||||
|
||||
|
||||
@@ -1,3 +1,6 @@
|
||||
# This file is part of Qt Creator
|
||||
# It enables debugging of Qt Quick applications
|
||||
|
||||
QT += declarative script
|
||||
INCLUDEPATH += $$PWD/include
|
||||
DEPENDPATH += $$PWD $$PWD/include editor $$PWD/qt-private
|
||||
|
||||
@@ -1,3 +1,6 @@
|
||||
# This file is part of Qt Creator
|
||||
# It enables debugging of Qt Quick applications
|
||||
|
||||
INCLUDEPATH += $$PWD/include
|
||||
DEPENDPATH += $PPWD/include
|
||||
QT += declarative script
|
||||
|
||||
@@ -1,3 +1,6 @@
|
||||
# This file is part of Qt Creator
|
||||
# It enables debugging of Qt Quick applications
|
||||
|
||||
TEMPLATE = lib
|
||||
CONFIG+=dll
|
||||
TARGET = QmlJSDebugger
|
||||
|
||||
@@ -7,7 +7,7 @@ int main(int argc, char *argv[])
|
||||
QApplication app(argc, argv);
|
||||
|
||||
MainWindow mainWindow;
|
||||
mainWindow.setOrientation(MainWindow::Auto); // ORIENTATION
|
||||
mainWindow.setOrientation(MainWindow::ScreenOrientationAuto); // ORIENTATION
|
||||
|
||||
#ifdef Q_OS_SYMBIAN
|
||||
mainWindow.showFullScreen();
|
||||
|
||||
@@ -1,3 +1,11 @@
|
||||
/*
|
||||
This file was generated by the Mobile Qt Application wizard of Qt Creator.
|
||||
MainWindow is a convenience class containing mobile device specific code
|
||||
such as screen orientation handling.
|
||||
It is recommended not to modify this file, since newer versions of Qt Creator
|
||||
may offer an updated version of it.
|
||||
*/
|
||||
|
||||
#include "mainwindow.h"
|
||||
#include "ui_mainwindow.h"
|
||||
|
||||
@@ -21,13 +29,13 @@ MainWindow::~MainWindow()
|
||||
delete ui;
|
||||
}
|
||||
|
||||
void MainWindow::setOrientation(Orientation orientation)
|
||||
void MainWindow::setOrientation(ScreenOrientation orientation)
|
||||
{
|
||||
#ifdef Q_OS_SYMBIAN
|
||||
if (orientation != Auto) {
|
||||
if (orientation != ScreenOrientationAuto) {
|
||||
#if defined(ORIENTATIONLOCK)
|
||||
const CAknAppUiBase::TAppUiOrientation uiOrientation =
|
||||
(orientation == LockPortrait) ? CAknAppUi::EAppUiOrientationPortrait
|
||||
(orientation == ScreenOrientationLockPortrait) ? CAknAppUi::EAppUiOrientationPortrait
|
||||
: CAknAppUi::EAppUiOrientationLandscape;
|
||||
CAknAppUi* appUi = dynamic_cast<CAknAppUi*> (CEikonEnv::Static()->AppUi());
|
||||
TRAPD(error,
|
||||
@@ -41,13 +49,13 @@ void MainWindow::setOrientation(Orientation orientation)
|
||||
#elif defined(Q_WS_MAEMO_5)
|
||||
Qt::WidgetAttribute attribute;
|
||||
switch (orientation) {
|
||||
case LockPortrait:
|
||||
case ScreenOrientationLockPortrait:
|
||||
attribute = Qt::WA_Maemo5PortraitOrientation;
|
||||
break;
|
||||
case LockLandscape:
|
||||
case ScreenOrientationLockLandscape:
|
||||
attribute = Qt::WA_Maemo5LandscapeOrientation;
|
||||
break;
|
||||
case Auto:
|
||||
case ScreenOrientationAuto:
|
||||
default:
|
||||
attribute = Qt::WA_Maemo5AutoOrientation;
|
||||
break;
|
||||
|
||||
@@ -1,3 +1,11 @@
|
||||
/*
|
||||
This file was generated by the Mobile Qt Application wizard of Qt Creator.
|
||||
MainWindow is a convenience class containing mobile device specific code
|
||||
such as screen orientation handling.
|
||||
It is recommended not to modify this file, since newer versions of Qt Creator
|
||||
may offer an updated version of it.
|
||||
*/
|
||||
|
||||
#ifndef MAINWINDOW_H
|
||||
#define MAINWINDOW_H
|
||||
|
||||
@@ -11,16 +19,16 @@ class MainWindow : public QMainWindow
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
enum Orientation {
|
||||
LockPortrait,
|
||||
LockLandscape,
|
||||
Auto
|
||||
enum ScreenOrientation {
|
||||
ScreenOrientationLockPortrait,
|
||||
ScreenOrientationLockLandscape,
|
||||
ScreenOrientationAuto
|
||||
};
|
||||
|
||||
MainWindow(QWidget *parent = 0);
|
||||
~MainWindow();
|
||||
explicit MainWindow(QWidget *parent = 0);
|
||||
virtual ~MainWindow();
|
||||
|
||||
void setOrientation(Orientation orientation);
|
||||
void setOrientation(ScreenOrientation orientation);
|
||||
|
||||
private:
|
||||
Ui::MainWindow *ui;
|
||||
|
||||
@@ -5,7 +5,7 @@ folder_01.target = qml
|
||||
DEPLOYMENTFOLDERS = folder_01
|
||||
# DEPLOYMENTFOLDERS_END #
|
||||
|
||||
# Additional import path used to resolve Qml modules in Creator's code model
|
||||
# Additional import path used to resolve QML modules in Creator's code model
|
||||
# QML_IMPORT_PATH #
|
||||
QML_IMPORT_PATH =
|
||||
|
||||
|
||||
@@ -7,7 +7,7 @@ int main(int argc, char *argv[])
|
||||
|
||||
QmlApplicationViewer viewer;
|
||||
viewer.addImportPath(QLatin1String("modules")); // ADDIMPORTPATH
|
||||
viewer.setOrientation(QmlApplicationViewer::Auto); // ORIENTATION
|
||||
viewer.setOrientation(QmlApplicationViewer::ScreenOrientationAuto); // ORIENTATION
|
||||
viewer.setMainQmlFile(QLatin1String("qml/app/main.qml")); // MAINQML
|
||||
viewer.show();
|
||||
|
||||
|
||||
@@ -1,3 +1,12 @@
|
||||
/*
|
||||
This file was generated by the Qt Quick Application wizard of Qt Creator.
|
||||
QmlApplicationViewer is a convenience class containing mobile device specific
|
||||
code such as screen orientation handling. Also QML paths and debugging are
|
||||
handled here.
|
||||
It is recommended not to modify this file, since newer versions of Qt Creator
|
||||
may offer an updated version of it.
|
||||
*/
|
||||
|
||||
#include "qmlapplicationviewer.h"
|
||||
|
||||
#include <QtCore/QCoreApplication>
|
||||
@@ -77,13 +86,13 @@ void QmlApplicationViewer::addImportPath(const QString &path)
|
||||
engine()->addImportPath(QmlApplicationViewerPrivate::adjustPath(path));
|
||||
}
|
||||
|
||||
void QmlApplicationViewer::setOrientation(Orientation orientation)
|
||||
void QmlApplicationViewer::setOrientation(ScreenOrientation orientation)
|
||||
{
|
||||
#ifdef Q_OS_SYMBIAN
|
||||
if (orientation != Auto) {
|
||||
if (orientation != ScreenOrientationAuto) {
|
||||
#if defined(ORIENTATIONLOCK)
|
||||
const CAknAppUiBase::TAppUiOrientation uiOrientation =
|
||||
(orientation == LockPortrait) ? CAknAppUi::EAppUiOrientationPortrait
|
||||
(orientation == ScreenOrientationLockPortrait) ? CAknAppUi::EAppUiOrientationPortrait
|
||||
: CAknAppUi::EAppUiOrientationLandscape;
|
||||
CAknAppUi* appUi = dynamic_cast<CAknAppUi*> (CEikonEnv::Static()->AppUi());
|
||||
TRAPD(error,
|
||||
@@ -97,13 +106,13 @@ void QmlApplicationViewer::setOrientation(Orientation orientation)
|
||||
#elif defined(Q_WS_MAEMO_5)
|
||||
Qt::WidgetAttribute attribute;
|
||||
switch (orientation) {
|
||||
case LockPortrait:
|
||||
case ScreenOrientationLockPortrait:
|
||||
attribute = Qt::WA_Maemo5PortraitOrientation;
|
||||
break;
|
||||
case LockLandscape:
|
||||
case ScreenOrientationLockLandscape:
|
||||
attribute = Qt::WA_Maemo5LandscapeOrientation;
|
||||
break;
|
||||
case Auto:
|
||||
case ScreenOrientationAuto:
|
||||
default:
|
||||
attribute = Qt::WA_Maemo5AutoOrientation;
|
||||
break;
|
||||
|
||||
@@ -1,3 +1,12 @@
|
||||
/*
|
||||
This file was generated by the Qt Quick Application wizard of Qt Creator.
|
||||
QmlApplicationViewer is a convenience class containing mobile device specific
|
||||
code such as screen orientation handling. Also QML paths and debugging are
|
||||
handled here.
|
||||
It is recommended not to modify this file, since newer versions of Qt Creator
|
||||
may offer an updated version of it.
|
||||
*/
|
||||
|
||||
#ifndef QMLAPPLICATIONVIEWER_H
|
||||
#define QMLAPPLICATIONVIEWER_H
|
||||
|
||||
@@ -5,19 +14,21 @@
|
||||
|
||||
class QmlApplicationViewer : public QDeclarativeView
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
enum Orientation {
|
||||
LockPortrait,
|
||||
LockLandscape,
|
||||
Auto
|
||||
enum ScreenOrientation {
|
||||
ScreenOrientationLockPortrait,
|
||||
ScreenOrientationLockLandscape,
|
||||
ScreenOrientationAuto
|
||||
};
|
||||
|
||||
QmlApplicationViewer(QWidget *parent = 0);
|
||||
explicit QmlApplicationViewer(QWidget *parent = 0);
|
||||
virtual ~QmlApplicationViewer();
|
||||
|
||||
void setMainQmlFile(const QString &file);
|
||||
void addImportPath(const QString &path);
|
||||
void setOrientation(Orientation orientation);
|
||||
void setOrientation(ScreenOrientation orientation);
|
||||
void show();
|
||||
|
||||
private:
|
||||
|
||||
@@ -1,5 +1,8 @@
|
||||
# This file should not be edited.
|
||||
# Future versions of Qt Creator might offer updated versions of this file.
|
||||
# This file was generated by the Qt Quick Application wizard of Qt Creator.
|
||||
# The code below adds the QmlApplicationViewer to the project and handles the
|
||||
# activation of QML debugging.
|
||||
# It is recommended not to modify this file, since newer versions of Qt Creator
|
||||
# may offer an updated version of it.
|
||||
|
||||
QT += declarative
|
||||
|
||||
|
||||
@@ -1,5 +1,8 @@
|
||||
# This file should not be edited.
|
||||
# Future versions of Qt Creator might offer updated versions of this file.
|
||||
# This file was generated by an application wizard of Qt Creator.
|
||||
# The code below handles deployment to Symbian and Maemo, aswell as copying
|
||||
# of the application data to shadow build directories on desktop.
|
||||
# It is recommended not to modify this file, since newer versions of Qt Creator
|
||||
# may offer an updated version of it.
|
||||
|
||||
defineTest(qtcAddDeployment) {
|
||||
for(deploymentfolder, DEPLOYMENTFOLDERS) {
|
||||
|
||||
@@ -68,7 +68,7 @@ const QString AbstractMobileApp::FileStubVersion(QLatin1String("version"));
|
||||
const int AbstractMobileApp::StubVersion = 1;
|
||||
|
||||
AbstractMobileApp::AbstractMobileApp()
|
||||
: m_orientation(Auto), m_networkEnabled(false)
|
||||
: m_orientation(ScreenOrientationAuto), m_networkEnabled(false)
|
||||
{
|
||||
}
|
||||
|
||||
@@ -85,12 +85,12 @@ QString AbstractMobileApp::symbianUidForPath(const QString &path)
|
||||
+ QString::fromLatin1("%1").arg(hash, 7, 16, QLatin1Char('0')).right(7).toUpper();
|
||||
}
|
||||
|
||||
void AbstractMobileApp::setOrientation(Orientation orientation)
|
||||
void AbstractMobileApp::setOrientation(ScreenOrientation orientation)
|
||||
{
|
||||
m_orientation = orientation;
|
||||
}
|
||||
|
||||
AbstractMobileApp::Orientation AbstractMobileApp::orientation() const
|
||||
AbstractMobileApp::ScreenOrientation AbstractMobileApp::orientation() const
|
||||
{
|
||||
return m_orientation;
|
||||
}
|
||||
@@ -210,14 +210,14 @@ QByteArray AbstractMobileApp::generateMainCpp(QString *errorMessage) const
|
||||
if (line.contains(QLatin1String("// ORIENTATION"))) {
|
||||
const char *orientationString;
|
||||
switch (orientation()) {
|
||||
case LockLandscape:
|
||||
orientationString = "LockLandscape";
|
||||
case ScreenOrientationLockLandscape:
|
||||
orientationString = "ScreenOrientationLockLandscape";
|
||||
break;
|
||||
case LockPortrait:
|
||||
orientationString = "LockPortrait";
|
||||
case ScreenOrientationLockPortrait:
|
||||
orientationString = "ScreenOrientationLockPortrait";
|
||||
break;
|
||||
case Auto:
|
||||
orientationString = "Auto";
|
||||
case ScreenOrientationAuto:
|
||||
orientationString = "ScreenOrientationAuto";
|
||||
break;
|
||||
}
|
||||
insertParameter(line, mainWindowClassName() + QLatin1String("::")
|
||||
@@ -258,7 +258,7 @@ QByteArray AbstractMobileApp::generateProFile(QString *errorMessage) const
|
||||
if (line.contains(QLatin1String("# TARGETUID3"))) {
|
||||
valueOnNextLine = symbianTargetUid();
|
||||
} else if (line.contains(QLatin1String("# ORIENTATIONLOCK"))
|
||||
&& orientation() == Auto) {
|
||||
&& orientation() == ScreenOrientationAuto) {
|
||||
uncommentNextLine = true;
|
||||
} else if (line.contains(QLatin1String("# NETWORKACCESS"))
|
||||
&& !networkEnabled()) {
|
||||
|
||||
@@ -70,10 +70,10 @@ struct AbstractGeneratedFileInfo
|
||||
class AbstractMobileApp : public QObject
|
||||
{
|
||||
public:
|
||||
enum Orientation {
|
||||
LockLandscape,
|
||||
LockPortrait,
|
||||
Auto
|
||||
enum ScreenOrientation {
|
||||
ScreenOrientationLockLandscape,
|
||||
ScreenOrientationLockPortrait,
|
||||
ScreenOrientationAuto
|
||||
};
|
||||
|
||||
enum FileType {
|
||||
@@ -95,8 +95,8 @@ public:
|
||||
|
||||
virtual ~AbstractMobileApp();
|
||||
|
||||
void setOrientation(Orientation orientation);
|
||||
Orientation orientation() const;
|
||||
void setOrientation(ScreenOrientation orientation);
|
||||
ScreenOrientation orientation() const;
|
||||
void setProjectName(const QString &name);
|
||||
QString projectName() const;
|
||||
void setProjectPath(const QString &path);
|
||||
@@ -164,7 +164,7 @@ private:
|
||||
QString m_symbianSvgIcon;
|
||||
QString m_maemoPngIcon;
|
||||
QString m_symbianTargetUid;
|
||||
Orientation m_orientation;
|
||||
ScreenOrientation m_orientation;
|
||||
bool m_networkEnabled;
|
||||
};
|
||||
|
||||
|
||||
@@ -60,11 +60,11 @@ MobileAppWizardOptionsPage::MobileAppWizardOptionsPage(QWidget *parent)
|
||||
SLOT(openMaemoPngIcon()));
|
||||
|
||||
m_d->ui.orientationBehaviorComboBox->addItem(tr("Automatically Rotate Orientation"),
|
||||
AbstractMobileApp::Auto);
|
||||
AbstractMobileApp::ScreenOrientationAuto);
|
||||
m_d->ui.orientationBehaviorComboBox->addItem(tr("Lock to Landscape Orientation"),
|
||||
AbstractMobileApp::LockLandscape);
|
||||
AbstractMobileApp::ScreenOrientationLockLandscape);
|
||||
m_d->ui.orientationBehaviorComboBox->addItem(tr("Lock to Portrait Orientation"),
|
||||
AbstractMobileApp::LockPortrait);
|
||||
AbstractMobileApp::ScreenOrientationLockPortrait);
|
||||
}
|
||||
|
||||
MobileAppWizardOptionsPage::~MobileAppWizardOptionsPage()
|
||||
@@ -72,7 +72,7 @@ MobileAppWizardOptionsPage::~MobileAppWizardOptionsPage()
|
||||
delete m_d;
|
||||
}
|
||||
|
||||
void MobileAppWizardOptionsPage::setOrientation(AbstractMobileApp::Orientation orientation)
|
||||
void MobileAppWizardOptionsPage::setOrientation(AbstractMobileApp::ScreenOrientation orientation)
|
||||
{
|
||||
QComboBox *const comboBox = m_d->ui.orientationBehaviorComboBox;
|
||||
for (int i = 0; i < comboBox->count(); ++i)
|
||||
@@ -82,10 +82,10 @@ void MobileAppWizardOptionsPage::setOrientation(AbstractMobileApp::Orientation o
|
||||
}
|
||||
}
|
||||
|
||||
AbstractMobileApp::Orientation MobileAppWizardOptionsPage::orientation() const
|
||||
AbstractMobileApp::ScreenOrientation MobileAppWizardOptionsPage::orientation() const
|
||||
{
|
||||
const int index = m_d->ui.orientationBehaviorComboBox->currentIndex();
|
||||
return static_cast<AbstractMobileApp::Orientation>(m_d->ui.orientationBehaviorComboBox->itemData(index).toInt());
|
||||
return static_cast<AbstractMobileApp::ScreenOrientation>(m_d->ui.orientationBehaviorComboBox->itemData(index).toInt());
|
||||
}
|
||||
|
||||
QString MobileAppWizardOptionsPage::symbianSvgIcon() const
|
||||
|
||||
@@ -46,8 +46,8 @@ public:
|
||||
explicit MobileAppWizardOptionsPage(QWidget *parent = 0);
|
||||
virtual ~MobileAppWizardOptionsPage();
|
||||
|
||||
void setOrientation(AbstractMobileApp::Orientation orientation);
|
||||
AbstractMobileApp::Orientation orientation() const;
|
||||
void setOrientation(AbstractMobileApp::ScreenOrientation orientation);
|
||||
AbstractMobileApp::ScreenOrientation orientation() const;
|
||||
QString symbianSvgIcon() const;
|
||||
void setSymbianSvgIcon(const QString &icon);
|
||||
QString maemoPngIcon() const;
|
||||
|
||||
Reference in New Issue
Block a user