Merge "Merge remote-tracking branch 'origin/4.12'"
14
dist/changes-4.11.2.md
vendored
@@ -33,6 +33,18 @@ Projects
|
||||
|
||||
* Fixed wrong default project for adding files via wizards (QTCREATORBUG-23603)
|
||||
|
||||
Debugging
|
||||
---------
|
||||
|
||||
### CDB
|
||||
|
||||
* Fixed startup if `_NT_DEBUGGER_EXTENSION_PATH` is set
|
||||
|
||||
Test Integration
|
||||
----------------
|
||||
|
||||
* Fixed debugging of Qt Quick tests (QTCREATORBUG-23709)
|
||||
|
||||
Platforms
|
||||
---------
|
||||
|
||||
@@ -46,8 +58,10 @@ Credits for these changes go to:
|
||||
André Pönitz
|
||||
Andy Shaw
|
||||
Christian Kandeler
|
||||
Christian Stenger
|
||||
David Schulz
|
||||
Eike Ziller
|
||||
Kai Köhne
|
||||
Leena Miettinen
|
||||
Orgad Shaneh
|
||||
Richard Weickelt
|
||||
|
Before Width: | Height: | Size: 27 KiB After Width: | Height: | Size: 18 KiB |
Before Width: | Height: | Size: 9.3 KiB After Width: | Height: | Size: 7.5 KiB |
After Width: | Height: | Size: 9.4 KiB |
Before Width: | Height: | Size: 9.7 KiB After Width: | Height: | Size: 10 KiB |
Before Width: | Height: | Size: 23 KiB After Width: | Height: | Size: 16 KiB |
Before Width: | Height: | Size: 12 KiB After Width: | Height: | Size: 12 KiB |
@@ -1,6 +1,6 @@
|
||||
/****************************************************************************
|
||||
**
|
||||
** Copyright (C) 2019 The Qt Company Ltd.
|
||||
** Copyright (C) 2020 The Qt Company Ltd.
|
||||
** Contact: https://www.qt.io/licensing/
|
||||
**
|
||||
** This file is part of the Qt Creator documentation.
|
||||
@@ -67,6 +67,9 @@
|
||||
|
||||
\section1 Running Clang Tools
|
||||
|
||||
To run the Clang tools to analyze the currently open file, select
|
||||
\uicontrol Tools > \uicontrol {C++} > \uicontrol {Analyze Current File}.
|
||||
|
||||
To run the Clang tools to analyze an open project:
|
||||
|
||||
\list 1
|
||||
@@ -96,9 +99,19 @@
|
||||
the code editor.
|
||||
|
||||
If a fixit exists for an issue, you can select the check box next to the
|
||||
issue to schedule it for fixing. You can see the status of the issue by
|
||||
issue to schedule it for fixing. Select the \uicontrol {Select Fixits}
|
||||
check box to select all fixits. You can see the status of an issue by
|
||||
hovering the mouse pointer over the icon next to the check box.
|
||||
|
||||
To see more information about an issue that is marked with the
|
||||
\inlineimage refactormarker.png
|
||||
icon, hover the mouse pointer over the line.
|
||||
|
||||
Select the \inlineimage settings.png
|
||||
button to configure Clang diagnostics globally for Clang tools.
|
||||
|
||||
\image qtcreator-clang-tools-options-customized.png "Clang Tools customized settings"
|
||||
|
||||
\section1 Configuring Clang Tools
|
||||
|
||||
To configure Clang diagnostics globally for Clang tools:
|
||||
@@ -131,32 +144,28 @@
|
||||
\li In the \uicontrol {Diagnostic configuration name} field, give the
|
||||
configuration a name, and then select \uicontrol OK.
|
||||
|
||||
\li In the \uicontrol Clang tab, select the
|
||||
\li In the \uicontrol {Clang Warnings} tab, select the
|
||||
\uicontrol {Use diagnostic flags from the build system} check box
|
||||
to forward diagnostic flags, such as warning flags, from the build
|
||||
system to the Clang code model for displaying annotations in the
|
||||
code editor.
|
||||
|
||||
\li In the \uicontrol {Clang-Tidy} tab, select
|
||||
\uicontrol {Select Checks} to select the checks to perform,
|
||||
\uicontrol {Use .clang-tidy Config File} to read them from a
|
||||
Clang-Tidy configuration file, or \uicontrol Disable to disable
|
||||
them.
|
||||
\li In the \uicontrol {Clang-Tidy Checks} tab, select
|
||||
\uicontrol {Select Checks} to select the checks to perform.
|
||||
|
||||
\image qtcreator-clang-tidy.png "Clang-Tidy tab"
|
||||
\image qtcreator-clang-tidy.png "Clang-Tidy Checks tab"
|
||||
|
||||
\li Select the \uicontrol {Web Page} link to view more
|
||||
information about the available checkers in the
|
||||
For more information about the available checkers, see
|
||||
\l{https://clang-analyzer.llvm.org/available_checks.html}
|
||||
{Clang Static Analyzer documentation}.
|
||||
|
||||
\li To edit the selected check as plain text, select
|
||||
\uicontrol {Edit Checks as String}.
|
||||
|
||||
\li In the \uicontrol Clazy tab, select the level of Clazy
|
||||
\li In the \uicontrol {Clazy Checks} tab, select the level of Clazy
|
||||
checks to perform.
|
||||
|
||||
\image qtcreator-clazy.png "Clazy tab"
|
||||
\image qtcreator-clazy.png "Clazy Checks tab"
|
||||
|
||||
\li In the \uicontrol {Topic Filter} field, select a topic to view
|
||||
only checks related to that area in the \uicontrol Checks field.
|
||||
|
@@ -274,8 +274,9 @@
|
||||
check box to allow \QC to create the kits for you. \QC displays a
|
||||
warning if it cannot find a suitable Qt version.
|
||||
|
||||
\li Select \uicontrol File > \uicontrol {New File or Project} > \uicontrol Application >
|
||||
\uicontrol {Qt Quick Application} > \uicontrol Choose, and
|
||||
\li Select \uicontrol File > \uicontrol {New File or Project} >
|
||||
\uicontrol {Application (Qt Quick)} >
|
||||
\uicontrol {Qt Quick Application - Empty} > \uicontrol Choose, and
|
||||
follow the instructions of the wizard to create a project. For more
|
||||
information, see
|
||||
\if defined(qtcreator)
|
||||
|
@@ -176,8 +176,8 @@
|
||||
|
||||
\list 1
|
||||
\li Select \uicontrol File > \uicontrol {New File or Project} >
|
||||
\uicontrol Application > \uicontrol {MCU Support Application} >
|
||||
\uicontrol Choose.
|
||||
\uicontrol {Application (Qt Quick)} >
|
||||
\uicontrol {MCU Support Application} > \uicontrol Choose.
|
||||
\li Follow the instructions of the wizard to create the project.
|
||||
\li Select \uicontrol Projects > \uicontrol {Build & Run}, and then
|
||||
select the kit for building the application and running it on the
|
||||
|
@@ -1,6 +1,6 @@
|
||||
/****************************************************************************
|
||||
**
|
||||
** Copyright (C) 2019 The Qt Company Ltd.
|
||||
** Copyright (C) 2020 The Qt Company Ltd.
|
||||
** Contact: https://www.qt.io/licensing/
|
||||
**
|
||||
** This file is part of the Qt Creator documentation.
|
||||
@@ -31,8 +31,8 @@
|
||||
\list 1
|
||||
|
||||
\li Select \uicontrol File > \uicontrol {New File or Project} >
|
||||
\uicontrol Application > \uicontrol {Qt Quick Application - Swipe} >
|
||||
\uicontrol Choose.
|
||||
\uicontrol {Application (Qt Quick)} >
|
||||
\uicontrol {Qt Quick Application - Swipe} > \uicontrol Choose.
|
||||
|
||||
\li In the \uicontrol Name field, enter a name for the application.
|
||||
|
||||
|
@@ -44,33 +44,39 @@
|
||||
options:
|
||||
|
||||
\list
|
||||
\li \uicontrol {Application (Qt Quick)}:
|
||||
|
||||
\li \uicontrol {Qt Quick Application - Empty} creates a Qt Quick 2
|
||||
application project that can contain both QML and C++ code. You can
|
||||
build the application and deploy it to desktop, embedded, and mobile
|
||||
target platforms.
|
||||
\list
|
||||
|
||||
\li \uicontrol {Qt for Python - Qt Quick Application - Empty} creates a
|
||||
\li \uicontrol {Qt Quick Application - Empty} creates a Qt Quick 2
|
||||
application project that can contain both QML and C++ code. You can
|
||||
build the application and deploy it to desktop, embedded, and mobile
|
||||
target platforms.
|
||||
|
||||
\li \uicontrol {Qt Quick Application - Scroll} uses the
|
||||
\l{http://doc.qt.io/qt-5/qml-qtquick-controls2-scrollview.html}
|
||||
{ScrollView} type to implement a scrollable list view
|
||||
(requires Qt 5.9 or later).
|
||||
|
||||
\li \uicontrol {Qt Quick Application - Stack} uses the
|
||||
\l{http://doc.qt.io/qt-5/qml-qtquick-controls2-stackview.html}
|
||||
{StackView} type to implement a set of pages with a stack-based
|
||||
navigation model (requires Qt 5.7 or later).
|
||||
|
||||
\li \uicontrol {Qt Quick Application - Swipe} uses the
|
||||
\l{http://doc.qt.io/qt-5/qml-qtquick-controls2-swipeview.html}
|
||||
{SwipeWiew} type to implement a set of pages with a swipe-based
|
||||
navigation model (requires Qt 5.7 or later).
|
||||
|
||||
\endlist
|
||||
|
||||
\li \uicontrol {Application (Qt for Python)} >
|
||||
\uicontrol {Qt for Python - Qt Quick Application - Empty} creates a
|
||||
Python project that contains an empty Qt Quick Application.
|
||||
|
||||
\li \uicontrol {Qt Quick Application - Scroll} uses the
|
||||
\l{http://doc.qt.io/qt-5/qml-qtquick-controls2-scrollview.html}
|
||||
{ScrollView} type to implement a scrollable list view
|
||||
(requires Qt 5.9 or later).
|
||||
|
||||
\li \uicontrol {Qt Quick Application - Stack} uses the
|
||||
\l{http://doc.qt.io/qt-5/qml-qtquick-controls2-stackview.html}
|
||||
{StackView} type to implement a set of pages with a stack-based
|
||||
navigation model (requires Qt 5.7 or later).
|
||||
|
||||
\li \uicontrol {Qt Quick Application - Swipe} uses the
|
||||
\l{http://doc.qt.io/qt-5/qml-qtquick-controls2-swipeview.html}
|
||||
{SwipeWiew} type to implement a set of pages with a swipe-based
|
||||
navigation model (requires Qt 5.7 or later).
|
||||
|
||||
\li \uicontrol {Qt Quick UI Prototype} (in the \uicontrol {Other Project}
|
||||
category) creates a \l{Creating Qt Quick UI Projects}
|
||||
{Qt Quick UI project} with a single QML file that
|
||||
\li \uicontrol {Other Project} > \uicontrol {Qt Quick UI Prototype}
|
||||
creates a \l{Creating Qt Quick UI Projects}{Qt Quick UI project}
|
||||
with a single QML file that
|
||||
contains the main view. You can review Qt Quick 2 UI projects in the
|
||||
\l{Previewing QML Files}{QML Scene preview tool}. You do not need to
|
||||
build them, because they do not contain any C++ code.
|
||||
@@ -81,8 +87,8 @@
|
||||
target platforms. For those platforms, create a Qt Quick application
|
||||
instead.
|
||||
|
||||
\li \uicontrol {Qt Quick 2 Extension Plugin} (in the \uicontrol Library category)
|
||||
create C++ plugins that make it possible to offer extensions that
|
||||
\li \uicontrol Library > \uicontrol {Qt Quick 2 Extension Plugin}
|
||||
creates C++ plugins that make it possible to offer extensions that
|
||||
can be loaded dynamically into Qt Quick 2 applications.
|
||||
|
||||
\endlist
|
||||
@@ -99,8 +105,8 @@
|
||||
\list 1
|
||||
|
||||
\li Select \uicontrol File > \uicontrol {New File or Project} >
|
||||
\uicontrol Application > \uicontrol {Qt Quick Application - Empty} >
|
||||
\uicontrol Choose.
|
||||
\uicontrol {Application (Qt Quick)} >
|
||||
\uicontrol {Qt Quick Application - Empty} > \uicontrol Choose.
|
||||
|
||||
\li In the \uicontrol Name field, enter a name for the application.
|
||||
|
||||
@@ -162,7 +168,8 @@
|
||||
\list 1
|
||||
|
||||
\li Select \uicontrol File > \uicontrol {New File or Project} >
|
||||
\uicontrol Application > \uicontrol {Qt Quick Application - Scroll},
|
||||
\uicontrol {Application (Qt Quick)} >
|
||||
\uicontrol {Qt Quick Application - Scroll},
|
||||
\uicontrol {Qt Quick Application - Stack}, or
|
||||
\uicontrol {Qt Quick Application - Swipe} > \uicontrol Choose.
|
||||
|
||||
|
@@ -76,8 +76,8 @@
|
||||
|
||||
\list 1
|
||||
\li Select \uicontrol File > \uicontrol {New File or Project} >
|
||||
\uicontrol Application > \uicontrol {Qt Quick Application - Empty} >
|
||||
\uicontrol Choose.
|
||||
\uicontrol {Application (Qt Quick)} >
|
||||
\uicontrol {Qt Quick Application - Empty} > \uicontrol Choose.
|
||||
\li In the \uicontrol {Build system} field, select \l qmake as the build
|
||||
system to use for building and running the project, and then select
|
||||
\uicontrol Next (or \uicontrol Continue on \macos).
|
||||
|
@@ -156,18 +156,49 @@
|
||||
|
||||
\section1 Animating Transitions Between States
|
||||
|
||||
To make movement between states smooth, you can specify transitions. You can
|
||||
use different types of animated transitions. For example, you can animate
|
||||
changes to property values and colors. You can use rotation animation to
|
||||
control the direction of rotation. For more information, see
|
||||
\l{Animation and Transitions in Qt Quick}.
|
||||
To make movement between states smooth, you can animate transitions.
|
||||
Animations are created by applying animation types to property values.
|
||||
Animation types interpolate property values to create smooth transitions.
|
||||
As well, state transitions may assign animations to state changes.
|
||||
|
||||
You can use the \c ParallelAnimation type to start several animations at
|
||||
the same time. Or use the \c SequentialAnimation type to run them one
|
||||
after another.
|
||||
To create an animation, use an appropriate animation type for the type of
|
||||
the property that is to be animated, and apply the animation depending on
|
||||
the type of behavior that is required.
|
||||
|
||||
You can drag and drop the following QML types from \uicontrol Library
|
||||
> \uicontrol {QML Types} > \uicontrol {Qt Quick - Animation} to the
|
||||
\uicontrol Navigator or \uicontrol {Form Editor}:
|
||||
|
||||
\list
|
||||
\li \l [QML] {ColorAnimation}{Color Animation} is a specialized
|
||||
property animation that defines an animation to be applied when a
|
||||
color value changes.
|
||||
\li \l [QML] {NumberAnimation}{Number Animation} is a specialized
|
||||
property animation that defines an animation to be applied when a
|
||||
numerical value changes.
|
||||
\li \l [QML] {ParallelAnimation}{Parallel Animation} enables
|
||||
animations to be run in parallel.
|
||||
\li \l [QML] {PauseAnimation}{Pause Animation} is used in a
|
||||
sequential animation to create a step where nothing happens, for
|
||||
a specified duration.
|
||||
\li \l [QML] {PropertyAction}{Property Action} immediately changes
|
||||
a propertyvalue during an animation, without animating the property
|
||||
change.
|
||||
\li \l [QML] {PropertyAnimation}{Property Animation} animates
|
||||
changes in thevalue of a property.
|
||||
\li \l [QML] {ScriptAction}{Script Action} defines scripts to be
|
||||
run during an animation.
|
||||
\li \l [QML] {SequentialAnimation}{Sequential Animation} enables
|
||||
animations to be run sequentially.
|
||||
\endlist
|
||||
|
||||
For more information, see \l{Animation and Transitions in Qt Quick}.
|
||||
|
||||
\if defined(qtcreator)
|
||||
For an example of assigning number animations to states, see
|
||||
\l {Creating a Qt Quick Application}.
|
||||
\endif
|
||||
|
||||
You can use the \uicontrol {Text Editor} to specify transitions. For more
|
||||
information, see \l{Transition}.
|
||||
|
||||
Alternatively, you can use the \uicontrol Timeline view to animate the
|
||||
properties of UI components and to bind the animations to states. For more
|
||||
|
@@ -44,8 +44,7 @@
|
||||
You can change the web browser in the project run settings.
|
||||
|
||||
To build applications for the web and run them in a web browser, you need to
|
||||
install Qt for WebAssembly and the tool chain for compiling to WebAssembly,
|
||||
as well as add a build and run kit in \QC.
|
||||
install Qt for WebAssembly and the tool chain for compiling to WebAssembly.
|
||||
|
||||
\section1 Requirements
|
||||
|
||||
@@ -66,10 +65,15 @@
|
||||
|
||||
\section1 Setting Up the Development Environment
|
||||
|
||||
To configure \QC for building Qt apps for the web and running them in a
|
||||
web browser:
|
||||
You need to install and configure Qt for WebAssembly and the tool chain for
|
||||
compiling to WebAssembly. The installer automatically adds a build and run
|
||||
kit to \QC.
|
||||
|
||||
\list 1
|
||||
\section2 Setting Up Qt for WebAssembly
|
||||
|
||||
To set up Qt for WebAssembly:
|
||||
|
||||
\list 1
|
||||
\li Use the Qt maintenance tool to install Qt for WebAssembly and, on
|
||||
Windows, \MinGW (found in \uicontrol {Developer and Designer Tools}).
|
||||
\li Check out \c emsdk and install and activate \c emscripten, as
|
||||
@@ -81,30 +85,62 @@
|
||||
\li On Windows, you have to download and install \c sed, as instructed
|
||||
in \l{http://gnuwin32.sourceforge.net/packages/sed.htm}
|
||||
{sed for Windows}.
|
||||
\endlist
|
||||
|
||||
\section2 Enabling the WebAssembly Plugin
|
||||
|
||||
To enable the plugin:
|
||||
|
||||
\list 1
|
||||
\li In \QC, select \uicontrol Help > \uicontrol {About Plugins} >
|
||||
\uicontrol {Device Support} > \uicontrol {WebAssembly} to enable
|
||||
the plugin.
|
||||
\uicontrol {Device Support} > \uicontrol {WebAssembly}.
|
||||
\li Select \uicontrol {Restart Now} to restart \QC and load the plugin.
|
||||
\li Select \uicontrol Tools > \uicontrol Options > \uicontrol Kits >
|
||||
\uicontrol {Qt Versions} > \uicontrol Add to add Qt for WebAssembly
|
||||
(wasm_32).
|
||||
\li Select \uicontrol Tools > \uicontrol Options > \uicontrol Kits >
|
||||
\uicontrol Add to add a kit for building applications for the web:
|
||||
\endlist
|
||||
|
||||
\section2 Specifying WebAssembly Settings
|
||||
|
||||
To configure \QC for building Qt apps for the web:
|
||||
|
||||
\list 1
|
||||
\li Select \uicontrol Tools > \uicontrol Options > \uicontrol Kits.
|
||||
\image qtcreator-kit-webassembly.png "Qt for WebAssembly kit"
|
||||
\list 1
|
||||
\li In the \uicontrol Name field, specify a name for the kit.
|
||||
\li In the \uicontrol {Device type} field, select
|
||||
\uicontrol {WebAssembly Runtime}.
|
||||
The value of the \uicontrol Device field is automatically
|
||||
set to \uicontrol {Web Browser}.
|
||||
\li In the \uicontrol Compiler field, select
|
||||
\uicontrol {Emscripten Compiler} for both C and C++.
|
||||
\li Select \uicontrol Change next to the \uicontrol Environment
|
||||
field to append the locations where you installed \MinGW and
|
||||
\c sed to the PATH variable. For example, on Windows:
|
||||
\c {PATH=C:\Qt\Tools\mingw730_64\bin;C:\Program Files (x86)\GnuWin32\bin;${PATH}}
|
||||
\li Select \uicontrol Apply to add the kit.
|
||||
\endlist
|
||||
\li In the \uicontrol Compiler group, \uicontrol {Emscripten Compiler}
|
||||
should have been automatically detected for both C++ and C. If not,
|
||||
check that emscripten is set up correctly and your home directory
|
||||
contains an \c{.emscripten} file.
|
||||
\li Select \uicontrol Change next to the \uicontrol Environment
|
||||
field to append the locations where you installed \MinGW and
|
||||
\c sed to the PATH variable. For example, on Windows:
|
||||
\c {PATH=C:\Qt\Tools\mingw730_64\bin;C:\Program Files (x86)\GnuWin32\bin;${PATH}}
|
||||
\li Select \uicontrol Apply to save the changes to the kit.
|
||||
\endlist
|
||||
|
||||
\section2 Adding WebAssembly Kits
|
||||
|
||||
The Qt for Web Assembly installation automatically adds build and run kits
|
||||
to \QC. To add kits:
|
||||
|
||||
\list 1
|
||||
\li Select \uicontrol Tools > \uicontrol Options > \uicontrol Kits >
|
||||
\uicontrol Add.
|
||||
\li In the \uicontrol Name field, specify a name for the kit.
|
||||
\li In the \uicontrol {Device type} field, select
|
||||
\uicontrol {WebAssembly Runtime}.
|
||||
The value of the \uicontrol Device field is automatically
|
||||
set to \uicontrol {Web Browser}.
|
||||
\li In the \uicontrol Compiler field, select
|
||||
\uicontrol {Emscripten Compiler} for both C and C++.
|
||||
\li Select \uicontrol Change next to the \uicontrol Environment
|
||||
field to append the locations where you installed \MinGW and
|
||||
\c sed to the PATH variable.
|
||||
\li Select \uicontrol Apply to add the kit.
|
||||
\endlist
|
||||
|
||||
\section1 Running Applications in a Web Browser
|
||||
|
||||
To run a project:
|
||||
|
||||
\list 1
|
||||
\li Open a project for an application you want to run in a web browser.
|
||||
\li Select \uicontrol Projects > \uicontrol {Build & Run}, and then
|
||||
select the WebAssembly kit as the build and run kit for the project.
|
||||
|
@@ -111,6 +111,7 @@ class Dumper(DumperBase):
|
||||
self.runEngineAttempted = False
|
||||
|
||||
self.executable_ = None
|
||||
self.symbolFile_ = None
|
||||
self.startMode_ = None
|
||||
self.processArgs_ = None
|
||||
self.attachPid_ = None
|
||||
@@ -857,6 +858,7 @@ class Dumper(DumperBase):
|
||||
self.remoteChannel_ = args.get('remotechannel', '')
|
||||
self.platform_ = args.get('platform', '')
|
||||
self.nativeMixed = int(args.get('nativemixed', 0))
|
||||
self.symbolFile_ = args['symbolfile'];
|
||||
self.workingDirectory_ = args.get('workingdirectory', '')
|
||||
if self.workingDirectory_ == '':
|
||||
try:
|
||||
@@ -878,10 +880,8 @@ class Dumper(DumperBase):
|
||||
if self.sysRoot_:
|
||||
self.debugger.SetCurrentPlatformSDKRoot(self.sysRoot_)
|
||||
|
||||
exefile = None if self.attachPid_ > 0 else self.executable_
|
||||
|
||||
self.target = self.debugger.CreateTarget(
|
||||
exefile, None, self.platform_, True, error)
|
||||
self.symbolFile_, None, self.platform_, True, error)
|
||||
|
||||
if not error.Success():
|
||||
self.report(self.describeError(error))
|
||||
|
@@ -67,6 +67,8 @@ void Qt5NodeInstanceServer::initializeView()
|
||||
QSurfaceFormat surfaceFormat = m_quickView->requestedFormat();
|
||||
surfaceFormat.setVersion(4, 1);
|
||||
surfaceFormat.setProfile(QSurfaceFormat::CoreProfile);
|
||||
QSurfaceFormat::setDefaultFormat(surfaceFormat);
|
||||
|
||||
m_quickView->setFormat(surfaceFormat);
|
||||
|
||||
DesignerSupport::createOpenGLContext(m_quickView.data());
|
||||
|
@@ -40,6 +40,14 @@
|
||||
"index": 2,
|
||||
"items":
|
||||
[
|
||||
{
|
||||
"trKey": "PySide 5.15",
|
||||
"value":
|
||||
{
|
||||
"QtQuickVersion": "2.15",
|
||||
"QtQuickWindowVersion": "2.15"
|
||||
}
|
||||
},
|
||||
{
|
||||
"trKey": "PySide 5.14",
|
||||
"value":
|
||||
|
@@ -1,4 +1,4 @@
|
||||
set(languages cs da de fr ja pl ru sl uk zh_CN zh_TW)
|
||||
set(languages cs da de fr hr ja pl ru sl uk zh_CN zh_TW)
|
||||
set(bad_languages hu) # Fix these before including them in languages!
|
||||
|
||||
find_package(PythonInterp)
|
||||
|
47778
share/qtcreator/translations/qtcreator_hr.ts
Normal file
@@ -2177,7 +2177,7 @@ See Google Test documentation for further information on GTest filters.</source>
|
||||
<name>Autotest::Internal::QtTestSettingsPage</name>
|
||||
<message>
|
||||
<source>Enables interrupting tests on assertions.</source>
|
||||
<translation>Влючение прерывания тестов на утверждениях.</translation>
|
||||
<translation>Включение прерывания тестов на утверждениях.</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Disable crash handler while debugging</source>
|
||||
@@ -2444,7 +2444,7 @@ Warning: Plain text misses some information, such as duration.</source>
|
||||
</message>
|
||||
<message>
|
||||
<source>expected fails</source>
|
||||
<translation>ожиданных ошибок</translation>
|
||||
<translation>ожидаемых ошибок</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>fatals</source>
|
||||
@@ -2707,7 +2707,7 @@ Warning: this is an experimental feature and might lead to failing to execute th
|
||||
</message>
|
||||
<message>
|
||||
<source>Clear all cached choices of run configurations for tests where the executable could not be deduced.</source>
|
||||
<translation>Очистка кэша сохраннённых предпочтений для конфигураций запуска тестов, исполняемые файлы которых не удалось определить.</translation>
|
||||
<translation>Очистка кэша сохранённых предпочтений для конфигураций запуска тестов, исполняемые файлы которых не удалось определить.</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Reset Cached Choices</source>
|
||||
@@ -4861,11 +4861,11 @@ For example, "Revision: 15" will leave the branch at revision 15.</sou
|
||||
</message>
|
||||
<message>
|
||||
<source>CMake configuration has no path to a C compiler set, even though the kit has a valid tool chain.</source>
|
||||
<translation>В концигурации CMake не задан путь к компилятору C, но в комплекте указан корректный иструментарий.</translation>
|
||||
<translation>В конфигурации CMake не задан путь к компилятору C, но в комплекте указан корректный иструментарий.</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>CMake configuration has a path to a C compiler set, even though the kit has no valid tool chain.</source>
|
||||
<translation>В концигурации CMake задан путь к компилятору C, но в комплекте не указан корректный иструментарий.</translation>
|
||||
<translation>В конфигурации CMake задан путь к компилятору C, но в комплекте не указан корректный иструментарий.</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>CMake configuration has a path to a C compiler set that does not match the compiler path configured in the tool chain of the kit.</source>
|
||||
@@ -5349,7 +5349,7 @@ For example, "Revision: 15" will leave the branch at revision 15.</sou
|
||||
</message>
|
||||
<message>
|
||||
<source>A CMake tool must be set up for building. Configure a CMake tool in the kit options.</source>
|
||||
<translation>Для сборки необходимо, чтобы была задана программа CMake. Задайте её в настройках комлекта.</translation>
|
||||
<translation>Для сборки необходимо, чтобы была задана программа CMake. Задайте её в настройках комплекта.</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>There is a CMakeCache.txt file in "%1", which suggest an in-source build was done before. You are now building in "%2", and the CMakeCache.txt file might confuse CMake.</source>
|
||||
@@ -6623,7 +6623,7 @@ Output:
|
||||
<name>ClassView::Internal::NavigationWidget</name>
|
||||
<message>
|
||||
<source>Show Subprojects</source>
|
||||
<translation>Показать подроекты</translation>
|
||||
<translation>Показать подпроекты</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
@@ -7618,7 +7618,7 @@ p, li { white-space: pre-wrap; }
|
||||
</message>
|
||||
<message>
|
||||
<source>The image is duplicated horizontally and vertically.</source>
|
||||
<translation>Размножить изображение горизнтально и вертикально.</translation>
|
||||
<translation>Размножить изображение горизонтально и вертикально.</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>The image is scaled uniformly to fit without cropping.</source>
|
||||
@@ -8367,7 +8367,7 @@ You will not be able to store any %2 settings.</source>
|
||||
<source>Error reading settings file "%1": %2
|
||||
You will likely experience further problems using this instance of %3.</source>
|
||||
<translation>При чтении файла настроек «%1» возникла ошибка: %2
|
||||
Возможны проблемы при дальнейшем использованнии %3 без перезапуска.</translation>
|
||||
Возможны проблемы при дальнейшем использовании %3 без перезапуска.</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
@@ -8938,7 +8938,7 @@ Do you want to kill it?</source>
|
||||
</message>
|
||||
<message>
|
||||
<source>This tool prints a line of useful text</source>
|
||||
<translation>Этаутилита выводит строку полезного текста</translation>
|
||||
<translation>Эта утилита выводит строку полезного текста</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Useful text</source>
|
||||
@@ -11067,7 +11067,7 @@ to version control (%2)
|
||||
<name>CppEditor::Internal::ParseContextModel</name>
|
||||
<message>
|
||||
<source><p><b>Active Parse Context</b>:<br/>%1</p><p>Multiple parse contexts (set of defines, include paths, and so on) are available for this file.</p><p>Choose a parse context to set it as the preferred one. Clear the preference from the context menu.</p></source>
|
||||
<translation><p><b>Активный контекст разбора</b>:<br/>%1</p><p>Для этого файла доступно несколько контекстов разбора (набор определений, путей включения и пр.).</p><p>Выберите контекст разбора и задайте его предпочтительным. Убрать предпочтение можно через котекстное меню.</p></translation>
|
||||
<translation><p><b>Активный контекст разбора</b>:<br/>%1</p><p>Для этого файла доступно несколько контекстов разбора (набор определений, путей включения и пр.).</p><p>Выберите контекст разбора и задайте его предпочтительным. Убрать предпочтение можно через контекстное меню.</p></translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
@@ -11957,7 +11957,7 @@ Flags: %3</source>
|
||||
</message>
|
||||
<message>
|
||||
<source>Move Declaration out of Condition</source>
|
||||
<translation>Вынести обявление из условия</translation>
|
||||
<translation>Вынести объявление из условия</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Split if Statement</source>
|
||||
@@ -12706,7 +12706,7 @@ Do you want to display them anyway?</source>
|
||||
</message>
|
||||
<message>
|
||||
<source>When checked, all files touched by a commit will be displayed when clicking on a revision number in the annotation view (retrieved via commit ID). Otherwise, only the respective file will be displayed.</source>
|
||||
<translation>Если включено, по щелчку на номере равизии при просмотре аннотации (полученной по идентификатору фиксации) будут отображаться все зафиксированные файлы. В противном случае, только соответствующий файл.</translation>
|
||||
<translation>Если включено, по щелчку на номере ревизии при просмотре аннотации (полученной по идентификатору фиксации) будут отображаться все зафиксированные файлы. В противном случае, только соответствующий файл.</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
@@ -13431,7 +13431,7 @@ Do you want to display them anyway?</source>
|
||||
</message>
|
||||
<message>
|
||||
<source>Internal ID:</source>
|
||||
<translation>Внутрениий ID:</translation>
|
||||
<translation>Внутренний ID:</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>State:</source>
|
||||
@@ -14139,7 +14139,7 @@ If you build %2 from sources and want to use a CDB executable with another bitne
|
||||
</message>
|
||||
<message>
|
||||
<source>Could not find a widget.</source>
|
||||
<translation>Не удалсь найти виджет.</translation>
|
||||
<translation>Не удалось найти виджет.</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>%1 for "%2"</source>
|
||||
@@ -14253,7 +14253,7 @@ Examining symbols and setting breakpoints by file name and line number may fail.
|
||||
<message>
|
||||
<source>The inferior is in the ELF format.
|
||||
Selecting GDB or LLDB as debugger would improve the debugging experience for this binary format.</source>
|
||||
<translation>Программа имеет формает ELF.
|
||||
<translation>Программа имеет формат ELF.
|
||||
Рекомендуется использовать отладчик GDB или LLDB для улучшения отладочных возможностей.</translation>
|
||||
</message>
|
||||
<message>
|
||||
@@ -14447,7 +14447,7 @@ Setting breakpoints by file name and line number may fail.</source>
|
||||
</message>
|
||||
<message>
|
||||
<source>This feature is very slow and unstable on the GDB side. It exhibits unpredictable behavior when going backwards over system calls and is very likely to destroy your debugging session.</source>
|
||||
<translation>Эта возможность очень медленная и настабильная на стороне GDB. Приводит к непредсказуемым результатам при обратном переходе через системный вызов и может разрушить сессию отладки.</translation>
|
||||
<translation>Эта возможность очень медленная и нестабильная на стороне GDB. Приводит к непредсказуемым результатам при обратном переходе через системный вызов и может разрушить сессию отладки.</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
@@ -14986,7 +14986,7 @@ Affected are breakpoints %1</source>
|
||||
</message>
|
||||
<message>
|
||||
<source><p>Shows Qt namespace prefix for Qt types. This is only relevant if Qt was configured with "-qtnamespace".</source>
|
||||
<translation><p>Отображать приставку пространтсва имён Qt для типов Qt. Имеет смысл только тогда, когда Qt собран с параметром «-qtnamespace».</translation>
|
||||
<translation><p>Отображать приставку пространства имён Qt для типов Qt. Имеет смысл только тогда, когда Qt собран с параметром «-qtnamespace».</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Show QObject names if available</source>
|
||||
@@ -16877,7 +16877,7 @@ You can choose another communication channel here, such as a serial line or cust
|
||||
</message>
|
||||
<message>
|
||||
<source>Internal ID</source>
|
||||
<translation>Внутрениий ID</translation>
|
||||
<translation>Внутренний ID</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Creation Time in ms</source>
|
||||
@@ -21077,7 +21077,7 @@ Commit now?</source>
|
||||
</message>
|
||||
<message>
|
||||
<source>Restores changes saved to the stash list using "Stash".</source>
|
||||
<translation>Восстанавить изменения сохранённые в список спрятанного командой «Спрятать».</translation>
|
||||
<translation>Восстановить изменения сохранённые в список спрятанного командой «Спрятать».</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Commit...</source>
|
||||
@@ -22308,7 +22308,7 @@ Add, modify, and remove document filters, which determine the documentation set
|
||||
<name>Help::Internal::HelpManager</name>
|
||||
<message>
|
||||
<source>Update Documentation</source>
|
||||
<translation>Обновить документацию</translation>
|
||||
<translation>Обновление документации</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
@@ -22623,7 +22623,7 @@ Add, modify, and remove document filters, which determine the documentation set
|
||||
<name>Help::Internal::SearchWidget</name>
|
||||
<message>
|
||||
<source>Indexing Documentation</source>
|
||||
<translation>Идексация документации</translation>
|
||||
<translation>Индексация документации</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Open Link</source>
|
||||
@@ -22727,7 +22727,7 @@ Add, modify, and remove document filters, which determine the documentation set
|
||||
</message>
|
||||
<message>
|
||||
<source>Extra console.</source>
|
||||
<translation>Допольнительная консоль.</translation>
|
||||
<translation>Дополнительная консоль.</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Unknown exit reason.</source>
|
||||
@@ -22743,7 +22743,7 @@ Add, modify, and remove document filters, which determine the documentation set
|
||||
</message>
|
||||
<message>
|
||||
<source>Heob: Failure in process attach handshake (%1).</source>
|
||||
<translation>Heob: не удалось выполнить рукопожание при подключении к процессу (%1).</translation>
|
||||
<translation>Heob: не удалось выполнить рукопожатие при подключении к процессу (%1).</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
@@ -23170,7 +23170,7 @@ Ids must begin with a lowercase letter.</source>
|
||||
</message>
|
||||
<message>
|
||||
<source>OS version:</source>
|
||||
<translation>Верия OS:</translation>
|
||||
<translation>Версия OS:</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>None</source>
|
||||
@@ -23446,7 +23446,7 @@ Ids must begin with a lowercase letter.</source>
|
||||
</message>
|
||||
<message>
|
||||
<source>To use this device you need to enable developer mode on it.</source>
|
||||
<translation>Для использования этого устройтсва необходимо включить в нём режим разработки.</translation>
|
||||
<translation>Для использования этого устройства необходимо включить в нём режим разработки.</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>%1 is not connected. Select %2?</source>
|
||||
@@ -24236,7 +24236,7 @@ Error: %5</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Preferred size of an item in a layout. If the preferred height or width is -1, it is ignored.</source>
|
||||
<translation>Предпочтительный резмер элемента в компоновщике. Если он -1, то игнорируется.</translation>
|
||||
<translation>Предпочтительный размер элемента в компоновщике. Если он -1, то игнорируется.</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Minimum size</source>
|
||||
@@ -24670,7 +24670,7 @@ Error: %5</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Texture Mipmap</source>
|
||||
<translation>Текстуры - мипмамминг</translation>
|
||||
<translation>Текстуры - мипмаппинг</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Texture Delete</source>
|
||||
@@ -24753,7 +24753,7 @@ Error: %5</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>In addition, we send a Microsoft Minidump file, which contains information about this computer, such as the operating system and CPU, and most importantly, it contains the stacktrace, which is an internal structure that shows where the program crashed. This information will help us to identify the cause of the crash and to fix it.</source>
|
||||
<translation>И ещё, мы отправим файл Microsoft Minidump, который содержит информацию об этом компьютере, такую как операционная система и процессор, а также, что особенно важно, он содержит стек вызовов — внутреннюю стуктуру показывающую, где возник сбой. Эта информация поможет нам определить причину сбоя и устранить её.</translation>
|
||||
<translation>И ещё, мы отправим файл Microsoft Minidump, который содержит информацию об этом компьютере, такую как операционная система и процессор, а также, что особенно важно, он содержит стек вызовов — внутреннюю структуру показывающую, где возник сбой. Эта информация поможет нам определить причину сбоя и устранить её.</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
@@ -26431,7 +26431,7 @@ Error: %5</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Failed to replay Perf events from stash file.</source>
|
||||
<translation>Не удалось вопроизвести события Perfs из файла.</translation>
|
||||
<translation>Не удалось воспроизвести события Perfs из файла.</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Loading Trace Data</source>
|
||||
@@ -27104,7 +27104,7 @@ Error: %5</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Could not submit the change, because your workspace was out of date. Created a pending submit instead.</source>
|
||||
<translation>Не удалось зафиксировать измененения, так как рабочая копия устарела. Создана фиксация для рассмотрения.</translation>
|
||||
<translation>Не удалось зафиксировать изменения, так как рабочая копия устарела. Создана фиксация для рассмотрения.</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
@@ -28755,7 +28755,7 @@ Excluding: %2
|
||||
<name>ProjectExplorer::Internal::CustomToolChainConfigWidget</name>
|
||||
<message>
|
||||
<source>Custom Parser Settings...</source>
|
||||
<translation>Настроть обработчик...</translation>
|
||||
<translation>Настроить обработчик...</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>MACRO[=VALUE]</source>
|
||||
@@ -28839,7 +28839,7 @@ Excluding: %2
|
||||
</message>
|
||||
<message>
|
||||
<source>Synchronize active kit, build, and deploy configuration between projects.</source>
|
||||
<translation>Сихронизировать у проектов текущий комплект и конфигурации сборки и развёртывания.</translation>
|
||||
<translation>Синхронизировать у проектов текущий комплект и конфигурации сборки и развёртывания.</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
@@ -29542,7 +29542,7 @@ What should Qt Creator do now?</source>
|
||||
</message>
|
||||
<message>
|
||||
<source>Cannot parse: The chosen kit does not provide an output parser.</source>
|
||||
<translation>Не удалось разобрать: выбранный комплект не подоставляет разборщик вывода.</translation>
|
||||
<translation>Не удалось разобрать: выбранный комплект не предоставляет разборщик вывода.</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Parsing build output</source>
|
||||
@@ -30252,7 +30252,7 @@ to project "%2".</source>
|
||||
One for the native x86_64 target, and one for a plain x86 target.
|
||||
Enable this if you plan to create 32-bit x86 binaries without using a dedicated cross compiler.</source>
|
||||
<translation>При включении Qt Creator будет настраивать два экземпляра для каждого компилятора x86_64:
|
||||
Один для целей x86_64, адругой для x86.
|
||||
Один для целей x86_64, а другой для x86.
|
||||
Включайте, если планируете создавать 32-битные программы без отдельного кросс-компилятора.</translation>
|
||||
</message>
|
||||
<message>
|
||||
@@ -30480,7 +30480,7 @@ Enable this if you plan to create 32-bit x86 binaries without using a dedicated
|
||||
<name>ProjectExplorer::JsonKitsPage</name>
|
||||
<message>
|
||||
<source>Feature list is set and not of type list.</source>
|
||||
<translation>Список особенностей задан, но не явлется типом list.</translation>
|
||||
<translation>Список особенностей задан, но не является типом list.</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>No "%1" key found in feature list object.</source>
|
||||
@@ -31104,11 +31104,11 @@ Preselects a desktop Qt for building the application if available.</source>
|
||||
</message>
|
||||
<message>
|
||||
<source>Creates a vertex shader in the Desktop OpenGL Shading Language (GLSL). Vertex shaders transform the positions, normals and texture coordinates of triangles, points and lines rendered with OpenGL.</source>
|
||||
<translation>Создание вершинного шейдера на языке Desktop OpenGL Shading Language (GLSL). Вершинные шейдеры изменяют положение, нормали и текстурные координаты теугольников, точек и линий, отрисовываемых с помощью OpenGL.</translation>
|
||||
<translation>Создание вершинного шейдера на языке Desktop OpenGL Shading Language (GLSL). Вершинные шейдеры изменяют положение, нормали и текстурные координаты треугольников, точек и линий, отрисовываемых с помощью OpenGL.</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Creates a vertex shader in the OpenGL/ES 2.0 Shading Language (GLSL/ES). Vertex shaders transform the positions, normals and texture coordinates of triangles, points and lines rendered with OpenGL.</source>
|
||||
<translation>Создание вершинного шейдера на языке OpenGL/ES 2.0 Shading Language (GLSL/ES). Вершинные шейдеры изменяют положение, нормали и текстурные координаты теугольников, точек и линий, отрисовываемых с помощью OpenGL.</translation>
|
||||
<translation>Создание вершинного шейдера на языке OpenGL/ES 2.0 Shading Language (GLSL/ES). Вершинные шейдеры изменяют положение, нормали и текстурные координаты треугольников, точек и линий, отрисовываемых с помощью OpenGL.</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>"%{JS: Util.toNativeSeparators('%{TargetPath}')}" exists in the filesystem.</source>
|
||||
@@ -31711,7 +31711,7 @@ Preselects a desktop Qt for building the application if available.</source>
|
||||
</message>
|
||||
<message>
|
||||
<source>Creates a fragment shader in the Desktop OpenGL Shading Language (GLSL). Fragment shaders generate the final pixel colors for triangles, points and lines rendered with OpenGL.</source>
|
||||
<translation>Создание фрагментного шейдера на языке Desktop OpenGL Shading Language (GLSL). Фрагментные шейдеры создают конечный цвет пикселя для теугольников, точек и линий, отрисовываемых с помощью OpenGL.</translation>
|
||||
<translation>Создание фрагментного шейдера на языке Desktop OpenGL Shading Language (GLSL). Фрагментные шейдеры создают конечный цвет пикселя для треугольников, точек и линий, отрисовываемых с помощью OpenGL.</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>GLSL</source>
|
||||
@@ -31727,7 +31727,7 @@ Preselects a desktop Qt for building the application if available.</source>
|
||||
</message>
|
||||
<message>
|
||||
<source>Creates a fragment shader in the OpenGL/ES 2.0 Shading Language (GLSL/ES). Fragment shaders generate the final pixel colors for triangles, points and lines rendered with OpenGL.</source>
|
||||
<translation>Создание фрагментного шейдера на языке OpenGL/ES 2.0 Shading Language (GLSL/ES). Фрагментные шейдеры создают конечный цвет пикселя для теугольников, точек и линий, отрисовываемых с помощью OpenGL.</translation>
|
||||
<translation>Создание фрагментного шейдера на языке OpenGL/ES 2.0 Shading Language (GLSL/ES). Фрагментные шейдеры создают конечный цвет пикселя для треугольников, точек и линий, отрисовываемых с помощью OpenGL.</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Fragment Shader (OpenGL/ES 2.0)</source>
|
||||
@@ -32032,7 +32032,7 @@ Preselects a desktop Qt for building the application if available.</source>
|
||||
</message>
|
||||
<message>
|
||||
<source>Make command missing. Specify Make command in step configuration.</source>
|
||||
<translation>Отсутвует команда Make. Укажите её в настройках шага.</translation>
|
||||
<translation>Отсутствует команда Make. Укажите её в настройках шага.</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
@@ -32984,7 +32984,7 @@ Do you want to ignore them?</source>
|
||||
</message>
|
||||
<message>
|
||||
<source>Select files matching:</source>
|
||||
<translation>Выбрать файлы соответствущие:</translation>
|
||||
<translation>Выбрать файлы соответствующие:</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Apply Filters</source>
|
||||
@@ -33167,7 +33167,7 @@ These files are preserved.</source>
|
||||
</message>
|
||||
<message>
|
||||
<source>Select all kits</source>
|
||||
<translation>Выбрать все комлекты</translation>
|
||||
<translation>Выбрать все комплекты</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Type to filter kits by name...</source>
|
||||
@@ -33296,15 +33296,15 @@ These files are preserved.</source>
|
||||
<name>ProjectExplorer::UseLibraryPathsAspect</name>
|
||||
<message>
|
||||
<source>Add build library search path to DYLD_LIBRARY_PATH and DYLD_FRAMEWORK_PATH</source>
|
||||
<translation>Добавить путь к собираемой библитеке в DYLD_LIBRARY_PATH и DYLD_FRAMEWORK_PATH</translation>
|
||||
<translation>Добавить путь к собираемой библиотеке в DYLD_LIBRARY_PATH и DYLD_FRAMEWORK_PATH</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Add build library search path to PATH</source>
|
||||
<translation>Добавить путь к собираемой библитеке в PATH</translation>
|
||||
<translation>Добавить путь к собираемой библиотеке в PATH</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Add build library search path to LD_LIBRARY_PATH</source>
|
||||
<translation>Добавить путь к собираемой библитеке в LD_LIBRARY_PATH</translation>
|
||||
<translation>Добавить путь к собираемой библиотеке в LD_LIBRARY_PATH</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
@@ -35710,7 +35710,7 @@ Neither the path to the library nor the path to its includes is added to the .pr
|
||||
</message>
|
||||
<message>
|
||||
<source>Show bounding rectangles and stripes for empty items (A).</source>
|
||||
<translation>Показавать границы и контуры пустых объектов (A).</translation>
|
||||
<translation>Показывать границы и контуры пустых объектов (A).</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Override Width</source>
|
||||
@@ -35767,7 +35767,7 @@ Neither the path to the library nor the path to its includes is added to the .pr
|
||||
</message>
|
||||
<message>
|
||||
<source>Singleton</source>
|
||||
<translation>Единственнная</translation>
|
||||
<translation>Единственная</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Local</source>
|
||||
@@ -37048,7 +37048,7 @@ This is independent of the visibility property in QML.</source>
|
||||
</message>
|
||||
<message>
|
||||
<source>Remove Timeline</source>
|
||||
<translation>Удалить временую шкалу</translation>
|
||||
<translation>Удалить временную шкалу</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Add Animation</source>
|
||||
@@ -37969,7 +37969,7 @@ For more information, see the "Checking Code Syntax" documentation.</s
|
||||
</message>
|
||||
<message>
|
||||
<source>Minimum number value is %1.</source>
|
||||
<translation>Миничальное числовое значение: %1.</translation>
|
||||
<translation>Минимальное числовое значение: %1.</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Maximum number value is exclusive.</source>
|
||||
@@ -38249,7 +38249,7 @@ For more information, see the "Checking Code Syntax" documentation.</s
|
||||
<source>// TODO: Move position bindings from the component to the Loader.
|
||||
// Check all uses of 'parent' inside the root element of the component.</source>
|
||||
<translation>// TODO: Переместить привязки позиций из компонента в загрузчик.
|
||||
// Проверить каждое использовние «parent» в корневом элементе компонента.</translation>
|
||||
// Проверить каждое использование «parent» в корневом элементе компонента.</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>// Rename all outer uses of the id "%1" to "%2.item".</source>
|
||||
@@ -38491,7 +38491,7 @@ the QML editor know about a likely URI.</source>
|
||||
<name>QmlParser</name>
|
||||
<message>
|
||||
<source>Illegal syntax for exponential number</source>
|
||||
<translation>Некорректная форма экпоненциального числа</translation>
|
||||
<translation>Некорректная форма экспоненциального числа</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Stray newline in string literal</source>
|
||||
@@ -38714,7 +38714,7 @@ the QML editor know about a likely URI.</source>
|
||||
</message>
|
||||
<message>
|
||||
<source>Double Click</source>
|
||||
<translation>Двойной щелчёк</translation>
|
||||
<translation>Двойной щелчок</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Mouse Press</source>
|
||||
@@ -38833,7 +38833,7 @@ the QML editor know about a likely URI.</source>
|
||||
</message>
|
||||
<message>
|
||||
<source>Double Click</source>
|
||||
<translation>Двойной щелчёк</translation>
|
||||
<translation>Двойной щелчок</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Mouse Wheel</source>
|
||||
@@ -39496,7 +39496,7 @@ Saving failed.</source>
|
||||
</message>
|
||||
<message>
|
||||
<source>+%1 in recursive calls</source>
|
||||
<translation>+%1 в рекурсивых вызовах</translation>
|
||||
<translation>+%1 в рекурсивных вызовах</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source><bytecode></source>
|
||||
@@ -39536,7 +39536,7 @@ Saving failed.</source>
|
||||
</message>
|
||||
<message>
|
||||
<source>Shortest Time</source>
|
||||
<translation>Наименьше время</translation>
|
||||
<translation>Наименьшее время</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Time in Percent</source>
|
||||
@@ -39902,7 +39902,7 @@ Are you sure you want to continue?</source>
|
||||
</message>
|
||||
<message>
|
||||
<source>Files can be created in /var/run.</source>
|
||||
<translation>Файлы можно создаватьв /var/run.</translation>
|
||||
<translation>Файлы можно создавать в /var/run.</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Files cannot be created in /var/run.</source>
|
||||
@@ -41106,7 +41106,7 @@ If you do not have a private key yet, you can also create one here.</source>
|
||||
<message>
|
||||
<source>rsync crashed.
|
||||
</source>
|
||||
<translation>rsync аварийно завершися.
|
||||
<translation>rsync аварийно завершился.
|
||||
</translation>
|
||||
</message>
|
||||
<message>
|
||||
@@ -41445,7 +41445,7 @@ If you do not have a private key yet, you can also create one here.</source>
|
||||
</message>
|
||||
<message>
|
||||
<source>Run custom remote command</source>
|
||||
<translation>Выполнить особую внешную команду</translation>
|
||||
<translation>Выполнить особую внешнюю команду</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
@@ -42418,19 +42418,19 @@ Description: %4</source>
|
||||
</message>
|
||||
<message>
|
||||
<source>Align Horizontal</source>
|
||||
<translation>Выравнить гоизонтально</translation>
|
||||
<translation>Выровнить горизонтально</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Align Horizontal (Ctrl+L,5)</source>
|
||||
<translation>Выравнить гоизонтально (Ctrl+L,5)</translation>
|
||||
<translation>Выровнить горизонтально (Ctrl+L,5)</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Align Vertical</source>
|
||||
<translation>Выравнить вертикально</translation>
|
||||
<translation>Выровнить вертикально</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Align Vertical (Ctrl+L,6)</source>
|
||||
<translation>Выравнить гоизонтально (Ctrl+L,6)</translation>
|
||||
<translation>Выровнить горизонтально (Ctrl+L,6)</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Adjust Width</source>
|
||||
@@ -42487,7 +42487,7 @@ Description: %4</source>
|
||||
<name>ScxmlEditor::PluginInterface::GraphicsScene</name>
|
||||
<message>
|
||||
<source>Align states</source>
|
||||
<translation>Выравнить состояния</translation>
|
||||
<translation>Выровнить состояния</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Adjust states</source>
|
||||
@@ -45194,7 +45194,7 @@ Influences the indentation of continuation lines.
|
||||
</message>
|
||||
<message>
|
||||
<source>Move the View a Line Up and Keep the Cursor Position</source>
|
||||
<translation>Сдвинуть отображаемый текст настроку выше с сохранением позиции курсора</translation>
|
||||
<translation>Сдвинуть отображаемый текст на строку выше с сохранением позиции курсора</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Ctrl+Up</source>
|
||||
@@ -45462,11 +45462,11 @@ Influences the indentation of continuation lines.
|
||||
</message>
|
||||
<message>
|
||||
<source>Go to Previous Word Camel Case</source>
|
||||
<translation>Перейти к предыдущему слову с учётом Верблюжего Регистра</translation>
|
||||
<translation>Перейти к предыдущему слову с учётом Верблюжьего Регистра</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Go to Next Word Camel Case</source>
|
||||
<translation>Перейти к следующему слову с учётом Верблюжего Регистра</translation>
|
||||
<translation>Перейти к следующему слову с учётом Верблюжьего Регистра</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Go to Line Start with Selection</source>
|
||||
@@ -45502,11 +45502,11 @@ Influences the indentation of continuation lines.
|
||||
</message>
|
||||
<message>
|
||||
<source>Go to Previous Word Camel Case with Selection</source>
|
||||
<translation>Перейти к предыдущему слову с выделением с учётом Верблюжего Регистра</translation>
|
||||
<translation>Перейти к предыдущему слову с выделением с учётом Верблюжьего Регистра</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Go to Next Word Camel Case with Selection</source>
|
||||
<translation>Перейти к следующему слову с выделением с учётом Верблюжего Регистра</translation>
|
||||
<translation>Перейти к следующему слову с выделением с учётом Верблюжьего Регистра</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
@@ -45558,7 +45558,7 @@ Influences the indentation of continuation lines.
|
||||
</message>
|
||||
<message>
|
||||
<source>Number of columns visible in current document.</source>
|
||||
<translation>Количество видимых стобцов текущего документа.</translation>
|
||||
<translation>Количество видимых столбцов текущего документа.</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Current document's font size in points.</source>
|
||||
@@ -45810,7 +45810,7 @@ Applied to text that matched no other rule.</source>
|
||||
</message>
|
||||
<message>
|
||||
<source>QML property of a parent item.</source>
|
||||
<translation>Свойство QML родительсвого элемента.</translation>
|
||||
<translation>Свойство QML родительского элемента.</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>QML Scope Object Property</source>
|
||||
@@ -45854,7 +45854,7 @@ Applied to text that matched no other rule.</source>
|
||||
</message>
|
||||
<message>
|
||||
<source>JavaScript Scope Var</source>
|
||||
<translation>Локальная перменная JavaScript</translation>
|
||||
<translation>Локальная переменная JavaScript</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Variables defined inside the JavaScript file.</source>
|
||||
@@ -45908,7 +45908,7 @@ To style user-defined operators, use Overloaded Operator.</source>
|
||||
</message>
|
||||
<message>
|
||||
<source>Preprocessor directives.</source>
|
||||
<translation>Дериктивы препроцессора.</translation>
|
||||
<translation>Директивы препроцессора.</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Label</source>
|
||||
@@ -45958,7 +45958,7 @@ Will not be applied to whitespace in comments and strings.</source>
|
||||
</message>
|
||||
<message>
|
||||
<source>Code disabled by preprocessor directives.</source>
|
||||
<translation>Код отключённый дериктивами препроцессора.</translation>
|
||||
<translation>Код отключённый директивами препроцессора.</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Added Line</source>
|
||||
@@ -46827,7 +46827,7 @@ To disable a variable, prefix the line with "#"</source>
|
||||
</message>
|
||||
<message>
|
||||
<source><p>No settings file created by this instance of %1 was found.</p><p>Did you work with this project on another machine or using a different settings path before?</p><p>Do you still want to load the settings file "%2"?</p></source>
|
||||
<translation><p>Не удалось найти файл настроек от этого экземляра %1.</p><p>Возможно вы работали с этим проектом на другой машине или использовали другой путь к настройкам.</p><p>Продолжить загрузку файла настроек «%2»?</p></translation>
|
||||
<translation><p>Не удалось найти файл настроек от этого экземпляра %1.</p><p>Возможно вы работали с этим проектом на другой машине или использовали другой путь к настройкам.</p><p>Продолжить загрузку файла настроек «%2»?</p></translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
@@ -47936,7 +47936,7 @@ To disable a variable, prefix the line with "#"</source>
|
||||
</message>
|
||||
<message>
|
||||
<source>Callees</source>
|
||||
<translation>Вызывемые</translation>
|
||||
<translation>Вызываемые</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Functions</source>
|
||||
@@ -48187,7 +48187,7 @@ When a problem is detected, the application is interrupted and can be debugged.<
|
||||
</message>
|
||||
<message>
|
||||
<source>The %1 executables must be in the appropriate location.</source>
|
||||
<translation>Программы %1 должны быть в соответствущем месте.</translation>
|
||||
<translation>Программы %1 должны быть в соответствующем месте.</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Heob used with MinGW projects needs the %1 DLLs for proper stacktrace resolution.</source>
|
||||
@@ -49050,7 +49050,7 @@ should a repository require SSH-authentication (see documentation on SSH and the
|
||||
<name>VcsBase::VcsBaseSubmitEditor</name>
|
||||
<message>
|
||||
<source>Check Message</source>
|
||||
<translation>Проверие сообщение</translation>
|
||||
<translation>Проверить сообщение</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Insert Name...</source>
|
||||
|
@@ -2,7 +2,7 @@ TEMPLATE = aux
|
||||
|
||||
include(../../../qtcreator.pri)
|
||||
|
||||
LANGUAGES = cs da de fr ja pl ru sl uk zh_CN zh_TW
|
||||
LANGUAGES = cs da de fr hr ja pl ru sl uk zh_CN zh_TW
|
||||
# *do not* re-enable these without a prior rework
|
||||
BAD_LANGUAGES = hu
|
||||
|
||||
|
@@ -1045,8 +1045,7 @@ bool AndroidManifestEditorWidget::parseMetaData(QXmlStreamReader &reader, QXmlSt
|
||||
{
|
||||
Q_ASSERT(reader.isStartElement());
|
||||
|
||||
const int parseItemsCount = 2;
|
||||
int counter = 0;
|
||||
bool found = false;
|
||||
QXmlStreamAttributes attributes = reader.attributes();
|
||||
QXmlStreamAttributes result;
|
||||
QStringList keys;
|
||||
@@ -1056,13 +1055,13 @@ bool AndroidManifestEditorWidget::parseMetaData(QXmlStreamReader &reader, QXmlSt
|
||||
keys = QStringList("android:value");
|
||||
values = QStringList(m_targetLineEdit->currentText());
|
||||
result = modifyXmlStreamAttributes(attributes, keys, values);
|
||||
++counter;
|
||||
found = true;
|
||||
} else if (attributes.value(QLatin1String("android:name"))
|
||||
== QLatin1String("android.app.extract_android_style")) {
|
||||
keys = QStringList("android:value");
|
||||
values = QStringList(m_styleExtractMethod->currentText());
|
||||
result = modifyXmlStreamAttributes(attributes, keys, values);
|
||||
++counter;
|
||||
found = true;
|
||||
} else {
|
||||
result = attributes;
|
||||
}
|
||||
@@ -1075,7 +1074,7 @@ bool AndroidManifestEditorWidget::parseMetaData(QXmlStreamReader &reader, QXmlSt
|
||||
while (!reader.atEnd()) {
|
||||
if (reader.isEndElement()) {
|
||||
writer.writeCurrentToken(reader);
|
||||
return counter == parseItemsCount;
|
||||
return found;
|
||||
} else if (reader.isStartElement()) {
|
||||
parseUnknownElement(reader, writer);
|
||||
} else {
|
||||
@@ -1083,7 +1082,7 @@ bool AndroidManifestEditorWidget::parseMetaData(QXmlStreamReader &reader, QXmlSt
|
||||
}
|
||||
reader.readNext();
|
||||
}
|
||||
return counter == parseItemsCount; // should never be reached
|
||||
return found; // should never be reached
|
||||
}
|
||||
|
||||
void AndroidManifestEditorWidget::parseUsesSdk(QXmlStreamReader &reader, QXmlStreamWriter & writer)
|
||||
|
@@ -1115,6 +1115,7 @@ void CdbEngine::doUpdateLocals(const UpdateParameters &updateParameters)
|
||||
showMessage(response.data["msg"].data(), LogError);
|
||||
}
|
||||
watchHandler()->notifyUpdateFinished();
|
||||
updateToolTips();
|
||||
};
|
||||
|
||||
runCommand(cmd);
|
||||
|
@@ -2358,6 +2358,10 @@ void DebuggerEngine::updateItem(const QString &iname)
|
||||
QTC_CHECK(item);
|
||||
WatchModelBase *model = handler->model();
|
||||
QTC_CHECK(model);
|
||||
if (item && !item->wantsChildren) {
|
||||
updateToolTips();
|
||||
return;
|
||||
}
|
||||
if (item && !model->hasChildren(model->indexForItem(item))) {
|
||||
handler->notifyUpdateStarted(UpdateParameters(iname));
|
||||
item->setValue(decodeData({}, "notaccessible"));
|
||||
|
@@ -302,6 +302,11 @@ DebuggerMainWindow::DebuggerMainWindow()
|
||||
cmd->setAttribute(Command::CA_Hide);
|
||||
viewsMenu->addAction(cmd, Core::Constants::G_DEFAULT_THREE);
|
||||
|
||||
// HACK: See QTCREATORBUG-23755. This ensures the showCentralWidget()
|
||||
// call in restorePersistentSettings() below has something to operate on,
|
||||
// and a plain QWidget is what we'll use anyway as central widget.
|
||||
setCentralWidget(new QWidget);
|
||||
|
||||
restorePersistentSettings();
|
||||
}
|
||||
|
||||
|
@@ -515,7 +515,7 @@ public:
|
||||
documentAndRightPane->setStretchFactor(0, 1);
|
||||
documentAndRightPane->setStretchFactor(1, 0);
|
||||
|
||||
auto centralEditorWidget = new QWidget;
|
||||
auto centralEditorWidget = mainWindow->centralWidget();
|
||||
auto centralLayout = new QVBoxLayout(centralEditorWidget);
|
||||
centralEditorWidget->setLayout(centralLayout);
|
||||
centralLayout->setContentsMargins(0, 0, 0, 0);
|
||||
@@ -544,7 +544,6 @@ public:
|
||||
splitter->setStretchFactor(1, 1);
|
||||
splitter->setObjectName("DebugModeWidget");
|
||||
|
||||
mainWindow->setCentralWidget(centralEditorWidget);
|
||||
mainWindow->addSubPerspectiveSwitcher(EngineManager::engineChooser());
|
||||
|
||||
setWidget(splitter);
|
||||
|
@@ -1179,7 +1179,7 @@ DebuggerToolTipManagerPrivate::DebuggerToolTipManagerPrivate(DebuggerEngine *eng
|
||||
this, &DebuggerToolTipManagerPrivate::saveSessionData);
|
||||
connect(SessionManager::instance(), &SessionManager::aboutToUnloadSession,
|
||||
this, &DebuggerToolTipManagerPrivate::sessionAboutToChange);
|
||||
setupEditors();
|
||||
debugModeEntered();
|
||||
}
|
||||
|
||||
void DebuggerToolTipManagerPrivate::slotTooltipOverrideRequested
|
||||
@@ -1241,8 +1241,6 @@ void DebuggerToolTipManagerPrivate::slotTooltipOverrideRequested
|
||||
DEBUG("SYNC IN STATE" << tooltip->state);
|
||||
tooltip->updateTooltip(m_engine);
|
||||
|
||||
*handled = true;
|
||||
|
||||
} else {
|
||||
|
||||
context.iname = "tooltip." + toHex(context.expression);
|
||||
@@ -1256,7 +1254,6 @@ void DebuggerToolTipManagerPrivate::slotTooltipOverrideRequested
|
||||
tooltip->context.mousePosition = point;
|
||||
ToolTip::move(point, DebuggerMainWindow::instance());
|
||||
DEBUG("UPDATING DELAYED.");
|
||||
*handled = true;
|
||||
} else {
|
||||
DEBUG("CREATING DELAYED.");
|
||||
tooltip = new DebuggerToolTipHolder(context);
|
||||
@@ -1272,6 +1269,8 @@ void DebuggerToolTipManagerPrivate::slotTooltipOverrideRequested
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
*handled = true;
|
||||
}
|
||||
|
||||
void DebuggerToolTipManagerPrivate::slotEditorOpened(IEditor *e)
|
||||
@@ -1323,6 +1322,7 @@ void DebuggerToolTipManagerPrivate::leavingDebugMode()
|
||||
foreach (IEditor *e, DocumentModel::editorsForOpenedDocuments()) {
|
||||
if (auto toolTipEditor = qobject_cast<BaseTextEditor *>(e)) {
|
||||
toolTipEditor->editorWidget()->verticalScrollBar()->disconnect(this);
|
||||
toolTipEditor->editorWidget()->disconnect(this);
|
||||
toolTipEditor->disconnect(this);
|
||||
}
|
||||
}
|
||||
|
@@ -4818,6 +4818,7 @@ void GdbEngine::handleFetchVariables(const DebuggerResponse &response)
|
||||
m_inUpdateLocals = false;
|
||||
updateLocalsView(response.data);
|
||||
watchHandler()->notifyUpdateFinished();
|
||||
updateToolTips();
|
||||
}
|
||||
|
||||
QString GdbEngine::msgPtraceError(DebuggerStartMode sm)
|
||||
|
@@ -279,6 +279,7 @@ void LldbEngine::setupEngine()
|
||||
cmd2.arg("environment", rp.inferior.environment.toStringList());
|
||||
cmd2.arg("processargs", toHex(QtcProcess::splitArgs(rp.inferior.commandLineArguments).join(QChar(0))));
|
||||
cmd2.arg("platform", rp.platform);
|
||||
cmd2.arg("symbolfile", rp.symbolFile);
|
||||
|
||||
if (terminal()) {
|
||||
const qint64 attachedPID = terminal()->applicationPid();
|
||||
@@ -785,6 +786,7 @@ void LldbEngine::doUpdateLocals(const UpdateParameters ¶ms)
|
||||
cmd.callback = [this](const DebuggerResponse &response) {
|
||||
updateLocalsView(response.data);
|
||||
watchHandler()->notifyUpdateFinished();
|
||||
updateToolTips();
|
||||
};
|
||||
|
||||
runCommand(cmd);
|
||||
|
@@ -774,6 +774,7 @@ void UvscEngine::handleUpdateLocals(bool partial)
|
||||
|
||||
updateLocalsView(all);
|
||||
watchHandler()->notifyUpdateFinished();
|
||||
updateToolTips();
|
||||
}
|
||||
|
||||
void UvscEngine::handleInsertBreakpoint(const QString &exp, const Breakpoint &bp)
|
||||
|
@@ -1,6 +1,6 @@
|
||||
add_qtc_plugin(McuSupport
|
||||
DEPENDS Qt5::Core
|
||||
PLUGIN_DEPENDS Core ProjectExplorer Debugger CMakeProjectManager
|
||||
PLUGIN_DEPENDS Core ProjectExplorer Debugger CMakeProjectManager QtSupport
|
||||
SOURCES
|
||||
mcusupport.qrc
|
||||
mcusupport_global.h
|
||||
|
@@ -11,6 +11,7 @@ QtcPlugin {
|
||||
Depends { name: "ProjectExplorer" }
|
||||
Depends { name: "Debugger" }
|
||||
Depends { name: "CMakeProjectManager" }
|
||||
Depends { name: "QtSupport" }
|
||||
|
||||
files: [
|
||||
"mcusupport.qrc",
|
||||
|
@@ -8,4 +8,5 @@ QTC_PLUGIN_DEPENDS += \
|
||||
coreplugin \
|
||||
projectexplorer \
|
||||
debugger \
|
||||
cmakeprojectmanager
|
||||
cmakeprojectmanager \
|
||||
qtsupport
|
||||
|
@@ -39,6 +39,7 @@
|
||||
#include <projectexplorer/kitmanager.h>
|
||||
#include <projectexplorer/kitinformation.h>
|
||||
#include <projectexplorer/devicesupport/devicemanager.h>
|
||||
#include <qtsupport/qtversionmanager.h>
|
||||
#include <utils/algorithm.h>
|
||||
#include <utils/fileutils.h>
|
||||
#include <utils/infolabel.h>
|
||||
@@ -356,22 +357,45 @@ void McuSupportOptions::populatePackagesAndTargets()
|
||||
setQulDir(Utils::FilePath::fromUserInput(qtForMCUsSdkPackage->path()));
|
||||
}
|
||||
|
||||
static Utils::FilePath qulDocsDir()
|
||||
{
|
||||
const Utils::FilePath qulDir = McuSupportOptions::qulDirFromSettings();
|
||||
if (qulDir.isEmpty() || !qulDir.exists())
|
||||
return {};
|
||||
const Utils::FilePath docsDir = qulDir.pathAppended("docs");
|
||||
return docsDir.exists() ? docsDir : Utils::FilePath();
|
||||
}
|
||||
|
||||
void McuSupportOptions::registerQchFiles()
|
||||
{
|
||||
const QString qulDir = qulDirFromSettings().toString();
|
||||
if (qulDir.isEmpty() || !QFileInfo::exists(qulDir))
|
||||
const QString docsDir = qulDocsDir().toString();
|
||||
if (docsDir.isEmpty())
|
||||
return;
|
||||
|
||||
const QString docsPath = qulDir + "/docs/";
|
||||
const QStringList qchFiles = {
|
||||
docsPath + "quickultralite.qch",
|
||||
docsPath + "quickultralitecmake.qch"
|
||||
docsDir + "/quickultralite.qch",
|
||||
docsDir + "/quickultralitecmake.qch"
|
||||
};
|
||||
Core::HelpManager::registerDocumentation(
|
||||
Utils::filtered(qchFiles,
|
||||
[](const QString &file) { return QFileInfo::exists(file); }));
|
||||
}
|
||||
|
||||
void McuSupportOptions::registerExamples()
|
||||
{
|
||||
const Utils::FilePath docsDir = qulDocsDir();
|
||||
if (docsDir.isEmpty())
|
||||
return;
|
||||
|
||||
const Utils::FilePath examplesDir =
|
||||
McuSupportOptions::qulDirFromSettings().pathAppended("demos");
|
||||
if (!examplesDir.exists())
|
||||
return;
|
||||
|
||||
QtSupport::QtVersionManager::registerExampleSet("Qt for MCUs", docsDir.toString(),
|
||||
examplesDir.toString());
|
||||
}
|
||||
|
||||
void McuSupportOptions::deletePackagesAndTargets()
|
||||
{
|
||||
qDeleteAll(packages);
|
||||
|
@@ -168,6 +168,7 @@ public:
|
||||
ProjectExplorer::Kit *newKit(const McuTarget *mcuTarget);
|
||||
void populatePackagesAndTargets();
|
||||
static void registerQchFiles();
|
||||
static void registerExamples();
|
||||
|
||||
private:
|
||||
void deletePackagesAndTargets();
|
||||
|
@@ -76,6 +76,7 @@ bool McuSupportPlugin::initialize(const QStringList& arguments, QString* errorSt
|
||||
dd = new McuSupportPluginPrivate;
|
||||
|
||||
McuSupportOptions::registerQchFiles();
|
||||
McuSupportOptions::registerExamples();
|
||||
ProjectExplorer::JsonWizardFactory::addWizardPath(
|
||||
Utils::FilePath::fromString(":/mcusupport/wizards/"));
|
||||
|
||||
|
@@ -73,6 +73,8 @@ struct CurveItemStyleOption
|
||||
QColor color = QColor(0, 200, 0);
|
||||
QColor selectionColor = QColor(200, 200, 200);
|
||||
QColor easingCurveColor = QColor(200, 0, 200);
|
||||
QColor lockedColor = QColor(50, 50, 50);
|
||||
QColor hoverColor = QColor(200, 0, 200);
|
||||
};
|
||||
|
||||
struct PlayheadStyleOption
|
||||
|
@@ -118,10 +118,10 @@ void CurveItem::paint(QPainter *painter, const QStyleOptionGraphicsItem *, QWidg
|
||||
pen.setColor(m_style.easingCurveColor);
|
||||
} else {
|
||||
if (locked())
|
||||
pen.setColor(Qt::black);
|
||||
pen.setColor(m_style.lockedColor);
|
||||
else if (isUnderMouse())
|
||||
pen.setColor(Qt::red);
|
||||
else if (hasSelection())
|
||||
pen.setColor(m_style.hoverColor);
|
||||
else if (hasSelectedKeyframe())
|
||||
pen.setColor(m_style.selectionColor);
|
||||
else
|
||||
pen.setColor(m_style.color);
|
||||
@@ -146,7 +146,25 @@ bool CurveItem::isDirty() const
|
||||
return m_itemDirty;
|
||||
}
|
||||
|
||||
bool CurveItem::hasSelection() const
|
||||
bool CurveItem::hasActiveKeyframe() const
|
||||
{
|
||||
for (auto *frame : m_keyframes) {
|
||||
if (frame->activated())
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
bool CurveItem::hasActiveHandle() const
|
||||
{
|
||||
for (auto *frame : m_keyframes) {
|
||||
if (frame->hasActiveHandle())
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
bool CurveItem::hasSelectedKeyframe() const
|
||||
{
|
||||
for (auto *frame : m_keyframes) {
|
||||
if (frame->selected())
|
||||
@@ -203,7 +221,7 @@ std::vector<AnimationCurve> CurveItem::curves() const
|
||||
|
||||
std::vector<Keyframe> tmp;
|
||||
|
||||
for (size_t i = 0; i < m_keyframes.size(); ++i) {
|
||||
for (int i = 0; i < m_keyframes.size(); ++i) {
|
||||
KeyframeItem *item = m_keyframes[i];
|
||||
|
||||
Keyframe current = item->keyframe();
|
||||
@@ -233,6 +251,33 @@ std::vector<AnimationCurve> CurveItem::curves() const
|
||||
return out;
|
||||
}
|
||||
|
||||
QVector<KeyframeItem *> CurveItem::keyframes() const
|
||||
{
|
||||
return m_keyframes;
|
||||
}
|
||||
|
||||
QVector<KeyframeItem *> CurveItem::selectedKeyframes() const
|
||||
{
|
||||
QVector<KeyframeItem *> out;
|
||||
for (auto *frame : m_keyframes) {
|
||||
if (frame->selected())
|
||||
out.push_back(frame);
|
||||
}
|
||||
return out;
|
||||
}
|
||||
|
||||
QVector<HandleItem *> CurveItem::handles() const
|
||||
{
|
||||
QVector<HandleItem *> out;
|
||||
for (auto *frame : m_keyframes) {
|
||||
if (auto *left = frame->leftHandle())
|
||||
out.push_back(left);
|
||||
if (auto *right = frame->rightHandle())
|
||||
out.push_back(right);
|
||||
}
|
||||
return out;
|
||||
}
|
||||
|
||||
void CurveItem::restore()
|
||||
{
|
||||
if (m_keyframes.empty())
|
||||
@@ -248,7 +293,7 @@ void CurveItem::restore()
|
||||
if (prevItem->hasLeftHandle())
|
||||
prevItem->setLeftHandle(QPointF());
|
||||
|
||||
for (size_t i = 1; i < m_keyframes.size(); ++i) {
|
||||
for (int i = 1; i < m_keyframes.size(); ++i) {
|
||||
KeyframeItem *currItem = m_keyframes[i];
|
||||
|
||||
bool left = prevItem->hasRightHandle();
|
||||
@@ -328,7 +373,7 @@ void CurveItem::setInterpolation(Keyframe::Interpolation interpolation)
|
||||
return;
|
||||
|
||||
KeyframeItem *prevItem = m_keyframes[0];
|
||||
for (size_t i = 1; i < m_keyframes.size(); ++i) {
|
||||
for (int i = 1; i < m_keyframes.size(); ++i) {
|
||||
KeyframeItem *currItem = m_keyframes[i];
|
||||
if (currItem->selected()) {
|
||||
Keyframe prev = prevItem->keyframe();
|
||||
|
@@ -73,7 +73,11 @@ public:
|
||||
|
||||
bool isDirty() const;
|
||||
|
||||
bool hasSelection() const;
|
||||
bool hasActiveKeyframe() const;
|
||||
|
||||
bool hasActiveHandle() const;
|
||||
|
||||
bool hasSelectedKeyframe() const;
|
||||
|
||||
unsigned int id() const;
|
||||
|
||||
@@ -87,6 +91,12 @@ public:
|
||||
|
||||
std::vector<AnimationCurve> curves() const;
|
||||
|
||||
QVector<KeyframeItem *> keyframes() const;
|
||||
|
||||
QVector<KeyframeItem *> selectedKeyframes() const;
|
||||
|
||||
QVector<HandleItem *> handles() const;
|
||||
|
||||
void restore();
|
||||
|
||||
void setDirty(bool dirty);
|
||||
@@ -126,7 +136,7 @@ private:
|
||||
|
||||
QTransform m_transform;
|
||||
|
||||
std::vector<KeyframeItem *> m_keyframes;
|
||||
QVector<KeyframeItem *> m_keyframes;
|
||||
|
||||
bool m_itemDirty;
|
||||
};
|
||||
|
@@ -31,20 +31,60 @@
|
||||
|
||||
#include <QGraphicsSceneMouseEvent>
|
||||
|
||||
#include <cmath>
|
||||
|
||||
namespace DesignTools {
|
||||
|
||||
GraphicsScene::GraphicsScene(QObject *parent)
|
||||
: QGraphicsScene(parent)
|
||||
, m_curves()
|
||||
, m_dirty(true)
|
||||
, m_limits()
|
||||
, m_doNotMoveItems(false)
|
||||
{}
|
||||
|
||||
GraphicsScene::~GraphicsScene()
|
||||
{
|
||||
m_curves.clear();
|
||||
}
|
||||
|
||||
bool GraphicsScene::empty() const
|
||||
{
|
||||
return items().empty();
|
||||
}
|
||||
|
||||
bool GraphicsScene::hasActiveKeyframe() const
|
||||
{
|
||||
for (auto *curve : m_curves) {
|
||||
if (curve->hasActiveKeyframe())
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
bool GraphicsScene::hasActiveHandle() const
|
||||
{
|
||||
for (auto *curve : m_curves) {
|
||||
if (curve->hasActiveHandle())
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
bool GraphicsScene::hasActiveItem() const
|
||||
{
|
||||
return hasActiveKeyframe() || hasActiveHandle();
|
||||
}
|
||||
|
||||
bool GraphicsScene::hasSelectedKeyframe() const
|
||||
{
|
||||
for (auto *curve : m_curves) {
|
||||
if (curve->hasSelectedKeyframe())
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
double GraphicsScene::minimumTime() const
|
||||
{
|
||||
return limits().left();
|
||||
@@ -65,6 +105,103 @@ double GraphicsScene::maximumValue() const
|
||||
return limits().top();
|
||||
}
|
||||
|
||||
QRectF GraphicsScene::rect() const
|
||||
{
|
||||
return sceneRect();
|
||||
}
|
||||
|
||||
QVector<CurveItem *> GraphicsScene::curves() const
|
||||
{
|
||||
return m_curves;
|
||||
}
|
||||
|
||||
QVector<CurveItem *> GraphicsScene::selectedCurves() const
|
||||
{
|
||||
QVector<CurveItem *> out;
|
||||
for (auto *curve : m_curves) {
|
||||
if (curve->hasSelectedKeyframe())
|
||||
out.push_back(curve);
|
||||
}
|
||||
return out;
|
||||
}
|
||||
|
||||
QVector<KeyframeItem *> GraphicsScene::keyframes() const
|
||||
{
|
||||
QVector<KeyframeItem *> out;
|
||||
for (auto *curve : m_curves)
|
||||
out.append(curve->keyframes());
|
||||
|
||||
return out;
|
||||
}
|
||||
|
||||
QVector<KeyframeItem *> GraphicsScene::selectedKeyframes() const
|
||||
{
|
||||
QVector<KeyframeItem *> out;
|
||||
for (auto *curve : m_curves)
|
||||
out.append(curve->selectedKeyframes());
|
||||
|
||||
return out;
|
||||
}
|
||||
|
||||
CurveItem *GraphicsScene::findCurve(unsigned int id) const
|
||||
{
|
||||
for (auto *curve : m_curves) {
|
||||
if (curve->id() == id)
|
||||
return curve;
|
||||
}
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
SelectableItem *GraphicsScene::intersect(const QPointF &pos) const
|
||||
{
|
||||
auto hitTest = [pos](QGraphicsObject *item) {
|
||||
return item->mapRectToScene(item->boundingRect()).contains(pos);
|
||||
};
|
||||
|
||||
const auto frames = keyframes();
|
||||
for (auto *frame : frames) {
|
||||
if (hitTest(frame))
|
||||
return frame;
|
||||
|
||||
if (auto *leftHandle = frame->leftHandle()) {
|
||||
if (hitTest(leftHandle))
|
||||
return leftHandle;
|
||||
}
|
||||
|
||||
if (auto *rightHandle = frame->rightHandle()) {
|
||||
if (hitTest(rightHandle))
|
||||
return rightHandle;
|
||||
}
|
||||
}
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
void GraphicsScene::reset()
|
||||
{
|
||||
m_curves.clear();
|
||||
clear();
|
||||
}
|
||||
|
||||
void GraphicsScene::deleteSelectedKeyframes()
|
||||
{
|
||||
for (auto *curve : m_curves)
|
||||
curve->deleteSelectedKeyframes();
|
||||
}
|
||||
|
||||
void GraphicsScene::insertKeyframe(double time, bool all)
|
||||
{
|
||||
if (!all) {
|
||||
for (auto *curve : m_curves) {
|
||||
if (curve->isUnderMouse())
|
||||
curve->insertKeyframeByTime(std::round(time));
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
for (auto *curve : m_curves)
|
||||
curve->insertKeyframeByTime(std::round(time));
|
||||
}
|
||||
|
||||
void GraphicsScene::doNotMoveItems(bool val)
|
||||
{
|
||||
m_doNotMoveItems = val;
|
||||
@@ -76,16 +213,15 @@ void GraphicsScene::addCurveItem(CurveItem *item)
|
||||
item->setDirty(false);
|
||||
item->connect(this);
|
||||
addItem(item);
|
||||
m_curves.push_back(item);
|
||||
}
|
||||
|
||||
void GraphicsScene::setComponentTransform(const QTransform &transform)
|
||||
{
|
||||
QRectF bounds;
|
||||
const auto itemList = items();
|
||||
for (auto *item : itemList) {
|
||||
if (auto *curveItem = qgraphicsitem_cast<CurveItem *>(item))
|
||||
bounds = bounds.united(curveItem->setComponentTransform(transform));
|
||||
}
|
||||
|
||||
for (auto *curve : m_curves)
|
||||
bounds = bounds.united(curve->setComponentTransform(transform));
|
||||
|
||||
if (bounds.isNull()) {
|
||||
if (GraphicsView *gview = graphicsView())
|
||||
@@ -98,29 +234,20 @@ void GraphicsScene::setComponentTransform(const QTransform &transform)
|
||||
|
||||
void GraphicsScene::keyframeMoved(KeyframeItem *movedItem, const QPointF &direction)
|
||||
{
|
||||
const auto itemList = items();
|
||||
for (auto *item : itemList) {
|
||||
if (item == movedItem)
|
||||
continue;
|
||||
|
||||
if (auto *frameItem = qgraphicsitem_cast<KeyframeItem *>(item)) {
|
||||
if (frameItem->selected())
|
||||
frameItem->moveKeyframe(direction);
|
||||
for (auto *curve : m_curves) {
|
||||
for (auto *keyframe : curve->keyframes()) {
|
||||
if (keyframe != movedItem && keyframe->selected())
|
||||
keyframe->moveKeyframe(direction);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void GraphicsScene::handleUnderMouse(HandleItem *handle)
|
||||
{
|
||||
const auto itemList = items();
|
||||
for (auto *item : itemList) {
|
||||
if (item == handle)
|
||||
continue;
|
||||
|
||||
if (auto *keyItem = qgraphicsitem_cast<KeyframeItem *>(item)) {
|
||||
if (keyItem->selected()) {
|
||||
keyItem->setActivated(handle->isUnderMouse(), handle->slot());
|
||||
}
|
||||
for (auto *curve : m_curves) {
|
||||
for (auto *keyframe : curve->keyframes()) {
|
||||
if (keyframe->selected())
|
||||
keyframe->setActivated(handle->isUnderMouse(), handle->slot());
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -142,16 +269,13 @@ void GraphicsScene::handleMoved(KeyframeItem *frame,
|
||||
}
|
||||
};
|
||||
|
||||
const auto itemList = items();
|
||||
for (auto *item : itemList) {
|
||||
if (auto *frameItem = qgraphicsitem_cast<KeyframeItem *>(item)) {
|
||||
if (item == frame) {
|
||||
moveUnified(frameItem);
|
||||
continue;
|
||||
}
|
||||
if (frameItem->selected()) {
|
||||
frameItem->moveHandle(handle, angle, deltaLength);
|
||||
moveUnified(frameItem);
|
||||
for (auto *curve : m_curves) {
|
||||
for (auto *keyframe : curve->keyframes()) {
|
||||
if (keyframe == frame)
|
||||
moveUnified(keyframe);
|
||||
else if (keyframe->selected()) {
|
||||
keyframe->moveHandle(handle, angle, deltaLength);
|
||||
moveUnified(keyframe);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -159,27 +283,24 @@ void GraphicsScene::handleMoved(KeyframeItem *frame,
|
||||
|
||||
void GraphicsScene::setPinned(uint id, bool pinned)
|
||||
{
|
||||
const auto itemList = items();
|
||||
for (auto *item : itemList) {
|
||||
if (auto *curveItem = qgraphicsitem_cast<CurveItem *>(item)) {
|
||||
if (curveItem->id() == id)
|
||||
curveItem->setPinned(pinned);
|
||||
}
|
||||
}
|
||||
if (CurveItem *curve = findCurve(id))
|
||||
curve->setPinned(pinned);
|
||||
}
|
||||
|
||||
std::vector<CurveItem *> GraphicsScene::takePinnedItems()
|
||||
{
|
||||
std::vector<CurveItem *> out;
|
||||
const auto itemList = items();
|
||||
for (auto *item : itemList) {
|
||||
if (auto *curveItem = qgraphicsitem_cast<CurveItem *>(item)) {
|
||||
if (curveItem->pinned()) {
|
||||
removeItem(curveItem);
|
||||
out.push_back(curveItem);
|
||||
}
|
||||
}
|
||||
for (auto *curve : m_curves) {
|
||||
if (curve->pinned())
|
||||
out.push_back(curve);
|
||||
}
|
||||
|
||||
for (auto *curve : out) {
|
||||
curve->disconnect(this);
|
||||
m_curves.removeOne(curve);
|
||||
removeItem(curve);
|
||||
}
|
||||
|
||||
return out;
|
||||
}
|
||||
|
||||
@@ -187,12 +308,24 @@ void GraphicsScene::mouseMoveEvent(QGraphicsSceneMouseEvent *mouseEvent)
|
||||
{
|
||||
QGraphicsScene::mouseMoveEvent(mouseEvent);
|
||||
|
||||
const auto itemList = items();
|
||||
for (auto *item : itemList) {
|
||||
if (auto *handleItem = qgraphicsitem_cast<HandleItem *>(item))
|
||||
handleItem->setIsUnderMouse(handleItem->contains(mouseEvent->scenePos()));
|
||||
else if (auto *curveItem = qgraphicsitem_cast<CurveItem *>(item))
|
||||
curveItem->setIsUnderMouse(curveItem->contains(mouseEvent->scenePos()));
|
||||
QPointF mouse = mouseEvent->scenePos();
|
||||
bool hasHandle = false;
|
||||
|
||||
for (auto *curve : m_curves) {
|
||||
for (auto *handle : curve->handles()) {
|
||||
bool intersects = handle->contains(mouse);
|
||||
handle->setIsUnderMouse(intersects);
|
||||
if (intersects)
|
||||
hasHandle = true;
|
||||
}
|
||||
}
|
||||
|
||||
if (hasHandle) {
|
||||
for (auto *curve : m_curves)
|
||||
curve->setIsUnderMouse(false);
|
||||
} else {
|
||||
for (auto *curve : m_curves)
|
||||
curve->setIsUnderMouse(curve->contains(mouseEvent->scenePos()));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -200,17 +333,13 @@ void GraphicsScene::mouseReleaseEvent(QGraphicsSceneMouseEvent *mouseEvent)
|
||||
{
|
||||
QGraphicsScene::mouseReleaseEvent(mouseEvent);
|
||||
|
||||
const auto itemList = items();
|
||||
for (auto *item : itemList) {
|
||||
if (auto *curveItem = qgraphicsitem_cast<CurveItem *>(item)) {
|
||||
// CurveItems might become invalid after a keyframe-drag operation.
|
||||
curveItem->restore();
|
||||
|
||||
if (curveItem->isDirty()) {
|
||||
m_dirty = true;
|
||||
curveItem->setDirty(false);
|
||||
emit curveChanged(curveItem->id(), curveItem->curve());
|
||||
}
|
||||
for (auto *curve : m_curves) {
|
||||
// CurveItems might become invalid after a keyframe-drag operation.
|
||||
curve->restore();
|
||||
if (curve->isDirty()) {
|
||||
m_dirty = true;
|
||||
curve->setDirty(false);
|
||||
emit curveChanged(curve->id(), curve->curve());
|
||||
}
|
||||
}
|
||||
|
||||
@@ -218,40 +347,11 @@ void GraphicsScene::mouseReleaseEvent(QGraphicsSceneMouseEvent *mouseEvent)
|
||||
graphicsView()->setZoomY(0.0);
|
||||
}
|
||||
|
||||
bool GraphicsScene::hasActiveKeyframe() const
|
||||
{
|
||||
const auto itemList = items();
|
||||
for (auto *item : itemList) {
|
||||
if (auto *kitem = qgraphicsitem_cast<KeyframeItem *>(item)) {
|
||||
if (kitem->activated())
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
bool GraphicsScene::hasActiveHandle() const
|
||||
{
|
||||
const auto itemList = items();
|
||||
for (auto *item : itemList) {
|
||||
if (auto *hitem = qgraphicsitem_cast<HandleItem *>(item)) {
|
||||
if (hitem->activated())
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
bool GraphicsScene::hasActiveItem() const
|
||||
{
|
||||
return hasActiveKeyframe() || hasActiveHandle();
|
||||
}
|
||||
|
||||
GraphicsView *GraphicsScene::graphicsView() const
|
||||
{
|
||||
const QList<QGraphicsView *> viewList = views();
|
||||
for (auto &&view : viewList) {
|
||||
if (GraphicsView *gview = qobject_cast<GraphicsView *>(view))
|
||||
if (viewList.size() == 1) {
|
||||
if (GraphicsView *gview = qobject_cast<GraphicsView *>(viewList.at(0)))
|
||||
return gview;
|
||||
}
|
||||
return nullptr;
|
||||
@@ -263,22 +363,19 @@ QRectF GraphicsScene::limits() const
|
||||
QPointF min(std::numeric_limits<double>::max(), std::numeric_limits<double>::max());
|
||||
QPointF max(std::numeric_limits<double>::lowest(), std::numeric_limits<double>::lowest());
|
||||
|
||||
const auto itemList = items();
|
||||
for (auto *item : itemList) {
|
||||
if (auto *curveItem = qgraphicsitem_cast<CurveItem *>(item)) {
|
||||
auto curve = curveItem->resolvedCurve();
|
||||
if (min.x() > curve.minimumTime())
|
||||
min.rx() = curve.minimumTime();
|
||||
for (auto *curveItem : m_curves) {
|
||||
auto curve = curveItem->resolvedCurve();
|
||||
if (min.x() > curve.minimumTime())
|
||||
min.rx() = curve.minimumTime();
|
||||
|
||||
if (min.y() > curve.minimumValue())
|
||||
min.ry() = curve.minimumValue();
|
||||
if (min.y() > curve.minimumValue())
|
||||
min.ry() = curve.minimumValue();
|
||||
|
||||
if (max.x() < curve.maximumTime())
|
||||
max.rx() = curve.maximumTime();
|
||||
if (max.x() < curve.maximumTime())
|
||||
max.rx() = curve.maximumTime();
|
||||
|
||||
if (max.y() < curve.maximumValue())
|
||||
max.ry() = curve.maximumValue();
|
||||
}
|
||||
if (max.y() < curve.maximumValue())
|
||||
max.ry() = curve.maximumValue();
|
||||
}
|
||||
|
||||
m_limits = QRectF(QPointF(min.x(), max.y()), QPointF(max.x(), min.y()));
|
||||
|
@@ -45,6 +45,8 @@ signals:
|
||||
public:
|
||||
GraphicsScene(QObject *parent = nullptr);
|
||||
|
||||
~GraphicsScene() override;
|
||||
|
||||
bool empty() const;
|
||||
|
||||
bool hasActiveKeyframe() const;
|
||||
@@ -53,6 +55,8 @@ public:
|
||||
|
||||
bool hasActiveItem() const;
|
||||
|
||||
bool hasSelectedKeyframe() const;
|
||||
|
||||
double minimumTime() const;
|
||||
|
||||
double maximumTime() const;
|
||||
@@ -61,6 +65,28 @@ public:
|
||||
|
||||
double maximumValue() const;
|
||||
|
||||
QRectF rect() const;
|
||||
|
||||
QVector<CurveItem *> curves() const;
|
||||
|
||||
QVector<CurveItem *> selectedCurves() const;
|
||||
|
||||
QVector<KeyframeItem *> keyframes() const;
|
||||
|
||||
QVector<KeyframeItem *> selectedKeyframes() const;
|
||||
|
||||
QVector<HandleItem *> handles() const;
|
||||
|
||||
CurveItem *findCurve(unsigned int id) const;
|
||||
|
||||
SelectableItem *intersect(const QPointF &pos) const;
|
||||
|
||||
void reset();
|
||||
|
||||
void deleteSelectedKeyframes();
|
||||
|
||||
void insertKeyframe(double time, bool all = false);
|
||||
|
||||
void doNotMoveItems(bool tmp);
|
||||
|
||||
void addCurveItem(CurveItem *item);
|
||||
@@ -85,10 +111,16 @@ protected:
|
||||
private:
|
||||
using QGraphicsScene::addItem;
|
||||
|
||||
using QGraphicsScene::clear;
|
||||
|
||||
using QGraphicsScene::removeItem;
|
||||
|
||||
GraphicsView *graphicsView() const;
|
||||
|
||||
QRectF limits() const;
|
||||
|
||||
QVector<CurveItem *> m_curves;
|
||||
|
||||
mutable bool m_dirty;
|
||||
|
||||
mutable QRectF m_limits;
|
||||
|
@@ -43,7 +43,7 @@ GraphicsView::GraphicsView(CurveEditorModel *model, QWidget *parent)
|
||||
, m_zoomX(0.0)
|
||||
, m_zoomY(0.0)
|
||||
, m_transform()
|
||||
, m_scene()
|
||||
, m_scene(new GraphicsScene())
|
||||
, m_model(model)
|
||||
, m_playhead(this)
|
||||
, m_selector()
|
||||
@@ -52,7 +52,7 @@ GraphicsView::GraphicsView(CurveEditorModel *model, QWidget *parent)
|
||||
{
|
||||
model->setGraphicsView(this);
|
||||
|
||||
setScene(&m_scene);
|
||||
setScene(m_scene);
|
||||
setAlignment(Qt::AlignLeft | Qt::AlignVCenter);
|
||||
setResizeAnchor(QGraphicsView::NoAnchor);
|
||||
setRenderHint(QPainter::Antialiasing, true);
|
||||
@@ -68,15 +68,23 @@ GraphicsView::GraphicsView(CurveEditorModel *model, QWidget *parent)
|
||||
m_model->setCurve(id, curve);
|
||||
};
|
||||
|
||||
connect(&m_scene, &GraphicsScene::curveChanged, itemSlot);
|
||||
connect(m_scene, &GraphicsScene::curveChanged, itemSlot);
|
||||
|
||||
auto pinSlot = [this](PropertyTreeItem *pti) { m_scene.setPinned(pti->id(), pti->pinned()); };
|
||||
auto pinSlot = [this](PropertyTreeItem *pti) { m_scene->setPinned(pti->id(), pti->pinned()); };
|
||||
connect(m_model, &CurveEditorModel::curveChanged, pinSlot);
|
||||
|
||||
applyZoom(m_zoomX, m_zoomY);
|
||||
update();
|
||||
}
|
||||
|
||||
GraphicsView::~GraphicsView()
|
||||
{
|
||||
if (m_scene) {
|
||||
delete m_scene;
|
||||
m_scene = nullptr;
|
||||
}
|
||||
}
|
||||
|
||||
CurveEditorModel *GraphicsView::model() const
|
||||
{
|
||||
return m_model;
|
||||
@@ -87,48 +95,26 @@ CurveEditorStyle GraphicsView::editorStyle() const
|
||||
return m_style;
|
||||
}
|
||||
|
||||
bool GraphicsView::hasActiveItem() const
|
||||
{
|
||||
return m_scene.hasActiveItem();
|
||||
}
|
||||
|
||||
bool GraphicsView::hasActiveHandle() const
|
||||
{
|
||||
return m_scene.hasActiveHandle();
|
||||
}
|
||||
|
||||
bool GraphicsView::hasSelectedKeyframe() const
|
||||
{
|
||||
const auto itemList = items();
|
||||
for (auto *item : itemList) {
|
||||
if (auto *curveItem = qgraphicsitem_cast<CurveItem *>(item)) {
|
||||
if (curveItem->hasSelection())
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
double GraphicsView::minimumTime() const
|
||||
{
|
||||
bool check = m_model->minimumTime() < m_scene.minimumTime();
|
||||
return check ? m_model->minimumTime() : m_scene.minimumTime();
|
||||
bool check = m_model->minimumTime() < m_scene->minimumTime();
|
||||
return check ? m_model->minimumTime() : m_scene->minimumTime();
|
||||
}
|
||||
|
||||
double GraphicsView::maximumTime() const
|
||||
{
|
||||
bool check = m_model->maximumTime() > m_scene.maximumTime();
|
||||
return check ? m_model->maximumTime() : m_scene.maximumTime();
|
||||
bool check = m_model->maximumTime() > m_scene->maximumTime();
|
||||
return check ? m_model->maximumTime() : m_scene->maximumTime();
|
||||
}
|
||||
|
||||
double GraphicsView::minimumValue() const
|
||||
{
|
||||
return m_scene.empty() ? -1.0 : m_scene.minimumValue();
|
||||
return m_scene->empty() ? -1.0 : m_scene->minimumValue();
|
||||
}
|
||||
|
||||
double GraphicsView::maximumValue() const
|
||||
{
|
||||
return m_scene.empty() ? 1.0 : m_scene.maximumValue();
|
||||
return m_scene->empty() ? 1.0 : m_scene->maximumValue();
|
||||
}
|
||||
|
||||
double GraphicsView::zoomX() const
|
||||
@@ -179,11 +165,9 @@ void GraphicsView::setStyle(const CurveEditorStyle &style)
|
||||
{
|
||||
m_style = style;
|
||||
|
||||
const auto itemList = items();
|
||||
for (auto *item : itemList) {
|
||||
if (auto *curveItem = qgraphicsitem_cast<CurveItem *>(item))
|
||||
curveItem->setStyle(style);
|
||||
}
|
||||
const auto curves = m_scene->curves();
|
||||
for (auto *curve : curves)
|
||||
curve->setStyle(style);
|
||||
|
||||
applyZoom(m_zoomX, m_zoomY);
|
||||
viewport()->update();
|
||||
@@ -191,12 +175,8 @@ void GraphicsView::setStyle(const CurveEditorStyle &style)
|
||||
|
||||
void GraphicsView::setLocked(PropertyTreeItem *item)
|
||||
{
|
||||
const auto itemList = items();
|
||||
for (auto *gitem : itemList) {
|
||||
if (auto *citem = qgraphicsitem_cast<CurveItem *>(gitem))
|
||||
if (item->id() == citem->id())
|
||||
citem->setLocked(item->locked());
|
||||
}
|
||||
if (CurveItem *curve = m_scene->findCurve(item->id()))
|
||||
curve->setLocked(item->locked());
|
||||
}
|
||||
|
||||
void GraphicsView::setZoomX(double zoom, const QPoint &pivot)
|
||||
@@ -231,9 +211,9 @@ void GraphicsView::scrollContent(double x, double y)
|
||||
|
||||
void GraphicsView::reset(const std::vector<CurveItem *> &items)
|
||||
{
|
||||
m_scene.clear();
|
||||
m_scene->reset();
|
||||
for (auto *item : items)
|
||||
m_scene.addCurveItem(item);
|
||||
m_scene->addCurveItem(item);
|
||||
|
||||
applyZoom(m_zoomX, m_zoomY);
|
||||
viewport()->update();
|
||||
@@ -241,49 +221,31 @@ void GraphicsView::reset(const std::vector<CurveItem *> &items)
|
||||
|
||||
void GraphicsView::updateSelection(const std::vector<CurveItem *> &items)
|
||||
{
|
||||
const std::vector<CurveItem *> pinnedItems = m_scene.takePinnedItems();
|
||||
auto notPinned = [pinnedItems](CurveItem *item) {
|
||||
for (auto *pinned : pinnedItems) {
|
||||
if (pinned->id() == item->id())
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
};
|
||||
|
||||
m_scene.clear();
|
||||
for (auto *item : items) {
|
||||
if (notPinned(item))
|
||||
m_scene.addCurveItem(item);
|
||||
std::vector<CurveItem *> preservedItems = m_scene->takePinnedItems();
|
||||
for (auto *curve : items) {
|
||||
auto finder = [curve](CurveItem *item) { return curve->id() == item->id(); };
|
||||
auto iter = std::find_if(preservedItems.begin(), preservedItems.end(), finder);
|
||||
if (iter == preservedItems.end())
|
||||
preservedItems.push_back(curve);
|
||||
}
|
||||
|
||||
for (auto *item : pinnedItems)
|
||||
m_scene.addCurveItem(item);
|
||||
|
||||
applyZoom(m_zoomX, m_zoomY);
|
||||
viewport()->update();
|
||||
reset(preservedItems);
|
||||
}
|
||||
|
||||
void GraphicsView::setInterpolation(Keyframe::Interpolation interpol)
|
||||
{
|
||||
const auto itemList = items();
|
||||
for (auto *item : itemList) {
|
||||
if (auto *citem = qgraphicsitem_cast<CurveItem *>(item))
|
||||
if (citem->hasSelection())
|
||||
citem->setInterpolation(interpol);
|
||||
}
|
||||
const auto selectedCurves = m_scene->selectedCurves();
|
||||
for (auto *curve : selectedCurves)
|
||||
curve->setInterpolation(interpol);
|
||||
|
||||
viewport()->update();
|
||||
}
|
||||
|
||||
void GraphicsView::toggleUnified()
|
||||
{
|
||||
const auto itemList = items();
|
||||
for (auto *item : itemList) {
|
||||
if (auto *citem = qgraphicsitem_cast<CurveItem *>(item)) {
|
||||
if (citem->hasSelection())
|
||||
citem->toggleUnified();
|
||||
}
|
||||
}
|
||||
const auto selectedCurves = m_scene->selectedCurves();
|
||||
for (auto *curve : selectedCurves)
|
||||
curve->toggleUnified();
|
||||
|
||||
viewport()->update();
|
||||
}
|
||||
|
||||
@@ -299,7 +261,7 @@ void GraphicsView::keyPressEvent(QKeyEvent *event)
|
||||
if (shortcut == m_style.shortcuts.frameAll)
|
||||
applyZoom(0.0, 0.0);
|
||||
else if (shortcut == m_style.shortcuts.deleteKeyframe)
|
||||
deleteSelectedKeyframes();
|
||||
m_scene->deleteSelectedKeyframes();
|
||||
}
|
||||
|
||||
void GraphicsView::mousePressEvent(QMouseEvent *event)
|
||||
@@ -309,7 +271,7 @@ void GraphicsView::mousePressEvent(QMouseEvent *event)
|
||||
|
||||
Shortcut shortcut(event);
|
||||
if (shortcut == m_style.shortcuts.insertKeyframe) {
|
||||
insertKeyframe(globalToRaster(event->globalPos()).x());
|
||||
m_scene->insertKeyframe(globalToRaster(event->globalPos()).x());
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -325,7 +287,7 @@ void GraphicsView::mousePressEvent(QMouseEvent *event)
|
||||
|
||||
QGraphicsView::mousePressEvent(event);
|
||||
|
||||
m_selector.mousePress(event, this);
|
||||
m_selector.mousePress(event, this, m_scene);
|
||||
}
|
||||
|
||||
void GraphicsView::mouseMoveEvent(QMouseEvent *event)
|
||||
@@ -335,7 +297,7 @@ void GraphicsView::mouseMoveEvent(QMouseEvent *event)
|
||||
|
||||
QGraphicsView::mouseMoveEvent(event);
|
||||
|
||||
m_selector.mouseMove(event, this, m_playhead);
|
||||
m_selector.mouseMove(event, this, m_scene, m_playhead);
|
||||
}
|
||||
|
||||
void GraphicsView::mouseReleaseEvent(QMouseEvent *event)
|
||||
@@ -343,7 +305,7 @@ void GraphicsView::mouseReleaseEvent(QMouseEvent *event)
|
||||
QGraphicsView::mouseReleaseEvent(event);
|
||||
|
||||
m_playhead.mouseRelease(this);
|
||||
m_selector.mouseRelease(event, this);
|
||||
m_selector.mouseRelease(event, m_scene);
|
||||
this->viewport()->update();
|
||||
}
|
||||
|
||||
@@ -371,16 +333,16 @@ void GraphicsView::contextMenuEvent(QContextMenuEvent *event)
|
||||
|
||||
menu.addSeparator();
|
||||
auto insertKeyframes = [this, event]() {
|
||||
insertKeyframe(globalToRaster(event->globalPos()).x(), true);
|
||||
m_scene->insertKeyframe(globalToRaster(event->globalPos()).x(), true);
|
||||
};
|
||||
QAction *insertKeyframeAction = menu.addAction(tr("Insert Keyframe"));
|
||||
connect(insertKeyframeAction, &QAction::triggered, insertKeyframes);
|
||||
|
||||
auto deleteKeyframes = [this, event] { deleteSelectedKeyframes(); };
|
||||
auto deleteKeyframes = [this, event] { m_scene->deleteSelectedKeyframes(); };
|
||||
QAction *deleteKeyframeAction = menu.addAction(tr("Delete Selected Keyframes"));
|
||||
connect(deleteKeyframeAction, &QAction::triggered, deleteKeyframes);
|
||||
|
||||
if (!hasSelectedKeyframe())
|
||||
if (!m_scene->hasSelectedKeyframe())
|
||||
deleteKeyframeAction->setEnabled(false);
|
||||
|
||||
menu.exec(event->globalPos());
|
||||
@@ -445,7 +407,7 @@ QPointF GraphicsView::globalToRaster(const QPoint &point) const
|
||||
|
||||
void GraphicsView::applyZoom(double x, double y, const QPoint &pivot)
|
||||
{
|
||||
m_scene.doNotMoveItems(true);
|
||||
m_scene->doNotMoveItems(true);
|
||||
|
||||
QPointF pivotRaster(globalToRaster(pivot));
|
||||
|
||||
@@ -469,9 +431,9 @@ void GraphicsView::applyZoom(double x, double y, const QPoint &pivot)
|
||||
double scaleY = lerp(clamp(m_zoomY, 0.0, 1.0), -yZoomedOut, -yZoomedIn);
|
||||
|
||||
m_transform = QTransform::fromScale(scaleX, scaleY);
|
||||
m_scene.setComponentTransform(m_transform);
|
||||
m_scene->setComponentTransform(m_transform);
|
||||
|
||||
QRectF sr = m_scene.sceneRect().adjusted(
|
||||
QRectF sr = m_scene->rect().adjusted(
|
||||
-m_style.valueAxisWidth - m_style.canvasMargin,
|
||||
-m_style.timeAxisHeight - m_style.canvasMargin,
|
||||
m_style.canvasMargin,
|
||||
@@ -486,29 +448,7 @@ void GraphicsView::applyZoom(double x, double y, const QPoint &pivot)
|
||||
scrollContent(mapTimeToX(deltaTransformed.x()), mapValueToY(deltaTransformed.y()));
|
||||
}
|
||||
|
||||
m_scene.doNotMoveItems(false);
|
||||
}
|
||||
|
||||
void GraphicsView::insertKeyframe(double time, bool allVisibleCurves)
|
||||
{
|
||||
const auto itemList = items();
|
||||
for (auto *item : itemList) {
|
||||
if (auto *curveItem = qgraphicsitem_cast<CurveItem *>(item)) {
|
||||
if (allVisibleCurves)
|
||||
curveItem->insertKeyframeByTime(std::round(time));
|
||||
else if (curveItem->isUnderMouse())
|
||||
curveItem->insertKeyframeByTime(std::round(time));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void GraphicsView::deleteSelectedKeyframes()
|
||||
{
|
||||
const auto itemList = items();
|
||||
for (auto *item : itemList) {
|
||||
if (auto *curveItem = qgraphicsitem_cast<CurveItem *>(item))
|
||||
curveItem->deleteSelectedKeyframes();
|
||||
}
|
||||
m_scene->doNotMoveItems(false);
|
||||
}
|
||||
|
||||
void GraphicsView::drawGrid(QPainter *painter, const QRectF &rect)
|
||||
@@ -551,7 +491,7 @@ void GraphicsView::drawExtremaX(QPainter *painter, const QRectF &rect)
|
||||
|
||||
void GraphicsView::drawExtremaY(QPainter *painter, const QRectF &rect)
|
||||
{
|
||||
if (m_scene.empty())
|
||||
if (m_scene->empty())
|
||||
return;
|
||||
|
||||
auto drawHorizontalLine = [rect, painter](double position) {
|
||||
@@ -560,8 +500,8 @@ void GraphicsView::drawExtremaY(QPainter *painter, const QRectF &rect)
|
||||
|
||||
painter->save();
|
||||
painter->setPen(Qt::blue);
|
||||
drawHorizontalLine(mapValueToY(m_scene.minimumValue()));
|
||||
drawHorizontalLine(mapValueToY(m_scene.maximumValue()));
|
||||
drawHorizontalLine(mapValueToY(m_scene->minimumValue()));
|
||||
drawHorizontalLine(mapValueToY(m_scene->maximumValue()));
|
||||
|
||||
painter->restore();
|
||||
}
|
||||
|
@@ -52,16 +52,12 @@ signals:
|
||||
public:
|
||||
GraphicsView(CurveEditorModel *model, QWidget *parent = nullptr);
|
||||
|
||||
~GraphicsView() override;
|
||||
|
||||
CurveEditorModel *model() const;
|
||||
|
||||
CurveEditorStyle editorStyle() const;
|
||||
|
||||
bool hasActiveItem() const;
|
||||
|
||||
bool hasActiveHandle() const;
|
||||
|
||||
bool hasSelectedKeyframe() const;
|
||||
|
||||
int mapTimeToX(double time) const;
|
||||
|
||||
int mapValueToY(double value) const;
|
||||
@@ -136,10 +132,6 @@ protected:
|
||||
private:
|
||||
void applyZoom(double x, double y, const QPoint &pivot = QPoint());
|
||||
|
||||
void insertKeyframe(double time, bool allVisibleCurves = false);
|
||||
|
||||
void deleteSelectedKeyframes();
|
||||
|
||||
void drawGrid(QPainter *painter, const QRectF &rect);
|
||||
|
||||
#if 0
|
||||
@@ -167,7 +159,7 @@ private:
|
||||
|
||||
QTransform m_transform;
|
||||
|
||||
GraphicsScene m_scene;
|
||||
GraphicsScene *m_scene;
|
||||
|
||||
CurveEditorModel *m_model;
|
||||
|
||||
|
@@ -64,6 +64,22 @@ int HandleItem::type() const
|
||||
return Type;
|
||||
}
|
||||
|
||||
bool HandleItem::keyframeSelected() const
|
||||
{
|
||||
if (auto *frame = keyframe())
|
||||
return frame->selected();
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
KeyframeItem *HandleItem::keyframe() const
|
||||
{
|
||||
if (KeyframeItem *parent = qgraphicsitem_cast<KeyframeItem *>(parentItem()))
|
||||
return parent;
|
||||
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
HandleItem::Slot HandleItem::slot() const
|
||||
{
|
||||
return m_slot;
|
||||
@@ -77,7 +93,7 @@ QRectF HandleItem::boundingRect() const
|
||||
|
||||
bool HandleItem::contains(const QPointF &point) const
|
||||
{
|
||||
if (KeyframeItem *parent = qgraphicsitem_cast<KeyframeItem *>(parentItem())) {
|
||||
if (KeyframeItem *parent = keyframe()) {
|
||||
HandleGeometry geom(pos(), m_style);
|
||||
geom.handle.moveCenter(parent->pos() + pos());
|
||||
return geom.handle.contains(point);
|
||||
@@ -130,7 +146,7 @@ void HandleItem::setStyle(const CurveEditorStyle &style)
|
||||
QVariant HandleItem::itemChange(QGraphicsItem::GraphicsItemChange change, const QVariant &value)
|
||||
{
|
||||
if (change == ItemPositionChange) {
|
||||
if (qgraphicsitem_cast<KeyframeItem *>(parentItem())) {
|
||||
if (keyframe()) {
|
||||
QPointF pos = value.toPointF();
|
||||
if (m_slot == HandleItem::Slot::Left) {
|
||||
if (pos.x() > 0.0)
|
||||
|
@@ -30,6 +30,8 @@
|
||||
|
||||
namespace DesignTools {
|
||||
|
||||
class KeyframeItem;
|
||||
|
||||
class HandleItem : public SelectableItem
|
||||
{
|
||||
Q_OBJECT
|
||||
@@ -53,6 +55,10 @@ public:
|
||||
|
||||
void underMouseCallback() override;
|
||||
|
||||
bool keyframeSelected() const;
|
||||
|
||||
KeyframeItem *keyframe() const;
|
||||
|
||||
Slot slot() const;
|
||||
|
||||
void setStyle(const CurveEditorStyle &style);
|
||||
|
@@ -116,6 +116,27 @@ bool KeyframeItem::hasRightHandle() const
|
||||
return m_frame.hasRightHandle();
|
||||
}
|
||||
|
||||
bool KeyframeItem::hasActiveHandle() const
|
||||
{
|
||||
if (m_left && m_left->activated())
|
||||
return true;
|
||||
|
||||
if (m_right && m_right->activated())
|
||||
return true;
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
HandleItem *KeyframeItem::leftHandle() const
|
||||
{
|
||||
return m_left;
|
||||
}
|
||||
|
||||
HandleItem *KeyframeItem::rightHandle() const
|
||||
{
|
||||
return m_right;
|
||||
}
|
||||
|
||||
QTransform KeyframeItem::transform() const
|
||||
{
|
||||
return m_transform;
|
||||
|
@@ -72,6 +72,12 @@ public:
|
||||
|
||||
bool hasRightHandle() const;
|
||||
|
||||
bool hasActiveHandle() const;
|
||||
|
||||
HandleItem *leftHandle() const;
|
||||
|
||||
HandleItem *rightHandle() const;
|
||||
|
||||
QTransform transform() const;
|
||||
|
||||
void setHandleVisibility(bool visible);
|
||||
|
@@ -83,7 +83,6 @@ SelectableItem::SelectableItem(QGraphicsItem *parent)
|
||||
: CurveEditorItem(parent)
|
||||
, m_active(false)
|
||||
, m_selected(false)
|
||||
, m_locked(false)
|
||||
, m_preSelected(SelectionMode::Undefined)
|
||||
{
|
||||
setFlag(QGraphicsItem::ItemIsSelectable, false);
|
||||
@@ -139,7 +138,7 @@ void SelectableItem::setSelected(bool selected)
|
||||
|
||||
void SelectableItem::setPreselected(SelectionMode mode)
|
||||
{
|
||||
if (m_locked)
|
||||
if (locked())
|
||||
return;
|
||||
|
||||
m_preSelected = mode;
|
||||
@@ -158,7 +157,7 @@ void SelectableItem::selectionCallback() {}
|
||||
|
||||
void SelectableItem::mousePressEvent(QGraphicsSceneMouseEvent *event)
|
||||
{
|
||||
if (m_locked)
|
||||
if (locked())
|
||||
return;
|
||||
|
||||
m_active = true;
|
||||
@@ -168,7 +167,7 @@ void SelectableItem::mousePressEvent(QGraphicsSceneMouseEvent *event)
|
||||
|
||||
void SelectableItem::mouseMoveEvent(QGraphicsSceneMouseEvent *event)
|
||||
{
|
||||
if (m_locked)
|
||||
if (locked())
|
||||
return;
|
||||
|
||||
if (type() == KeyframeItem::Type && !selected())
|
||||
@@ -179,7 +178,7 @@ void SelectableItem::mouseMoveEvent(QGraphicsSceneMouseEvent *event)
|
||||
|
||||
void SelectableItem::mouseReleaseEvent(QGraphicsSceneMouseEvent *event)
|
||||
{
|
||||
if (m_locked)
|
||||
if (locked())
|
||||
return;
|
||||
|
||||
m_active = false;
|
||||
|
@@ -99,8 +99,6 @@ private:
|
||||
|
||||
bool m_selected;
|
||||
|
||||
bool m_locked;
|
||||
|
||||
SelectionMode m_preSelected;
|
||||
};
|
||||
|
||||
|
@@ -23,6 +23,7 @@
|
||||
**
|
||||
****************************************************************************/
|
||||
#include "selector.h"
|
||||
#include "graphicsscene.h"
|
||||
#include "graphicsview.h"
|
||||
#include "keyframeitem.h"
|
||||
#include "playhead.h"
|
||||
@@ -55,29 +56,40 @@ void Selector::paint(QPainter *painter)
|
||||
painter->restore();
|
||||
}
|
||||
|
||||
void Selector::mousePress(QMouseEvent *event, GraphicsView *view)
|
||||
void Selector::mousePress(QMouseEvent *event, GraphicsView *view, GraphicsScene *scene)
|
||||
{
|
||||
m_shortcut = Shortcut(event);
|
||||
|
||||
if (view->hasActiveHandle())
|
||||
return;
|
||||
QPointF click = view->globalToScene(event->globalPos());
|
||||
|
||||
m_mouseInit = event->globalPos();
|
||||
m_mouseCurr = event->globalPos();
|
||||
if (SelectableItem *sitem = scene->intersect(click)) {
|
||||
KeyframeItem *kitem = qobject_cast<KeyframeItem *>(sitem);
|
||||
if (HandleItem *hitem = qobject_cast<HandleItem *>(sitem))
|
||||
kitem = hitem->keyframe();
|
||||
|
||||
QPointF click = view->globalToScene(m_mouseInit);
|
||||
if (!kitem->selected()) {
|
||||
if (select(SelectionTool::Undefined, click, scene))
|
||||
applyPreSelection(scene);
|
||||
}
|
||||
} else {
|
||||
if (select(SelectionTool::Undefined, click, scene))
|
||||
applyPreSelection(scene);
|
||||
|
||||
if (!isOverSelectedKeyframe(click, view))
|
||||
if (select(SelectionTool::Undefined, click, view))
|
||||
applyPreSelection(view);
|
||||
// Init selection tools.
|
||||
m_mouseInit = event->globalPos();
|
||||
m_mouseCurr = event->globalPos();
|
||||
|
||||
m_lasso = QPainterPath(click);
|
||||
m_lasso.closeSubpath();
|
||||
m_lasso = QPainterPath(click);
|
||||
m_lasso.closeSubpath();
|
||||
|
||||
m_rect = QRectF(click, click);
|
||||
m_rect = QRectF(click, click);
|
||||
}
|
||||
}
|
||||
|
||||
void Selector::mouseMove(QMouseEvent *event, GraphicsView *view, Playhead &playhead)
|
||||
void Selector::mouseMove(QMouseEvent *event,
|
||||
GraphicsView *view,
|
||||
GraphicsScene *scene,
|
||||
Playhead &playhead)
|
||||
{
|
||||
if (m_mouseInit.isNull())
|
||||
return;
|
||||
@@ -89,10 +101,10 @@ void Selector::mouseMove(QMouseEvent *event, GraphicsView *view, Playhead &playh
|
||||
if (m_shortcut == m_shortcuts.newSelection || m_shortcut == m_shortcuts.addToSelection
|
||||
|| m_shortcut == m_shortcuts.removeFromSelection
|
||||
|| m_shortcut == m_shortcuts.toggleSelection) {
|
||||
if (view->hasActiveItem())
|
||||
if (scene->hasActiveItem())
|
||||
return;
|
||||
|
||||
select(m_tool, view->globalToScene(event->globalPos()), view);
|
||||
select(m_tool, view->globalToScene(event->globalPos()), scene);
|
||||
|
||||
event->accept();
|
||||
view->viewport()->update();
|
||||
@@ -111,11 +123,11 @@ void Selector::mouseMove(QMouseEvent *event, GraphicsView *view, Playhead &playh
|
||||
}
|
||||
}
|
||||
|
||||
void Selector::mouseRelease(QMouseEvent *event, GraphicsView *view)
|
||||
void Selector::mouseRelease(QMouseEvent *event, GraphicsScene *scene)
|
||||
{
|
||||
Q_UNUSED(event)
|
||||
|
||||
applyPreSelection(view);
|
||||
applyPreSelection(scene);
|
||||
|
||||
m_shortcut = Shortcut();
|
||||
m_mouseInit = QPoint();
|
||||
@@ -124,50 +136,73 @@ void Selector::mouseRelease(QMouseEvent *event, GraphicsView *view)
|
||||
m_rect = QRectF();
|
||||
}
|
||||
|
||||
bool Selector::isOverSelectedKeyframe(const QPointF &pos, GraphicsView *view)
|
||||
bool Selector::isOverMovableItem(const QPointF &pos, GraphicsScene *scene)
|
||||
{
|
||||
const auto itemList = view->items();
|
||||
for (auto *item : itemList) {
|
||||
if (auto *frame = qgraphicsitem_cast<KeyframeItem *>(item)) {
|
||||
QRectF itemRect = frame->mapRectToScene(frame->boundingRect());
|
||||
if (itemRect.contains(pos))
|
||||
return frame->selected();
|
||||
auto intersect = [pos](QGraphicsObject *item) {
|
||||
return item->mapRectToScene(item->boundingRect()).contains(pos);
|
||||
};
|
||||
|
||||
const auto frames = scene->keyframes();
|
||||
for (auto *frame : frames) {
|
||||
if (intersect(frame))
|
||||
return true;
|
||||
|
||||
if (auto *leftHandle = frame->leftHandle()) {
|
||||
if (intersect(leftHandle))
|
||||
return true;
|
||||
}
|
||||
|
||||
if (auto *rightHandle = frame->rightHandle()) {
|
||||
if (intersect(rightHandle))
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
bool Selector::select(const SelectionTool &tool, const QPointF &pos, GraphicsView *view)
|
||||
bool Selector::isOverSelectedKeyframe(const QPointF &pos, GraphicsScene *scene)
|
||||
{
|
||||
auto selectWidthTool = [this, tool](SelectionMode mode, const QPointF &pos, GraphicsView *view) {
|
||||
const auto frames = scene->selectedKeyframes();
|
||||
for (auto *frame : frames) {
|
||||
QRectF frameRect = frame->mapRectToScene(frame->boundingRect());
|
||||
if (frameRect.contains(pos))
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
bool Selector::select(const SelectionTool &tool, const QPointF &pos, GraphicsScene *scene)
|
||||
{
|
||||
auto selectWidthTool = [this,
|
||||
tool](SelectionMode mode, const QPointF &pos, GraphicsScene *scene) {
|
||||
switch (tool) {
|
||||
case SelectionTool::Lasso:
|
||||
return lassoSelection(mode, pos, view);
|
||||
return lassoSelection(mode, pos, scene);
|
||||
case SelectionTool::Rectangle:
|
||||
return rectangleSelection(mode, pos, view);
|
||||
return rectangleSelection(mode, pos, scene);
|
||||
default:
|
||||
return pressSelection(mode, pos, view);
|
||||
return pressSelection(mode, pos, scene);
|
||||
}
|
||||
};
|
||||
|
||||
if (m_shortcut == m_shortcuts.newSelection) {
|
||||
clearSelection(view);
|
||||
return selectWidthTool(SelectionMode::New, pos, view);
|
||||
clearSelection(scene);
|
||||
return selectWidthTool(SelectionMode::New, pos, scene);
|
||||
} else if (m_shortcut == m_shortcuts.addToSelection) {
|
||||
return selectWidthTool(SelectionMode::Add, pos, view);
|
||||
return selectWidthTool(SelectionMode::Add, pos, scene);
|
||||
} else if (m_shortcut == m_shortcuts.removeFromSelection) {
|
||||
return selectWidthTool(SelectionMode::Remove, pos, view);
|
||||
return selectWidthTool(SelectionMode::Remove, pos, scene);
|
||||
} else if (m_shortcut == m_shortcuts.toggleSelection) {
|
||||
return selectWidthTool(SelectionMode::Toggle, pos, view);
|
||||
return selectWidthTool(SelectionMode::Toggle, pos, scene);
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
bool Selector::pressSelection(SelectionMode mode, const QPointF &pos, GraphicsView *view)
|
||||
bool Selector::pressSelection(SelectionMode mode, const QPointF &pos, GraphicsScene *scene)
|
||||
{
|
||||
bool out = false;
|
||||
const auto itemList = view->items();
|
||||
const auto itemList = scene->items();
|
||||
for (auto *item : itemList) {
|
||||
if (auto *frame = qgraphicsitem_cast<KeyframeItem *>(item)) {
|
||||
QRectF itemRect = frame->mapRectToScene(frame->boundingRect());
|
||||
@@ -176,15 +211,25 @@ bool Selector::pressSelection(SelectionMode mode, const QPointF &pos, GraphicsVi
|
||||
out = true;
|
||||
}
|
||||
}
|
||||
|
||||
if (auto *handle = qgraphicsitem_cast<HandleItem *>(item)) {
|
||||
QRectF itemRect = handle->mapRectToScene(handle->boundingRect());
|
||||
if (itemRect.contains(pos)) {
|
||||
if (auto *frame = handle->keyframe()) {
|
||||
frame->setPreselected(mode);
|
||||
out = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
return out;
|
||||
}
|
||||
|
||||
bool Selector::rectangleSelection(SelectionMode mode, const QPointF &pos, GraphicsView *view)
|
||||
bool Selector::rectangleSelection(SelectionMode mode, const QPointF &pos, GraphicsScene *scene)
|
||||
{
|
||||
bool out = false;
|
||||
m_rect.setBottomRight(pos);
|
||||
const auto itemList = view->items();
|
||||
const auto itemList = scene->items();
|
||||
for (auto *item : itemList) {
|
||||
if (auto *keyframeItem = qgraphicsitem_cast<KeyframeItem *>(item)) {
|
||||
if (m_rect.contains(keyframeItem->pos())) {
|
||||
@@ -198,11 +243,11 @@ bool Selector::rectangleSelection(SelectionMode mode, const QPointF &pos, Graphi
|
||||
return out;
|
||||
}
|
||||
|
||||
bool Selector::lassoSelection(SelectionMode mode, const QPointF &pos, GraphicsView *view)
|
||||
bool Selector::lassoSelection(SelectionMode mode, const QPointF &pos, GraphicsScene *scene)
|
||||
{
|
||||
bool out = false;
|
||||
m_lasso.lineTo(pos);
|
||||
const auto itemList = view->items();
|
||||
const auto itemList = scene->items();
|
||||
for (auto *item : itemList) {
|
||||
if (auto *keyframeItem = qgraphicsitem_cast<KeyframeItem *>(item)) {
|
||||
if (m_lasso.contains(keyframeItem->pos())) {
|
||||
@@ -216,20 +261,22 @@ bool Selector::lassoSelection(SelectionMode mode, const QPointF &pos, GraphicsVi
|
||||
return out;
|
||||
}
|
||||
|
||||
void Selector::clearSelection(GraphicsView *view)
|
||||
void Selector::clearSelection(GraphicsScene *scene)
|
||||
{
|
||||
const auto itemList = view->items();
|
||||
const auto itemList = scene->items();
|
||||
for (auto *item : itemList) {
|
||||
if (auto *frameItem = qgraphicsitem_cast<KeyframeItem *>(item)) {
|
||||
frameItem->setPreselected(SelectionMode::Clear);
|
||||
frameItem->applyPreselection();
|
||||
frameItem->setActivated(false, HandleItem::Slot::Left);
|
||||
frameItem->setActivated(false, HandleItem::Slot::Right);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void Selector::applyPreSelection(GraphicsView *view)
|
||||
void Selector::applyPreSelection(GraphicsScene *scene)
|
||||
{
|
||||
const auto itemList = view->items();
|
||||
const auto itemList = scene->items();
|
||||
for (auto *item : itemList) {
|
||||
if (auto *keyframeItem = qgraphicsitem_cast<KeyframeItem *>(item))
|
||||
keyframeItem->applyPreselection();
|
||||
|
@@ -31,6 +31,7 @@
|
||||
namespace DesignTools {
|
||||
|
||||
class GraphicsView;
|
||||
class GraphicsScene;
|
||||
class Playhead;
|
||||
|
||||
enum class SelectionTool { Undefined, Lasso, Rectangle };
|
||||
@@ -42,26 +43,28 @@ public:
|
||||
|
||||
void paint(QPainter *painter);
|
||||
|
||||
void mousePress(QMouseEvent *event, GraphicsView *view);
|
||||
void mousePress(QMouseEvent *event, GraphicsView *view, GraphicsScene *scene);
|
||||
|
||||
void mouseMove(QMouseEvent *event, GraphicsView *view, Playhead &playhead);
|
||||
void mouseMove(QMouseEvent *event, GraphicsView *view, GraphicsScene *scene, Playhead &playhead);
|
||||
|
||||
void mouseRelease(QMouseEvent *event, GraphicsView *view);
|
||||
void mouseRelease(QMouseEvent *event, GraphicsScene *scene);
|
||||
|
||||
private:
|
||||
bool isOverSelectedKeyframe(const QPointF &pos, GraphicsView *view);
|
||||
bool isOverSelectedKeyframe(const QPointF &pos, GraphicsScene *scene);
|
||||
|
||||
bool select(const SelectionTool &tool, const QPointF &pos, GraphicsView *view);
|
||||
bool isOverMovableItem(const QPointF &pos, GraphicsScene *scene);
|
||||
|
||||
bool pressSelection(SelectionMode mode, const QPointF &pos, GraphicsView *view);
|
||||
bool select(const SelectionTool &tool, const QPointF &pos, GraphicsScene *scene);
|
||||
|
||||
bool rectangleSelection(SelectionMode mode, const QPointF &pos, GraphicsView *view);
|
||||
bool pressSelection(SelectionMode mode, const QPointF &pos, GraphicsScene *scene);
|
||||
|
||||
bool lassoSelection(SelectionMode mode, const QPointF &pos, GraphicsView *view);
|
||||
bool rectangleSelection(SelectionMode mode, const QPointF &pos, GraphicsScene *scene);
|
||||
|
||||
void clearSelection(GraphicsView *view);
|
||||
bool lassoSelection(SelectionMode mode, const QPointF &pos, GraphicsScene *scene);
|
||||
|
||||
void applyPreSelection(GraphicsView *view);
|
||||
void clearSelection(GraphicsScene *scene);
|
||||
|
||||
void applyPreSelection(GraphicsScene *scene);
|
||||
|
||||
Shortcuts m_shortcuts;
|
||||
|
||||
|
@@ -50,7 +50,7 @@ QRectF bbox(const QRectF &rect, const QTransform &transform);
|
||||
QPalette singleColorPalette(const QColor &color);
|
||||
|
||||
template<typename T>
|
||||
inline void freeClear(std::vector<T *> &vec)
|
||||
inline void freeClear(T &vec)
|
||||
{
|
||||
for (auto *&el : vec)
|
||||
delete el;
|
||||
|
@@ -26,7 +26,7 @@
|
||||
#include "setframevaluedialog.h"
|
||||
#include "ui_setframevaluedialog.h"
|
||||
|
||||
#include <QIntValidator>
|
||||
#include <QtGui/qvalidator.h>
|
||||
|
||||
namespace QmlDesigner {
|
||||
|
||||
@@ -40,9 +40,13 @@ SetFrameValueDialog::SetFrameValueDialog(qreal frame, const QVariant &value,
|
||||
setFixedSize(size());
|
||||
|
||||
ui->lineEditFrame->setValidator(new QIntValidator(0, 99999, this));
|
||||
auto dv = new QDoubleValidator(this);
|
||||
dv->setDecimals(2);
|
||||
ui->lineEditValue->setValidator(dv);
|
||||
|
||||
ui->lineEditFrame->setText(QString::number(frame));
|
||||
ui->lineEditValue->setText(value.toString());
|
||||
QLocale l;
|
||||
ui->lineEditFrame->setText(l.toString(qRound(frame)));
|
||||
ui->lineEditValue->setText(l.toString(value.toDouble(), 'f', 2));
|
||||
ui->labelValue->setText(propertyName);
|
||||
}
|
||||
|
||||
@@ -53,12 +57,14 @@ SetFrameValueDialog::~SetFrameValueDialog()
|
||||
|
||||
qreal SetFrameValueDialog::frame() const
|
||||
{
|
||||
return ui->lineEditFrame->text().toDouble();
|
||||
QLocale l;
|
||||
return l.toDouble(ui->lineEditFrame->text());
|
||||
}
|
||||
|
||||
QVariant SetFrameValueDialog::value() const
|
||||
{
|
||||
return QVariant(ui->lineEditValue->text());
|
||||
QLocale l;
|
||||
return QVariant(l.toDouble(ui->lineEditValue->text()));
|
||||
}
|
||||
|
||||
} // namespace QmlDesigner
|
||||
|
@@ -367,11 +367,18 @@ void QmlObjectNode::destroy()
|
||||
stateOperation.modelNode().destroy(); //remove of belonging StatesOperations
|
||||
}
|
||||
|
||||
for (const ModelNode &timelineNode : view()->allModelNodes()) {
|
||||
if (QmlTimeline::isValidQmlTimeline(timelineNode)) {
|
||||
QmlTimeline timeline(timelineNode);
|
||||
timeline.destroyKeyframesForTarget(modelNode());
|
||||
}
|
||||
QVector<ModelNode> timelineNodes;
|
||||
const auto allNodes = view()->allModelNodes();
|
||||
for (const auto &timelineNode : allNodes) {
|
||||
if (QmlTimeline::isValidQmlTimeline(timelineNode))
|
||||
timelineNodes.append(timelineNode);
|
||||
}
|
||||
|
||||
const auto subNodes = modelNode().allSubModelNodesAndThisNode();
|
||||
for (auto &timelineNode : qAsConst(timelineNodes)) {
|
||||
QmlTimeline timeline(timelineNode);
|
||||
for (const auto &subNode : subNodes)
|
||||
timeline.destroyKeyframesForTarget(subNode);
|
||||
}
|
||||
|
||||
if (QmlFlowActionAreaNode::isValidQmlFlowActionAreaNode(modelNode()))
|
||||
|
@@ -107,6 +107,7 @@ ExampleSetModel::ExampleSetModel()
|
||||
<< ", examplesPath=" << set.examplesPath;
|
||||
}
|
||||
}
|
||||
m_extraExampleSets += pluginRegisteredExampleSets();
|
||||
|
||||
connect(QtVersionManager::instance(), &QtVersionManager::qtVersionsLoaded,
|
||||
this, &ExampleSetModel::qtVersionManagerLoaded);
|
||||
|
@@ -45,6 +45,14 @@ class ExampleSetModel : public QStandardItemModel
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
struct ExtraExampleSet
|
||||
{
|
||||
QString displayName;
|
||||
QString manifestPath;
|
||||
QString examplesPath;
|
||||
};
|
||||
static QVector<ExtraExampleSet> pluginRegisteredExampleSets();
|
||||
|
||||
ExampleSetModel();
|
||||
|
||||
int selectedExampleSet() const { return m_selectedExampleSetIndex; }
|
||||
@@ -56,11 +64,6 @@ signals:
|
||||
void selectedExampleSetChanged(int);
|
||||
|
||||
private:
|
||||
struct ExtraExampleSet {
|
||||
QString displayName;
|
||||
QString manifestPath;
|
||||
QString examplesPath;
|
||||
};
|
||||
|
||||
enum ExampleSetType {
|
||||
InvalidExampleSet,
|
||||
@@ -87,8 +90,7 @@ private:
|
||||
void helpManagerInitialized();
|
||||
void tryToInitialize();
|
||||
|
||||
QList<ExtraExampleSet> m_extraExampleSets;
|
||||
QList<BaseQtVersion*> m_qtVersions;
|
||||
QVector<ExtraExampleSet> m_extraExampleSets;
|
||||
int m_selectedExampleSetIndex = -1;
|
||||
QSet<Core::Id> m_selectedQtTypes;
|
||||
|
||||
|
@@ -25,10 +25,11 @@
|
||||
|
||||
#include "qtversionmanager.h"
|
||||
|
||||
#include "qtkitinformation.h"
|
||||
#include "qtversionfactory.h"
|
||||
#include "baseqtversion.h"
|
||||
#include "exampleslistmodel.h"
|
||||
#include "qtkitinformation.h"
|
||||
#include "qtsupportconstants.h"
|
||||
#include "qtversionfactory.h"
|
||||
|
||||
#include <coreplugin/icore.h>
|
||||
#include <coreplugin/helpmanager.h>
|
||||
@@ -77,6 +78,7 @@ static QtVersionManager *m_instance = nullptr;
|
||||
static FileSystemWatcher *m_configFileWatcher = nullptr;
|
||||
static QTimer *m_fileWatcherTimer = nullptr;
|
||||
static PersistentSettingsWriter *m_writer = nullptr;
|
||||
static QVector<ExampleSetModel::ExtraExampleSet> m_pluginRegisteredExampleSets;
|
||||
|
||||
static Q_LOGGING_CATEGORY(log, "qtc.qt.versions", QtWarningMsg);
|
||||
|
||||
@@ -100,6 +102,11 @@ static bool restoreQtVersions();
|
||||
static void findSystemQt();
|
||||
static void saveQtVersions();
|
||||
|
||||
QVector<ExampleSetModel::ExtraExampleSet> ExampleSetModel::pluginRegisteredExampleSets()
|
||||
{
|
||||
return m_pluginRegisteredExampleSets;
|
||||
}
|
||||
|
||||
// --------------------------------------------------------------------------
|
||||
// QtVersionManager
|
||||
// --------------------------------------------------------------------------
|
||||
@@ -471,6 +478,13 @@ void QtVersionManager::removeVersion(BaseQtVersion *version)
|
||||
delete version;
|
||||
}
|
||||
|
||||
void QtVersionManager::registerExampleSet(const QString &displayName,
|
||||
const QString &manifestPath,
|
||||
const QString &examplesPath)
|
||||
{
|
||||
m_pluginRegisteredExampleSets.append({displayName, manifestPath, examplesPath});
|
||||
}
|
||||
|
||||
using Path = QString;
|
||||
using FileName = QString;
|
||||
static QList<std::pair<Path, FileName>> documentationFiles(BaseQtVersion *v)
|
||||
|
@@ -63,6 +63,11 @@ public:
|
||||
static void addVersion(BaseQtVersion *version);
|
||||
static void removeVersion(BaseQtVersion *version);
|
||||
|
||||
// Call latest in extensionsInitialized of plugin depending on QtSupport
|
||||
static void registerExampleSet(const QString &displayName,
|
||||
const QString &manifestPath,
|
||||
const QString &examplesPath);
|
||||
|
||||
signals:
|
||||
// content of BaseQtVersion objects with qmake path might have changed
|
||||
void qtVersionsChanged(const QList<int> &addedIds, const QList<int> &removedIds, const QList<int> &changedIds);
|
||||
|
@@ -38,7 +38,7 @@ VcsOutputFormatter::VcsOutputFormatter() :
|
||||
m_regexp(
|
||||
"(https?://\\S*)" // https://codereview.org/c/1234
|
||||
"|(v[0-9]+\\.[0-9]+\\.[0-9]+[\\-A-Za-z0-9]*)" // v0.1.2-beta3
|
||||
"|([0-9a-f]{6,}(?:\\.\\.[0-9a-f]{6,}" // 789acf or 123abc..456cde
|
||||
"|([0-9a-f]{6,}(?:\\.{2,3}[0-9a-f]{6,}" // 789acf or 123abc..456cde
|
||||
"|\\^+|~\\d+)?)") // or 789acf^ or 123abc~99
|
||||
{
|
||||
}
|
||||
|