Merge branch '2.3'

Conflicts:
	qtcreator.pri
	src/plugins/qmlprojectmanager/qmlprojectruncontrol.cpp
	src/plugins/remotelinux/maemodeploystepfactory.cpp
	src/plugins/remotelinux/maemodirectdeviceuploadstep.cpp

Change-Id: I195163713145e72df20aec4ac9058f0c9158083e
This commit is contained in:
Oswald Buddenhagen
2011-07-25 13:57:13 +02:00
196 changed files with 3087 additions and 1177 deletions
+1
View File
@@ -33,6 +33,7 @@ Thumbs.db
*.qmlproject.user*
*.pluginspec
src/app/Info.plist
src/libs/utils/app_version.h
src/plugins/coreplugin/ide_version.h
share/qtcreator/externaltools
@@ -0,0 +1,73 @@
/***************************************************************************
**
** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (info@qt.nokia.com)
**
** This file is part of the documentation of Qt Creator.
**
** You may use this file under the terms of the BSD license as follows:
**
** "Redistribution and use in source and binary forms, with or without
** modification, are permitted provided that the following conditions are
** met:
** * Redistributions of source code must retain the above copyright
** notice, this list of conditions and the following disclaimer.
** * Redistributions in binary form must reproduce the above copyright
** notice, this list of conditions and the following disclaimer in
** the documentation and/or other materials provided with the
** distribution.
** * Neither the name of Nokia Corporation and its Subsidiary(-ies) nor
** the names of its contributors may be used to endorse or promote
** products derived from this software without specific prior written
** permission.
**
** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
**
****************************************************************************/
# Add more folders to ship with the application, here
folder_01.source = qml/BatteryStatus
folder_01.target = qml
DEPLOYMENTFOLDERS = folder_01
# Additional import path used to resolve QML modules in Creator's code model
QML_IMPORT_PATH =
symbian:TARGET.UID3 = 0xE54A5459
# Smart Installer package's UID
# This UID is from the protected range and therefore the package will
# fail to install if self-signed. By default qmake uses the unprotected
# range value if unprotected UID is defined for the application and
# 0x2002CCCF value if protected UID is given to the application
#symbian:DEPLOYMENT.installer_header = 0x2002CCCF
# Allow network access on Symbian
symbian:TARGET.CAPABILITY += NetworkServices
# If your application uses the Qt Mobility libraries, uncomment the following
# lines and add the respective components to the MOBILITY variable.
CONFIG += mobility
MOBILITY += systeminfo
# Add dependency to symbian components
CONFIG += qtquickcomponents
# The .cpp file which was generated for your project. Feel free to hack it.
SOURCES += main.cpp
# Please do not modify the following two lines. Required for deployment.
include(qmlapplicationviewer/qmlapplicationviewer.pri)
qtcAddDeployment()
+51
View File
@@ -0,0 +1,51 @@
/***************************************************************************
**
** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (info@qt.nokia.com)
**
** This file is part of the documentation of Qt Creator.
**
** You may use this file under the terms of the BSD license as follows:
**
** "Redistribution and use in source and binary forms, with or without
** modification, are permitted provided that the following conditions are
** met:
** * Redistributions of source code must retain the above copyright
** notice, this list of conditions and the following disclaimer.
** * Redistributions in binary form must reproduce the above copyright
** notice, this list of conditions and the following disclaimer in
** the documentation and/or other materials provided with the
** distribution.
** * Neither the name of Nokia Corporation and its Subsidiary(-ies) nor
** the names of its contributors may be used to endorse or promote
** products derived from this software without specific prior written
** permission.
**
** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
**
****************************************************************************/
#include <QtGui/QApplication>
#include "qmlapplicationviewer.h"
int main(int argc, char *argv[])
{
QApplication app(argc, argv);
QmlApplicationViewer viewer;
viewer.setMainQmlFile(QLatin1String("qml/BatteryStatus/main.qml"));
viewer.showExpanded();
return app.exec();
}
@@ -0,0 +1,82 @@
/***************************************************************************
**
** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (info@qt.nokia.com)
**
** This file is part of the documentation of Qt Creator.
**
** You may use this file under the terms of the BSD license as follows:
**
** "Redistribution and use in source and binary forms, with or without
** modification, are permitted provided that the following conditions are
** met:
** * Redistributions of source code must retain the above copyright
** notice, this list of conditions and the following disclaimer.
** * Redistributions in binary form must reproduce the above copyright
** notice, this list of conditions and the following disclaimer in
** the documentation and/or other materials provided with the
** distribution.
** * Neither the name of Nokia Corporation and its Subsidiary(-ies) nor
** the names of its contributors may be used to endorse or promote
** products derived from this software without specific prior written
** permission.
**
** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
**
****************************************************************************/
import QtQuick 1.0
import com.nokia.symbian 1.0
import QtMobility.systeminfo 1.1
//! [0]
Page {
id: mainPage
DeviceInfo {
id: deviceinfo
Component.onCompleted: {
deviceinfo.startBatteryLevelChanged();
}
onBatteryLevelChanged: {
progressbar1.value = batteryLevel
}
}
//! [0]
//! [1]
Text {
id: text1
x: 0
color: platformStyle.colorNormalLight
text: qsTr("Battery status: %1%").arg(progressbar1.value)
anchors.horizontalCenter: parent.horizontalCenter
anchors.verticalCenter: parent.verticalCenter
font.pixelSize: 20
}
//! [1]
//! [2]
ProgressBar {
id: progressbar1
anchors.horizontalCenter: text1.horizontalCenter
anchors.top: text1.bottom
anchors.topMargin: 20
minimumValue: 0
maximumValue: 100
value: deviceinfo.batteryLevel
}
//! [2]
}
@@ -0,0 +1,71 @@
/***************************************************************************
**
** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (info@qt.nokia.com)
**
** This file is part of the documentation of Qt Creator.
**
** You may use this file under the terms of the BSD license as follows:
**
** "Redistribution and use in source and binary forms, with or without
** modification, are permitted provided that the following conditions are
** met:
** * Redistributions of source code must retain the above copyright
** notice, this list of conditions and the following disclaimer.
** * Redistributions in binary form must reproduce the above copyright
** notice, this list of conditions and the following disclaimer in
** the documentation and/or other materials provided with the
** distribution.
** * Neither the name of Nokia Corporation and its Subsidiary(-ies) nor
** the names of its contributors may be used to endorse or promote
** products derived from this software without specific prior written
** permission.
**
** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
**
****************************************************************************/
import QtQuick 1.0
import com.nokia.symbian 1.0
Window {
id: window
StatusBar {
id: statusBar
anchors.top: window.top
}
PageStack {
id: pageStack
anchors { left: parent.left; right: parent.right; top: statusBar.bottom; bottom: toolBar.top }
}
ToolBar {
id: toolBar
anchors.bottom: window.bottom
tools: ToolBarLayout {
id: toolBarLayout
ToolButton {
flat: true
iconSource: "toolbar-back"
onClicked: pageStack.depth <= 1 ? Qt.quit() : pageStack.pop()
}
}
}
Component.onCompleted: {
pageStack.push(Qt.resolvedUrl("MainPage.qml"))
}
}
Binary file not shown.

After

Width:  |  Height:  |  Size: 816 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 756 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 980 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 30 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 29 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 44 KiB

After

Width:  |  Height:  |  Size: 20 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 88 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 66 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 42 KiB

+384 -22
View File
@@ -56,9 +56,11 @@
\o \l{Getting Started}
\list
\o \l{Building and Running an Example Application}
\o \l{Creating a Qt Widget Based Application}
\o \l{Creating a Mobile Application with Qt SDK}
\o \l{Creating a Qt Quick Application}
\o \l{Creating a Qt Quick Application Using Qt Quick Components}
\o \l{Creating a Qt Widget Based Application}
\o \l{Creating a Qt Widget Based Mobile Application}
\endlist
\o \l{Managing Projects}
\list
@@ -465,6 +467,13 @@
can change the information that the device has about its configuration
and environment.
Qt Simulator does not support any device specific APIs by design. Therefore,
applications that run well on Qt Simulator also run on any device that hosts
the Qt and Qt Mobility libraries. However, this means that you cannot use
Qt Simulator to test applications that use device specific libraries, such
as Symbian C++ APIs. To test such applications, use the device emulators or
real devices.
The Qt Simulator is installed as part of the \QSDK. After it is
installed, you can select it as a build target in Qt Creator.
@@ -1319,10 +1328,6 @@
\image qmldesigner-element-properties.png
The default values of properties are displayed in white color, while the values
that you specify explicitly are highlighted with blue color. In addition, property
changes in states are highlighted with blue.
You can use a context-menu to reset some element properties. To reset the
position or size property of an element, right-click the element and select
\gui {Edit > Reset Position} or \gui {Reset Size} in the context menu. To
@@ -1330,6 +1335,56 @@
For more information on the properties available for an element, press \key {F1}.
\section2 Viewing Changes in Properties
The default values of properties are displayed in white color, while the
values that you specify explicitly are highlighted with blue color. In
addition, property changes in states are highlighted with blue.
This allows you to easily see which values are set in the .qml file and
which values are default characteristics of an element or a component.
When editing states, you can easily see which values are explicitly set in
the current state and which values are derived from the base state.
The following images illustrate this. In the base state, the \gui Position,
\gui Size, and \gui Colors values are explicitly set and highlighted.
\image qmldesigner-properties-explicit-base.png "Explicitly set properties"
In \gui State1, only the color is explicitly set and highlighted.
\image qmldesigner-properties-explicit-state1.png "Explicitly set properties"
Resetting a property sets it back to the default value and removes the value
from the .qml file.
\note As a result, all boolean values can be visualized in four different
ways.
For example, visibility can be visualized as follows:
\table
\row
\i \image qmldesigner-boolean-true.png
\i TRUE
\i The element is visible by default. The visibility might be
overridden by the visibility set in the base state.
\row
\i \image qmldesigner-boolean-true-blue.png
\i TRUE (highlighted)
\i The element is explicitly set to visible.
\row
\i \image qmldesigner-boolean-false.png
\i FALSE
\i The element is hidden by default. The visibility might be
overridden by the visibility set in the base state.
\row
\i \image qmldesigner-boolean-false-blue.png
\i FALSE (hightlighted)
\i The item is explicitly set to hidden.
\endtable
\section2 Setting Expressions
\l{http://doc.qt.nokia.com/4.7/propertybinding.html}{Property binding}
@@ -3177,7 +3232,7 @@
/*!
\contentspage index.html
\previouspage creator-qml-application.html
\previouspage creator-mobile-example.html
\page creator-project-managing.html
\nextpage creator-project-creating.html
@@ -5930,9 +5985,228 @@
\list
\o \l{Building and Running an Example Application}
\o \l{Creating a Qt Widget Based Application}
\o \l{Creating a Mobile Application with Qt SDK}
\o \l{Creating a Qt Quick Application}
\o \l{Creating a Qt Quick Application Using Qt Quick Components}
\o \l{Creating a Qt Widget Based Application}
\o \l{Creating a Qt Widget Based Mobile Application}
\endlist
*/
/*!
\contentspage index.html
\previouspage creator-qml-application.html
\page creator-qml-components-example.html
\nextpage creator-writing-program.html
\title Creating a Qt Quick Application Using Qt Quick Components
\note To complete this tutorial, you must install the Qt Quick Components
for Symbian and the Symbian^3 tool chain as part of the \QSDK. In addition,
you must install the Qt Quick Components on the test device.
This tutorial describes how to use Qt Creator to create a small Qt
application, Battery Status, that uses the System Information
Mobility API to fetch battery information from the device.
\image qtcreator-symbian-components-example.png "Mobile example"
The user interface for the application is designed using Qt Quick Components
for Symbian. This enforces a platform look and feel for Symbian^3 devices.
\section1 Creating the Project
\list 1
\o Select \gui{File > New File or Project > Qt Quick Project > Qt Quick
Application > Choose}.
\o In the \gui{Name} field, type \bold {BatteryStatus}.
\o In the \gui {Create in} field, enter the path for the project files.
For example, \c {C:\Qt\examples}, and then click \gui{Next}.
\o In the \gui {Application Type} dialog, select \gui {Qt Quick
Components (Symbian Applications)}, and then click \gui{Next}.
\o Select \gui {Symbian Device} and \gui {Qt Simulator} targets, and
then click \gui{Next}.
\note Targets are listed if you installed the appropriate
development environment, for example, as part of the \QSDK. You can
add targets later in the \gui Projects mode.
\o Select \gui Next in the following dialogs to use the default
settings.
\note Qt Creator contains a default program icon and generates an
\l{Application UID}, for testing the application on a device. You
only need to change the icon and UID if you deliver the application
for public use.
\o Review the project settings, and click \gui{Finish} to create the
project.
\endlist
Qt Creator generates the necessary files that contain boiler plate code. The
wizard creates an application that uses
\l{http://doc.qt.nokia.com/qt-components-symbian-1.0/qt-components-pages-and-navigation-overview.html}
{page-based application navigation}.
Modify the files as described in the following sections.
\section1 Declaring the Qt Mobility API
To use the Qt Mobility APIs or develop applications for Symbian
devices, you must modify the .pro file to declare the Qt Mobility APIs
that you use.
This example uses the System Info API, so you must declare it, as
illustrated by the following code snippet:
\code
CONFIG += mobility
MOBILITY = systeminfo
\endcode
Each Mobility API has its corresponding value that you have to add
as a value of MOBILITY to use the API. For a list of the APIs and the
corresponding values that you can assign to MOBILITY, see the
\l {http://doc.qt.nokia.com/qtmobility/quickstart.html}{Quickstart Example}.
\section1 Adding Import Statements
The wizard adds the import statements for Qt Quick and the Qt Quick
Components for Symbian to the MainPage.qml file:
\code
import QtQuick 1.0
import com.nokia.symbian 1.0
\endcode
To use the Qt Mobility APIs, you must add the import statements for the
Qt Mobility APIs that you use. This example uses the System Info API, so you
must import it, as illustrated by the following code snippet:
\code
import QtMobility.systeminfo 1.1
\endcode
Use the values as you can assign to MOBILITY also to construct import
statements.
\section1 Creating the Main View
Qt Creator generates a default QML file that you can modify to create the
main view of the application. It displays a progress bar and a text label
that indicate the battery status.
\list 1
\o Click \gui Design to open MainPage.qml in \QMLD.
\o In the \gui Navigator pane, select the \gui Text element to edit its
properties in the \gui Properties pane.
\o In the \gui Text field, change the text from \bold {Hello World!}
to \gui {Battery status: 1%}.
\o In the \gui Library view, \gui Items tab, select the
\gui ProgressBar element, drag and drop it to the canvas, and edit
its properties.
\image qtcreator-symbian-components-example-ui.png "Qt Quick Components for Symbian"
\list 1
\o Click \gui {Layout}, and then click the top anchor button.
\o In the \gui Target field, select \gui text1, to anchor the
progress bar to the bottom of the text field.
\o In the \gui Margin field, select 20.
\o Click the horizontal anchor button, and select \gui text1 in
the \gui Target field to anchor the progress bar
horizontally to the text field.
\o To check that the application can be built and run, select
\gui {Qt Simulator} as the target and click the
\inlineimage qtcreator-run.png
button.
\endlist
\endlist
\section1 Fetching Battery Status
To fetch the battery status, open MainPage.qml in the code editor and add
some code to it:
\list 1
\o Add an invisible
\l{http://doc.qt.nokia.com/qtmobility/qml-deviceinfo.html}
{DeviceInfo element} that contains two signals. The
\l{http://doc.qt.nokia.com/4.7/qml-component.html#onCompleted-signal}
{onCompleted} signal starts battery level notification when the
component is initialized. The
\l{http://doc.qt.nokia.com/qtmobility/qml-deviceinfo.html#batteryLevelChanged-signal}
{batteryLevelChanged} signal is called when the battery level
changes.
\snippet examples/batterystatus/qml/BatteryStatus/MainPage.qml 0
\o Set an expression as the value of the text property of the Text
element to display the battery level as a percentage:
\snippet examples/batterystatus/qml/BatteryStatus/MainPage.qml 1
\o Set values for the ProgressBar element to display the battery level
on the progress bar:
\snippet examples/batterystatus/qml/BatteryStatus/MainPage.qml 2
\endlist
\section1 Compiling and Running Your Program
Now that you have all the necessary code, select \gui {Qt Simulator}
as the target and click the
\inlineimage qtcreator-run.png
button to build your program and run it in the Qt Simulator.
In Qt Simulator, run the runOutOfBattery.qs example script
to see the value change in the Battery Indicator application.
Select \gui {Scripting > examples > runOutOfBattery.qs > Run}.
\image qtcreator-symbian-components-example-simulated.png "Mobile example in Qt Simulator"
\section1 Testing on a Symbian Device
You also need to test the application on real devices. Before you can
start testing on Symbian devices, you must connect them to the development
PC by using a USB cable and install the necessary software on them.
\list 1
\o Install Qt libraries, Qt mobile libraries, Qt Quick components for
Symbian, and a debugging agent on the device. For more information,
see \l{Connecting Symbian Devices}.
\o Start the CODA debugging agent on the device.
\o Click the \gui {Target Selector} and select \gui {Symbian Device}.
\o Click \gui Run to build the application for the Symbian device.
\endlist
*/
@@ -5942,9 +6216,9 @@
\contentspage index.html
\previouspage creator-writing-program.html
\page creator-mobile-example.html
\nextpage creator-qml-application.html
\nextpage creator-project-managing.html
\title Creating a Mobile Application with Qt SDK
\title Creating a Qt Widget Based Mobile Application
\note To complete this tutorial, you must install \QSDK.
The installation program installs and configures the necessary tool chains
@@ -5954,6 +6228,12 @@
application, Battery Indicator, that uses the System Information
Mobility API to fetch battery information from the device.
The user interface for the application is designed using Qt widgets. This
enforces a platform look and feel for Symbian devices and Maemo 5 devices.
However, to achieve a platform look and feel for MeeGo Harmattan devices,
\l{Creating Qt Quick Applications}{create a Qt Quick Application} and use
the Qt Quick components for MeeGo.
\image qtcreator-batteryindicator-screenshot.png
\section1 Creating the Battery Indicator Project
@@ -6200,7 +6480,7 @@
\contentspage index.html
\previouspage creator-getting-started.html
\page creator-build-example-application.html
\nextpage creator-writing-program.html
\nextpage creator-qml-application.html
\title Building and Running an Example Application
@@ -6262,9 +6542,9 @@
/*!
\contentspage index.html
\previouspage creator-mobile-example.html
\previouspage creator-build-example-application.html
\page creator-qml-application.html
\nextpage creator-project-managing.html
\nextpage creator-qml-components-example.html
\title Creating a Qt Quick Application
@@ -6565,7 +6845,7 @@
/*!
\contentspage index.html
\previouspage creator-build-example-application.html
\previouspage creator-qml-components-example.html
\page creator-writing-program.html
\nextpage creator-mobile-example.html
@@ -7939,6 +8219,9 @@
Symbol Server provided by Microsoft to the symbol search path of the debugger.
For more information, see \l{Setting the Symbol Server in Windows}.
\note To use the Free Software Foundation (FSF) GDB on Mac OS, you must
sign it and add it to Qt Creator as a tool chain.
This section explains the
options you have for debugging C++ code and provides installation notes for the
supported native debuggers.
@@ -7946,9 +8229,8 @@
\section1 Supported Native Debugger Versions
The debugger plugin supports different builds of the GDB debugger, both
with and without the ability to use Python scripting. The Python enabled
versions are preferred, but they are not available on Mac and on older
versions of Linux.
with and without the ability to use Python scripting. Use a Python enabled
version if one is available.
On Windows, Symbian, Maemo, and MeeGo Harmattan, only the Python version is
supported.
@@ -7985,11 +8267,17 @@
\o Yes
\o Plain, Terminal, Attach, Remote, Core
\row
\o Mac OS
\o Mac OS/GDB
\o GCC
\o GDB
\o No
\o Plain, Terminal, Attach, Core
\row
\o Mac OS/FSF GDB (experimental)
\o GCC
\o FSF GDB
\o Yes
\o Plain, Terminal, Attach, Core
\row
\o Windows/MinGW
\o GCC
@@ -8119,7 +8407,7 @@
\o The Qt binary distribution contains both debug and release
variants of the libraries. But you have to explicitly tell the
runtime linker that you want to use the debug libraries even if
your application is compiled as debug as release is the default
your application is compiled as debug, as release is the default
library.
If you use a qmake based project in Qt Creator, you can set a
@@ -8127,9 +8415,17 @@
configuration, select \gui{Use debug version of frameworks}.
For more detailed information about debugging on the Mac OS X, see:
\l{http://developer.apple.com/mac/library/technotes/tn2004/tn2124.html}{Mac OS X Debugging Magic}.
\l{http://developer.apple.com/library/mac/#technotes/tn2124/_index.html#//apple_ref/doc/uid/DTS10003391}
{Mac OS X Debugging Magic}.
\note The Mac OS X Snow Leopard (10.6) has a bug that might cause the
You can download an experimental version of FSF GDB that
supports Python from
\l{ftp://ftp.qt.nokia.com/misc/gdb/7.2/gdb72_mac_platform.tar.bz2}.
To use FSF GDB on Mac OS, you must sign it and add it to the Qt
Creator tool chains. For more information, see
\l{Setting up FSF GDB for Mac OS}.
\note The Mac OS X Snow Leopard (10.6) has a bug that might cause the
application to crash. For a workaround, see:
\l{http://bugreports.qt.nokia.com/browse/QTBUG-4962}{QTBUG-4962}.
@@ -8158,6 +8454,64 @@
Debugging tools for Windows, Qt Creator prompts you to add the Symbol
Server.
\section1 Setting up FSF GDB for Mac OS
To use FSF GDB on Mac OS, you must sign it and add it to the Qt Creator tool
chains.
\list 1
\o To create a key for signing FSF GDB, select \gui {Keychain Access >
Certificate Assistant > Create a Certificate}:
\list 1
\o In the \gui {Certificate Type} field, select \gui {Code Signing}.
\o Select the \gui {Let me override defaults} check box.
\o Select \gui Continue, and follow the instructions of the
wizard (use the default settings), until the \gui {Select a
Location for the Certificate} dialog opens.
\o In the \gui Keychain field, select \gui System.
\o Select \gui {Keychain Access > System}, and locate the
certificate.
\o Double click the certificate to view certificate information.
\o In the \gui Trust field, select \gui {Always Trust}.
\endlist
\o To sign the binary, enter the following command in the terminal,
where $USER is the name of the certificate (which is the same as the
user name, by default):
\code
codesign -f -s "$USER" $INSTALL_LOCATION/fsfgdb
\endcode
\o In Qt Creator, select \gui {Tools > Preferences… > Tool Chains}, to
add a tool chain that uses the debugger:
\list 1
\o Select a native tool chain (usually, a x86 64-bit tool chain)
and click \gui Clone to clone it.
\o In the \gui Debugger field, specify the path to FSF GDB
(\c $HOME/gdb72/bin/fsfgdb, but with an explicit value for
\c $HOME).
\endlist
\o To use the debugger, select the tool chain in the \gui {Tool chain}
field in the \gui {Build Settings} of the project.
\endlist
*/
/*!
@@ -9070,6 +9424,10 @@
\note You need Qt 4.7.1 or later to debug Qt Quick projects. Debugging projects
not created with the Qt Quick wizards is only supported with Qt 4.8, or later.
To debug Qt Quick applications running on devices, you must install
Qt 4.7.4, or later, libraries on devices. To debug applications on Symbian
devices, you must install also QML Viewer on them.
\section1 Setting Up QML Debugging
The process of setting up debugging for Qt Quick projects depends on the type of
@@ -9113,6 +9471,10 @@
\endlist
To debug Qt Quick Applications on devices, install Qt 4.7.4, or later,
libraries on devices. Then select the device as the target before you
start debugging.
\section1 Starting QML Debugging
To start the application, choose \gui {Debug > Start Debugging
@@ -12,6 +12,12 @@ Module {
"Qt.labs.gestures/GestureArea 1.0"
]
Property { name: "gesture"; type: "QGesture"; isReadonly: true; isPointer: true }
Signal { name: "tap" }
Signal { name: "tapAndHold" }
Signal { name: "pan" }
Signal { name: "pinch" }
Signal { name: "swipe" }
Signal { name: "gesture" }
}
Component {
name: "QGesture"
@@ -87,7 +87,6 @@ void ComponentNodeInstance::setNodeSource(const QString &source)
setId(id());
if (component()->isError()) {
qDebug() << source;
foreach(const QDeclarativeError &error, component()->errors())
qDebug() << error;
}
@@ -403,7 +403,6 @@ void NodeInstanceServer::setupDummyData(const QUrl &fileUrl)
QList<ServerNodeInstance> NodeInstanceServer::setupInstances(const CreateSceneCommand &command)
{
QList<ServerNodeInstance> instanceList = createInstances(command.instances());
reparentInstances(command.reparentInstances());
foreach (const IdContainer &container, command.ids()) {
if (hasInstanceForId(container.instanceId()))
@@ -420,6 +419,8 @@ QList<ServerNodeInstance> NodeInstanceServer::setupInstances(const CreateSceneC
setInstancePropertyVariant(container);
}
reparentInstances(command.reparentInstances());
foreach (const PropertyBindingContainer &container, command.bindingChanges()) {
if (container.isDynamic())
setInstancePropertyBinding(container);
@@ -374,6 +374,18 @@ void ObjectNodeInstance::reparent(const ObjectNodeInstance::Pointer &oldParentIn
addToNewProperty(object(), newParentInstance->object(), newParentProperty);
}
}
QVariant ObjectNodeInstance::convertSpecialCharacter(const QVariant& value) const
{
QVariant specialCharacterConvertedValue = value;
if (value.type() == QVariant::String) {
QString string = value.toString();
string.replace(QLatin1String("\\n"), QLatin1String("\n"));
string.replace(QLatin1String("\\t"), QLatin1String("\t"));
specialCharacterConvertedValue = string;
}
return specialCharacterConvertedValue;
}
void ObjectNodeInstance::setPropertyVariant(const QString &name, const QVariant &value)
{
@@ -394,7 +406,7 @@ void ObjectNodeInstance::setPropertyVariant(const QString &name, const QVariant
QDeclarativePropertyPrivate::setBinding(property, 0, QDeclarativePropertyPrivate::BypassInterceptor | QDeclarativePropertyPrivate::DontRemoveBinding);
}
bool isWritten = property.write(value);
bool isWritten = property.write(convertSpecialCharacter(value));
if (!isWritten)
qDebug() << "ObjectNodeInstance.setPropertyVariant: Cannot be written: " << object() << name << value;
@@ -906,6 +918,10 @@ void ObjectNodeInstance::setInPositioner(bool isInPositioner)
m_isInPositioner = isInPositioner;
}
void ObjectNodeInstance::refreshPositioner()
{
}
void ObjectNodeInstance::updateAnchors()
{
}
@@ -161,6 +161,7 @@ public:
virtual bool isMovable() const;
bool isInPositioner() const;
void setInPositioner(bool isInPositioner);
virtual void refreshPositioner();
bool hasBindingForProperty(const QString &name, bool *hasChanged = 0) const;
@@ -186,6 +187,7 @@ protected:
void removeFromOldProperty(QObject *object, QObject *oldParent, const QString &oldParentProperty);
void addToNewProperty(QObject *object, QObject *newParent, const QString &newParentProperty);
void deleteObjectsInList(const QDeclarativeProperty &metaProperty);
QVariant convertSpecialCharacter(const QVariant& value) const;
private:
QHash<QString, QVariant> m_resetValueHash;
@@ -34,6 +34,8 @@
#include <QGraphicsObject>
#include "private/qgraphicsitem_p.h"
#include <private/qdeclarativemetatype_p.h>
#include <QStyleOptionGraphicsItem>
#include <QPixmap>
#include <QSizeF>
@@ -57,9 +59,28 @@ QGraphicsObject *GraphicsObjectNodeInstance::graphicsObject() const
return static_cast<QGraphicsObject*>(object());
}
bool GraphicsObjectNodeInstance::childrenHasContent(QGraphicsItem *graphicsItem) const
{
QGraphicsObject *graphicsObject = graphicsItem->toGraphicsObject();
if (graphicsObject && !nodeInstanceServer()->hasInstanceForObject(graphicsObject) && !graphicsItem->flags().testFlag(QGraphicsItem::ItemHasNoContents))
return true;
foreach (QGraphicsItem *childItem, graphicsItem->childItems()) {
bool childHasContent = childrenHasContent(childItem);
if (childHasContent)
return true;
}
return false;
}
bool GraphicsObjectNodeInstance::hasContent() const
{
return m_hasContent;
if (m_hasContent)
return true;
return childrenHasContent(graphicsObject());
}
QList<ServerNodeInstance> GraphicsObjectNodeInstance::childItems() const
@@ -88,7 +88,7 @@ protected:
QGraphicsObject *graphicsObject() const;
void paintRecursively(QGraphicsItem *graphicsItem, QPainter *painter) const;
QRectF boundingRectWithStepChilds(QGraphicsItem *parentItem) const;
bool childrenHasContent(QGraphicsItem *graphicsItem) const;
private: // variables
bool m_hasContent;
@@ -84,5 +84,18 @@ PositionerNodeInstance::Pointer PositionerNodeInstance::create(QObject *object)
return instance;
}
QDeclarativeBasePositioner *PositionerNodeInstance::positioner() const
{
Q_ASSERT(qobject_cast<QDeclarativeBasePositioner*>(object()));
return static_cast<QDeclarativeBasePositioner*>(object());
}
void PositionerNodeInstance::refreshPositioner()
{
bool success = QMetaObject::invokeMethod(positioner(), "prePositioning");
Q_ASSERT(success);
}
}
} // namespace QmlDesigner
@@ -57,9 +57,11 @@ public:
bool isResizable() const;
void refreshPositioner();
protected:
PositionerNodeInstance(QDeclarativeBasePositioner *item);
QDeclarativeBasePositioner *positioner() const;
};
} // namespace Internal
@@ -154,6 +154,8 @@ void QmlGraphicsItemNodeInstance::setPropertyVariant(const QString &name, const
GraphicsObjectNodeInstance::setPropertyVariant(name, value);
refresh();
if (isInPositioner())
parentInstance()->refreshPositioner();
}
void QmlGraphicsItemNodeInstance::setPropertyBinding(const QString &name, const QString &expression)
@@ -325,6 +327,9 @@ void QmlGraphicsItemNodeInstance::resetProperty(const QString &name)
}
GraphicsObjectNodeInstance::resetProperty(name);
if (isInPositioner())
parentInstance()->refreshPositioner();
}
void QmlGraphicsItemNodeInstance::reparent(const ObjectNodeInstance::Pointer &oldParentInstance, const QString &oldParentProperty, const ObjectNodeInstance::Pointer &newParentInstance, const QString &newParentProperty)
@@ -353,6 +358,8 @@ void QmlGraphicsItemNodeInstance::reparent(const ObjectNodeInstance::Pointer &ol
}
refresh();
if (isInPositioner())
parentInstance()->refreshPositioner();
}
QDeclarativeAnchors::Anchor anchorLineFlagForName(const QString &name)
@@ -238,12 +238,14 @@ QExtGroupBox {
ColorTypeButtons {
id: buttons;
visible: showButtons && baseStateFlag
visible: showButtons
enabled: baseStateFlag
opacity: enabled ? 1 : 0.6
showGradientButton: colorGroupBox.showGradientButton
}
QWidget {
visible: !(showButtons && baseStateFlag)
visible: !(showButtons)
fixedHeight: 28
fixedWidth: 93
width: fixedWidth
@@ -296,6 +298,7 @@ QExtGroupBox {
leftMargin: 0
spacing: 2
QWidget {
toolTip: qsTr("Hue")
layout: HorizontalLayout {
Label {
text: "H"
@@ -313,6 +316,7 @@ QExtGroupBox {
}
}
QWidget {
toolTip: qsTr("Saturation")
layout: HorizontalLayout {
Label {
text: "S"
@@ -330,6 +334,7 @@ QExtGroupBox {
}
QWidget {
toolTip: qsTr("Brightness")
layout: HorizontalLayout {
Label {
text: "B"
@@ -346,6 +351,7 @@ QExtGroupBox {
}
QWidget {
toolTip: qsTr("Alpha")
layout: HorizontalLayout {
topMargin: 12
Label {
@@ -82,7 +82,7 @@ QWidget {
styleSheetFile: "styledbuttonleft.css"
iconFromFile: "images/icon_color_solid.png"
toolTip: qsTr("Solid color")
toolTip: baseStateFlag ? qsTr("Solid color") : qsTr("Solid color (only editable in base state)")
onToggled: {
if (checked) {
@@ -107,7 +107,7 @@ QWidget {
styleSheetFile: "styledbuttonmiddle.css"
iconFromFile: "images/icon_color_gradient.png"
toolTip: qsTr("Gradient")
toolTip: baseStateFlag ? qsTr("Gradient") : qsTr("Gradient (only editable in base state)")
onToggled: {
if (checked) {
@@ -131,7 +131,7 @@ QWidget {
fixedHeight: 28
styleSheetFile: "styledbuttonright.css"
iconFromFile: "images/icon_color_none.png"
toolTip: qsTr("Transparent")
toolTip: baseStateFlag ? qsTr("Transparent") : qsTr("Transparent (only editable in base state)")
onToggled: {
if (checked) {
@@ -35,7 +35,7 @@ import Bauhaus 1.0
QWidget {
id: expressionEditor;
x: 6
x: 16
y: -400
width: frame.width - 22
height: 40
@@ -80,8 +80,8 @@ QWidget {
styleSheet: "QTextEdit {border-radius: 0px;}"
documentTitle: qsTr("Expression")
width: expressionEdit.width
height: expressionEdit.height
width: expressionEdit.width - 10
height: expressionEdit.height - 10
horizontalScrollBarPolicy: "Qt::ScrollBarAlwaysOff"
verticalScrollBarPolicy: "Qt::ScrollBarAlwaysOff"
@@ -97,19 +97,19 @@ QWidget {
QPushButton {
focusPolicy: "Qt::NoFocus";
y: expressionEdit.height - 22;
x: expressionEdit.width - 61;
x: expressionEdit.width - 59;
styleSheetFile: "applybutton.css";
width: 29
height: 19
onClicked: {
expressionEdit.backendValue.expression = textEdit.plainText;
expressionEdit.active = false;
}
}
}
QPushButton {
focusPolicy: "Qt::NoFocus";
y: expressionEdit.height - 22;
x: expressionEdit.width - 32;
x: expressionEdit.width - 30;
styleSheetFile: "cancelbutton.css";
width: 29
height: 19
@@ -108,8 +108,12 @@ AnimatedToolButton {
QAction {
text: qsTr("Set Expression");
onTriggered: {
expressionEdit.globalY = extendedFunctionButton.globalY;
expressionEdit.globalY = extendedFunctionButton.globalY - 10;
expressionEdit.backendValue = extendedFunctionButton.backendValue
if ((expressionEdit.y + expressionEdit.height + 20) > frame.height)
expressionEdit.y = frame.height - expressionEdit.height - 20
expressionEdit.show();
expressionEdit.raise();
expressionEdit.active = true;
@@ -70,11 +70,15 @@ GroupBox {
text: qsTr("Size")
}
SpinBox {
minimum: 0
maximum: 400
visible: !sizeWidget.pixelSize
backendValue: backendValues.font_pointSize
baseStateFlag: isBaseState;
}
SpinBox {
minimum: 0
maximum: 400
visible: sizeWidget.pixelSize
backendValue: backendValues.font_pixelSize
baseStateFlag: isBaseState;
@@ -90,6 +90,7 @@ GroupBox {
}
DoubleSpinBox {
toolTip: qsTr("Width")
id: widthSpinBox;
text: "W"
alignRight: false
@@ -103,6 +104,7 @@ GroupBox {
}
DoubleSpinBox {
toolTip: qsTr("Height")
id: heightSpinBox;
text: "H"
alignRight: false
@@ -35,6 +35,8 @@ import Bauhaus 1.0
PropertyFrame {
id: frame;
x: 0
y: 0
ExpressionEditor {
id: expressionEdit
@@ -36,6 +36,16 @@ import Bauhaus 1.0
QWidget {
id: lineEdit
function escapeString(string) {
var str = string;
str = str.replace(/\\/g, "\\\\");
str.replace(/\"/g, "\\\"");
str = str.replace(/\t/g, "\\t");
str = str.replace(/\r/g, "\\r");
str = str.replace(/\n/g, '\\n');
return str;
}
property variant backendValue
property alias enabled: lineEdit.enabled
property variant baseStateFlag
@@ -103,7 +113,7 @@ QWidget {
onEditingFinished: {
if (backendValue.isTranslated) {
backendValue.expression = "qsTr(\"" + text + "\")"
backendValue.expression = "qsTr(\"" + escapeString(text) + "\")"
} else {
backendValue.value = text
}
@@ -137,7 +147,7 @@ QWidget {
checked: backendValue.isTranslated
onToggled: {
if (trCheckbox.checked) {
backendValue.expression = "qsTr(\"" + lineEditWidget.text + "\")"
backendValue.expression = "qsTr(\"" + escapeString(lineEditWidget.text) + "\")"
} else {
backendValue.value = lineEditWidget.text
}
@@ -36,7 +36,7 @@ import Bauhaus 1.0
WidgetFrame {
id: propertyFrame;
minimumWidth: 300;
minimumWidth: 320;
property int frameWidth: width
property int labelWidth: 96
@@ -56,7 +56,9 @@ QWidget {
rightMargin: 24
IntEditor {
visible: colorsBox.hasBorder
enabled: colorsBox.hasBorder
opacity: enabled ? 1 : 0.6
toolTip: enabled ? qsTr("Border width") : qsTr("Border has to be solid to change width")
id: borderWidth;
backendValue: backendValues.border_width === undefined ? 0 : backendValues.border_width
@@ -40,6 +40,7 @@ GroupBox {
property bool showIsWrapping: false
property bool showVerticalAlignment: false
property bool useLineEdit: false
layout: VerticalLayout {
QWidget {
@@ -48,10 +49,17 @@ GroupBox {
text: qsTr("Text")
}
LineEdit {
visible: !useLineEdit
backendValue: backendValues.text
baseStateFlag: isBaseState;
translation: true
}
TextEditor {
visible: useLineEdit
translation: true
backendValue: backendValues.text
baseStateFlag: isBaseState;
}
}
}
QWidget {
@@ -46,6 +46,7 @@ QWidget {
StandardTextGroupBox {
finished: finishedNotify;
showIsWrapping: true
useLineEdit: true
}
StandardTextColorGroupBox {
finished: finishedNotify;
@@ -0,0 +1,168 @@
/**************************************************************************
**
** This file is part of Qt Creator
**
** Copyright (c) 2011 Nokia Corporation and/or its subsidiary(-ies).
**
** Contact: Nokia Corporation (info@qt.nokia.com)
**
**
** GNU Lesser General Public License Usage
**
** 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.
**
** In addition, as a special exception, Nokia gives you certain additional
** rights. These rights are described in the Nokia Qt LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
** Other Usage
**
** Alternatively, this file may be used in accordance with the terms and
** conditions contained in a signed written agreement between you and Nokia.
**
** If you have questions regarding the use of this file, please contact
** Nokia at info@qt.nokia.com.
**
**************************************************************************/
import Qt 4.7
import Bauhaus 1.0
QWidget {
id: textEdit
function escapeString(string) {
var str = string;
str = str.replace(/\\/g, "\\\\");
str.replace(/\"/g, "\\\"");
str = str.replace(/\t/g, "\\t");
str = str.replace(/\r/g, "\\r");
str = str.replace(/\n/g, '\\n');
return str;
}
property variant backendValue
property alias enabled: textEdit.enabled
property variant baseStateFlag
property alias text: textEditWidget.plainText
property alias readOnly: textEditWidget.readOnly
property alias translation: trCheckbox.visible
minimumHeight: 72;
onBaseStateFlagChanged: {
evaluate();
}
property variant isEnabled: textEdit.enabled
onIsEnabledChanged: {
evaluate();
}
property bool isInModel: backendValue.isInModel;
onIsInModelChanged: {
evaluate();
}
property bool isInSubState: backendValue.isInSubState;
onIsInSubStateChanged: {
evaluate();
}
function evaluate() {
if (!enabled) {
textEditWidget.setStyleSheet("color: "+scheme.disabledColor);
} else {
if (baseStateFlag) {
if (backendValue != null && backendValue.isInModel)
textEditWidget.setStyleSheet("color: "+scheme.changedBaseColor);
else
textEditWidget.setStyleSheet("color: "+scheme.defaultColor);
} else {
if (backendValue != null && backendValue.isInSubState)
textEditWidget.setStyleSheet("color: "+scheme.changedStateColor);
else
textEditWidget.setStyleSheet("color: "+scheme.defaultColor);
}
}
}
ColorScheme { id:scheme; }
QTextEdit {
acceptRichText: false
verticalScrollBarPolicy: "Qt::ScrollBarAlwaysOff"
y: 2
id: textEditWidget
styleSheet: "QLineEdit { padding-left: 32; }"
width: textEdit.width
height: textEdit.height - 2
toolTip: backendValue.isBound ? backendValue.expression : ""
property string valueFromBackend: (backendValue === undefined || backendValue.value === undefined) ? "" : backendValue.value;
onValueFromBackendChanged: {
if (backendValue.value === undefined)
return;
if (plainText === backendValue.value)
return;
plainText = backendValue.value;
}
onTextChanged: {
if (backendValue.isTranslated) {
backendValue.expression = "qsTr(\"" + escapeString(plainText) + "\")"
} else {
backendValue.value = plainText
}
evaluate();
}
onFocusChanged: {
if (focus)
backendValue.lock();
else
backendValue.unlock();
}
}
ExtendedFunctionButton {
backendValue: textEdit.backendValue
y: 6
x: 0
visible: textEdit.enabled
}
QCheckBox {
id: trCheckbox
y: 2
styleSheetFile: "checkbox_tr.css";
toolTip: qsTr("Translate this string")
x: textEditWidget.width - 22
height: 24;
width: 24
visible: false
checked: backendValue.isTranslated
onToggled: {
if (trCheckbox.checked) {
backendValue.expression = "qsTr(\"" + escapeString(textEditWidget.plainText) + "\")"
} else {
backendValue.value = textEditWidget.plainText
}
evaluate();
}
onVisibleChanged: {
if (trCheckbox.visible) {
trCheckbox.raise();
textEditWidget.styleSheet = "QLineEdit { padding-left: 32; padding-right: 62;}"
}
}
}
}
@@ -122,10 +122,10 @@ GroupBox {
layout: HorizontalLayout {
Label {text: ""}
CheckBox {
text: qsTr("Focus on press")
text: qsTr("Active focus on press")
baseStateFlag: isBaseState;
checkable: true;
backendValue: backendValues.focusOnPress;
backendValue: backendValues.activeFocusOnPress;
}
}
}
@@ -65,7 +65,6 @@ GroupBox {
}
QWidget {
layout: HorizontalLayout {
spacing: 4
Label {
text: ""
}
@@ -100,17 +99,17 @@ GroupBox {
SliderWidget {
id: opacitySlider
minimum: 0
maximum: 10
maximum: 100
property variant pureValue: backendValues.opacity.value;
onPureValueChanged: {
if (value != pureValue * 10)
value = pureValue * 10;
if (value != pureValue * 100)
value = pureValue * 100;
}
singleStep: 5;
backendValue: backendValues.opacity
onValueChanged: {
if ((value >= 0) && (value <= 10))
backendValues.opacity.value = value / 10;
if ((value >= 0) && (value <= 100))
backendValues.opacity.value = value / 100;
}
}
}
@@ -68,6 +68,20 @@ QPlainTextEdit
stop: 0 #2c2c2c, stop: 1 #333333);
}
QTextEdit
{
border: 1px solid #0F0F0F;
font-size: 11px;
border-radius: 6px;
color: white;
padding: 8 8px;
selection-background-color: lightgray;
background-color: qlineargradient(x1: 0, y1: 0, x2: 0, y2: 1,
stop: 0 #2c2c2c, stop: 1 #333333);
}
QSpinBox
{
font-size: 11px;
@@ -29,7 +29,11 @@ qmldir.files = qmldir
symbian {
TARGET.EPOCALLOWDLLDATA = 1
} else:unix {
installPath = /usr/lib/qt4/imports/$$replace(uri, \\., /)
maemo5 | !isEmpty(MEEGO_VERSION_MAJOR) {
installPath = /usr/lib/qt4/imports/$$replace(uri, \\., /)
} else {
installPath = $$[QT_INSTALL_IMPORTS]/$$replace(uri, \\., /)
}
qmldir.path = $$installPath
target.path = $$installPath
INSTALLS += target qmldir
+334 -277
View File
@@ -330,10 +330,6 @@
<source>Run CMake</source>
<translation>CMake ausführen</translation>
</message>
<message>
<source>Arguments</source>
<translation type="obsolete">Argumente</translation>
</message>
<message>
<source>The directory %1 does not contain a cbp file. Qt Creator needs to create this file by running CMake. Some projects require command line arguments to the initial CMake call.</source>
<translation>Das Verzeichnis %1 enthält keine cbp-Datei. Qt Creator muss die Datei durch einen cmake-Aufruf erzeugen. Für einige Projekte sind dazu Kommandozeilenargumente erforderlich.</translation>
@@ -1581,7 +1577,7 @@
<translation>Alles Aus&amp;wählen</translation>
</message>
<message>
<source>&amp;Go To Line...</source>
<source>&amp;Go to Line...</source>
<translation>&amp;Gehe zu Zeile...</translation>
</message>
<message>
@@ -2675,6 +2671,10 @@ Qt Creator kann sich nicht anhängen.</translation>
<source>Break on &quot;qWarning&quot;</source>
<translation>Bei &quot;qWarning&quot; anhalten</translation>
</message>
<message>
<source>Break on &quot;qFatal&quot;</source>
<translation>Bei &quot;qFatal&quot; anhalten</translation>
</message>
<message>
<source>Automatically Quit Debugger</source>
<translation>Debugger automatisch beenden</translation>
@@ -5042,6 +5042,10 @@ on slow machines. In this case, the value should be increased.</source>
<source>Always try to set breakpoints in plugins automatically</source>
<translation>Versuche, Haltepunkte in Plugins automatisch zu setzen.</translation>
</message>
<message>
<source>Stop when a qFatal is issued</source>
<translation>Bei qFatal anhalten</translation>
</message>
</context>
<context>
<name>GeneralSettingsPage</name>
@@ -10564,10 +10568,6 @@ Die folgenden Encodings scheinen der Datei zu entsprechen:</translation>
<source>Enable Text &amp;Wrapping</source>
<translation>Text&amp;umbruch aktivieren</translation>
</message>
<message>
<source>(Un)Comment &amp;Selection</source>
<translation>Auswahl aus&amp;kommentieren</translation>
</message>
<message>
<source>Ctrl+/</source>
<translation>Ctrl+/</translation>
@@ -10584,10 +10584,6 @@ Die folgenden Encodings scheinen der Datei zu entsprechen:</translation>
<source>Unfold</source>
<translation>Ausklappen</translation>
</message>
<message>
<source>(Un)&amp;Fold All</source>
<translation>Alles Aus&amp;klappen</translation>
</message>
<message>
<source>Reset Font Size</source>
<translation>Schriftgröße zurücksetzen</translation>
@@ -10628,6 +10624,10 @@ Die folgenden Encodings scheinen der Datei zu entsprechen:</translation>
<source>%1+E, %2+W</source>
<translation>%1+E, %2+W</translation>
</message>
<message>
<source>Toggle Comment &amp;Selection</source>
<translation>Auswahl aus&amp;kommentieren</translation>
</message>
<message>
<source>Cut &amp;Line</source>
<translation>&amp;Zeile ausschneiden</translation>
@@ -10648,6 +10648,10 @@ Die folgenden Encodings scheinen der Datei zu entsprechen:</translation>
<source>Ctrl+&gt;</source>
<translation>Ctrl+&gt;</translation>
</message>
<message>
<source>Toggle &amp;Fold All</source>
<translation>Alles Aus&amp;klappen</translation>
</message>
<message>
<source>Increase Font Size</source>
<translation>Schrift vergrößern</translation>
@@ -13269,6 +13273,10 @@ Sie können die Änderungen in einem Stash ablegen oder rücksetzen.</translatio
<source>&amp;Restore Default View</source>
<translation>&amp;Vorgabe wiederherstellen</translation>
</message>
<message>
<source>&amp;Go into Component</source>
<translation>In Komponente gehen</translation>
</message>
<message>
<source>Toggle &amp;Left Sidebar</source>
<translation>&amp;Linke Seitenleiste umschalten</translation>
@@ -13412,6 +13420,10 @@ Sie können die Änderungen in einem Stash ablegen oder rücksetzen.</translatio
<source>Failed to detect the ABI(s) used by the Qt version.</source>
<translation>Die ABI(s) der Qt-Version konnten nicht bestimmt werden.</translation>
</message>
<message>
<source>No qmlviewer installed.</source>
<translation>Es ist kein qmlviewer installiert.</translation>
</message>
<message>
<source>The &quot;Open C/C++ plugin&quot; is not installed in the Symbian SDK or the Symbian SDK path is misconfigured</source>
<translation>Das Plugin &quot;Open C/C++&quot; ist im Symbian SDK nicht installiert oder der Pfad des Symbian SDKs ist falsch konfiguriert</translation>
@@ -13456,7 +13468,13 @@ Sie können die Änderungen in einem Stash ablegen oder rücksetzen.</translatio
</message>
<message>
<source>The Qt Version has no tool chain.</source>
<translation>Dieser Qt-Version ist keine Toolchain zugeordnet.</translation>
<translation type="obsolete">Dieser Qt-Version ist keine Toolchain zugeordnet.</translation>
</message>
<message>
<source>Building helper(s) with toolchain &apos;%1&apos; ...
</source>
<translation>Erstelle Ausgabe-Hilfsbibliothek mit der Toolchain &apos;%1&apos;...
</translation>
</message>
<message>
<source>Build failed.</source>
@@ -13507,6 +13525,10 @@ Sie können die Änderungen in einem Stash ablegen oder rücksetzen.</translatio
<source>Text Editor</source>
<translation>Text Editor</translation>
</message>
<message>
<source>Translate this string</source>
<translation>Zeichenkette übersetzen</translation>
</message>
</context>
<context>
<name>VCSBase::VCSBasePlugin</name>
@@ -14517,6 +14539,14 @@ Qt Quick-UI-Projekte benötigen keine Übersetzung und können direkt im QML-Bet
<source>Size</source>
<translation>Größe</translation>
</message>
<message>
<source>Width</source>
<translation>Breite</translation>
</message>
<message>
<source>Height</source>
<translation>Höhe</translation>
</message>
<message>
<source>Lock aspect ratio</source>
<translation>Festes Seitenverhältnis</translation>
@@ -14609,6 +14639,14 @@ Qt Quick-UI-Projekte benötigen keine Übersetzung und können direkt im QML-Bet
<source>Rectangle</source>
<translation>Rechteck</translation>
</message>
<message>
<source>Border width</source>
<translation>Randbreite</translation>
</message>
<message>
<source>Border has to be solid to change width</source>
<translation>Änderung der Breite ist nur bei durchgezogenem Rand möglich</translation>
</message>
<message>
<source>Radius</source>
<translation>Radius</translation>
@@ -14721,9 +14759,13 @@ Qt Quick-UI-Projekte benötigen keine Übersetzung und können direkt im QML-Bet
<translation>Mauszeiger sichtbar</translation>
</message>
<message>
<source>Focus on press</source>
<source>Active focus on press</source>
<translation>Fokussieren durch Betätigen</translation>
</message>
<message>
<source>Focus on press</source>
<translation type="obsolete">Fokussieren durch Betätigen</translation>
</message>
<message>
<source>Auto scroll</source>
<translation>Automatisch rollen</translation>
@@ -15358,10 +15400,6 @@ should a repository require SSH-authentication (see documentation on SSH and the
<source>Icon to be displayed in Package Manager:</source>
<translation>In Paketverwaltung anzuzeigendes Icon:</translation>
</message>
<message>
<source>Size is 48x48 pixels</source>
<translation>Größe: 48x48 Pixel</translation>
</message>
<message>
<source>Adapt Debian file:</source>
<translation>Debian-Datei anpassen:</translation>
@@ -16901,11 +16939,11 @@ wenn es außerhalb von git bash aufgerufen wird.</translation>
<context>
<name>ProjectExplorer::Internal::ShowInEditorTaskHandler</name>
<message>
<source>&amp;Show in editor</source>
<source>&amp;Show in Editor</source>
<translation>In &amp;Editor anzeigen</translation>
</message>
<message>
<source>Show task location in an editor</source>
<source>Show task location in an editor.</source>
<translation>Fundstelle in Editor anzeigen</translation>
</message>
</context>
@@ -17545,7 +17583,7 @@ Der Pfad zur Bibliothek und der Pfad zu den Headerdateien werden zur .pro-Datei
<context>
<name>TaskList::Internal::StopMonitoringHandler</name>
<message>
<source>Stop monitoring</source>
<source>Stop Monitoring</source>
<translation>Überwachung beenden</translation>
</message>
<message>
@@ -18839,10 +18877,6 @@ Fehler: %2</translation>
<source>Emulator</source>
<translation>Emulator</translation>
</message>
<message>
<source>The SSH port:</source>
<translation type="obsolete">Der SSH-Port:</translation>
</message>
<message>
<source>The SSH server port:</source>
<translation>Der SSH-Port des Servers:</translation>
@@ -19362,6 +19396,10 @@ Hinweis: Unter Umständen wird die lokale Datei gelöscht.</translation>
<source>Set Message Tracepoint at line %1...</source>
<translation>Tracepoint mit Meldung bei Zeile %1 hinzufügen...</translation>
</message>
<message>
<source>Start &apos;%1&apos; and break at function &apos;main()&apos;</source>
<translation>Starte &apos;%1&apos; und halte bei Erreichen der Funktion &quot;main()&quot; an</translation>
</message>
<message>
<source>Save Debugger Log</source>
<translation>Debugger Log speichern</translation>
@@ -19636,6 +19674,16 @@ Hinweis: Unter Umständen wird die lokale Datei gelöscht.</translation>
<source>%1 debugger activated</source>
<translation>Debugger %1 aktiviert</translation>
</message>
<message>
<source>QML/C++ Debugging</source>
<translation>QML/C++-Debuggen</translation>
</message>
<message>
<source>Cannot stop execution before QML engine is started. Skipping breakpoint.
Suggestions: Move the breakpoint after QmlApplicationViewer instantiation or switch to C++ only debugging.</source>
<translation>Die Ausführung kann nicht gestoppt werden, bis der QML-Engine gestartet ist. Der Haltepunkt wird daher übersprungen.
Positionieren Sie den Haltepunkt hinter die Instanziierung der Klasse QmlApplicationViewer oder verwenden Sie reines C++-Debuggen.</translation>
</message>
</context>
<context>
<name>Debugger::Internal::QmlEngine</name>
@@ -21676,6 +21724,10 @@ Lokale Pull-Operationen werden nicht auf den Master-Branch angewandt.</translati
</context>
<context>
<name>ProjectExplorer::Internal::MsvcToolChainConfigWidget</name>
<message>
<source>Initialization:</source>
<translation>Initialisierung:</translation>
</message>
<message>
<source>The CDB debugger could not be found in %1</source>
<translation>Die CDB-Debugger konnte nicht in %1 gefunden werden</translation>
@@ -22311,6 +22363,22 @@ Außerdem wird die Anwendung bei Verwendung einer nicht freigegebenen Qt-Version
<source>Color editor</source>
<translation>Farb-Editor</translation>
</message>
<message>
<source>Hue</source>
<translation>Farbton</translation>
</message>
<message>
<source>Saturation</source>
<translation>Sättigung</translation>
</message>
<message>
<source>Brightness</source>
<translation>Helligkeit</translation>
</message>
<message>
<source>Alpha</source>
<translation>Alpha</translation>
</message>
</context>
<context>
<name>ColorTypeButtons</name>
@@ -22318,14 +22386,26 @@ Außerdem wird die Anwendung bei Verwendung einer nicht freigegebenen Qt-Version
<source>Solid color</source>
<translation>Füllfarbe</translation>
</message>
<message>
<source>Solid color (only editable in base state)</source>
<translation>Füllfarbe (nur im Basiszustand änderbar)</translation>
</message>
<message>
<source>Gradient</source>
<translation>Gradient</translation>
</message>
<message>
<source>Gradient (only editable in base state)</source>
<translation>Gradient (nur im Basiszustand änderbar)</translation>
</message>
<message>
<source>Transparent</source>
<translation>Transparent</translation>
</message>
<message>
<source>Transparent (only editable in base state)</source>
<translation>Transparent (nur im Basiszustand änderbar)</translation>
</message>
</context>
<context>
<name>Valgrind::XmlProtocol::ErrorListModel</name>
@@ -23071,6 +23151,10 @@ a = a +
<source>Build All</source>
<translation>Alles erstellen</translation>
</message>
<message>
<source>Tool Chain:</source>
<translation>Toolchain:</translation>
</message>
</context>
<context>
<name>QtSupport::Internal::QtVersionInfo</name>
@@ -23145,37 +23229,6 @@ a = a +
<translation>Zu installierende Dateien des Unterprojektes:</translation>
</message>
</context>
<context>
<name>MaemoDeviceConfigWizardLoginDataPage</name>
<message>
<source>WizardPage</source>
<translation type="obsolete">WizardPage</translation>
</message>
<message>
<source>User name:</source>
<translation type="obsolete">Nutzername:</translation>
</message>
<message>
<source>Authentication type:</source>
<translation type="obsolete">Art der Authentifizierung:</translation>
</message>
<message>
<source>Password</source>
<translation type="obsolete">Passwort</translation>
</message>
<message>
<source>Key</source>
<translation type="obsolete">Schlüssel</translation>
</message>
<message>
<source>Password:</source>
<translation type="obsolete">Passwort:</translation>
</message>
<message>
<source>Private key:</source>
<translation type="obsolete">Privater Schlüssel:</translation>
</message>
</context>
<context>
<name>TextEditor::TabPreferencesWidget</name>
<message>
@@ -23314,127 +23367,6 @@ Bestimmt das Verhalten bezüglich der Einrückung von Fortsetzungszeilen.
<translation>Nur in Leerzeichen am Zeilenanfang</translation>
</message>
</context>
<context>
<name>Valgrind::Internal::CallgrindConfigWidget</name>
<message>
<source>Profiling Options</source>
<translation>Einstellungen des Profilers</translation>
</message>
<message>
<source>Result view: Show events with inclusive costs higher than:</source>
<translation>Ergebnisanzeige: Zeige Ereignisse mit einschließlichen Kosten höher als:</translation>
</message>
<message>
<source>%</source>
<translation>%</translation>
</message>
<message>
<source>Show additional information for events in tooltips</source>
<translation>Zusätzliche Informationen zu Ereignissen in Tooltips anzeigen</translation>
</message>
<message>
<source>Enable cache simulation</source>
<translation>Cache-Simulation aktivieren</translation>
</message>
<message>
<source>Enable branch prediction simulation</source>
<translation>Verzweigungsvorhersage aktivieren</translation>
</message>
<message>
<source>Collect system call time</source>
<translation>In Systemaufrufen verbrachte Zeit aufnehmen</translation>
</message>
<message>
<source>Visualisation: Show events with inclusive costs higher than:</source>
<translation>Visualisierung: Zeige Ereignisse mit einschließlichen Kosten höher als:</translation>
</message>
<message>
<source>Collect global bus events</source>
<translation>Globale Bus-Ereignisse aufnehmen</translation>
</message>
<message>
<source>Limits the amount of results the profiler gives you. A lower limit will likely increase performance.</source>
<translation>Diese Einstellung beschränkt die Anzahl der Ergebnisse des Profilers. Kleinere Werte steigern die Geschwindigkeit.</translation>
</message>
<message>
<source>&lt;html&gt;&lt;head/&gt;&lt;body&gt;
&lt;p&gt;Does full cache simulation.&lt;/p&gt;
&lt;p&gt;By default, only instruction read accesses will be counted (&quot;Ir&quot;).&lt;/p&gt;
&lt;p&gt;
With cache simulation, further event counters are enabled:
&lt;ul&gt;&lt;li&gt;Cache misses on instruction reads (&quot;I1mr&quot;/&quot;I2mr&quot;)&lt;/li&gt;
&lt;li&gt;Data read accesses (&quot;Dr&quot;) and related cache misses (&quot;D1mr&quot;/&quot;D2mr&quot;)&lt;/li&gt;
&lt;li&gt;Data write accesses (&quot;Dw&quot;) and related cache misses (&quot;D1mw&quot;/&quot;D2mw&quot;)&lt;/li&gt;&lt;/ul&gt;
&lt;/p&gt;
&lt;/body&gt;&lt;/html&gt;</source>
<translation>&lt;html&gt;&lt;head/&gt;&lt;body&gt;
&lt;p&gt;Gibt an, ob eine vollständige Simulation des Caches erfolgen soll.&lt;/p&gt;
&lt;p&gt;In der Vorgabeinstellungen werden nur Lesezugriffe für Anweisungen gezählt (&quot;Ir&quot;).&lt;/p&gt;
&lt;p&gt;
Bei vollständiger Cache-Simulation werden weitere Ereigniszähler aktiviert:
&lt;ul&gt;&lt;li&gt;Cache-Fehlzugriffe bei Lesen von Anweisungen (&quot;I1mr&quot;/&quot;I2mr&quot;)&lt;/li&gt;
&lt;li&gt;Daten-Lesezugriffe (&quot;Dr&quot;) und diesbezügliche Fehlzugriffe (&quot;D1mr&quot;/&quot;D2mr&quot;)&lt;/li&gt;
&lt;li&gt;Daten-Schreibzugriffe (&quot;Dw&quot;) und diesbezügliche Fehlzugriffe (&quot;D1mw&quot;/&quot;D2mw&quot;)&lt;/li&gt;&lt;/ul&gt;
&lt;/p&gt;
&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</translation>
</message>
<message>
<source>&lt;html&gt;&lt;head/&gt;&lt;body&gt;
&lt;p&gt;Do branch prediction simulation.&lt;/p&gt;
&lt;p&gt;Further event counters are enabled: &lt;/p&gt;
&lt;ul&gt;&lt;li&gt;Number of executed conditional branches and related predictor misses (
&quot;Bc&quot;/&quot;Bcm&quot;)&lt;/li&gt;
&lt;li&gt;Executed indirect jumps and related misses of the jump address predictor (
&quot;Bi&quot;/&quot;Bim&quot;)&lt;/li&gt;&lt;/ul&gt;&lt;/body&gt;&lt;/html&gt;</source>
<translation>&lt;html&gt;&lt;head/&gt;&lt;body&gt;
&lt;p&gt;Gibt an, ob Verzweigungsvorhersage aktiviert ist.&lt;/p&gt;
&lt;p&gt;Zusätzliche Ereigniszähler: &lt;/p&gt;
&lt;ul&gt;&lt;li&gt;Zahl der ausgeführten bedingten Zweige und fehlerhaften Vorhersagen (
&quot;Bc&quot;/&quot;Bcm&quot;)&lt;/li&gt;
&lt;li&gt;Ausgeführte indirekte Sprünge und fehlerhafte Vorhersagen der Sprungadresse (
&quot;Bi&quot;/&quot;Bim&quot;)&lt;/li&gt;&lt;/ul&gt;&lt;/body&gt;&lt;/html&gt;</translation>
</message>
<message>
<source>Collect information for system call times.</source>
<translation>In Systemaufrufen verbrachte Zeit aufnehmen.</translation>
</message>
<message>
<source>Collect the number of global bus events that are executed. The event type &quot;Ge&quot; is used for these events.</source>
<translation>Gibt an, ob die Anzahl der ausgeführten globalen Bus-Ereignisse aufgenommen werden soll. Der Ereignistyp &quot;Ge&quot; wird dafür verwendet.</translation>
</message>
</context>
<context>
<name>Valgrind::Internal::MemcheckConfigWidget</name>
<message>
<source>Memory Analysis Options</source>
<translation>Einstellungen zur Speicheranalyse</translation>
</message>
<message>
<source>Backtrace frame count:</source>
<translation>Stack-Frames:</translation>
</message>
<message>
<source>Suppression files:</source>
<translation>Ausschluss-Dateien:</translation>
</message>
<message>
<source>Add...</source>
<translation>Hinzufügen...</translation>
</message>
<message>
<source>Remove</source>
<translation>Entfernen</translation>
</message>
<message>
<source>Track origins of uninitialized memory</source>
<translation>Herkunft von nicht initialisiertem Speicher verfolgen</translation>
</message>
<message>
<source>Valgrind Suppression File (*.supp);;All Files (*)</source>
<translation>Valgrind Ausschlussdatei (*.supp);;Alle Dateien (*)</translation>
</message>
</context>
<context>
<name>Valgrind::Internal::SuppressionDialog</name>
<message>
@@ -23472,6 +23404,121 @@ Bei vollständiger Cache-Simulation werden weitere Ereigniszähler aktiviert:
<source>Valgrind Command</source>
<translation>Valgrind-Kommando</translation>
</message>
<message>
<source>Valgrind Suppression File (*.supp);;All Files (*)</source>
<translation>Valgrind Ausschlussdatei (*.supp);;Alle Dateien (*)</translation>
</message>
<message>
<source>Memory Analysis Options</source>
<translation>Einstellungen zur Speicheranalyse</translation>
</message>
<message>
<source>Backtrace frame count:</source>
<translation>Stack-Frames:</translation>
</message>
<message>
<source>Suppression files:</source>
<translation>Ausschluss-Dateien:</translation>
</message>
<message>
<source>Add...</source>
<translation>Hinzufügen...</translation>
</message>
<message>
<source>Remove</source>
<translation>Entfernen</translation>
</message>
<message>
<source>Track origins of uninitialized memory</source>
<translation>Herkunft von nicht initialisiertem Speicher verfolgen</translation>
</message>
<message>
<source>Profiling Options</source>
<translation>Einstellungen des Profilers</translation>
</message>
<message>
<source>Limits the amount of results the profiler gives you. A lower limit will likely increase performance.</source>
<translation>Diese Einstellung beschränkt die Anzahl der Ergebnisse des Profilers. Kleinere Werte steigern die Geschwindigkeit.</translation>
</message>
<message>
<source>Result view: Minimum event cost:</source>
<translation>Minimale Ereigniskosten für Ergebnisanzeige:</translation>
</message>
<message>
<source>%</source>
<translation>%</translation>
</message>
<message>
<source>Show additional information for events in tooltips</source>
<translation>Zusätzliche Informationen zu Ereignissen in Tooltips anzeigen</translation>
</message>
<message>
<source>&lt;html&gt;&lt;head/&gt;&lt;body&gt;
&lt;p&gt;Does full cache simulation.&lt;/p&gt;
&lt;p&gt;By default, only instruction read accesses will be counted (&quot;Ir&quot;).&lt;/p&gt;
&lt;p&gt;
With cache simulation, further event counters are enabled:
&lt;ul&gt;&lt;li&gt;Cache misses on instruction reads (&quot;I1mr&quot;/&quot;I2mr&quot;)&lt;/li&gt;
&lt;li&gt;Data read accesses (&quot;Dr&quot;) and related cache misses (&quot;D1mr&quot;/&quot;D2mr&quot;)&lt;/li&gt;
&lt;li&gt;Data write accesses (&quot;Dw&quot;) and related cache misses (&quot;D1mw&quot;/&quot;D2mw&quot;)&lt;/li&gt;&lt;/ul&gt;
&lt;/p&gt;
&lt;/body&gt;&lt;/html&gt;</source>
<translation>&lt;html&gt;&lt;head/&gt;&lt;body&gt;
&lt;p&gt;Gibt an, ob eine vollständige Simulation des Caches erfolgen soll.&lt;/p&gt;
&lt;p&gt;In der Vorgabeinstellungen werden nur Lesezugriffe für Anweisungen gezählt (&quot;Ir&quot;).&lt;/p&gt;
&lt;p&gt;
Bei vollständiger Cache-Simulation werden weitere Ereigniszähler aktiviert:
&lt;ul&gt;&lt;li&gt;Cache-Fehlzugriffe bei Lesen von Anweisungen (&quot;I1mr&quot;/&quot;I2mr&quot;)&lt;/li&gt;
&lt;li&gt;Daten-Lesezugriffe (&quot;Dr&quot;) und diesbezügliche Fehlzugriffe (&quot;D1mr&quot;/&quot;D2mr&quot;)&lt;/li&gt;
&lt;li&gt;Daten-Schreibzugriffe (&quot;Dw&quot;) und diesbezügliche Fehlzugriffe (&quot;D1mw&quot;/&quot;D2mw&quot;)&lt;/li&gt;&lt;/ul&gt;
&lt;/p&gt;
&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</translation>
</message>
<message>
<source>Enable cache simulation</source>
<translation>Cache-Simulation aktivieren</translation>
</message>
<message>
<source>&lt;html&gt;&lt;head/&gt;&lt;body&gt;
&lt;p&gt;Do branch prediction simulation.&lt;/p&gt;
&lt;p&gt;Further event counters are enabled: &lt;/p&gt;
&lt;ul&gt;&lt;li&gt;Number of executed conditional branches and related predictor misses (
&quot;Bc&quot;/&quot;Bcm&quot;)&lt;/li&gt;
&lt;li&gt;Executed indirect jumps and related misses of the jump address predictor (
&quot;Bi&quot;/&quot;Bim&quot;)&lt;/li&gt;&lt;/ul&gt;&lt;/body&gt;&lt;/html&gt;</source>
<translation>&lt;html&gt;&lt;head/&gt;&lt;body&gt;
&lt;p&gt;Gibt an, ob Verzweigungsvorhersage aktiviert ist.&lt;/p&gt;
&lt;p&gt;Zusätzliche Ereigniszähler: &lt;/p&gt;
&lt;ul&gt;&lt;li&gt;Zahl der ausgeführten bedingten Zweige und fehlerhaften Vorhersagen (
&quot;Bc&quot;/&quot;Bcm&quot;)&lt;/li&gt;
&lt;li&gt;Ausgeführte indirekte Sprünge und fehlerhafte Vorhersagen der Sprungadresse (
&quot;Bi&quot;/&quot;Bim&quot;)&lt;/li&gt;&lt;/ul&gt;&lt;/body&gt;&lt;/html&gt;</translation>
</message>
<message>
<source>Enable branch prediction simulation</source>
<translation>Verzweigungsvorhersage aktivieren</translation>
</message>
<message>
<source>Collect information for system call times.</source>
<translation>In Systemaufrufen verbrachte Zeit aufnehmen.</translation>
</message>
<message>
<source>Collect system call time</source>
<translation>In Systemaufrufen verbrachte Zeit aufnehmen</translation>
</message>
<message>
<source>Collect the number of global bus events that are executed. The event type &quot;Ge&quot; is used for these events.</source>
<translation>Gibt an, ob die Anzahl der ausgeführten globalen Bus-Ereignisse aufgenommen werden soll. Der Ereignistyp &quot;Ge&quot; wird dafür verwendet.</translation>
</message>
<message>
<source>Collect global bus events</source>
<translation>Globale Bus-Ereignisse aufnehmen</translation>
</message>
<message>
<source>Visualisation: Minimum event cost:</source>
<translation>Minimale Ereigniskosten für Visualisierung:</translation>
</message>
</context>
<context>
<name>VCSBase::VcsConfigurationPage</name>
@@ -23679,18 +23726,6 @@ Bei vollständiger Cache-Simulation werden weitere Ereigniszähler aktiviert:
<source>Cache buffer</source>
<translation>Cache-Puffer</translation>
</message>
<message>
<source>Cell height</source>
<translation>Zellenhöhe</translation>
</message>
<message>
<source>Cell width</source>
<translation>Zellenbreite</translation>
</message>
<message>
<source>Flow</source>
<translation>Fluss</translation>
</message>
<message>
<source>Navigation wraps</source>
<translation>Tastennavigation bricht um</translation>
@@ -24308,6 +24343,14 @@ Sollen sie überschrieben werden?</translation>
</context>
<context>
<name>QmlDesigner::NodeInstanceServerProxy</name>
<message>
<source>Cannot Start QML Puppet Executable</source>
<translation>QML-Puppet konnte nicht gestartet werden</translation>
</message>
<message>
<source>The executable of the QML Puppet process (%1) cannot be started. Please check your installation. QML Puppet is a process which runs in the background to render the items.</source>
<translation>Die ausführbare Datei des QML-Puppet-Prozess (%1) konnte nicht gefunden werden. Bitte überprüfen Sie Ihre Installation. QML Puppet ist ein Prozess, der im Hintergrund die Elemente rendert.</translation>
</message>
<message>
<source>Cannot Find QML Puppet Executable</source>
<translation>Ausführbare Datei der QML-Puppet nicht gefunden</translation>
@@ -24353,6 +24396,20 @@ Sollen sie überschrieben werden?</translation>
</context>
<context>
<name>QmlProfiler::Internal::QmlProfilerEngine</name>
<message>
<source>QML Profiler</source>
<translation>QML-Profiler</translation>
</message>
<message>
<source>Application finished before loading profiled data.
Please use the stop button instead.</source>
<translation>Die Anwendung wurde vor dem Laden der Profildaten beenden.
Bitte verwenden Sie den Stop-Button.</translation>
</message>
<message>
<source>No executable file to launch.</source>
<translation>Es wurde keine ausführbare Datei zum Starten angegeben.</translation>
</message>
<message>
<source>The port seems to be in use.</source>
<extracomment>Error message shown after &apos;Could not connect ... debugger:&quot;</extracomment>
@@ -24453,23 +24510,23 @@ Sollen sie überschrieben werden?</translation>
</message>
<message>
<source>Open Qt4 Options</source>
<translation>Einstellungen zur Qt4-Bibliothek öffnen</translation>
<translation type="obsolete">Einstellungen zur Qt4-Bibliothek öffnen</translation>
</message>
<message>
<source>Cancel</source>
<translation>Abbrechen</translation>
<translation type="obsolete">Abbrechen</translation>
</message>
<message>
<source>QML Observer Missing</source>
<translation>QML-Beobachter fehlt</translation>
<translation type="obsolete">QML-Beobachter fehlt</translation>
</message>
<message>
<source>QML Observer could not be found.</source>
<translation>Der QML-Beobachter konnte nicht gefunden werden.</translation>
<translation type="obsolete">Der QML-Beobachter konnte nicht gefunden werden.</translation>
</message>
<message>
<source>QML Observer is used to offer debugging features for QML applications, such as interactive debugging and inspection tools. It must be compiled for each used Qt version separately. On the Qt4 options page, select the current Qt installation and click Rebuild.</source>
<translation>Der QML-Beobachter stellt zusätzliche Debugging-Funktionalität für QML-Anwendungen zur Verfügung, wie zum Beispiel interaktive Vorschau von Code-Änderungen und weitere Werkzeuge zur Untersuchung. Er muss für jede verwendete Qt-Version separat übersetzt werden. Gehen Sie auf die Qt4-Einstellungsseite, wählen Sie die betreffende Qt-Installation aus und klicken Sie auf &apos;Neu Erstellen&apos;.</translation>
<translation type="obsolete">Der QML-Beobachter stellt zusätzliche Debugging-Funktionalität für QML-Anwendungen zur Verfügung, wie zum Beispiel interaktive Vorschau von Code-Änderungen und weitere Werkzeuge zur Untersuchung. Er muss für jede verwendete Qt-Version separat übersetzt werden. Gehen Sie auf die Qt4-Einstellungsseite, wählen Sie die betreffende Qt-Installation aus und klicken Sie auf &apos;Neu Erstellen&apos;.</translation>
</message>
</context>
<context>
@@ -25107,13 +25164,6 @@ Haben Sie Qemu gestartet?</translation>
<translation>Allgemeine Informationen</translation>
</message>
</context>
<context>
<name>RemoteLinux::Internal::MaemoDeviceConfigWizardLoginDataPage</name>
<message>
<source>Login Data</source>
<translation type="obsolete">Login-Daten</translation>
</message>
</context>
<context>
<name>RemoteLinux::Internal::MaemoDeviceConfigWizardPreviousKeySetupCheckPage</name>
<message>
@@ -25535,6 +25585,10 @@ Es wird versucht eine Paketdatei zu erstellen, es können aber Probleme auftrete
</context>
<context>
<name>RemoteLinux::Internal::MaemoPackageCreationWidget</name>
<message>
<source>Size should be %1x%2 pixels</source>
<translation>Erforderliche Größe: %1x%2 Pixel</translation>
</message>
<message>
<source>No Version Available.</source>
<translation>Keine Version verfügbar.</translation>
@@ -25842,10 +25896,6 @@ Es wird versucht eine Paketdatei zu erstellen, es können aber Probleme auftrete
</context>
<context>
<name>RemoteLinux::Internal::MaemoQemuManager</name>
<message>
<source>Start Maemo Emulator</source>
<translation type="obsolete">Maemo-Emulator starten</translation>
</message>
<message>
<source>Start MeeGo Emulator</source>
<translation>Meego-Emulator starten</translation>
@@ -25870,10 +25920,6 @@ Es wird versucht eine Paketdatei zu erstellen, es können aber Probleme auftrete
<source>Stop MeeGo Emulator</source>
<translation>Meego-Emulator stoppen</translation>
</message>
<message>
<source>Stop Maemo Emulator</source>
<translation type="obsolete">Maemo-Emulator stoppen</translation>
</message>
</context>
<context>
<name>RemoteLinux::Internal::MaemoRemoteCopyFacility</name>
@@ -26080,10 +26126,6 @@ Fehlerausgabe: %1</translation>
</context>
<context>
<name>RemoteLinux::Internal::MaemoQemuSettingsPage</name>
<message>
<source>Maemo Qemu Settings</source>
<translation type="obsolete">Maemo QEmu-Einstellungen</translation>
</message>
<message>
<source>MeeGo Qemu Settings</source>
<translation>Meego QEmu-Einstellungen</translation>
@@ -26251,30 +26293,22 @@ Fehlerausgabe: %1</translation>
<source>Error creating packaging directory &apos;%1&apos;.</source>
<translation>Fehler beim Anlegen des Paket-Ordners &apos;%1&apos;.</translation>
</message>
<message>
<source>&lt;html&gt;Qt Creator has set up the following files to enable packaging:
%1
Do you want to add them to the project?&lt;/html&gt;</source>
<translation>&lt;html&gt;Qt Creator hat die folgenden Dateien zur Paketierung angelegt:
%1
Möchten Sie sie zum Projekt hinzufügen?&lt;/html&gt;</translation>
</message>
<message>
<source>Error creating MeeGo templates</source>
<translation>Fehlschlag beim Erstellen der Meego-Vorlagendateien</translation>
</message>
<message>
<source>Error creating Maemo packaging directory &apos;%1&apos;.</source>
<translation type="obsolete">Fehler beim Anlegen des Maemo-Paket-Ordners &apos;%1&apos;</translation>
</message>
<message>
<source>Add Packaging Files to Project</source>
<translation>Paketdateien zum Projekt hinzufügen</translation>
</message>
<message>
<source>Qt Creator has set up the following files to enable packaging:
%1
Do you want to add them to the project?</source>
<translation>Qt Creator hat die folgenden Dateien zur Paketierung angelegt:
%1
Möchten Sie sie zum Projekt hinzufügen?</translation>
</message>
<message>
<source>Error creating Maemo templates</source>
<translation type="obsolete">Fehlschlag beim Erstellen der Maemo-Vorlagendateien</translation>
</message>
</context>
<context>
<name>RemoteLinux::Internal::AbstractDebBasedQt4MaemoTarget</name>
@@ -26409,17 +26443,10 @@ Möchten Sie sie zum Projekt hinzufügen?</translation>
</translation>
</message>
</context>
<context>
<name>Valgrind::Internal::AbstractCallgrindSettings</name>
<message>
<source>Profiling</source>
<translation>Profiling</translation>
</message>
</context>
<context>
<name>Valgrind::Internal::CallgrindTool</name>
<message>
<source>Valgrind Function Profile</source>
<source>Valgrind Function Profiler</source>
<translation>Valgrind-Profiling einer Funktion</translation>
</message>
<message>
@@ -26588,13 +26615,6 @@ Möchten Sie sie zum Projekt hinzufügen?</translation>
<translation>Fehler unterdrücken</translation>
</message>
</context>
<context>
<name>Valgrind::Internal::AbstractMemcheckSettings</name>
<message>
<source>Memory Analysis</source>
<translation>Speicheranalyse</translation>
</message>
</context>
<context>
<name>Valgrind::Internal::MemcheckTool</name>
<message>
@@ -26630,7 +26650,7 @@ Möchten Sie sie zum Projekt hinzufügen?</translation>
<translation>Ungültige Aufrufe von &quot;free()&quot;</translation>
</message>
<message>
<source>Valgrind Analyze Memory</source>
<source>Valgrind Memory Analyzer</source>
<translation>Speicheranalyse mit Valgrind</translation>
</message>
<message>
@@ -26705,13 +26725,6 @@ Möchten Sie sie zum Projekt hinzufügen?</translation>
<translation>Ausgabe der Anwendung</translation>
</message>
</context>
<context>
<name>Valgrind::Internal::ValgrindSettings</name>
<message>
<source>Generic Settings</source>
<translation>Allgemeine Einstellungen</translation>
</message>
</context>
<context>
<name>VCSBase::Internal::CommonSettingsWidget</name>
<message>
@@ -26826,6 +26839,14 @@ Möchten Sie sie zum Projekt hinzufügen?</translation>
</context>
<context>
<name>Utils::FileUtils</name>
<message>
<source>Refusing to remove root directory.</source>
<translation>Das Wurzelverzeichnis kann nicht entfernt werden.</translation>
</message>
<message>
<source>Refusing to remove your home directory.</source>
<translation>Das Nutzerverzeichnis (Home) kann nicht entfernt werden.</translation>
</message>
<message>
<source>Failed to remove directory &apos;%1&apos;.</source>
<translation>Der Ordner &apos;%1&apos; konnte nicht gelöscht werden.</translation>
@@ -26873,10 +26894,6 @@ Möchten Sie sie zum Projekt hinzufügen?</translation>
</context>
<context>
<name>LinuxDeviceFactorySelectionDialog</name>
<message>
<source>Available wizards:</source>
<translation type="obsolete">Verfügbare Wizards:</translation>
</message>
<message>
<source>Device Configuration Wizard Selection</source>
<translation>Einrichtung einer neuen Geräte-Konfiguration</translation>
@@ -26918,14 +26935,6 @@ Möchten Sie sie zum Projekt hinzufügen?</translation>
<source>The device&apos;s host name or IP address:</source>
<translation>Hostname oder IP-Adresse des Geräts:</translation>
</message>
<message>
<source>User name:</source>
<translation type="obsolete">Nutzername:</translation>
</message>
<message>
<source>Authentication type:</source>
<translation type="obsolete">Art der Authentifizierung:</translation>
</message>
<message>
<source>Password</source>
<translation>Passwort</translation>
@@ -26934,14 +26943,6 @@ Möchten Sie sie zum Projekt hinzufügen?</translation>
<source>Key</source>
<translation>Schlüssel</translation>
</message>
<message>
<source>Password:</source>
<translation type="obsolete">Passwort:</translation>
</message>
<message>
<source>Private key:</source>
<translation type="obsolete">Privater Schlüssel:</translation>
</message>
<message>
<source>The user name to log into the device:</source>
<translation>Nutzername für Geräte-Login:</translation>
@@ -27331,10 +27332,6 @@ Requires Qt 4.7.4 or newer, and the component set installed for your Qt version.
Erfordert Qt 4.7.4 oder neuer.</translation>
</message>
<message>
<source>Qt Quick Application Type</source>
<translation>Qt Quick-Anwendung</translation>
</message>
<message>
<source>Use an existing .qml file</source>
<translation>Verwnde existierende .qml-Datei</translation>
@@ -27643,6 +27640,10 @@ Erfordert Qt 4.7.4 oder neuer.</translation>
<source>Recently Used Sessions</source>
<translation>Zuletzt benutzte Sitzungen</translation>
</message>
<message>
<source>%1 (last session)</source>
<translation>%1 (zuletzt benutzt)</translation>
</message>
<message>
<source>%1 (current session)</source>
<translation>%1 (aktuelle Sitzung)</translation>
@@ -27708,6 +27709,10 @@ Erfordert Qt 4.7.4 oder neuer.</translation>
<source>Select QML File</source>
<translation>QML-Datei auswählen</translation>
</message>
<message>
<source>Qt Quick Application Type</source>
<translation>Qt Quick-Anwendung</translation>
</message>
</context>
<context>
<name>TagBrowser</name>
@@ -27901,4 +27906,56 @@ Erfordert Qt 4.7.4 oder neuer.</translation>
<translation>&lt;Unbekannt&gt;</translation>
</message>
</context>
<context>
<name>StatusDisplay</name>
<message>
<source>No QML events recorded</source>
<translation>Es wurden keine QML-Ereignisse aufgenommen</translation>
</message>
<message>
<source>Profiling application</source>
<translation>Profiliere Anwendung</translation>
</message>
<message>
<source>Loading data</source>
<translation>Lade Daten</translation>
</message>
</context>
<context>
<name>QmlDesigner::TextToModelMerger error message</name>
<message>
<source>No import statements found</source>
<translation>Es konnte keine Import-Anweisung gefunden werden</translation>
</message>
</context>
<context>
<name>Valgrind::Internal::ValgrindBaseSettings</name>
<message>
<source>Valgrind</source>
<translation>Valgrind</translation>
</message>
</context>
<context>
<name>QmlProjectManager::QmlProjectPlugin</name>
<message>
<source>Open Qt4 Options</source>
<translation>Einstellungen zur Qt4-Bibliothek öffnen</translation>
</message>
<message>
<source>Cancel</source>
<translation type="obsolete">Abbrechen</translation>
</message>
<message>
<source>QML Observer Missing</source>
<translation>QML-Beobachter fehlt</translation>
</message>
<message>
<source>QML Observer could not be found.</source>
<translation>Der QML-Beobachter konnte nicht gefunden werden.</translation>
</message>
<message>
<source>QML Observer is used to offer debugging features for QML applications, such as interactive debugging and inspection tools. It must be compiled for each used Qt version separately. On the Qt4 options page, select the current Qt installation and click Rebuild.</source>
<translation>Der QML-Beobachter stellt zusätzliche Debugging-Funktionalität für QML-Anwendungen zur Verfügung, wie zum Beispiel interaktives Debuggen und weitere Werkzeuge zur Untersuchung. Er muss für jede verwendete Qt-Version separat übersetzt werden. Gehen Sie auf die Qt4-Einstellungsseite, wählen Sie die betreffende Qt-Installation aus und klicken Sie auf &apos;Neu Erstellen&apos;.</translation>
</message>
</context>
</TS>
@@ -37,7 +37,7 @@ Components.Button {
id:button
// dm: this is wrong
width: Math.max(100, button.iconSource !== "" ? labelItem.contentsWidth+12 : 0 )
width: Math.max(sizehint.width, button.iconSource !== "" ? labelItem.contentsWidth + 8 : 0 )
height: Math.max(22, sizehint.height)
property variant sizehint: backgroundItem.sizeFromContents(80, 6)
@@ -74,6 +74,7 @@ Components.Button {
Row {
id: row
anchors.centerIn: parent
anchors.verticalCenterOffset: -1
spacing: 4
Image {
source: iconSource
@@ -48,6 +48,9 @@ FocusScope {
property alias verticalValue: vscrollbar.value
property alias horizontalValue: hscrollbar.value
property alias horizontalScrollBar: hscrollbar
property alias verticalScrollBar: vscrollbar
default property alias data: content.data
property int contentY
@@ -32,31 +32,36 @@
import QtQuick 1.0
import "custom" as Components
import "plugin"
Item {
id: scrollbar
property bool upPressed
property bool downPressed
property int orientation : Qt.Horizontal
property alias minimumValue: slider.minimumValue
property alias maximumValue: slider.maximumValue
property int pageStep: styleitem.horizontal ? width : height
property int singleStep: 20
property alias value: slider.value
property bool scrollToClickposition: styleitem.styleHint("scrollToClickPosition")
width: orientation == Qt.Horizontal ? 200 : internal.scrollbarExtent
height: orientation == Qt.Horizontal ? internal.scrollbarExtent : 200
onValueChanged: internal.updateHandle()
// onMaximumValueChanged: internal.updateHandle()
// onMinimumValueChanged: internal.updateHandle()
MouseArea {
id: internal
anchors.fill: parent
property bool upPressed
property bool downPressed
property bool pageUpPressed
property bool pageDownPressed
property bool autoincrement: false
property int scrollbarExtent : styleitem.pixelMetric("scrollbarExtent");
property bool handlePressed
// Update hover item
onEntered: styleitem.activeControl = styleitem.hitTest(mouseX, mouseY)
@@ -64,8 +69,14 @@ Item {
onMouseXChanged: styleitem.activeControl = styleitem.hitTest(mouseX, mouseY)
hoverEnabled: true
property variant control
property variant pressedX
property variant pressedY
property int oldPosition
property int grooveSize
Timer {
running: upPressed || downPressed
running: internal.upPressed || internal.downPressed || internal.pageUpPressed || internal.pageDownPressed
interval: 350
onTriggered: internal.autoincrement = true
}
@@ -74,37 +85,81 @@ Item {
running: internal.autoincrement
interval: 60
repeat: true
onTriggered: upPressed ? internal.decrement() : internal.increment()
onTriggered: internal.upPressed ? internal.decrement() : internal.downPressed ? internal.increment() :
internal.pageUpPressed ? internal.decrementPage() :
internal.incrementPage()
}
onMousePositionChanged: {
if (pressed && control === "handle") {
//slider.positionAtMaximum = grooveSize
if (!styleitem.horizontal)
slider.position = oldPosition + (mouseY - pressedY)
else
slider.position = oldPosition + (mouseX - pressedX)
}
}
onPressed: {
var control = styleitem.hitTest(mouseX,mouseY)
if (control == "up") {
control = styleitem.hitTest(mouseX,mouseY)
scrollToClickposition = styleitem.styleHint("scrollToClickPosition")
grooveSize = styleitem.horizontal? styleitem.subControlRect("groove").width -
styleitem.subControlRect("handle").width:
styleitem.subControlRect("groove").height -
styleitem.subControlRect("handle").height;
if (control == "handle") {
pressedX = mouseX
pressedY = mouseY
oldPosition = slider.position
} else if (control == "up") {
decrement();
upPressed = true
} else if (control == "down") {
increment();
downPressed = true
} else if (!scrollToClickposition){
if (control == "upPage") {
decrementPage();
pageUpPressed = true
} else if (control == "downPage") {
incrementPage();
pageDownPressed = true
}
} else {
slider.position = styleitem.horizontal ? mouseX - handleRect.width/2
: mouseY - handleRect.height/2
}
}
onReleased: {
autoincrement = false;
if (upPressed) {
upPressed = false;
decrement()
} else if (downPressed) {
increment()
downPressed = false;
}
upPressed = false;
downPressed = false;
pageUpPressed = false
pageDownPressed = false
control = ""
}
function incrementPage() {
value += pageStep
if (value > maximumValue)
value = maximumValue
}
function decrementPage() {
value -= pageStep
if (value < minimumValue)
value = minimumValue
}
function increment() {
value += 30
value += singleStep
if (value > maximumValue)
value = maximumValue
}
function decrement() {
value -= 30
value -= singleStep
if (value < minimumValue)
value = minimumValue
}
@@ -115,7 +170,7 @@ Item {
elementType: "scrollbar"
hover: activeControl != "none"
activeControl: "none"
sunken: upPressed | downPressed
sunken: internal.upPressed | internal.downPressed
minimum: slider.minimumValue
maximum: slider.maximumValue
value: slider.value
@@ -124,35 +179,20 @@ Item {
}
property variant handleRect: Qt.rect(0,0,0,0)
property variant grooveRect: Qt.rect(0,0,0,0)
function updateHandle() {
internal.handleRect = styleitem.subControlRect("handle")
var grooveRect = styleitem.subControlRect("groove");
var extra = 0
if (orientation == Qt.Vertical) {
slider.anchors.topMargin = grooveRect.y + extra
slider.anchors.bottomMargin = height - grooveRect.y - grooveRect.height + extra
} else {
slider.anchors.leftMargin = grooveRect.x + extra
slider.anchors.rightMargin = width - grooveRect.x - grooveRect.width + extra
}
grooveRect = styleitem.subControlRect("groove");
}
Components.Slider {
RangeModel {
id: slider
hoverEnabled: false // Handled by the scrollbar background
orientation: scrollbar.orientation
anchors.fill: parent
leftMargin: (orientation === Qt.Horizontal) ? internal.handleRect.width / 2 : internal.handleRect.height / 2
rightMargin: leftMargin
handle: Item {
width: orientation == Qt.Vertical ? internal.handleRect.height : internal.handleRect.width;
height: orientation == Qt.Vertical ? internal.handleRect.width : internal.handleRect.height
}
groove:null
containsMouse: false
valueIndicator:null
inverted:orientation != Qt.Horizontal
minimumValue: 0.0
maximumValue: 1.0
value: 0
stepSize: 0.0
inverted: false
positionAtMaximum: internal.grooveSize
}
}
}
@@ -43,6 +43,8 @@ Components.TextField {
leftMargin: 6
rightMargin: 6
property string hint
height: backgroundItem.sizeFromContents(200, 25).height
width: 200
clip: false
@@ -53,6 +55,7 @@ Components.TextField {
sunken: true
focus: textfield.activeFocus
hover: containsMouse
hint: textfield.hint
}
Item{
@@ -152,6 +152,7 @@ FocusScope {
opacity: !textInput.text.length && !textInput.activeFocus ? 1 : 0
color: "gray"
text: "Enter text"
elide: Text.ElideRight
Behavior on opacity { NumberAnimation { duration: 90 } }
}
}
@@ -302,7 +302,21 @@ void QStyleItem::initStyleOption()
opt->maximum = maximum();
// ### fixme - workaround for KDE inverted dial
opt->sliderPosition = value();
opt->tickInterval = opt->maximum != opt->minimum ? 1200 / (opt->maximum - opt->minimum) : 0;
opt->singleStep = step();
if (opt->singleStep)
{
qreal numOfSteps = (opt->maximum - opt->minimum) / opt->singleStep;
// at least 5 pixels between tick marks
if (numOfSteps && (width() / numOfSteps < 5))
opt->tickInterval = qRound((5*numOfSteps / width()) + 0.5)*step();
else
opt->tickInterval = opt->singleStep;
}
else // default Qt-components implementation
opt->tickInterval = opt->maximum != opt->minimum ? 1200 / (opt->maximum - opt->minimum) : 0;
if (style() == QLatin1String("oxygen") && type == QLatin1String("dial"))
opt->sliderValue = maximum() - value();
else
@@ -487,19 +501,21 @@ QString QStyleItem::hitTest(int px, int py)
}
break;
case ScrollBar: {
subcontrol = qApp->style()->hitTestComplexControl(QStyle::CC_ScrollBar,
qstyleoption_cast<QStyleOptionComplex*>(m_styleoption),
QPoint(px,py), 0);
if (subcontrol == QStyle::SC_ScrollBarSlider)
return "handle";
subcontrol = qApp->style()->hitTestComplexControl(QStyle::CC_ScrollBar,
qstyleoption_cast<QStyleOptionComplex*>(m_styleoption),
QPoint(px,py), 0);
if (subcontrol == QStyle::SC_ScrollBarSlider)
return "handle";
if (subcontrol == QStyle::SC_ScrollBarSubLine
|| subcontrol == QStyle::SC_ScrollBarSubPage)
return "up";
if (subcontrol == QStyle::SC_ScrollBarSubLine)
return "up";
else if (subcontrol == QStyle::SC_ScrollBarSubPage)
return "upPage";
if (subcontrol == QStyle::SC_ScrollBarAddLine
|| subcontrol == QStyle::SC_ScrollBarAddPage)
return "down";
if (subcontrol == QStyle::SC_ScrollBarAddLine)
return "down";
else if (subcontrol == QStyle::SC_ScrollBarAddPage)
return "downPage";
}
break;
default:
@@ -621,15 +637,15 @@ QVariant QStyleItem::styleHint(const QString &metric)
return qApp->palette().text().color().name();
} else if (metric == "focuswidget") {
return qApp->style()->styleHint(QStyle::SH_FocusFrame_AboveWidget);
} else if (metric == "tabbaralignment") {
int result = qApp->style()->styleHint(QStyle::SH_TabBar_Alignment);
if (result == Qt::AlignCenter)
return "center";
return "left";
} else if (metric == "framearoundcontents")
} else if (metric == "framearoundcontents") {
return qApp->style()->styleHint(QStyle::SH_ScrollView_FrameOnlyAroundContents);
} else if (metric == "scrollToClickPosition")
return qApp->style()->styleHint(QStyle::SH_ScrollBar_LeftClickAbsolutePosition);
return 0;
}
@@ -70,6 +70,7 @@ class QStyleItem: public QDeclarativeItem
Q_PROPERTY( int minimum READ minimum WRITE setMinimum NOTIFY minimumChanged)
Q_PROPERTY( int maximum READ maximum WRITE setMaximum NOTIFY maximumChanged)
Q_PROPERTY( int value READ value WRITE setValue NOTIFY valueChanged)
Q_PROPERTY( int step READ step WRITE setStep NOTIFY stepChanged)
Q_PROPERTY( int paintMargins READ paintMargins WRITE setPaintMargins NOTIFY paintMarginsChanged)
Q_PROPERTY( QString fontFamily READ fontFamily)
@@ -122,6 +123,7 @@ public:
int minimum() const { return m_minimum; }
int maximum() const { return m_maximum; }
int step() const { return m_step; }
int value() const { return m_value; }
int paintMargins() const { return m_paintMargins; }
@@ -144,6 +146,7 @@ public:
void setMinimum(int minimum) { if (m_minimum!= minimum) {m_minimum = minimum; emit minimumChanged();}}
void setMaximum(int maximum) { if (m_maximum != maximum) {m_maximum = maximum; emit maximumChanged();}}
void setValue(int value) { if (m_value!= value) {m_value = value; emit valueChanged();}}
void setStep(int step) { if (m_step != step) { m_step = step; emit stepChanged(); }}
void setPaintMargins(int value) {
Q_UNUSED(value)
#ifdef Q_WS_WIN //only vista style needs this hack
@@ -189,6 +192,7 @@ Q_SIGNALS:
void horizontalChanged();
void minimumChanged();
void maximumChanged();
void stepChanged();
void valueChanged();
void activeControlChanged();
void infoChanged();
@@ -223,6 +227,7 @@ protected:
int m_minimum;
int m_maximum;
int m_value;
int m_step;
int m_paintMargins;
};
@@ -163,7 +163,7 @@ qreal QWheelArea::verticalValue() const
void QWheelArea::setVerticalDelta(qreal d)
{
_verticalDelta = d/15;
_verticalDelta = d/5;
setVerticalValue(_verticalValue - _verticalDelta);
emit(verticalWheelMoved());
}
@@ -175,7 +175,7 @@ qreal QWheelArea::verticalDelta() const
void QWheelArea::setHorizontalDelta(qreal d)
{
_horizontalDelta = d/15;
_horizontalDelta = d/5;
setHorizontalValue(_horizontalValue - _horizontalDelta);
emit(horizontalWheelMoved());
}
+19 -18
View File
@@ -36,36 +36,37 @@ import components 1.0 as Components
Item {
id: root
property int margin: 10
property int margin: 8
Components.ScrollArea {
id: scrollArea
anchors.fill: parent
anchors.fill: parent
anchors.margins: - margin
frame: false
Item {
height: Math.max(recentSessions.height + manageSessionsButton.height + margin,
recentProjects.height)
id: baseitem
height: Math.max(recentSessions.height, recentProjects.height)
width: root.width
Widgets.RecentSessions {
id: recentSessions
width: parent.width / 3 - margin
width: Math.floor(root.width / 2.5)
anchors.left: parent.left
}
Widgets.Button {
id: manageSessionsButton
anchors.top: recentSessions.bottom
anchors.topMargin: margin
anchors.left: recentSessions.left
text: qsTr("Manage Sessions...")
onClicked: projectWelcomePage.manageSessions()
}
Widgets.RecentProjects {
id: recentProjects
x: parent.width / 3 + margin
width: parent.width - x
anchors.left: recentSessions.right
anchors.right: parent.right
anchors.rightMargin: scrollArea.verticalScrollBar.visible ? 0 :
-scrollArea.verticalScrollBar.width
}
}
}
Rectangle {
anchors.top: scrollArea.top
height: root.height + 2 * margin
width: 1
color: "#ccc"
x: recentProjects.x - margin
}
}
@@ -21,5 +21,6 @@ OTHER_FILES = develop.qml \
widgets/FeaturedAndNewsListing.qml \
widgets/NewsListing.qml \
widgets/TabWidget.qml \
widgets/TagBrowser.qml \
examples_fallback.xml \
qtcreator_tutorials.xml
+73 -67
View File
@@ -32,89 +32,95 @@
import QtQuick 1.0
import "widgets"
import components 1.0 as Components
Rectangle {
id: root
color: "#F2F2F2"
color: "white"
// work around the fact that we can't use
// a property alias to welcomeMode.activePlugin
property int current: 0
onCurrentChanged: welcomeMode.activePlugin = current
Component.onCompleted: current = welcomeMode.activePlugin
Item {
anchors.top: parent.top
anchors.left: parent.left
anchors.right: parent.right
anchors.bottom: feedback.top
anchors.margins: 10
Item {
id: news
anchors.top: parent.top
anchors.bottom: parent.bottom
anchors.left: parent.left
anchors.rightMargin: 5
width: 270
Rectangle {
anchors.fill: parent
border.color: "#36295B7F"
border.width: 1
color: "#B3FFFFFF"
}
FeaturedAndNewsListing {
anchors.fill: parent
anchors.margins: 8
}
}
BorderImage {
id: inner_background
Image {
id: tabFrame
source: "qrc:welcome/images/welcomebg.png"
smooth: true
Rectangle {
anchors.fill: parent
border.color: "#36295B7F"
border.width: 1
color: "#20FFFFFF"
}
id: header;
source: "qrc:welcome/images/center_frame_header.png";
anchors.verticalCenter: parent.verticalCenter;
anchors.horizontalCenter: parent.horizontalCenter;
anchors.topMargin: 2
}
anchors.top: root.top
source: "qrc:welcome/images/background_center_frame_v2.png"
width: parent.width
height: 60
border.right: 2
border.left: 2
border.top: 2
border.bottom: 10
}
LinksBar {
id: navigationAndDevLinks
property alias current: root.current
anchors.top: inner_background.bottom
anchors.left: news.right
anchors.right: parent.right
anchors.bottomMargin: 4
anchors.topMargin: -2
model: tabs.model
}
Rectangle {
color: "#eee"
id: news
opacity: 0.7
anchors.top: navigationAndDevLinks.top
anchors.bottom: feedback.top
anchors.left: parent.left
width: 270
FeaturedAndNewsListing {
anchors.fill: parent
}
Rectangle {
anchors.left: parent.left
anchors.right: parent.right
anchors.top: parent.top
height: 1
color: "black"
}
Rectangle {
anchors.left: parent.left
anchors.right: parent.right
anchors.top: parent.top
anchors.topMargin: 1
height: 1
color: "#ccc"
}
Rectangle{
anchors.right: parent.right
anchors.top: parent.top
anchors.bottom: parent.bottom
anchors.left: news.right
anchors.right: parent.right
anchors.leftMargin: 5
LinksBar {
id: linksBar
anchors.top: parent.top
anchors.left: parent.left
anchors.right: parent.right
property alias current: root.current
model: tabs.model
}
Rectangle {
anchors.fill: linksBar
anchors.bottomMargin: 1
opacity: 1
border.color: "#4D295B7F"
border.width: 1
color: "#00000000"
}
TabWidget {
id: tabs
property int current: root.current
model: pagesModel
anchors.top: linksBar.bottom
anchors.bottom: parent.bottom
anchors.left: parent.left
anchors.right: parent.right
anchors.margins: 10
}
width:1
color: "black"
}
}
TabWidget {
id: tabs
property int current: root.current
model: pagesModel
anchors.top: navigationAndDevLinks.bottom
anchors.bottom: feedback.top
anchors.left: news.right
anchors.right: parent.right
anchors.leftMargin: 0
anchors.rightMargin: 0
anchors.margins: 4
}
Feedback {
id: feedback
anchors.bottom: parent.bottom
@@ -36,12 +36,12 @@ import "../components/custom" as Custom
Custom.Button {
id: button
width: Math.max(100, labelItem.contentsWidth+20)
width: Math.max(50, labelItem.contentsWidth+20)
height: 32
background: BorderImage {
source: {
if (pressed)
if (pressed || checked )
return "qrc:/welcome/images/btn_26_pressed.png"
else
if (containsMouse)
@@ -32,21 +32,40 @@
import QtQuick 1.0
import components 1.0 as Components
import widgets 1.0 as Widgets
Item {
id: exampleBrowserRoot
Item {
id : lineEditRoot
width: parent.width
height: lineEdit.height
function appendTag(tag) {
var tagStr = "tag:" + '"' + tag + '"'
if (lineEdit.text == "")
lineEdit.text = tagStr
else
lineEdit.text += " " + tagStr
}
LineEdit {
Behavior on width { NumberAnimation{} }
Rectangle {
id : lineEditRoot
color:"#f4f4f4"
width: parent.width
height: lineEdit.height + 6
anchors.bottom: parent.bottom
anchors.left: parent.left
anchors.right: parent.right
anchors.bottomMargin: - 8
anchors.leftMargin: - 8
anchors.rightMargin: scrollArea.verticalScrollBar.visible ? 0 : -8
Widgets.LineEdit {
id: lineEdit
placeholderText: !checkBox.checked ? qsTr("Search in Tutorials") : qsTr("Search in Tutorials, Examples and Demos")
focus: true
id: lineEdit
width: lineEditRoot.width - checkBox.width - 20 - tagFilterButton.width
onTextChanged: examplesModel.filterRegExp = RegExp('.*'+text, "im")
anchors.left: parent.left
anchors.leftMargin:4
anchors.verticalCenter: parent.verticalCenter
width: Math.max(lineEditRoot.width - checkBox.width - 21 - tagFilterButton.width, 100)
onTextChanged: examplesModel.parseSearchString(text)
}
CheckBox {
@@ -63,37 +82,65 @@ Item {
Button {
id: tagFilterButton
property string tag
Behavior on width { NumberAnimation{} }
onTagChanged: { examplesModel.filterTag = tag; examplesModel.updateFilter() }
anchors.leftMargin: 6
property Item browser;
onTagChanged: exampleBrowserRoot.appendTag(tag)
anchors.left: checkBox.right
anchors.leftMargin: 6
anchors.verticalCenter: lineEdit.verticalCenter
visible: !examplesModel.showTutorialsOnly
text: tag === "" ? qsTr("Filter by Tag") : qsTr("Tag Filter: %1").arg(tag)
onClicked: {
tagBrowserLoader.source = "TagBrowser.qml"
tagBrowserLoader.item.visible = true
text: qsTr("Tag List")
checkable: true
Connections {
target: tagBrowserLoader.item
onVisibleChanged: tagFilterButton.checked = tagBrowserLoader.item.visible
}
onCheckedChanged: {
if (checked) {
tagBrowserLoader.source = "TagBrowser.qml"
var item = tagBrowserLoader.item;
item.bottomMargin = lineEditRoot.height
item.visible = true
} else { tagBrowserLoader.item.visible = false }
}
}
}
Components.ScrollArea {
id: scrollArea
anchors.topMargin: lineEditRoot.height+12
anchors.bottomMargin: lineEditRoot.height - 8
anchors.margins:-8
anchors.fill: parent
clip: true
frame: false
Column {
Repeater {
id: repeater
model: examplesModel
delegate: ExampleDelegate {
width: scrollArea.width-20;
property int count: repeater.count
}
delegate: ExampleDelegate { width: scrollArea.width; onTagClicked: exampleBrowserRoot.appendTag(tag) }
}
}
Component.onCompleted: verticalScrollBar.anchors.bottomMargin = -(scrollArea.anchors.bottomMargin + 8)
}
Rectangle {
anchors.bottom: scrollArea.bottom
height:4
anchors.left: scrollArea.left
anchors.right: scrollArea.right
anchors.rightMargin: scrollArea.verticalScrollBar.visible ?
scrollArea.verticalScrollBar.width : 0
width:parent.width
gradient: Gradient{
GradientStop{position:1 ; color:"#10000000"}
GradientStop{position:0 ; color:"#00000000"}
}
Rectangle{
height:1
color:"#ccc"
anchors.bottom: parent.bottom
width:parent.width
}
}
Loader {
id: tagBrowserLoader
anchors.fill: parent
@@ -35,12 +35,29 @@ import components 1.0 as Components
Rectangle {
id: root
height: 130
height: Math.max(image.height-20, description.paintedHeight) + 68
color: "#00ffffff"
radius: 6
clip: true
property variant tags : model.tags
signal tagClicked(string tag)
Components.QStyleItem { id: styleItem; cursor: "pointinghandcursor"; anchors.fill: parent }
Components.QStyleItem { cursor: "pointinghandcursor" ; anchors.fill: parent }
Item {
visible: parent.state=="hover"
anchors.fill: parent
Rectangle{
height: 1
color: "#eee"
anchors.top: parent.top
width:parent.width
}
Rectangle {
height: 1
color: "#eee"
anchors.bottom: parent.bottom
width:parent.width
}
}
Text {
id: title
@@ -50,18 +67,19 @@ Rectangle {
anchors.topMargin: 10
text: model.name
font.bold: true
font.pixelSize: 16
}
font.pixelSize: 14
elide: Text.ElideRight
}
RatingBar { id: rating; anchors.top: parent.top; anchors.topMargin: 10; anchors.right: parent.right; anchors.rightMargin: 10; rating: model.difficulty; visible: model.difficulty !== 0 }
Image {
property bool hideImage : model.imageUrl === "" || status === Image.Error
id: image
anchors.top: title.bottom
anchors.left: parent.left
anchors.topMargin: 10
anchors.leftMargin: 10
smooth: true
anchors.top: description.top
anchors.right: parent.right
anchors.rightMargin: 30
width: hideImage ? 0 : 90
height: hideImage ? 0 : 66
asynchronous: true
@@ -69,43 +87,15 @@ Rectangle {
source: model.imageUrl !== "" ? "image://helpimage/" + encodeURI(model.imageUrl) : ""
}
Item {
Text {
id: description
anchors.left: image.right
anchors.right: parent.right
anchors.rightMargin: 10
anchors.leftMargin: image.hideImage ? 0 : 10
anchors.left: parent.left
anchors.right: image.left
anchors.leftMargin: 10
anchors.top: rating.bottom
anchors.topMargin: 6
anchors.bottom: bottomRow.top
anchors.bottomMargin: 6
clip: true
Text {
clip: true
anchors.top: parent.top
anchors.right: parent.right
anchors.left: parent.left
wrapMode: Text.WordWrap
text: model.description
}
}
Row {
id: bottomRow
anchors.left: image.right;
anchors.leftMargin: image.hideImage ? 0 : 10
anchors.topMargin: 10
anchors.bottomMargin: 10
anchors.bottom: parent.bottom
spacing: 4
Text { text: qsTr("Tags:"); font.bold: true; }
Text { text: model.tags.join(", "); color: "grey" }
}
Rectangle {
visible: count-1 !== index
height: 1
anchors {left: parent.left; bottom: parent.bottom; right: parent.right }
color: "darkgrey"
wrapMode: Text.WordWrap
text: model.description
color:"#444"
}
MouseArea {
@@ -122,13 +112,39 @@ Rectangle {
onExited: parent.state = ""
}
states: [ State { name: "hover"; PropertyChanges { target: root; color: "#5effffff" } } ]
transitions:
Transition {
from: ""
to: "hover"
reversible: true
ColorAnimation { duration: 100; easing.type: Easing.OutQuad }
Row {
id: tagLine;
anchors.bottomMargin: 20
anchors.top: description.bottom
anchors.left: parent.left
anchors.leftMargin: 10
anchors.rightMargin: 26
spacing: 4
Text { id: labelText; text: qsTr("Tags:") ; color: "#999"; font.pixelSize: 11}
Repeater {
model: tags;
Text {
states: [ State { name: "hover"; PropertyChanges { target: tagText; color: "black" } } ]
id: tagText
text: model.modelData
color: "#bbb"
font.pixelSize: 11
MouseArea {
anchors.fill: parent;
hoverEnabled: true;
onEntered: {
root.state = "hover"
parent.state = "hover"
}
onExited:{
root.state = ""
parent.state = ""
}
onClicked: root.tagClicked(model.modelData)
}
}
}
}
states: [ State { name: "hover"; PropertyChanges { target: root; color: "#f9f9f9" } } ]
}
@@ -36,15 +36,14 @@ import components 1.0 as Components
Item {
InsetText {
id: text
anchors.horizontalCenter: parent.horizontalCenter
anchors.left: parent.left
anchors.top: parent.top
anchors.margins: 10
horizontalAlignment: Text.AlignHCenter
anchors.margins: 14
horizontalAlignment: Text.AlignLeft
text: qsTr("Featured News")
// mainColor: "#44A51C"
mainColor: "#074C1C"
font.bold: true
font.pointSize: 16
font.pointSize: 18
}
ListModel {
@@ -64,9 +63,7 @@ Item {
anchors.top: text.bottom
anchors.left: parent.left
anchors.right: parent.right
anchors.topMargin: text.height
clip: true
anchors.margins: 16
}
}
@@ -33,16 +33,17 @@
import QtQuick 1.0
import components 1.0 as Components
BorderImage {
Rectangle {
id: inner_background
height: openProjectButton.height + 10
source: "qrc:welcome/images/background_center_frame_v2.png"
border.left: 2
border.right: 2
height: 40
Rectangle { color: "#4D295B7F"; width: parent.width; height: 1; anchors.top: parent.top; anchors.left: parent.left }
gradient: Gradient{
GradientStop{color: "#eee" ; position: 0}
GradientStop{color: "#bbb" ; position: 1}
}
Components.QStyleItem { id: styleItem; visible: false }
Rectangle { color: "#444"; width: parent.width; height: 1; anchors.top: parent.top; anchors.left: parent.left }
Rectangle { color: "white"; width: parent.width; height: 1; anchors.top: parent.top; anchors.topMargin: 1 ; anchors.left: parent.left }
// whitelist
property bool _hasDesktopTheme: welcomeMode.platform() === "linux"
@@ -55,27 +56,26 @@ BorderImage {
anchors.verticalCenter: parent.verticalCenter
anchors.left: parent.left
anchors.margins: 5
anchors.rightMargin: 10
onClicked: welcomeMode.sendFeedback()
}
Text {
id: feedbackText
anchors.verticalCenter: parent.verticalCenter
anchors.margins: 5
anchors.leftMargin: 10
anchors.left: feedbackButton.right
anchors.margins: 5
text: qsTr("Help us make Qt Creator even better")
}
Button {
id: openProjectButton
text: qsTr("Open Project...")
focus: false
iconSource: _hasDesktopTheme ? "image://desktoptheme/document-open" : ""
onClicked: welcomeMode.openProject();
anchors.right: createProjectButton.left
anchors.margins: 5
height: 32
anchors.verticalCenter: parent.verticalCenter
}
@@ -85,8 +85,9 @@ BorderImage {
iconSource: _hasDesktopTheme ? "image://desktoptheme/document-new" : ""
onClicked: welcomeMode.newProject();
height: 32
anchors.margins: 5
anchors.right: parent.right
anchors.margins: 5
anchors.verticalCenter: parent.verticalCenter
}
}
@@ -39,27 +39,47 @@ Item {
property QtObject model
property Component delegate
Rectangle {
color: "#ececec"
anchors.top: parent.top
anchors.bottom: dataSection.top
width: parent.width
}
Text {
id: titleText
text: root.header
width: parent.width
font.bold: true
font.pointSize: 14
color: "#555555"
font.pointSize: 16
color: "#444"
anchors.top: parent.top
anchors.left: parent.left
anchors.right: parent.right
elide: Text.ElideRight
anchors.topMargin: 10
anchors.leftMargin: 10
}
Rectangle {
height: 1
color: "#ccc"
anchors.bottom: dataSection.top
width: parent.width
}
Rectangle {
height: 1
color: "#ccc"
anchors.top: parent.top
width: parent.width
}
Column {
id: dataSection
spacing: 10
anchors.topMargin: 10
anchors.top: titleText.bottom
anchors.left: parent.left
anchors.right: parent.right
Repeater {
width: parent.width
model: root.model
delegate: root.delegate
}
@@ -41,14 +41,17 @@ Row {
property int tabWidth: Math.floor(tabBar.width/tabs.count)
Repeater {
id: tabs
height: tabBar.height
model: parent.model
delegate: Item {
Components.QStyleItem { id: styleItem; cursor: "pointinghandcursor"; anchors.fill: parent }
Components.QStyleItem { cursor: "pointinghandcursor"; anchors.fill: parent }
height: tabBar.height
width: index === 1 ? tabWidth : (tabWidth + tabBar.width % tabs.count + 1)
Image {
width: tabs.count-1 === index ? tabWidth : tabWidth + tabBar.width%tabs.count
BorderImage {
id: tabBackground
anchors.fill: parent
border { top: 1; bottom: 1}
source: "qrc:welcome/images/tab_inactive.png"
}
Text {
@@ -70,12 +73,7 @@ Row {
id: activeState; when: tabBar.current == index
PropertyChanges { target: tabBackground; source:"qrc:welcome/images/tab_active.png" }
PropertyChanges { target: text; color: "white" }
},
State {
id: hoverState; when: mouseArea.containsMouse
PropertyChanges { target: tabBackground; source:"qrc:welcome/images/tab_hover.png" }
}
]
}
}
@@ -106,7 +106,7 @@ Item {
font.bold: true;
wrapMode: Text.WrapAtWordBoundaryOrAnywhere;
textFormat: Text.RichText;
width: parent.width-icon.width-5
width: parent.width-icon.width-16
}
Row {
spacing: 5
@@ -138,6 +138,7 @@ Item {
font.italic: true;
wrapMode: Text.WrapAtWordBoundaryOrAnywhere;
textFormat: Text.RichText
width: parent.width-10
}
}
Components.QStyleItem {
@@ -30,46 +30,73 @@
**
**************************************************************************/
import QtQuick 1.0
import QtQuick 1.1
import components 1.0 as Components
HeaderItemView {
header: qsTr("Recently Edited Projects")
model: projectList
delegate: Item {
delegate: Rectangle {
Components.QStyleItem { id: styleItem; cursor: "pointinghandcursor"; anchors.fill: parent }
height: nameText.font.pixelSize*2.5
height: 60
width: dataSection.width
Image{
Rectangle {
height: 1
color: "#eee"
anchors.bottom: parent.bottom
width: parent.width
}
color: mousearea.containsMouse ? "#f9f9f9" : "white"
Image {
id: arrowImage;
source: "qrc:welcome/images/list_bullet_arrow.png";
anchors.verticalCenter: parent.verticalCenter;
anchors.left: parent.left
}
Text {
id: nameText
text: displayName
font.bold: true
anchors.right: parent.right
anchors.top: parent.top
anchors.left: arrowImage.right
anchors.leftMargin: 10
}
Text {
text: prettyFilePath
elide: Text.ElideMiddle
color: "grey"
anchors.right: parent.right
anchors.top: nameText.bottom
Column {
spacing: 4
anchors.left: arrowImage.right
anchors.leftMargin: 10
anchors.right: parent.right
anchors.verticalCenter: parent.verticalCenter
Text {
id: nameText
text: displayName
font.bold: true
width: parent.width
anchors.left: parent.left
anchors.leftMargin: 10
anchors.rightMargin: arrowImage.width + 10
anchors.right: parent.right
elide: Text.ElideRight
}
Text {
id: filepath
text: prettyFilePath
elide: Text.ElideMiddle
color: "grey"
anchors.left: parent.left
anchors.right: parent.right
anchors.leftMargin: 10
anchors.rightMargin: arrowImage.width + 14
}
}
Timer { id: timer; interval: 500; onTriggered: styleItem.showToolTip(filePath) }
Timer {
id: timer
interval: 1000
onTriggered: {
if (filepath.truncated)
styleItem.showToolTip(filePath)
}
}
MouseArea {
id: mousearea
anchors.fill: parent
onClicked: projectWelcomePage.requestProject(filePath)
hoverEnabled: true
@@ -37,10 +37,19 @@ HeaderItemView {
header: qsTr("Recently Used Sessions")
model: sessionList
delegate: Item {
height: arrowImage.height
delegate: Rectangle {
height: 60
width: dataSection.width
Rectangle {
height: 1
color: "#eee"
anchors.bottom: parent.bottom
width: parent.width
}
color: mousearea.containsMouse ? "#f9f9f9" : "white"
function fullSessionName()
{
var newSessionName = sessionName
@@ -51,31 +60,43 @@ HeaderItemView {
return newSessionName;
}
Image{
Image {
id: arrowImage;
source: "qrc:welcome/images/list_bullet_arrow.png";
anchors.verticalCenter: parent.verticalCenter;
source: "qrc:welcome/images/list_bullet_arrow.png"
anchors.verticalCenter: parent.verticalCenter
anchors.left: parent.left
anchors.leftMargin: 10
}
Text {
Components.QStyleItem { id: styleItem; cursor: "pointinghandcursor"; anchors.fill: parent }
id: fileNameText
text: parent.fullSessionName()
elide: Text.ElideMiddle
anchors.left: arrowImage.right
anchors.right: parent.right
anchors.verticalCenter: parent.verticalCenter
anchors.leftMargin: 10
anchors.rightMargin: 20
}
Timer { id: timer; interval: 500; onTriggered: styleItem.showToolTip(sessionName) }
Timer {
id: timer
interval: 1000
repeat: false
onTriggered: {
if (fileNameText.truncated)
styleItem.showToolTip(sessionName)
}
}
MouseArea {
id: mousearea
anchors.fill: parent
onClicked: projectWelcomePage.requestSession(sessionName)
hoverEnabled: true
onEntered:timer.start()
onEntered: timer.start()
onExited: timer.stop()
Components.QStyleItem { id: styleItem; cursor: "pointinghandcursor"; anchors.fill: parent }
}
}
}
@@ -48,8 +48,7 @@ Item {
Loader {
property bool active: index == tabWidget.current
id: pageLoader
clip: true
opacity: active
visible: active
anchors.fill: parent
anchors.margins: 4
onActiveChanged: if (active && source == "") source = model.modelData.pageLocation
@@ -33,9 +33,10 @@
import QtQuick 1.0
Rectangle {
property int bottomMargin : 0
id: tagChooser
anchors.fill: parent
anchors.bottomMargin: bottomMargin
color: "darkgrey"
opacity: 0.95
radius: 6
@@ -74,36 +75,6 @@ Rectangle {
font.bold: true
}
Item {
width: rect.width
height: rect.height
anchors.margins: 6;
anchors.top: parent.top;
anchors.right: parent.right
Rectangle {
color: "red"
id: rect
radius: 4
opacity: 0.3
width: clearText.width+4
height: clearText.height+4
x: clearText.x-2
y: clearText.y-2
}
Text { id: clearText; text: qsTr("Clear"); color: "white"; anchors.centerIn: parent }
MouseArea {
id: mouseArea
anchors.fill: parent
hoverEnabled: true
onClicked: {
tagChooser.visible = false;
tagFilterButton.tag = "";
}
}
}
Flickable {
id: flickable
anchors.fill: parent
@@ -137,34 +108,17 @@ Rectangle {
id: mouseArea
anchors.fill: parent
hoverEnabled: true
onClicked: { tagChooser.visible = false; tagFilterButton.tag = model.value }
}
states: [
State {
name: "selected"
when: mouseArea.pressed
},
State {
name: "hovered"
when: mouseArea.containsMouse
PropertyChanges {
target: btnRect
color: "darkblue"
opacity: 0.3
}
}
]
transitions: [
Transition {
from: "hovered"
to: "selected"
ParallelAnimation {
PropertyAction { target: tagFilterButton; property: "tag"; value: model.value }
PropertyAction { target: tagChooser; property: "visible"; value: false }
ColorAnimation { to: "#00000000"; duration: 0 }
}
PropertyChanges { target: btnRect; color: "darkblue"; opacity: 0.3 }
}
]
}
}
}
+39
View File
@@ -0,0 +1,39 @@
/**************************************************************************
**
** This file is part of Qt Creator
**
** Copyright (c) 2011 Nokia Corporation and/or its subsidiary(-ies).
**
** Contact: Nokia Corporation (info@qt.nokia.com)
**
**
** GNU Lesser General Public License Usage
**
** 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.
**
** In addition, as a special exception, Nokia gives you certain additional
** rights. These rights are described in the Nokia Qt LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
** Other Usage
**
** Alternatively, this file may be used in accordance with the terms and
** conditions contained in a signed written agreement between you and Nokia.
**
** If you have questions regarding the use of this file, please contact
** Nokia at info@qt.nokia.com.
**
**************************************************************************/
namespace Utils {
namespace Internal {
#define STRINGIFY(x) #x
#define APP_VERSION $${QTCREATOR_VERSION}
#define APP_VERSION_STR STRINGIFY(APP_VERSION_STR)
} // Internal
} // Utils
@@ -41,6 +41,7 @@
#include <utils/environment.h>
#include <utils/synchronousprocess.h>
#include <utils/fileutils.h>
#include <QtGui/QDesktopServices>
#include <QtCore/QDebug>
@@ -128,6 +129,9 @@ bool BuildableHelperLibrary::copyFiles(const QString &sourcePath,
const QString &targetDirectory,
QString *errorMessage)
{
// try remove the directory
if (!FileUtils::removeRecursively(targetDirectory, errorMessage))
return false;
if (!QDir().mkpath(targetDirectory)) {
*errorMessage = QCoreApplication::translate("ProjectExplorer::DebuggingHelperLibrary", "The target directory %1 could not be created.").arg(targetDirectory);
return false;
+1
View File
@@ -173,6 +173,7 @@ void Environment::prependOrSetPath(const QString &value)
void Environment::prependOrSetLibrarySearchPath(const QString &value)
{
#ifdef Q_OS_MAC
Q_UNUSED(value);
// we could set DYLD_LIBRARY_PATH on Mac but it is unnecessary in practice
#elif defined(Q_OS_WIN)
const QChar sep = QLatin1Char(';');
+61 -25
View File
@@ -34,13 +34,14 @@
#include <utils/qtcassert.h>
#include <QtCore/QFileInfo>
#include <QtCore/QUrl>
namespace Utils {
/*!
\class Utils::FileInProjectFinder
\brief Helper class to find the 'original' file in the project directory for a given file path.
\brief Helper class to find the 'original' file in the project directory for a given file url.
Often files are copied in the build + deploy process. findFile() searches for an existing file
in the project directory for a given file path:
@@ -86,49 +87,84 @@ void FileInProjectFinder::setProjectFiles(const QStringList &projectFiles)
}
/**
Returns the best match for the given originalPath in the project directory.
Returns the best match for the given file url in the project directory.
The method first checks whether the originalPath inside the project directory exists.
The method first checks whether the file inside the project directory exists.
If not, the leading directory in the path is stripped, and the - now shorter - path is
checked for existence. This continues until either the file is found, or the relative path
does not contain any directories any more: In this case the originalPath is returned.
does not contain any directories any more: In this case the path of the url is returned.
Second, we walk the list of project files, and search for a file name match there.
*/
QString FileInProjectFinder::findFile(const QString &originalPath, bool *success) const
QString FileInProjectFinder::findFile(const QUrl &fileUrl, bool *success) const
{
QString originalPath = fileUrl.toLocalFile();
if (originalPath.isEmpty()) // e.g. qrc://
originalPath = fileUrl.path();
if (originalPath.isEmpty()) {
if (success)
success = false;
return originalPath;
}
if (!m_projectDir.isEmpty()) {
int prefixToIgnore = -1;
const QChar separator = QLatin1Char('/');
if (originalPath.startsWith(m_projectDir + separator)) {
if (success)
*success = true;
return originalPath;
#ifdef Q_OS_MAC
// starting with the project path is not sufficient if the file was
// copied in an insource build, e.g. into MyApp.app/Contents/Resources
static const QString appResourcePath = QString::fromLatin1(".app/Contents/Resources");
if (originalPath.contains(appResourcePath)) {
// the path is inside the project, but most probably as a resource of an insource build
// so ignore that path
prefixToIgnore = originalPath.indexOf(appResourcePath) + appResourcePath.length();
} else {
#endif
if (success)
*success = true;
return originalPath;
#ifdef Q_OS_MAC
}
#endif
}
if (m_cache.contains(originalPath)) {
if (success)
*success = true;
return m_cache.value(originalPath);
// check if cached path is still there
QString candidate = m_cache.value(originalPath);
QFileInfo candidateInfo(candidate);
if (candidateInfo.exists() && candidateInfo.isFile()) {
if (success)
*success = true;
return candidate;
}
}
// Strip directories one by one from the beginning of the path,
// and see if the new relative path exists in the build directory.
if (originalPath.contains(separator)) {
for (int pos = originalPath.indexOf(separator); pos != -1;
pos = originalPath.indexOf(separator, pos + 1)) {
QString candidate = originalPath;
candidate.remove(0, pos);
candidate.prepend(m_projectDir);
QFileInfo candidateInfo(candidate);
if (candidateInfo.exists() && candidateInfo.isFile()) {
if (success)
*success = true;
m_cache.insert(originalPath, candidate);
return candidate;
}
if (prefixToIgnore < 0) {
if (!QFileInfo(originalPath).isAbsolute()
&& !originalPath.startsWith(separator)) {
prefixToIgnore = 0;
} else {
prefixToIgnore = originalPath.indexOf(separator);
}
}
while (prefixToIgnore != -1) {
QString candidate = originalPath;
candidate.remove(0, prefixToIgnore);
candidate.prepend(m_projectDir);
QFileInfo candidateInfo(candidate);
if (candidateInfo.exists() && candidateInfo.isFile()) {
if (success)
*success = true;
m_cache.insert(originalPath, candidate);
return candidate;
}
prefixToIgnore = originalPath.indexOf(separator, prefixToIgnore + 1);
}
}
const QString fileName = QFileInfo(originalPath).fileName();
+2 -1
View File
@@ -37,6 +37,7 @@
#include <QtCore/QHash>
#include <QtCore/QStringList>
#include <QtCore/QUrl>
namespace Utils {
@@ -50,7 +51,7 @@ public:
void setProjectFiles(const QStringList &projectFiles);
QString findFile(const QString &originalPath, bool *success = 0) const;
QString findFile(const QUrl &fileUrl, bool *success = 0) const;
private:
QString m_projectDir;
+17 -2
View File
@@ -100,14 +100,29 @@ bool FileUtils::removeRecursively(const QString &filePath, QString *error)
QFile::setPermissions(filePath, fileInfo.permissions() | QFile::WriteUser);
if (fileInfo.isDir()) {
QDir dir(filePath);
dir = dir.canonicalPath();
if (dir.isRoot()) {
if (error) {
*error = QCoreApplication::translate("Utils::FileUtils",
"Refusing to remove root directory.");
}
return false;
}
if (dir.path() == QDir::home().canonicalPath()) {
if (error) {
*error = QCoreApplication::translate("Utils::FileUtils",
"Refusing to remove your home directory.");
}
return false;
}
QStringList fileNames = dir.entryList(QDir::Files | QDir::Hidden
| QDir::System | QDir::Dirs | QDir::NoDotAndDotDot);
foreach (const QString &fileName, fileNames) {
if (!removeRecursively(filePath + QLatin1Char('/') + fileName, error))
return false;
}
dir.cdUp();
if (!dir.rmdir(fileInfo.fileName())) {
if (!QDir::root().rmdir(dir.path())) {
if (error) {
*error = QCoreApplication::translate("Utils::FileUtils", "Failed to remove directory '%1'.")
.arg(QDir::toNativeSeparators(filePath));
@@ -39,17 +39,17 @@
#include <sys/utsname.h>
#endif
#include "coreconstants.h"
#include "app_version.h"
/*!
\class Core::NetworkManager
\class Utils::NetworkManager
\brief Network Access Manager for use with Qt Creator.
Common initialization, Qt Creator User Agent
*/
namespace Core {
namespace Utils {
static const QString getOsString()
{
@@ -111,7 +111,7 @@ static const QString getOsString()
osString += QLatin1String("Unix (Unknown)");
}
#else
ossttring = QLatin1String("Unknown OS");
osString = QLatin1String("Unknown OS");
#endif
return osString;
}
@@ -133,7 +133,7 @@ void NetworkAccessManager::getUrl(const QUrl &url)
QNetworkReply* NetworkAccessManager::createRequest(Operation op, const QNetworkRequest &request, QIODevice *outgoingData)
{
QString agentStr = QString::fromLatin1("Qt-Creator/%1 (QNetworkAccessManager %2; %3; %4; %5 bit)")
.arg(Core::Constants::IDE_VERSION_LONG).arg(qVersion())
.arg(APP_VERSION_STR).arg(qVersion())
.arg(getOsString()).arg(QLocale::system().name())
.arg(QSysInfo::WordSize);
QNetworkRequest req(request);
@@ -30,14 +30,14 @@
**
**************************************************************************/
#include "core_global.h"
#include "utils_global.h"
#include <QtCore/QUrl>
#include <QtNetwork/QNetworkAccessManager>
namespace Core {
namespace Utils {
class CORE_EXPORT NetworkAccessManager : public QNetworkAccessManager
class QTCREATOR_UTILS_EXPORT NetworkAccessManager : public QNetworkAccessManager
{
Q_OBJECT
public:
+13 -3
View File
@@ -87,7 +87,8 @@ SOURCES += $$PWD/environment.cpp \
$$PWD/ssh/sshremoteprocessrunner.cpp \
$$PWD/ssh/sshconnectionmanager.cpp \
$$PWD/outputformatter.cpp \
$$PWD/flowlayout.cpp
$$PWD/flowlayout.cpp \
$$PWD/networkaccessmanager.cpp
win32 {
SOURCES += \
@@ -101,7 +102,9 @@ unix:!macx {
HEADERS += $$PWD/unixutils.h
SOURCES += $$PWD/unixutils.cpp
}
HEADERS += $$PWD/environment.h \
HEADERS += \
$$PWD/app_version.h \
$$PWD/environment.h \
$$PWD/environmentmodel.h \
$$PWD/qtcprocess.h \
$$PWD/utils_global.h \
@@ -187,11 +190,18 @@ HEADERS += $$PWD/environment.h \
$$PWD/statuslabel.h \
$$PWD/outputformatter.h \
$$PWD/outputformat.h \
$$PWD/flowlayout.h
$$PWD/flowlayout.h \
$$PWD/networkaccessmanager.h
FORMS += $$PWD/filewizardpage.ui \
$$PWD/projectintropage.ui \
$$PWD/newclasswidget.ui \
$$PWD/submiteditorwidget.ui \
$$PWD/checkablemessagebox.ui
RESOURCES += $$PWD/utils.qrc
OTHER_FILES += $$PWD/app_version.h.in
QMAKE_SUBSTITUTES += $$PWD/app_version.h.in
@@ -160,7 +160,10 @@ QString AnalyzerRunControl::displayName() const
{
if (!d->m_engine)
return QString();
return d->m_engine->startParameters().displayName;
if (d->m_engine->runConfiguration())
return d->m_engine->runConfiguration()->displayName();
else
return d->m_engine->startParameters().displayName;
}
QIcon AnalyzerRunControl::icon() const
+2 -6
View File
@@ -90,9 +90,7 @@ SOURCES += mainwindow.cpp \
variablechooser.cpp \
mimetypemagicdialog.cpp \
mimetypesettings.cpp \
dialogs/promptoverwritedialog.cpp \
multifeedrssmodel.cpp \
networkaccessmanager.cpp
dialogs/promptoverwritedialog.cpp
HEADERS += mainwindow.h \
editmode.h \
@@ -184,9 +182,7 @@ HEADERS += mainwindow.h \
variablechooser.h \
mimetypemagicdialog.h \
mimetypesettings.h \
dialogs/promptoverwritedialog.h \
multifeedrssmodel.h \
networkaccessmanager.h
dialogs/promptoverwritedialog.h
FORMS += dialogs/newdialog.ui \
actionmanager/commandmappings.ui \
+1 -1
View File
@@ -710,7 +710,7 @@ void MainWindow::registerDefaultActions()
// Goto Action
icon = QIcon::fromTheme(QLatin1String("go-jump"));
tmpaction = new QAction(icon, tr("&Go To Line..."), this);
tmpaction = new QAction(icon, tr("&Go to Line..."), this);
cmd = am->registerAction(tmpaction, Constants::GOTO, globalContext);
cmd->setDefaultKeySequence(QKeySequence(tr("Ctrl+L")));
medit->addAction(cmd, Constants::G_EDIT_OTHER);
+3 -2
View File
@@ -31,10 +31,11 @@
**************************************************************************/
#include "protocol.h"
#include <utils/networkaccessmanager.h>
#include <cpptools/cpptoolsconstants.h>
#include <qmljseditor/qmljseditorconstants.h>
#include <coreplugin/icore.h>
#include <coreplugin/networkaccessmanager.h>
#include <coreplugin/dialogs/ioptionspage.h>
#include <QtNetwork/QNetworkRequest>
@@ -193,7 +194,7 @@ QNetworkReply *NetworkAccessManagerProxy::httpPost(const QString &link, const QB
QNetworkAccessManager *NetworkAccessManagerProxy::networkAccessManager()
{
if (m_networkAccessManager.isNull())
m_networkAccessManager.reset(new Core::NetworkAccessManager);
m_networkAccessManager.reset(new Utils::NetworkAccessManager);
return m_networkAccessManager.data();
}
+29 -8
View File
@@ -2124,6 +2124,8 @@ void DebuggerPluginPrivate::updateState(DebuggerEngine *engine)
m_stepAction->setEnabled(stopped || state == DebuggerNotReady);
m_nextAction->setEnabled(stopped || state == DebuggerNotReady);
m_stepAction->setToolTip(QString());
m_nextAction->setToolTip(QString());
m_stepOutAction->setEnabled(stopped);
m_runToLineAction->setEnabled(stopped && (caps & RunToLineCapability));
@@ -2152,14 +2154,31 @@ void DebuggerPluginPrivate::updateDebugActions()
{
ProjectExplorerPlugin *pe = ProjectExplorerPlugin::instance();
Project *project = pe->startupProject();
m_debugAction->setEnabled(pe->canRun(project, _(Constants::DEBUGMODE)));
m_debugAction->setToolTip(pe->cannotRunReason(project, _(Constants::DEBUGMODE)));
const bool canStepInto = pe->canRun(project, _(Constants::DEBUGMODE2));
const QString cannotStepIntoReason = pe->cannotRunReason(project, _(Constants::DEBUGMODE2));
m_stepAction->setEnabled(canStepInto);
m_nextAction->setEnabled(canStepInto);
m_stepAction->setToolTip(cannotStepIntoReason);
m_nextAction->setToolTip(cannotStepIntoReason);
const QString debugMode = _(Constants::DEBUGMODE);
const bool canRun = pe->canRun(project, debugMode);
m_debugAction->setEnabled(canRun);
m_debugAction->setToolTip(canRun ? QString() : pe->cannotRunReason(project, debugMode));
// Step into/next: Start and break at 'main' unless a debugger is running.
if (m_snapshotHandler->currentIndex() < 0) {
const QString debugMode2 = _(Constants::DEBUGMODE2);
const bool canRunAndBreakMain = pe->canRun(project, debugMode2);
m_stepAction->setEnabled(canRunAndBreakMain);
m_nextAction->setEnabled(canRunAndBreakMain);
QString toolTip;
if (canRunAndBreakMain) {
QTC_ASSERT(project, return ; );
toolTip = tr("Start '%1' and break at function 'main()'")
.arg(project->displayName());
} else {
// Do not display long tooltip saying 'debugMode2 is not supported
// for project' for projects to which 'break at main' is not applicable.
if (!canRun)
toolTip = pe->cannotRunReason(project, debugMode2);
}
m_stepAction->setToolTip(toolTip);
m_nextAction->setToolTip(toolTip);
}
}
void DebuggerPluginPrivate::onCoreAboutToOpen()
@@ -2922,12 +2941,14 @@ void DebuggerPluginPrivate::extensionsInitialized()
Constants::NEXT, globalcontext);
cmd->setDefaultKeySequence(QKeySequence(Constants::NEXT_KEY));
cmd->setAttribute(Command::CA_Hide);
cmd->setAttribute(Command::CA_UpdateText);
debugMenu->addAction(cmd);
cmd = am->registerAction(m_stepAction,
Constants::STEP, globalcontext);
cmd->setDefaultKeySequence(QKeySequence(Constants::STEP_KEY));
cmd->setAttribute(Command::CA_Hide);
cmd->setAttribute(Command::CA_UpdateText);
debugMenu->addAction(cmd);
cmd = am->registerAction(m_stepOutAction,
+1 -1
View File
@@ -2791,7 +2791,7 @@ void GdbEngine::extractDataFromInfoBreak(const QString &output, BreakpointModelI
bool locationComing = false;
QByteArray location;
QByteArray function;
qulonglong address;
qulonglong address = 0;
foreach (const QByteArray &part, data.split(' ')) {
if (part.isEmpty())
continue;
+2 -1
View File
@@ -700,7 +700,8 @@ void QmlCppEngine::skipCppBreakpoint()
if (d->m_msg->isHidden()) {
d->m_msg->setIcon(QMessageBox::Warning);
d->m_msg->setWindowTitle(tr("QML/C++ Debugging"));
d->m_msg->setText(tr("Cannot stop execution before QML engine is started. Skipping breakpoint.\nSuggestions: Move the breakpoint after QmlViewer initialization or switch to C++ only debugging"));
d->m_msg->setText(tr("Cannot stop execution before QML engine is started. Skipping breakpoint.\n"
"Suggestions: Move the breakpoint after QmlApplicationViewer instantiation or switch to C++ only debugging."));
d->m_msg->setStandardButtons(QMessageBox::Ok);
d->m_msg->setDefaultButton(QMessageBox::Ok);
d->m_msg->setModal(false);
+3 -16
View File
@@ -768,27 +768,14 @@ unsigned QmlEngine::debuggerCapabilities() const
| AddWatcherCapability;*/
}
QString QmlEngine::toFileInProject(const QString &fileUrl)
QString QmlEngine::toFileInProject(const QUrl &fileUrl)
{
if (fileUrl.isEmpty())
return fileUrl;
const QString path = QUrl(fileUrl).toLocalFile();
if (path.isEmpty())
return fileUrl;
if (d->fileFinder.projectDirectory().isEmpty()) {
d->fileFinder.setProjectDirectory(startParameters().projectSourceDirectory);
d->fileFinder.setProjectFiles(startParameters().projectSourceFiles);
}
// Try to find file with biggest common path in source directory
bool fileFound = false;
QString fileInProject = d->fileFinder.findFile(path, &fileFound);
if (fileFound)
return fileInProject;
return path;
return d->fileFinder.findFile(fileUrl);
}
void QmlEngine::messageReceived(const QByteArray &message)
@@ -819,7 +806,7 @@ void QmlEngine::messageReceived(const QByteArray &message)
StackFrame frame;
frame.line = stackFrames.at(i).lineNumber;
frame.function = stackFrames.at(i).functionName;
frame.file = toFileInProject(stackFrames.at(i).fileUrl);
frame.file = toFileInProject(QUrl(stackFrames.at(i).fileUrl));
frame.usable = QFileInfo(frame.file).isReadable();
frame.level = i + 1;
ideStackFrames << frame;
+1 -1
View File
@@ -152,7 +152,7 @@ private:
LogReceive
};
void logMessage(LogDirection direction, const QString &str);
QString toFileInProject(const QString &file);
QString toFileInProject(const QUrl &fileUrl);
private:
friend class QmlCppEngine;
+10 -2
View File
@@ -452,9 +452,17 @@ static inline QVariant editValue(const WatchData &d)
default:
break;
}
// Replace newlines, which will cause line edit troubles.
// Some string value: '0x434 "Hallo"':
// Remove quotes and replace newlines, which will cause line edit troubles.
QString stringValue = d.value;
stringValue.replace(QLatin1String("\n"), QLatin1String("\\n"));
if (stringValue.endsWith(QLatin1Char('"'))) {
const int leadingDoubleQuote = stringValue.indexOf(QLatin1Char('"'));
if (leadingDoubleQuote != stringValue.size() - 1) {
stringValue.truncate(stringValue.size() - 1);
stringValue.remove(0, leadingDoubleQuote + 1);
stringValue.replace(QLatin1String("\n"), QLatin1String("\\n"));
}
}
return QVariant(stringValue);
}
@@ -365,6 +365,11 @@ void GenericProject::setToolChain(ToolChain *tc)
m_toolChain = tc;
refresh(Configuration);
foreach (Target *t, targets()) {
foreach (BuildConfiguration *bc, t->buildConfigurations())
bc->setToolChain(tc);
}
emit toolChainChanged(m_toolChain);
}
+2 -2
View File
@@ -39,7 +39,7 @@
#include <QtNetwork/QNetworkReply>
#include <coreplugin/networkaccessmanager.h>
#include <utils/networkaccessmanager.h>
enum { debug = 0 };
@@ -529,7 +529,7 @@ void Gitorious::slotReplyFinished()
QNetworkReply *Gitorious::createRequest(const QUrl &url, int protocol, int hostIndex, int page)
{
if (!m_networkManager)
m_networkManager = new Core::NetworkAccessManager(this);
m_networkManager = new Utils::NetworkAccessManager(this);
QNetworkReply *reply = m_networkManager->get(QNetworkRequest(url));
connect(reply, SIGNAL(finished()), this, SLOT(slotReplyFinished()));
reply->setProperty(protocolPropertyC, QVariant(protocol));
+4 -4
View File
@@ -52,7 +52,7 @@
#include <QtNetwork/QNetworkReply>
#include <QtNetwork/QNetworkRequest>
#include <coreplugin/networkaccessmanager.h>
#include <utils/networkaccessmanager.h>
using namespace Find;
using namespace Help;
@@ -107,7 +107,7 @@ qint64 HelpNetworkReply::readData(char *buffer, qint64 maxlen)
// -- HelpNetworkAccessManager
class HelpNetworkAccessManager : public Core::NetworkAccessManager
class HelpNetworkAccessManager : public Utils::NetworkAccessManager
{
public:
HelpNetworkAccessManager(QObject *parent);
@@ -118,7 +118,7 @@ protected:
};
HelpNetworkAccessManager::HelpNetworkAccessManager(QObject *parent)
: Core::NetworkAccessManager(parent)
: Utils::NetworkAccessManager(parent)
{
}
@@ -126,7 +126,7 @@ QNetworkReply *HelpNetworkAccessManager::createRequest(Operation op,
const QNetworkRequest &request, QIODevice* outgoingData)
{
if (!HelpViewer::isLocalUrl(request.url()))
return Core::NetworkAccessManager::createRequest(op, request, outgoingData);
return Utils::NetworkAccessManager::createRequest(op, request, outgoingData);
QString url = request.url().toString();
const QHelpEngineCore &engine = LocalHelpManager::helpEngine();
+2
View File
@@ -61,6 +61,8 @@ PerforceChecker::PerforceChecker(QObject *parent) :
PerforceChecker::~PerforceChecker()
{
m_process.kill();
m_process.waitForFinished();
resetOverrideCursor();
}
@@ -421,7 +421,7 @@ void FolderNavigationWidget::showInGraphicalShell(QWidget *parent, const QString
#else
// we cannot select a file here, because no file browser really supports it...
const QFileInfo fileInfo(pathIn);
const QString folder = fileInfo.absoluteFilePath();
const QString folder = fileInfo.isDir() ? fileInfo.absoluteFilePath() : fileInfo.filePath();
const QString app = Utils::UnixUtils::fileBrowser(Core::ICore::instance()->settings());
QProcess browserProc;
const QString browserArgs = Utils::UnixUtils::substituteFileBrowserParameters(app, folder);
@@ -523,7 +523,7 @@ void MiniProjectTargetSelector::removeProject(ProjectExplorer::Project* project)
// Update display names
QString name = project->displayName();
int count = 0;
int otherIndex;
int otherIndex = -1;
for (int i = 0; i < m_projectsBox->count(); ++i) {
Project *p = m_projectsBox->itemData(i).value<Project*>();
if (p->displayName() == name) {
@@ -2376,17 +2376,23 @@ QString pathOrDirectoryFor(Node *node, bool dir)
FolderNode *folder = qobject_cast<FolderNode *>(node);
if (path.contains("#") && folder) {
// Virtual Folder case
// We figure out a commonPath from the subfolders
QStringList list;
foreach (FolderNode *f, folder->subFolderNodes())
list << f->path() + QLatin1Char('/');
if (list.isEmpty())
location = path.left(path.indexOf('#'));
else
// If there are files directly below or no subfolders, take the folder path
if (!folder->fileNodes().isEmpty() || folder->subFolderNodes().isEmpty()) {
location = path.left(path.indexOf('#'));;
} else {
// Otherwise we figure out a commonPath from the subfolders
QStringList list;
foreach (FolderNode *f, folder->subFolderNodes())
list << f->path() + QLatin1Char('/');
location = Utils::commonPath(list);
}
} else {
QFileInfo fi(path);
location = (fi.isDir() && dir) ? fi.absoluteFilePath() : fi.absolutePath();
if (dir) {
location = fi.isDir() ? fi.absoluteFilePath() : fi.absolutePath();
} else {
location = fi.absoluteFilePath();
}
}
return location;
}
@@ -2521,7 +2527,7 @@ void ProjectExplorerPlugin::showInGraphicalShell()
void ProjectExplorerPlugin::openTerminalHere()
{
QTC_ASSERT(d->m_currentNode, return)
FolderNavigationWidget::openTerminal(pathFor(d->m_currentNode));
FolderNavigationWidget::openTerminal(directoryFor(d->m_currentNode));
}
void ProjectExplorerPlugin::removeFile()
@@ -37,8 +37,6 @@
#include <QtDeclarative/QDeclarativeEngine>
#include <QtDeclarative/QDeclarativeContext>
#include <coreplugin/multifeedrssmodel.h>
#include <projectexplorer/session.h>
#include <projectexplorer/projectexplorer.h>
@@ -138,8 +136,6 @@ ProjectWelcomePage::ProjectWelcomePage() :
void ProjectWelcomePage::facilitateQml(QDeclarativeEngine *engine)
{
static const char feedGroupName[] = "Feeds";
ProjectExplorerPlugin *pePlugin = ProjectExplorer::ProjectExplorerPlugin::instance();
m_sessionModel = new SessionModel(pePlugin->session(), this);
m_projectModel = new ProjectModel(pePlugin, this);
@@ -147,22 +143,6 @@ void ProjectWelcomePage::facilitateQml(QDeclarativeEngine *engine)
QDeclarativeContext *ctx = engine->rootContext();
ctx->setContextProperty("sessionList", m_sessionModel);
ctx->setContextProperty("projectList", m_projectModel);
Core::MultiFeedRssModel *rssModel = new Core::MultiFeedRssModel(this);
QSettings *settings = Core::ICore::instance()->settings();
if (settings->childGroups().contains(feedGroupName)) {
int size = settings->beginReadArray(feedGroupName);
for (int i = 0; i < size; ++i)
{
settings->setArrayIndex(i);
rssModel->addFeed(settings->value("url").toString());
}
settings->endArray();
} else {
rssModel->addFeed(QLatin1String("http://labs.trolltech.com/blogs/feed"));
rssModel->addFeed(QLatin1String("http://feeds.feedburner.com/TheQtBlog?format=xml"));
}
ctx->setContextProperty("aggregatedFeedsModel", rssModel);
ctx->setContextProperty("projectWelcomePage", this);
}
@@ -62,7 +62,7 @@ void ShowInEditorTaskHandler::handle(const ProjectExplorer::Task &task)
QAction *ShowInEditorTaskHandler::createAction(QObject *parent)
{
QAction *showAction = new QAction(tr("&Show in editor"), parent);
showAction->setToolTip(tr("Show task location in an editor"));
QAction *showAction = new QAction(tr("&Show in Editor"), parent);
showAction->setToolTip(tr("Show task location in an editor."));
return showAction;
}
@@ -185,12 +185,20 @@ void DragTool::createQmlItemNodeFromImage(const QString &imageName, QmlItemNode
m_selectionIndicator.setItems(scene()->itemsForQmlItemNodes(nodeList));
}
static inline bool isAncestorOf(FormEditorItem *formEditorItem, FormEditorItem *newParentItem)
{
if (formEditorItem && newParentItem)
return formEditorItem->isAncestorOf(newParentItem);
return false;
}
FormEditorItem* DragTool::calculateContainer(const QPointF &point, FormEditorItem * currentItem)
{
QList<QGraphicsItem *> list = scene()->items(point);
foreach (QGraphicsItem *item, list) {
FormEditorItem *formEditorItem = FormEditorItem::fromQGraphicsItem(item);
if (formEditorItem && formEditorItem != currentItem && formEditorItem->isContainer())
if (formEditorItem && formEditorItem != currentItem && formEditorItem->isContainer()
&& !isAncestorOf(currentItem, formEditorItem))
return formEditorItem;
}
@@ -199,12 +199,8 @@ void FormEditorScene::synchronizeOtherProperty(const QmlItemNode &qmlItemNode, c
if (propertyName == "z")
item->setZValue(qmlItemNode.instanceValue("z").toDouble());
if (!qmlItemNode.isRootNode()) {
if (propertyName == "visible")
item->setContentVisible(qmlItemNode.instanceValue("visible").toBool());
} else {
item->setContentVisible(true);
}
if (propertyName == "visible")
item->setContentVisible(qmlItemNode.instanceValue("visible").toBool());
}
}
@@ -45,6 +45,7 @@
#include <limits>
#include <model.h>
#include <qmlanchors.h>
#include <nodemetainfo.h>
#include <variantproperty.h>
#include <nodeabstractproperty.h>
@@ -108,7 +109,8 @@ void MoveManipulator::synchronizeParent(const QList<FormEditorItem*> &itemList,
}
}
update(m_lastPosition, NoSnapping, UseBaseState);
if (!parentNode.metaInfo().isSubclassOf("<cpp>.QDeclarativeBasePositioner", -1, -1))
update(m_lastPosition, NoSnapping, UseBaseState);
}
void MoveManipulator::synchronizeInstanceParent(const QList<FormEditorItem*> &itemList)
@@ -363,6 +365,15 @@ void MoveManipulator::reparentTo(FormEditorItem *newParent)
if (!itemsCanReparented())
return;
if (!newParent->qmlItemNode().modelNode().metaInfo().isSubclassOf("<cpp>.QDeclarativeBasePositioner", -1, -1)
&& newParent->qmlItemNode().modelNode().hasParentProperty()) {
ModelNode grandParent = newParent->qmlItemNode().modelNode().parentProperty().parentModelNode();
if (grandParent.metaInfo().isSubclassOf("<cpp>.QDeclarativeBasePositioner", -1, -1))
newParent = m_view.data()->scene()->itemForQmlItemNode(QmlItemNode(grandParent));
}
QVector<ModelNode> nodeReparentVector;
NodeAbstractProperty parentProperty;
@@ -292,12 +292,12 @@ QLineF Snapper::createSnapLine(Qt::Orientation orientation,
const QRectF &itemRect) const
{
if (orientation == Qt::Horizontal) {
double lowerX(qMin(lowerLimit, itemRect.left()));
double upperX(qMax(upperLimit, itemRect.right()));
double lowerX(qMin(lowerLimit, double(itemRect.left())));
double upperX(qMax(upperLimit, double(itemRect.right())));
return QLineF(lowerX, snapLine, upperX, snapLine);
} else {
double lowerY(qMin(lowerLimit, itemRect.top()));
double upperY(qMax(upperLimit, itemRect.bottom()));
double lowerY(qMin(lowerLimit, double(itemRect.top())));
double upperY(qMax(upperLimit, double(itemRect.bottom())));
return QLineF(snapLine, lowerY, snapLine, upperY);
}
}
@@ -477,10 +477,10 @@ static QLineF mergedHorizontalLine(const QList<QLineF> &lineList)
double minimumX = std::numeric_limits<double>::max();
double maximumX = std::numeric_limits<double>::min();
foreach(const QLineF &line, lineList) {
minimumX = qMin(minimumX, line.x1());
minimumX = qMin(minimumX, line.x2());
maximumX = qMax(maximumX, line.x1());
maximumX = qMax(maximumX, line.x2());
minimumX = qMin(minimumX, double(line.x1()));
minimumX = qMin(minimumX, double(line.x2()));
maximumX = qMax(maximumX, double(line.x1()));
maximumX = qMax(maximumX, double(line.x2()));
}
double y(lineList.first().y1());
@@ -495,10 +495,10 @@ static QLineF mergedVerticalLine(const QList<QLineF> &lineList)
double minimumY = std::numeric_limits<double>::max();
double maximumY = std::numeric_limits<double>::min();
foreach(const QLineF &line, lineList) {
minimumY = qMin(minimumY, line.y1());
minimumY = qMin(minimumY, line.y2());
maximumY = qMax(maximumY, line.y1());
maximumY = qMax(maximumY, line.y2());
minimumY = qMin(minimumY, double(line.y1()));
minimumY = qMin(minimumY, double(line.y2()));
maximumY = qMax(maximumY, double(line.y1()));
maximumY = qMax(maximumY, double(line.y2()));
}
double x(lineList.first().x1());
@@ -56,6 +56,7 @@
#include <nodelistproperty.h>
#include <variantproperty.h>
#include <rewritingexception.h>
#include <model/modelnodecontextmenu.h>
#include <utils/fileutils.h>
@@ -393,20 +394,20 @@ void DesignDocumentController::changeCurrentModelTo(const ModelNode &componentNo
QWeakPointer<Model> oldModel = m_d->model;
Q_ASSERT(oldModel.data());
if (m_d->model == m_d->subComponentModel) {
changeToMasterModel();
}
QString componentText = m_d->rewriterView->extractText(QList<ModelNode>() << componentNode).value(componentNode);
if (componentText.isEmpty())
return;
bool explicitComponent = false;
if (componentText.contains("Component")) { //explicit component
explicitComponent = true;
}
if (m_d->model == m_d->subComponentModel) {
changeToMasterModel();
}
if (!componentNode.isRootNode()) {
Q_ASSERT(m_d->model == m_d->masterModel);
Q_ASSERT(componentNode.isValid());
@@ -451,6 +452,19 @@ void DesignDocumentController::changeCurrentModelTo(const ModelNode &componentNo
m_d->componentView->setComponentNode(componentNode);
}
void DesignDocumentController::goIntoComponent()
{
if (!m_d->model)
return;
QList<ModelNode> selectedNodes;
if (m_d->formEditorView)
selectedNodes = m_d->formEditorView->selectedModelNodes();
if (selectedNodes.count() == 1)
ModelNodeAction::goIntoComponent(selectedNodes.first());
}
void DesignDocumentController::loadCurrentModel()
{
QApplication::setOverrideCursor(QCursor(Qt::WaitCursor));

Some files were not shown because too many files have changed in this diff Show More