forked from qt-creator/qt-creator
Merge remote-tracking branch 'origin/4.10'
Change-Id: I0d4655b195d0615719d5d391aa69e682f8c6f78f
This commit is contained in:
BIN
doc/images/qtcreator-debugger-breakpoint-preset.png
Normal file
BIN
doc/images/qtcreator-debugger-breakpoint-preset.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 3.3 KiB |
BIN
doc/images/qtcreator-unclaimed-breakpoint-icon.png
Normal file
BIN
doc/images/qtcreator-unclaimed-breakpoint-icon.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 160 B |
@@ -1,6 +1,6 @@
|
|||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
**
|
**
|
||||||
** Copyright (C) 2018 The Qt Company Ltd.
|
** Copyright (C) 2019 The Qt Company Ltd.
|
||||||
** Contact: https://www.qt.io/licensing/
|
** Contact: https://www.qt.io/licensing/
|
||||||
**
|
**
|
||||||
** This file is part of the Qt Creator documentation.
|
** This file is part of the Qt Creator documentation.
|
||||||
@@ -29,16 +29,7 @@
|
|||||||
|
|
||||||
\section1 Setting Breakpoints
|
\section1 Setting Breakpoints
|
||||||
|
|
||||||
A breakpoint represents a position or sets of positions in the code that,
|
|
||||||
when executed, interrupts the program being debugged and passes the control
|
|
||||||
to you. You can then examine the state of the interrupted program, or
|
|
||||||
continue execution either line-by-line or continuously.
|
|
||||||
|
|
||||||
\QC shows breakpoints in the \uicontrol Breakpoints view which is enabled
|
|
||||||
by default. The \uicontrol Breakpoints view is also accessible when the
|
|
||||||
debugger and the program being debugged is not running.
|
|
||||||
|
|
||||||
\image qtcreator-debug-breakpoints.png "Breakpoints view"
|
|
||||||
|
|
||||||
You can associate breakpoints with:
|
You can associate breakpoints with:
|
||||||
|
|
||||||
@@ -68,9 +59,48 @@
|
|||||||
The interruption of a program by a breakpoint can be restricted with certain
|
The interruption of a program by a breakpoint can be restricted with certain
|
||||||
conditions.
|
conditions.
|
||||||
|
|
||||||
You can set and delete breakpoints before the program starts running or
|
Breakpoints come in two varieties: \c unclaimed and \c claimed.
|
||||||
while it is running under the debugger's control. Breakpoints are saved
|
An unclaimed breakpoint represents a task to interrupt the debugged
|
||||||
together with a session.
|
program and passes the control to you later. I has two states:
|
||||||
|
\c pending and \c implanted.
|
||||||
|
|
||||||
|
Unclaimed breakpoints are stored as a part of a session and exist
|
||||||
|
independently of whether a program is being debugged or not. They
|
||||||
|
are listed in the \uicontrol {Breakpoint Preset} view and in the
|
||||||
|
editor using the \inlineimage qtcreator-unclaimed-breakpoint-icon.png
|
||||||
|
(\uicontrol {Unclaimed Breakpoint}) icon, when they refer to a position
|
||||||
|
in code.
|
||||||
|
|
||||||
|
\image qtcreator-debugger-breakpoint-preset.png "Breakpoint Preset" view
|
||||||
|
|
||||||
|
When a debugger starts, the debugging backend identifies breakpoints
|
||||||
|
from the set of unclaimed breakpoints that might be handled by the
|
||||||
|
debugged program and claims them for its own exclusive use. Claimed
|
||||||
|
breakpoints are listed in the \uicontrol {Breakpoints} view of the
|
||||||
|
running debugger. This view only exists while the debugger is running.
|
||||||
|
|
||||||
|
When a debugger claims a breakpoint, the unclaimed breakpoint disappears
|
||||||
|
from the \uicontrol {Breakpoint Preset} view, to appear as a pending
|
||||||
|
breakpoint in the \uicontrol Breakpoints view.
|
||||||
|
|
||||||
|
At various times, attempts are made to implant pending breakpoints into
|
||||||
|
the debugged process. Succesfull implantation might create one or more
|
||||||
|
implanted breakpoints, each associated with an actual address in
|
||||||
|
the debugged breakpoint. The implantation might also move a breakpoint
|
||||||
|
marker in the editor from an empty line to the next line for which the
|
||||||
|
actual code was generated, for example. Implanted breakpoint icons don't
|
||||||
|
have the hourglass overlay.
|
||||||
|
|
||||||
|
When the debugger ends, its claimed breakpoints, both pending and
|
||||||
|
implanted, will return to the unclaimed state and re-appear in the
|
||||||
|
\uicontrol{Breakpoint Preset} view.
|
||||||
|
|
||||||
|
When an implanted breakpoint is hit during the execution of the
|
||||||
|
debugged program, control is passed back to you.
|
||||||
|
You can then examine the state of the interrupted program, or
|
||||||
|
continue execution either line-by-line or continuously.
|
||||||
|
|
||||||
|
\image qtcreator-debug-breakpoints.png "Breakpoints view"
|
||||||
|
|
||||||
\section2 Adding Breakpoints
|
\section2 Adding Breakpoints
|
||||||
|
|
||||||
@@ -86,12 +116,14 @@
|
|||||||
(\key F8 for \macos) at a particular line you want the
|
(\key F8 for \macos) at a particular line you want the
|
||||||
program to stop.
|
program to stop.
|
||||||
|
|
||||||
\li In the \uicontrol Breakpoints view, double-click in the empty
|
\li In the \uicontrol {Breakpoint Preset} view or the
|
||||||
part of the view.
|
\uicontrol Breakpoints view:
|
||||||
|
|
||||||
\li In the \uicontrol Breakpoints view, select
|
|
||||||
\uicontrol {Add Breakpoint} in the context menu.
|
|
||||||
|
|
||||||
|
\list
|
||||||
|
\li Double-click the empty part of the view.
|
||||||
|
\li Right-click the view, and select
|
||||||
|
\uicontrol {Add Breakpoint} in the context menu.
|
||||||
|
\endlist
|
||||||
\endlist
|
\endlist
|
||||||
|
|
||||||
\li In the \uicontrol {Breakpoint type} field, select the location in the
|
\li In the \uicontrol {Breakpoint type} field, select the location in the
|
||||||
@@ -119,7 +151,16 @@
|
|||||||
|
|
||||||
\section2 Moving Breakpoints
|
\section2 Moving Breakpoints
|
||||||
|
|
||||||
To move the breakpoint, drag and drop a breakpoint marker to another line.
|
To move a breakpoint:
|
||||||
|
|
||||||
|
\list
|
||||||
|
\li Drag and drop a breakpoint marker to another line
|
||||||
|
in the text editor.
|
||||||
|
\li In the \uicontrol {Breakpoint Preset} view or the
|
||||||
|
\uicontrol Breakpoints view, select
|
||||||
|
\uicontrol {Edit Selected Breakpoints}, and set the
|
||||||
|
line number in the \uicontrol {Line number} field.
|
||||||
|
\endlist
|
||||||
|
|
||||||
\section2 Deleting Breakpoints
|
\section2 Deleting Breakpoints
|
||||||
|
|
||||||
@@ -129,11 +170,15 @@
|
|||||||
|
|
||||||
\li Click the breakpoint marker in the text editor.
|
\li Click the breakpoint marker in the text editor.
|
||||||
|
|
||||||
\li Select the breakpoint in the \uicontrol Breakpoints view and press
|
\li In the \uicontrol {Breakpoint Preset} view or the
|
||||||
\key Delete.
|
\uicontrol Breakpoints view:
|
||||||
|
\list
|
||||||
\li Select \uicontrol {Delete Breakpoint} in the context menu in the
|
\li Select the breakpoint and press \key Delete.
|
||||||
\uicontrol Breakpoints view.
|
\li Select \uicontrol {Delete Selected Breakpoints},
|
||||||
|
\uicontrol {Delete Selected Breakpoints}, or
|
||||||
|
\uicontrol {Delete Breakpoints of File} in the
|
||||||
|
context menu.
|
||||||
|
\endlist
|
||||||
|
|
||||||
\endlist
|
\endlist
|
||||||
|
|
||||||
@@ -147,31 +192,17 @@
|
|||||||
\li Right-click the breakpoint marker in the text editor and select
|
\li Right-click the breakpoint marker in the text editor and select
|
||||||
\uicontrol{Disable Breakpoint}.
|
\uicontrol{Disable Breakpoint}.
|
||||||
|
|
||||||
\li Select the breakpoint in the \uicontrol Breakpoints view and press
|
\li In the \uicontrol {Breakpoint Preset} view or the
|
||||||
\key Space.
|
\uicontrol Breakpoints view:
|
||||||
|
\list
|
||||||
\li Select \uicontrol {Disabled Breakpoint} in the context menu in the
|
\li Select the breakpoint and press \key Space.
|
||||||
\uicontrol Breakpoints view.
|
\li Select \uicontrol {Disable Breakpoint} in the context menu.
|
||||||
|
\endlist
|
||||||
\endlist
|
\endlist
|
||||||
|
|
||||||
A disabled breakpoint is marked with a hollow read circle in the
|
A hollow breakpoint icon in the text editor and the views indicates a
|
||||||
text editor and the \uicontrol Breakpoint view.
|
disabled breakpoint. To re-enable a breakpoint, use any of the above
|
||||||
|
methods.
|
||||||
To re-enable a temporarily disabled breakpoint:
|
|
||||||
|
|
||||||
\list
|
|
||||||
|
|
||||||
\li Right-click the marker of a disabled breakpoint in the text editor and
|
|
||||||
select \uicontrol{Enable Breakpoint}.
|
|
||||||
|
|
||||||
\li Select a disabled breakpoint in the \uicontrol Breakpoints view and press
|
|
||||||
\key Space.
|
|
||||||
|
|
||||||
\li Select \uicontrol {Disabled Breakpoint} in the context menu in the
|
|
||||||
\uicontrol Breakpoints view.
|
|
||||||
|
|
||||||
\endlist
|
|
||||||
|
|
||||||
With the notable exception of data breakpoints, breakpoints retain their
|
With the notable exception of data breakpoints, breakpoints retain their
|
||||||
enabled or disabled state when the debugged program is restarted.
|
enabled or disabled state when the debugged program is restarted.
|
||||||
@@ -185,8 +216,8 @@
|
|||||||
|
|
||||||
\list 1
|
\list 1
|
||||||
|
|
||||||
\li Right-click in the \uicontrol Breakpoints view to open the context
|
\li In the \uicontrol {Breakpoint Preset} or \uicontrol Breakpoints
|
||||||
menu, and select \uicontrol {Add Breakpoint}.
|
view, select \uicontrol {Add Breakpoint} in the context menu.
|
||||||
|
|
||||||
\li In the \uicontrol {Breakpoint type} field, select
|
\li In the \uicontrol {Breakpoint type} field, select
|
||||||
\uicontrol {Break on data access at fixed address}.
|
\uicontrol {Break on data access at fixed address}.
|
||||||
|
@@ -89,7 +89,7 @@ RowLayout {
|
|||||||
}
|
}
|
||||||
|
|
||||||
Label {
|
Label {
|
||||||
text: "Margin"
|
text: qsTr("Margin")
|
||||||
color: __defaultTextColor
|
color: __defaultTextColor
|
||||||
elide: Text.ElideRight
|
elide: Text.ElideRight
|
||||||
Layout.minimumWidth: Math.min(60, Layout.preferredWidth + 10)
|
Layout.minimumWidth: Math.min(60, Layout.preferredWidth + 10)
|
||||||
|
@@ -43,13 +43,12 @@ Column {
|
|||||||
|
|
||||||
SecondColumnLayout {
|
SecondColumnLayout {
|
||||||
ComboBox {
|
ComboBox {
|
||||||
|
scope: "Flow"
|
||||||
model: ["LeftToRight", "TopToBottom"]
|
model: ["LeftToRight", "TopToBottom"]
|
||||||
backendValue: backendValues.flow
|
backendValue: backendValues.flow
|
||||||
scope: "Flow"
|
Layout.fillWidth: true
|
||||||
}
|
}
|
||||||
|
|
||||||
ExpandingSpacer {
|
ExpandingSpacer {
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -59,12 +58,13 @@ Column {
|
|||||||
|
|
||||||
SecondColumnLayout {
|
SecondColumnLayout {
|
||||||
ComboBox {
|
ComboBox {
|
||||||
|
scope: "Qt"
|
||||||
model: ["LeftToRight", "RightToLeft"]
|
model: ["LeftToRight", "RightToLeft"]
|
||||||
backendValue: backendValues.layoutDirection
|
backendValue: backendValues.layoutDirection
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
scope: "Qt"
|
|
||||||
}
|
}
|
||||||
|
ExpandingSpacer {
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Label {
|
Label {
|
||||||
@@ -78,7 +78,6 @@ Column {
|
|||||||
maximumValue: 4000
|
maximumValue: 4000
|
||||||
decimals: 0
|
decimals: 0
|
||||||
}
|
}
|
||||||
|
|
||||||
ExpandingSpacer {
|
ExpandingSpacer {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -51,13 +51,11 @@ Column {
|
|||||||
SectionLayout {
|
SectionLayout {
|
||||||
SpinBox {
|
SpinBox {
|
||||||
backendValue: backendValues.cacheBuffer
|
backendValue: backendValues.cacheBuffer
|
||||||
minimumValue: 0;
|
minimumValue: 0
|
||||||
maximumValue: 1000;
|
maximumValue: 1000
|
||||||
decimals: 0
|
decimals: 0
|
||||||
}
|
}
|
||||||
|
|
||||||
ExpandingSpacer {
|
ExpandingSpacer {
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -66,47 +64,48 @@ Column {
|
|||||||
}
|
}
|
||||||
|
|
||||||
SecondColumnLayout {
|
SecondColumnLayout {
|
||||||
|
|
||||||
Label {
|
Label {
|
||||||
text: "W"
|
text: "W"
|
||||||
width: 12
|
width: 12
|
||||||
}
|
}
|
||||||
|
|
||||||
SpinBox {
|
SpinBox {
|
||||||
backendValue: backendValues.cellWidth
|
backendValue: backendValues.cellWidth
|
||||||
minimumValue: 0;
|
minimumValue: 0
|
||||||
maximumValue: 1000;
|
maximumValue: 1000
|
||||||
decimals: 0
|
decimals: 0
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Item {
|
||||||
|
width: 4
|
||||||
|
height: 4
|
||||||
|
}
|
||||||
|
|
||||||
Label {
|
Label {
|
||||||
text: "H"
|
text: "H"
|
||||||
width: 12
|
width: 12
|
||||||
}
|
}
|
||||||
|
|
||||||
SpinBox {
|
SpinBox {
|
||||||
backendValue: backendValues.cellHeight
|
backendValue: backendValues.cellHeight
|
||||||
minimumValue: 0;
|
minimumValue: 0
|
||||||
maximumValue: 1000;
|
maximumValue: 1000
|
||||||
decimals: 0
|
decimals: 0
|
||||||
}
|
}
|
||||||
|
|
||||||
ExpandingSpacer {
|
ExpandingSpacer {
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
Label {
|
Label {
|
||||||
text: qsTr("Flow")
|
text: qsTr("Flow")
|
||||||
}
|
}
|
||||||
|
|
||||||
SecondColumnLayout {
|
SecondColumnLayout {
|
||||||
ComboBox {
|
ComboBox {
|
||||||
|
scope: "GridView"
|
||||||
model: ["FlowLeftToRight", "FlowTopToBottom"]
|
model: ["FlowLeftToRight", "FlowTopToBottom"]
|
||||||
backendValue: backendValues.flow
|
backendValue: backendValues.flow
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
scope: "GridView"
|
}
|
||||||
|
ExpandingSpacer {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -117,11 +116,11 @@ Column {
|
|||||||
|
|
||||||
SectionLayout {
|
SectionLayout {
|
||||||
CheckBox {
|
CheckBox {
|
||||||
|
Layout.fillWidth: true
|
||||||
backendValue: backendValues.keyNavigationWraps
|
backendValue: backendValues.keyNavigationWraps
|
||||||
|
text: backendValues.keyNavigationWraps.valueToString
|
||||||
}
|
}
|
||||||
|
|
||||||
ExpandingSpacer {
|
ExpandingSpacer {
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -131,10 +130,12 @@ Column {
|
|||||||
|
|
||||||
SecondColumnLayout {
|
SecondColumnLayout {
|
||||||
ComboBox {
|
ComboBox {
|
||||||
|
scope: "Qt"
|
||||||
model: ["LeftToRight", "RightToLeft"]
|
model: ["LeftToRight", "RightToLeft"]
|
||||||
backendValue: backendValues.layoutDirection
|
backendValue: backendValues.layoutDirection
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
scope: "Qt"
|
}
|
||||||
|
ExpandingSpacer {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -145,10 +146,12 @@ Column {
|
|||||||
|
|
||||||
SecondColumnLayout {
|
SecondColumnLayout {
|
||||||
ComboBox {
|
ComboBox {
|
||||||
|
scope: "GridView"
|
||||||
model: ["NoSnap", "SnapToRow", "SnapOneRow"]
|
model: ["NoSnap", "SnapToRow", "SnapOneRow"]
|
||||||
backendValue: backendValues.snapMode
|
backendValue: backendValues.snapMode
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
scope: "GridView"
|
}
|
||||||
|
ExpandingSpacer {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -169,14 +172,15 @@ Column {
|
|||||||
|
|
||||||
SecondColumnLayout {
|
SecondColumnLayout {
|
||||||
ComboBox {
|
ComboBox {
|
||||||
|
scope: "GridView"
|
||||||
model: ["NoHighlightRange", "ApplyRange", "StrictlyEnforceRange"]
|
model: ["NoHighlightRange", "ApplyRange", "StrictlyEnforceRange"]
|
||||||
backendValue: backendValues.highlightRangeMode
|
backendValue: backendValues.highlightRangeMode
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
scope: "GridView"
|
}
|
||||||
|
ExpandingSpacer {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
Label {
|
Label {
|
||||||
text: qsTr("Move duration")
|
text: qsTr("Move duration")
|
||||||
tooltip: qsTr("Move animation duration of the highlight delegate.")
|
tooltip: qsTr("Move animation duration of the highlight delegate.")
|
||||||
@@ -185,13 +189,11 @@ Column {
|
|||||||
SectionLayout {
|
SectionLayout {
|
||||||
SpinBox {
|
SpinBox {
|
||||||
backendValue: backendValues.highlightMoveDuration
|
backendValue: backendValues.highlightMoveDuration
|
||||||
minimumValue: 0;
|
minimumValue: 0
|
||||||
maximumValue: 1000;
|
maximumValue: 1000
|
||||||
decimals: 0
|
decimals: 0
|
||||||
}
|
}
|
||||||
|
|
||||||
ExpandingSpacer {
|
ExpandingSpacer {
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -203,13 +205,11 @@ Column {
|
|||||||
SectionLayout {
|
SectionLayout {
|
||||||
SpinBox {
|
SpinBox {
|
||||||
backendValue: backendValues.highlightMoveSpeed
|
backendValue: backendValues.highlightMoveSpeed
|
||||||
minimumValue: 0;
|
minimumValue: 0
|
||||||
maximumValue: 1000;
|
maximumValue: 1000
|
||||||
decimals: 0
|
decimals: 0
|
||||||
}
|
}
|
||||||
|
|
||||||
ExpandingSpacer {
|
ExpandingSpacer {
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -221,13 +221,11 @@ Column {
|
|||||||
SectionLayout {
|
SectionLayout {
|
||||||
SpinBox {
|
SpinBox {
|
||||||
backendValue: backendValues.preferredHighlightBegin
|
backendValue: backendValues.preferredHighlightBegin
|
||||||
minimumValue: 0;
|
minimumValue: 0
|
||||||
maximumValue: 1000;
|
maximumValue: 1000
|
||||||
decimals: 0
|
decimals: 0
|
||||||
}
|
}
|
||||||
|
|
||||||
ExpandingSpacer {
|
ExpandingSpacer {
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -239,13 +237,11 @@ Column {
|
|||||||
SectionLayout {
|
SectionLayout {
|
||||||
SpinBox {
|
SpinBox {
|
||||||
backendValue: backendValues.preferredHighlightEnd
|
backendValue: backendValues.preferredHighlightEnd
|
||||||
minimumValue: 0;
|
minimumValue: 0
|
||||||
maximumValue: 1000;
|
maximumValue: 1000
|
||||||
decimals: 0
|
decimals: 0
|
||||||
}
|
}
|
||||||
|
|
||||||
ExpandingSpacer {
|
ExpandingSpacer {
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -256,11 +252,11 @@ Column {
|
|||||||
|
|
||||||
SectionLayout {
|
SectionLayout {
|
||||||
CheckBox {
|
CheckBox {
|
||||||
|
Layout.fillWidth: true
|
||||||
backendValue: backendValues.highlightFollowsCurrentItem
|
backendValue: backendValues.highlightFollowsCurrentItem
|
||||||
|
text: backendValues.highlightFollowsCurrentItem.valueToString
|
||||||
}
|
}
|
||||||
|
|
||||||
ExpandingSpacer {
|
ExpandingSpacer {
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -43,12 +43,11 @@ Column {
|
|||||||
|
|
||||||
SecondColumnLayout {
|
SecondColumnLayout {
|
||||||
UrlChooser {
|
UrlChooser {
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
backendValue: backendValues.source
|
backendValue: backendValues.source
|
||||||
}
|
}
|
||||||
|
|
||||||
ExpandingSpacer {
|
ExpandingSpacer {
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -58,15 +57,14 @@ Column {
|
|||||||
|
|
||||||
SecondColumnLayout {
|
SecondColumnLayout {
|
||||||
ComboBox {
|
ComboBox {
|
||||||
|
scope: "Image"
|
||||||
model: ["Stretch", "PreserveAspectFit", "PreserveAspectCrop", "Tile", "TileVertically", "TileHorizontally"]
|
model: ["Stretch", "PreserveAspectFit", "PreserveAspectCrop", "Tile", "TileVertically", "TileHorizontally"]
|
||||||
backendValue: backendValues.fillMode
|
backendValue: backendValues.fillMode
|
||||||
implicitWidth: 180
|
implicitWidth: 180
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
scope: "Image"
|
|
||||||
}
|
}
|
||||||
|
|
||||||
ExpandingSpacer {
|
ExpandingSpacer {
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -87,6 +85,11 @@ Column {
|
|||||||
decimals: 0
|
decimals: 0
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Item {
|
||||||
|
width: 4
|
||||||
|
height: 4
|
||||||
|
}
|
||||||
|
|
||||||
Label {
|
Label {
|
||||||
text: "H"
|
text: "H"
|
||||||
width: 12
|
width: 12
|
||||||
@@ -100,7 +103,6 @@ Column {
|
|||||||
}
|
}
|
||||||
|
|
||||||
ExpandingSpacer {
|
ExpandingSpacer {
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -51,13 +51,12 @@ Column {
|
|||||||
SectionLayout {
|
SectionLayout {
|
||||||
SpinBox {
|
SpinBox {
|
||||||
backendValue: backendValues.cacheBuffer
|
backendValue: backendValues.cacheBuffer
|
||||||
minimumValue: 0;
|
minimumValue: 0
|
||||||
maximumValue: 1000;
|
maximumValue: 1000
|
||||||
decimals: 0
|
decimals: 0
|
||||||
}
|
}
|
||||||
|
|
||||||
ExpandingSpacer {
|
ExpandingSpacer {
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -68,11 +67,11 @@ Column {
|
|||||||
|
|
||||||
SectionLayout {
|
SectionLayout {
|
||||||
CheckBox {
|
CheckBox {
|
||||||
|
Layout.fillWidth: true
|
||||||
backendValue: backendValues.keyNavigationWraps
|
backendValue: backendValues.keyNavigationWraps
|
||||||
|
text: backendValues.keyNavigationWraps.valueToString
|
||||||
}
|
}
|
||||||
|
|
||||||
ExpandingSpacer {
|
ExpandingSpacer {
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -83,12 +82,13 @@ Column {
|
|||||||
|
|
||||||
SecondColumnLayout {
|
SecondColumnLayout {
|
||||||
ComboBox {
|
ComboBox {
|
||||||
|
scope: "ListView"
|
||||||
model: ["Horizontal", "Vertical"]
|
model: ["Horizontal", "Vertical"]
|
||||||
backendValue: backendValues.orientation
|
backendValue: backendValues.orientation
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
scope: "ListView"
|
|
||||||
}
|
}
|
||||||
|
ExpandingSpacer {
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Label {
|
Label {
|
||||||
@@ -97,14 +97,12 @@ Column {
|
|||||||
|
|
||||||
SecondColumnLayout {
|
SecondColumnLayout {
|
||||||
ComboBox {
|
ComboBox {
|
||||||
|
scope: "Qt"
|
||||||
model: ["LeftToRight", "RightToLeft"]
|
model: ["LeftToRight", "RightToLeft"]
|
||||||
backendValue: backendValues.layoutDirection
|
backendValue: backendValues.layoutDirection
|
||||||
scope: "Qt"
|
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
}
|
}
|
||||||
|
|
||||||
ExpandingSpacer {
|
ExpandingSpacer {
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -115,14 +113,12 @@ Column {
|
|||||||
|
|
||||||
SecondColumnLayout {
|
SecondColumnLayout {
|
||||||
ComboBox {
|
ComboBox {
|
||||||
|
scope: "ListView"
|
||||||
model: ["NoSnap", "SnapToItem", "SnapOneItem"]
|
model: ["NoSnap", "SnapToItem", "SnapOneItem"]
|
||||||
backendValue: backendValues.snapMode
|
backendValue: backendValues.snapMode
|
||||||
scope: "ListView"
|
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
}
|
}
|
||||||
|
|
||||||
ExpandingSpacer {
|
ExpandingSpacer {
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -134,13 +130,11 @@ Column {
|
|||||||
SectionLayout {
|
SectionLayout {
|
||||||
SpinBox {
|
SpinBox {
|
||||||
backendValue: backendValues.spacing
|
backendValue: backendValues.spacing
|
||||||
minimumValue: 0;
|
minimumValue: 0
|
||||||
maximumValue: 1000;
|
maximumValue: 1000
|
||||||
decimals: 0
|
decimals: 0
|
||||||
}
|
}
|
||||||
|
|
||||||
ExpandingSpacer {
|
ExpandingSpacer {
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -161,14 +155,12 @@ Column {
|
|||||||
|
|
||||||
SecondColumnLayout {
|
SecondColumnLayout {
|
||||||
ComboBox {
|
ComboBox {
|
||||||
|
scope: "ListView"
|
||||||
model: ["NoHighlightRange", "ApplyRange", "StrictlyEnforceRange"]
|
model: ["NoHighlightRange", "ApplyRange", "StrictlyEnforceRange"]
|
||||||
backendValue: backendValues.highlightRangeMode
|
backendValue: backendValues.highlightRangeMode
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
scope: "ListView"
|
|
||||||
}
|
}
|
||||||
|
|
||||||
ExpandingSpacer {
|
ExpandingSpacer {
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -181,13 +173,11 @@ Column {
|
|||||||
SectionLayout {
|
SectionLayout {
|
||||||
SpinBox {
|
SpinBox {
|
||||||
backendValue: backendValues.highlightMoveDuration
|
backendValue: backendValues.highlightMoveDuration
|
||||||
minimumValue: 0;
|
minimumValue: 0
|
||||||
maximumValue: 1000;
|
maximumValue: 1000
|
||||||
decimals: 0
|
decimals: 0
|
||||||
}
|
}
|
||||||
|
|
||||||
ExpandingSpacer {
|
ExpandingSpacer {
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -199,13 +189,11 @@ Column {
|
|||||||
SectionLayout {
|
SectionLayout {
|
||||||
SpinBox {
|
SpinBox {
|
||||||
backendValue: backendValues.highlightMoveSpeed
|
backendValue: backendValues.highlightMoveSpeed
|
||||||
minimumValue: 0;
|
minimumValue: 0
|
||||||
maximumValue: 1000;
|
maximumValue: 1000
|
||||||
decimals: 0
|
decimals: 0
|
||||||
}
|
}
|
||||||
|
|
||||||
ExpandingSpacer {
|
ExpandingSpacer {
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -217,13 +205,11 @@ Column {
|
|||||||
SectionLayout {
|
SectionLayout {
|
||||||
SpinBox {
|
SpinBox {
|
||||||
backendValue: backendValues.highlightResizeDuration
|
backendValue: backendValues.highlightResizeDuration
|
||||||
minimumValue: 0;
|
minimumValue: 0
|
||||||
maximumValue: 1000;
|
maximumValue: 1000
|
||||||
decimals: 0
|
decimals: 0
|
||||||
}
|
}
|
||||||
|
|
||||||
ExpandingSpacer {
|
ExpandingSpacer {
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -235,13 +221,11 @@ Column {
|
|||||||
SectionLayout {
|
SectionLayout {
|
||||||
SpinBox {
|
SpinBox {
|
||||||
backendValue: backendValues.preferredHighlightBegin
|
backendValue: backendValues.preferredHighlightBegin
|
||||||
minimumValue: 0;
|
minimumValue: 0
|
||||||
maximumValue: 1000;
|
maximumValue: 1000
|
||||||
decimals: 0
|
decimals: 0
|
||||||
}
|
}
|
||||||
|
|
||||||
ExpandingSpacer {
|
ExpandingSpacer {
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -253,13 +237,11 @@ Column {
|
|||||||
SectionLayout {
|
SectionLayout {
|
||||||
SpinBox {
|
SpinBox {
|
||||||
backendValue: backendValues.preferredHighlightEnd
|
backendValue: backendValues.preferredHighlightEnd
|
||||||
minimumValue: 0;
|
minimumValue: 0
|
||||||
maximumValue: 1000;
|
maximumValue: 1000
|
||||||
decimals: 0
|
decimals: 0
|
||||||
}
|
}
|
||||||
|
|
||||||
ExpandingSpacer {
|
ExpandingSpacer {
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -270,11 +252,11 @@ Column {
|
|||||||
|
|
||||||
SectionLayout {
|
SectionLayout {
|
||||||
CheckBox {
|
CheckBox {
|
||||||
|
Layout.fillWidth: true
|
||||||
backendValue: backendValues.highlightFollowsCurrentItem
|
backendValue: backendValues.highlightFollowsCurrentItem
|
||||||
|
text: backendValues.highlightFollowsCurrentItem.valueToString
|
||||||
}
|
}
|
||||||
|
|
||||||
ExpandingSpacer {
|
ExpandingSpacer {
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -44,11 +44,12 @@ Column {
|
|||||||
|
|
||||||
SecondColumnLayout {
|
SecondColumnLayout {
|
||||||
CheckBox {
|
CheckBox {
|
||||||
|
Layout.fillWidth: true
|
||||||
backendValue: backendValues.enabled
|
backendValue: backendValues.enabled
|
||||||
|
text: backendValues.enabled.valueToString
|
||||||
}
|
}
|
||||||
|
|
||||||
ExpandingSpacer {
|
ExpandingSpacer {
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -59,7 +60,9 @@ Column {
|
|||||||
|
|
||||||
SecondColumnLayout {
|
SecondColumnLayout {
|
||||||
CheckBox {
|
CheckBox {
|
||||||
|
Layout.fillWidth: true
|
||||||
backendValue: backendValues.hoverEnabled
|
backendValue: backendValues.hoverEnabled
|
||||||
|
text: backendValues.hoverEnabled.valueToString
|
||||||
}
|
}
|
||||||
|
|
||||||
ExpandingSpacer {
|
ExpandingSpacer {
|
||||||
|
@@ -46,13 +46,11 @@ Column {
|
|||||||
SecondColumnLayout {
|
SecondColumnLayout {
|
||||||
SpinBox {
|
SpinBox {
|
||||||
backendValue: backendValues.dragMargin
|
backendValue: backendValues.dragMargin
|
||||||
minimumValue: 0;
|
minimumValue: 0
|
||||||
maximumValue: 100;
|
maximumValue: 100
|
||||||
decimals: 0
|
decimals: 0
|
||||||
}
|
}
|
||||||
|
|
||||||
ExpandingSpacer {
|
ExpandingSpacer {
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -63,13 +61,11 @@ Column {
|
|||||||
SecondColumnLayout {
|
SecondColumnLayout {
|
||||||
SpinBox {
|
SpinBox {
|
||||||
backendValue: backendValues.flickDeceleration
|
backendValue: backendValues.flickDeceleration
|
||||||
minimumValue: 0;
|
minimumValue: 0
|
||||||
maximumValue: 1000;
|
maximumValue: 1000
|
||||||
decimals: 0
|
decimals: 0
|
||||||
}
|
}
|
||||||
|
|
||||||
ExpandingSpacer {
|
ExpandingSpacer {
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -80,11 +76,11 @@ Column {
|
|||||||
|
|
||||||
SecondColumnLayout {
|
SecondColumnLayout {
|
||||||
CheckBox {
|
CheckBox {
|
||||||
|
Layout.fillWidth: true
|
||||||
backendValue: backendValues.interactive
|
backendValue: backendValues.interactive
|
||||||
|
text: backendValues.interactive.valueToString
|
||||||
}
|
}
|
||||||
|
|
||||||
ExpandingSpacer {
|
ExpandingSpacer {
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -96,13 +92,11 @@ Column {
|
|||||||
SecondColumnLayout {
|
SecondColumnLayout {
|
||||||
SpinBox {
|
SpinBox {
|
||||||
backendValue: backendValues.offset
|
backendValue: backendValues.offset
|
||||||
minimumValue: 0;
|
minimumValue: 0
|
||||||
maximumValue: 1000;
|
maximumValue: 1000
|
||||||
decimals: 0
|
decimals: 0
|
||||||
}
|
}
|
||||||
|
|
||||||
ExpandingSpacer {
|
ExpandingSpacer {
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -114,13 +108,11 @@ Column {
|
|||||||
SecondColumnLayout {
|
SecondColumnLayout {
|
||||||
SpinBox {
|
SpinBox {
|
||||||
backendValue: backendValues.pathItemCount
|
backendValue: backendValues.pathItemCount
|
||||||
minimumValue: -1;
|
minimumValue: -1
|
||||||
maximumValue: 1000;
|
maximumValue: 1000
|
||||||
decimals: 0
|
decimals: 0
|
||||||
}
|
}
|
||||||
|
|
||||||
ExpandingSpacer {
|
ExpandingSpacer {
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -139,18 +131,15 @@ Column {
|
|||||||
|
|
||||||
SecondColumnLayout {
|
SecondColumnLayout {
|
||||||
ComboBox {
|
ComboBox {
|
||||||
|
scope: "PathView"
|
||||||
model: ["NoHighlightRange", "ApplyRange", "StrictlyEnforceRange"]
|
model: ["NoHighlightRange", "ApplyRange", "StrictlyEnforceRange"]
|
||||||
backendValue: backendValues.highlightRangeMode
|
backendValue: backendValues.highlightRangeMode
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
scope: "PathView"
|
|
||||||
}
|
}
|
||||||
|
|
||||||
ExpandingSpacer {
|
ExpandingSpacer {
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
Label {
|
Label {
|
||||||
text: qsTr("Move duration")
|
text: qsTr("Move duration")
|
||||||
tooltip: qsTr("Move animation duration of the highlight delegate.")
|
tooltip: qsTr("Move animation duration of the highlight delegate.")
|
||||||
@@ -159,13 +148,11 @@ Column {
|
|||||||
SecondColumnLayout {
|
SecondColumnLayout {
|
||||||
SpinBox {
|
SpinBox {
|
||||||
backendValue: backendValues.highlightMoveDuration
|
backendValue: backendValues.highlightMoveDuration
|
||||||
minimumValue: 0;
|
minimumValue: 0
|
||||||
maximumValue: 1000;
|
maximumValue: 1000
|
||||||
decimals: 0
|
decimals: 0
|
||||||
}
|
}
|
||||||
|
|
||||||
ExpandingSpacer {
|
ExpandingSpacer {
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -177,13 +164,11 @@ Column {
|
|||||||
SecondColumnLayout {
|
SecondColumnLayout {
|
||||||
SpinBox {
|
SpinBox {
|
||||||
backendValue: backendValues.preferredHighlightBegin
|
backendValue: backendValues.preferredHighlightBegin
|
||||||
minimumValue: 0;
|
minimumValue: 0
|
||||||
maximumValue: 1;
|
maximumValue: 1
|
||||||
decimals: 2
|
decimals: 2
|
||||||
}
|
}
|
||||||
|
|
||||||
ExpandingSpacer {
|
ExpandingSpacer {
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -195,13 +180,11 @@ Column {
|
|||||||
SecondColumnLayout {
|
SecondColumnLayout {
|
||||||
SpinBox {
|
SpinBox {
|
||||||
backendValue: backendValues.preferredHighlightEnd
|
backendValue: backendValues.preferredHighlightEnd
|
||||||
minimumValue: 0;
|
minimumValue: 0
|
||||||
maximumValue: 1;
|
maximumValue: 1
|
||||||
decimals: 2
|
decimals: 2
|
||||||
}
|
}
|
||||||
|
|
||||||
ExpandingSpacer {
|
ExpandingSpacer {
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -27,7 +27,6 @@ import QtQuick 2.1
|
|||||||
import HelperWidgets 2.0
|
import HelperWidgets 2.0
|
||||||
import QtQuick.Layouts 1.0
|
import QtQuick.Layouts 1.0
|
||||||
|
|
||||||
|
|
||||||
Section {
|
Section {
|
||||||
anchors.left: parent.left
|
anchors.left: parent.left
|
||||||
anchors.right: parent.right
|
anchors.right: parent.right
|
||||||
@@ -40,7 +39,6 @@ Section {
|
|||||||
rows: 4
|
rows: 4
|
||||||
columns: 2
|
columns: 2
|
||||||
|
|
||||||
|
|
||||||
Label {
|
Label {
|
||||||
visible: textInputSection.isTextInput
|
visible: textInputSection.isTextInput
|
||||||
text: qsTr("Input mask")
|
text: qsTr("Input mask")
|
||||||
@@ -62,7 +60,7 @@ Section {
|
|||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
backendValue: backendValues.echoMode
|
backendValue: backendValues.echoMode
|
||||||
scope: "TextInput"
|
scope: "TextInput"
|
||||||
model: ["Normal", "Password", "PasswordEchoOnEdit", "NoEcho"]
|
model: ["Normal", "Password", "PasswordEchoOnEdit", "NoEcho"]
|
||||||
}
|
}
|
||||||
|
|
||||||
Label {
|
Label {
|
||||||
@@ -85,25 +83,28 @@ Section {
|
|||||||
SecondColumnLayout {
|
SecondColumnLayout {
|
||||||
ColumnLayout {
|
ColumnLayout {
|
||||||
CheckBox {
|
CheckBox {
|
||||||
|
Layout.fillWidth: true
|
||||||
text: qsTr("Read only")
|
text: qsTr("Read only")
|
||||||
backendValue: backendValues.readOnly;
|
backendValue: backendValues.readOnly
|
||||||
}
|
}
|
||||||
|
|
||||||
CheckBox {
|
CheckBox {
|
||||||
|
Layout.fillWidth: true
|
||||||
text: qsTr("Cursor visible")
|
text: qsTr("Cursor visible")
|
||||||
backendValue: backendValues.cursorVisible;
|
backendValue: backendValues.cursorVisible
|
||||||
}
|
}
|
||||||
|
|
||||||
CheckBox {
|
CheckBox {
|
||||||
|
Layout.fillWidth: true
|
||||||
text: qsTr("Active focus on press")
|
text: qsTr("Active focus on press")
|
||||||
backendValue: backendValues.activeFocusOnPress;
|
backendValue: backendValues.activeFocusOnPress
|
||||||
}
|
}
|
||||||
|
|
||||||
CheckBox {
|
CheckBox {
|
||||||
|
Layout.fillWidth: true
|
||||||
text: qsTr("Auto scroll")
|
text: qsTr("Auto scroll")
|
||||||
backendValue: backendValues.autoScroll;
|
backendValue: backendValues.autoScroll
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -0,0 +1,42 @@
|
|||||||
|
/****************************************************************************
|
||||||
|
**
|
||||||
|
** Copyright (C) 2016 The Qt Company Ltd.
|
||||||
|
** Contact: https://www.qt.io/licensing/
|
||||||
|
**
|
||||||
|
** This file is part of Qt Creator.
|
||||||
|
**
|
||||||
|
** Commercial License Usage
|
||||||
|
** Licensees holding valid commercial Qt licenses may use this file in
|
||||||
|
** accordance with the commercial license agreement provided with the
|
||||||
|
** Software or, alternatively, in accordance with the terms contained in
|
||||||
|
** a written agreement between you and The Qt Company. For licensing terms
|
||||||
|
** and conditions see https://www.qt.io/terms-conditions. For further
|
||||||
|
** information use the contact form at https://www.qt.io/contact-us.
|
||||||
|
**
|
||||||
|
** GNU General Public License Usage
|
||||||
|
** Alternatively, this file may be used under the terms of the GNU
|
||||||
|
** General Public License version 3 as published by the Free Software
|
||||||
|
** Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
|
||||||
|
** included in the packaging of this file. Please review the following
|
||||||
|
** information to ensure the GNU General Public License requirements will
|
||||||
|
** be met: https://www.gnu.org/licenses/gpl-3.0.html.
|
||||||
|
**
|
||||||
|
****************************************************************************/
|
||||||
|
|
||||||
|
import QtQuick 2.1
|
||||||
|
import StudioControls 1.0 as StudioControls
|
||||||
|
import StudioTheme 1.0 as StudioTheme
|
||||||
|
|
||||||
|
StudioControls.AbstractButton {
|
||||||
|
id: button
|
||||||
|
|
||||||
|
property alias tooltip: toolTipArea.tooltip
|
||||||
|
|
||||||
|
ToolTipArea {
|
||||||
|
id: toolTipArea
|
||||||
|
anchors.fill: parent
|
||||||
|
// Without setting the acceptedButtons property the clicked event won't
|
||||||
|
// reach the AbstractButton, it will be consumed by the ToolTipArea
|
||||||
|
acceptedButtons: Qt.NoButton
|
||||||
|
}
|
||||||
|
}
|
@@ -40,10 +40,10 @@ StudioControls.ButtonRow {
|
|||||||
id: group
|
id: group
|
||||||
}
|
}
|
||||||
|
|
||||||
StudioControls.AbstractButton {
|
AbstractButton {
|
||||||
checkable: true
|
checkable: true
|
||||||
buttonIcon: StudioTheme.Constants.anchorTop
|
buttonIcon: StudioTheme.Constants.anchorTop
|
||||||
//tooltip: qsTr("Anchor item to the top.")
|
tooltip: qsTr("Anchor item to the top.")
|
||||||
|
|
||||||
property bool topAnchored: anchorBackend.topAnchored
|
property bool topAnchored: anchorBackend.topAnchored
|
||||||
onTopAnchoredChanged: {
|
onTopAnchoredChanged: {
|
||||||
@@ -61,10 +61,10 @@ StudioControls.ButtonRow {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
StudioControls.AbstractButton {
|
AbstractButton {
|
||||||
checkable: true
|
checkable: true
|
||||||
buttonIcon: StudioTheme.Constants.anchorBottom
|
buttonIcon: StudioTheme.Constants.anchorBottom
|
||||||
//tooltip: qsTr("Anchor item to the bottom.")
|
tooltip: qsTr("Anchor item to the bottom.")
|
||||||
|
|
||||||
property bool bottomAnchored: anchorBackend.bottomAnchored
|
property bool bottomAnchored: anchorBackend.bottomAnchored
|
||||||
onBottomAnchoredChanged: {
|
onBottomAnchoredChanged: {
|
||||||
@@ -80,13 +80,12 @@ StudioControls.ButtonRow {
|
|||||||
anchorBackend.bottomAnchored = false;
|
anchorBackend.bottomAnchored = false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
StudioControls.AbstractButton {
|
AbstractButton {
|
||||||
checkable: true
|
checkable: true
|
||||||
buttonIcon: StudioTheme.Constants.anchorLeft
|
buttonIcon: StudioTheme.Constants.anchorLeft
|
||||||
//tooltip: qsTr("Anchor item to the left.")
|
tooltip: qsTr("Anchor item to the left.")
|
||||||
|
|
||||||
property bool leftAnchored: anchorBackend.leftAnchored
|
property bool leftAnchored: anchorBackend.leftAnchored
|
||||||
onLeftAnchoredChanged: {
|
onLeftAnchoredChanged: {
|
||||||
@@ -104,10 +103,10 @@ StudioControls.ButtonRow {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
StudioControls.AbstractButton {
|
AbstractButton {
|
||||||
checkable: true
|
checkable: true
|
||||||
buttonIcon: StudioTheme.Constants.anchorRight
|
buttonIcon: StudioTheme.Constants.anchorRight
|
||||||
//tooltip: qsTr("Anchor item to the right.")
|
tooltip: qsTr("Anchor item to the right.")
|
||||||
|
|
||||||
property bool rightAnchored: anchorBackend.rightAnchored
|
property bool rightAnchored: anchorBackend.rightAnchored
|
||||||
onRightAnchoredChanged: {
|
onRightAnchoredChanged: {
|
||||||
@@ -125,15 +124,14 @@ StudioControls.ButtonRow {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
StudioControls.AbstractButton {
|
AbstractButton {
|
||||||
enabled: false
|
enabled: false
|
||||||
}
|
}
|
||||||
|
|
||||||
|
AbstractButton {
|
||||||
StudioControls.AbstractButton {
|
|
||||||
checkable: true
|
checkable: true
|
||||||
buttonIcon: StudioTheme.Constants.anchorFill
|
buttonIcon: StudioTheme.Constants.anchorFill
|
||||||
//tooltip: qsTr("Fill parent item.")
|
tooltip: qsTr("Fill parent item.")
|
||||||
|
|
||||||
property bool isFilled: anchorBackend.isFilled
|
property bool isFilled: anchorBackend.isFilled
|
||||||
onIsFilledChanged: {
|
onIsFilledChanged: {
|
||||||
@@ -149,14 +147,14 @@ StudioControls.ButtonRow {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
StudioControls.AbstractButton {
|
AbstractButton {
|
||||||
enabled: false
|
enabled: false
|
||||||
}
|
}
|
||||||
|
|
||||||
StudioControls.AbstractButton {
|
AbstractButton {
|
||||||
checkable: true
|
checkable: true
|
||||||
buttonIcon: StudioTheme.Constants.centerVertical
|
buttonIcon: StudioTheme.Constants.centerVertical
|
||||||
//tooltip: qsTr("Anchor item vertically.")
|
tooltip: qsTr("Anchor item vertically.")
|
||||||
|
|
||||||
property bool verticalCentered: anchorBackend.verticalCentered;
|
property bool verticalCentered: anchorBackend.verticalCentered;
|
||||||
onVerticalCenteredChanged: {
|
onVerticalCenteredChanged: {
|
||||||
@@ -176,10 +174,10 @@ StudioControls.ButtonRow {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
StudioControls.AbstractButton {
|
AbstractButton {
|
||||||
checkable: true
|
checkable: true
|
||||||
buttonIcon: StudioTheme.Constants.centerHorizontal
|
buttonIcon: StudioTheme.Constants.centerHorizontal
|
||||||
//tooltip: qsTr("Anchor item horizontally.")
|
tooltip: qsTr("Anchor item horizontally.")
|
||||||
|
|
||||||
property bool horizontalCentered: anchorBackend.horizontalCentered;
|
property bool horizontalCentered: anchorBackend.horizontalCentered;
|
||||||
onHorizontalCenteredChanged: {
|
onHorizontalCenteredChanged: {
|
||||||
|
@@ -24,61 +24,42 @@
|
|||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
|
||||||
import QtQuick 2.1
|
import QtQuick 2.1
|
||||||
import QtQuick.Controls 1.1 as Controls
|
|
||||||
import QtQuick.Controls.Styles 1.0
|
|
||||||
import QtQuickDesignerTheme 1.0
|
|
||||||
import "Constants.js" as Constants
|
|
||||||
import StudioTheme 1.0 as StudioTheme
|
import StudioTheme 1.0 as StudioTheme
|
||||||
|
|
||||||
QtObject {
|
QtObject {
|
||||||
id: innerObject
|
id: innerObject
|
||||||
|
|
||||||
property variant backendValue
|
property variant backendValue
|
||||||
property color textColor: StudioTheme.Values.themeTextColor//Theme.color(Theme.PanelTextColorLight)
|
property color textColor: StudioTheme.Values.themeTextColor
|
||||||
property variant valueFromBackend: backendValue.value;
|
property variant valueFromBackend: backendValue.value;
|
||||||
property bool baseStateFlag: isBaseState;
|
property bool baseStateFlag: isBaseState;
|
||||||
property bool isInModel: backendValue.isInModel;
|
property bool isInModel: backendValue.isInModel;
|
||||||
property bool isInSubState: backendValue.isInSubState;
|
property bool isInSubState: backendValue.isInSubState;
|
||||||
property bool highlight: textColor === __changedTextColor
|
property bool highlight: textColor === __changedTextColor
|
||||||
|
|
||||||
property color __defaultTextColor: StudioTheme.Values.themeTextColor//Theme.color(Theme.PanelTextColorLight)
|
property color __defaultTextColor: StudioTheme.Values.themeTextColor
|
||||||
readonly property color __changedTextColor: StudioTheme.Values.themeInteraction//Theme.color(Theme.QmlDesigner_HighlightColor)
|
readonly property color __changedTextColor: StudioTheme.Values.themeInteraction
|
||||||
|
|
||||||
onBackendValueChanged: {
|
onBackendValueChanged: evaluate()
|
||||||
evaluate();
|
onValueFromBackendChanged: evaluate()
|
||||||
}
|
onBaseStateFlagChanged: evaluate()
|
||||||
|
onIsInModelChanged: evaluate()
|
||||||
onValueFromBackendChanged: {
|
onIsInSubStateChanged: evaluate()
|
||||||
evaluate();
|
|
||||||
}
|
|
||||||
|
|
||||||
onBaseStateFlagChanged: {
|
|
||||||
evaluate();
|
|
||||||
}
|
|
||||||
|
|
||||||
onIsInModelChanged: {
|
|
||||||
evaluate();
|
|
||||||
}
|
|
||||||
|
|
||||||
onIsInSubStateChanged: {
|
|
||||||
evaluate();
|
|
||||||
}
|
|
||||||
|
|
||||||
function evaluate() {
|
function evaluate() {
|
||||||
if (innerObject.backendValue === undefined)
|
if (innerObject.backendValue === undefined)
|
||||||
return;
|
return
|
||||||
|
|
||||||
if (baseStateFlag) {
|
if (innerObject.baseStateFlag) {
|
||||||
if (innerObject.backendValue.isInModel)
|
if (innerObject.backendValue.isInModel)
|
||||||
innerObject.textColor = __changedTextColor
|
innerObject.textColor = __changedTextColor
|
||||||
else
|
else
|
||||||
innerObject.textColor = Theme.color(Theme.PanelTextColorLight)
|
innerObject.textColor = __defaultTextColor
|
||||||
} else {
|
} else {
|
||||||
if (innerObject.backendValue.isInSubState)
|
if (innerObject.backendValue.isInSubState)
|
||||||
innerObject.textColor = Constants.colorsChangedStateText
|
innerObject.textColor = StudioTheme.Values.themeChangedStateText
|
||||||
else
|
else
|
||||||
innerObject.textColor = Theme.color(Theme.PanelTextColorLight)
|
innerObject.textColor = __defaultTextColor
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -23,10 +23,7 @@
|
|||||||
**
|
**
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
|
||||||
import QtQuick 2.1
|
import StudioControls 1.0 as StudioControls
|
||||||
import QtQuick.Controls 1.0 as Controls
|
|
||||||
import QtQuick.Layouts 1.0
|
|
||||||
|
|
||||||
Item {
|
StudioControls.ExpandingSpacer {
|
||||||
Layout.fillWidth: true
|
|
||||||
}
|
}
|
||||||
|
@@ -104,7 +104,6 @@ Item {
|
|||||||
onTriggered: {
|
onTriggered: {
|
||||||
transaction.start()
|
transaction.start()
|
||||||
backendValue.resetValue()
|
backendValue.resetValue()
|
||||||
backendValue.resetValue()
|
|
||||||
transaction.end()
|
transaction.end()
|
||||||
extendedFunctionButton.reseted()
|
extendedFunctionButton.reseted()
|
||||||
}
|
}
|
||||||
|
@@ -50,7 +50,8 @@ Section {
|
|||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
scope: "Flickable"
|
scope: "Flickable"
|
||||||
}
|
}
|
||||||
|
ExpandingSpacer {
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Label {
|
Label {
|
||||||
@@ -65,7 +66,8 @@ Section {
|
|||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
scope: "Flickable"
|
scope: "Flickable"
|
||||||
}
|
}
|
||||||
|
ExpandingSpacer {
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -81,18 +83,21 @@ Section {
|
|||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
scope: "Flickable"
|
scope: "Flickable"
|
||||||
}
|
}
|
||||||
|
ExpandingSpacer {
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Label {
|
Label {
|
||||||
text:qsTr("Interactive")
|
text: qsTr("Interactive")
|
||||||
|
tooltip: qsTr("Describes whether the user can interact with the Flickable. A user cannot drag or flick a Flickable that is not interactive.")
|
||||||
}
|
}
|
||||||
|
|
||||||
SecondColumnLayout {
|
SecondColumnLayout {
|
||||||
CheckBox {
|
CheckBox {
|
||||||
|
Layout.fillWidth: true
|
||||||
backendValue: backendValues.interactive
|
backendValue: backendValues.interactive
|
||||||
|
text: backendValues.interactive.valueToString
|
||||||
}
|
}
|
||||||
|
|
||||||
ExpandingSpacer {
|
ExpandingSpacer {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -109,7 +114,6 @@ Section {
|
|||||||
maximumValue: 8000
|
maximumValue: 8000
|
||||||
decimals: 0
|
decimals: 0
|
||||||
}
|
}
|
||||||
|
|
||||||
ExpandingSpacer {
|
ExpandingSpacer {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -126,7 +130,6 @@ Section {
|
|||||||
maximumValue: 8000
|
maximumValue: 8000
|
||||||
decimals: 0
|
decimals: 0
|
||||||
}
|
}
|
||||||
|
|
||||||
ExpandingSpacer {
|
ExpandingSpacer {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -143,21 +146,21 @@ Section {
|
|||||||
maximumValue: 2000
|
maximumValue: 2000
|
||||||
decimals: 0
|
decimals: 0
|
||||||
}
|
}
|
||||||
|
|
||||||
ExpandingSpacer {
|
ExpandingSpacer {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Label {
|
Label {
|
||||||
text:qsTr("Pixel aligned")
|
text: qsTr("Pixel aligned")
|
||||||
|
tooltip: qsTr("Sets the alignment of contentX and contentY to pixels (true) or subpixels (false).")
|
||||||
}
|
}
|
||||||
|
|
||||||
SecondColumnLayout {
|
SecondColumnLayout {
|
||||||
CheckBox {
|
CheckBox {
|
||||||
|
Layout.fillWidth: true
|
||||||
backendValue: backendValues.pixelAligned
|
backendValue: backendValues.pixelAligned
|
||||||
tooltip: qsTr("Sets the alignment of contentX and contentY to pixels (true) or subpixels (false).")
|
text: backendValues.pixelAligned.valueToString
|
||||||
}
|
}
|
||||||
|
|
||||||
ExpandingSpacer {
|
ExpandingSpacer {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -170,7 +173,7 @@ Section {
|
|||||||
|
|
||||||
Label {
|
Label {
|
||||||
text: "W"
|
text: "W"
|
||||||
width: 28
|
width: 42
|
||||||
}
|
}
|
||||||
|
|
||||||
SpinBox {
|
SpinBox {
|
||||||
@@ -178,6 +181,7 @@ Section {
|
|||||||
minimumValue: 0
|
minimumValue: 0
|
||||||
maximumValue: 8000
|
maximumValue: 8000
|
||||||
implicitWidth: root.spinBoxWidth
|
implicitWidth: root.spinBoxWidth
|
||||||
|
Layout.fillWidth: true
|
||||||
}
|
}
|
||||||
|
|
||||||
Item {
|
Item {
|
||||||
@@ -187,7 +191,7 @@ Section {
|
|||||||
|
|
||||||
Label {
|
Label {
|
||||||
text: "H"
|
text: "H"
|
||||||
width: 28
|
width: 42
|
||||||
}
|
}
|
||||||
|
|
||||||
SpinBox {
|
SpinBox {
|
||||||
@@ -195,11 +199,9 @@ Section {
|
|||||||
minimumValue: 0
|
minimumValue: 0
|
||||||
maximumValue: 8000
|
maximumValue: 8000
|
||||||
implicitWidth: root.spinBoxWidth
|
implicitWidth: root.spinBoxWidth
|
||||||
|
Layout.fillWidth: true
|
||||||
}
|
}
|
||||||
|
|
||||||
ExpandingSpacer {
|
ExpandingSpacer {
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -211,7 +213,7 @@ Section {
|
|||||||
|
|
||||||
Label {
|
Label {
|
||||||
text: "X"
|
text: "X"
|
||||||
width: 28
|
width: 42
|
||||||
}
|
}
|
||||||
|
|
||||||
SpinBox {
|
SpinBox {
|
||||||
@@ -219,6 +221,7 @@ Section {
|
|||||||
minimumValue: 0
|
minimumValue: 0
|
||||||
maximumValue: 8000
|
maximumValue: 8000
|
||||||
implicitWidth: root.spinBoxWidth
|
implicitWidth: root.spinBoxWidth
|
||||||
|
Layout.fillWidth: true
|
||||||
}
|
}
|
||||||
|
|
||||||
Item {
|
Item {
|
||||||
@@ -228,7 +231,7 @@ Section {
|
|||||||
|
|
||||||
Label {
|
Label {
|
||||||
text: "Y"
|
text: "Y"
|
||||||
width: 28
|
width: 42
|
||||||
}
|
}
|
||||||
|
|
||||||
SpinBox {
|
SpinBox {
|
||||||
@@ -236,11 +239,9 @@ Section {
|
|||||||
minimumValue: 0
|
minimumValue: 0
|
||||||
maximumValue: 8000
|
maximumValue: 8000
|
||||||
implicitWidth: root.spinBoxWidth
|
implicitWidth: root.spinBoxWidth
|
||||||
|
Layout.fillWidth: true
|
||||||
}
|
}
|
||||||
|
|
||||||
ExpandingSpacer {
|
ExpandingSpacer {
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -253,7 +254,7 @@ Section {
|
|||||||
|
|
||||||
Label {
|
Label {
|
||||||
text: "Top"
|
text: "Top"
|
||||||
width: 28
|
width: 42
|
||||||
}
|
}
|
||||||
|
|
||||||
SpinBox {
|
SpinBox {
|
||||||
@@ -262,6 +263,7 @@ Section {
|
|||||||
minimumValue: 0
|
minimumValue: 0
|
||||||
decimals: 0
|
decimals: 0
|
||||||
implicitWidth: root.spinBoxWidth
|
implicitWidth: root.spinBoxWidth
|
||||||
|
Layout.fillWidth: true
|
||||||
}
|
}
|
||||||
|
|
||||||
Item {
|
Item {
|
||||||
@@ -271,7 +273,7 @@ Section {
|
|||||||
|
|
||||||
Label {
|
Label {
|
||||||
text: "Bottom"
|
text: "Bottom"
|
||||||
width: 28
|
width: 42
|
||||||
}
|
}
|
||||||
|
|
||||||
SpinBox {
|
SpinBox {
|
||||||
@@ -280,9 +282,9 @@ Section {
|
|||||||
minimumValue: 0
|
minimumValue: 0
|
||||||
decimals: 0
|
decimals: 0
|
||||||
implicitWidth: root.spinBoxWidth
|
implicitWidth: root.spinBoxWidth
|
||||||
|
Layout.fillWidth: true
|
||||||
}
|
}
|
||||||
ExpandingSpacer {
|
ExpandingSpacer {
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -295,7 +297,7 @@ Section {
|
|||||||
|
|
||||||
Label {
|
Label {
|
||||||
text: "Left"
|
text: "Left"
|
||||||
width: 28
|
width: 42
|
||||||
}
|
}
|
||||||
|
|
||||||
SpinBox {
|
SpinBox {
|
||||||
@@ -304,6 +306,7 @@ Section {
|
|||||||
minimumValue: 0
|
minimumValue: 0
|
||||||
decimals: 0
|
decimals: 0
|
||||||
implicitWidth: root.spinBoxWidth
|
implicitWidth: root.spinBoxWidth
|
||||||
|
Layout.fillWidth: true
|
||||||
}
|
}
|
||||||
|
|
||||||
Item {
|
Item {
|
||||||
@@ -313,7 +316,7 @@ Section {
|
|||||||
|
|
||||||
Label {
|
Label {
|
||||||
text: "Right"
|
text: "Right"
|
||||||
width: 28
|
width: 42
|
||||||
}
|
}
|
||||||
|
|
||||||
SpinBox {
|
SpinBox {
|
||||||
@@ -322,11 +325,10 @@ Section {
|
|||||||
minimumValue: 0
|
minimumValue: 0
|
||||||
decimals: 0
|
decimals: 0
|
||||||
implicitWidth: root.spinBoxWidth
|
implicitWidth: root.spinBoxWidth
|
||||||
|
Layout.fillWidth: true
|
||||||
}
|
}
|
||||||
ExpandingSpacer {
|
ExpandingSpacer {
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -45,8 +45,8 @@ Section {
|
|||||||
width: 42
|
width: 42
|
||||||
}
|
}
|
||||||
SpinBox {
|
SpinBox {
|
||||||
maximumValue: 9999999
|
maximumValue: 10000
|
||||||
minimumValue: -9999999
|
minimumValue: -10000
|
||||||
decimals: 0
|
decimals: 0
|
||||||
backendValue: backendValues.topPadding
|
backendValue: backendValues.topPadding
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
@@ -62,8 +62,8 @@ Section {
|
|||||||
width: 42
|
width: 42
|
||||||
}
|
}
|
||||||
SpinBox {
|
SpinBox {
|
||||||
maximumValue: 9999999
|
maximumValue: 10000
|
||||||
minimumValue: -9999999
|
minimumValue: -10000
|
||||||
decimals: 0
|
decimals: 0
|
||||||
backendValue: backendValues.bottomPadding
|
backendValue: backendValues.bottomPadding
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
@@ -80,8 +80,8 @@ Section {
|
|||||||
width: 42
|
width: 42
|
||||||
}
|
}
|
||||||
SpinBox {
|
SpinBox {
|
||||||
maximumValue: 9999999
|
maximumValue: 10000
|
||||||
minimumValue: -9999999
|
minimumValue: -10000
|
||||||
decimals: 0
|
decimals: 0
|
||||||
backendValue: backendValues.leftPadding
|
backendValue: backendValues.leftPadding
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
@@ -97,8 +97,8 @@ Section {
|
|||||||
width: 42
|
width: 42
|
||||||
}
|
}
|
||||||
SpinBox {
|
SpinBox {
|
||||||
maximumValue: 9999999
|
maximumValue: 10000
|
||||||
minimumValue: -9999999
|
minimumValue: -10000
|
||||||
decimals: 0
|
decimals: 0
|
||||||
backendValue: backendValues.rightPadding
|
backendValue: backendValues.rightPadding
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
@@ -111,8 +111,8 @@ Section {
|
|||||||
}
|
}
|
||||||
SecondColumnLayout {
|
SecondColumnLayout {
|
||||||
SpinBox {
|
SpinBox {
|
||||||
maximumValue: 9999999
|
maximumValue: 10000
|
||||||
minimumValue: -9999999
|
minimumValue: -10000
|
||||||
decimals: 0
|
decimals: 0
|
||||||
backendValue: backendValues.padding
|
backendValue: backendValues.padding
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
|
@@ -31,16 +31,15 @@ import QtQuick.Controls.Styles 1.1
|
|||||||
|
|
||||||
RowLayout {
|
RowLayout {
|
||||||
id: urlChooser
|
id: urlChooser
|
||||||
|
|
||||||
property variant backendValue
|
property variant backendValue
|
||||||
|
|
||||||
property color textColor: colorLogic.highlight ? colorLogic.textColor : "white"
|
property color textColor: colorLogic.highlight ? colorLogic.textColor : "white"
|
||||||
|
property string filter: "*.png *.gif *.jpg *.bmp *.jpeg *.svg *.pbm *.pgm *.ppm *.xbm *.xpm"
|
||||||
property string filter: "*.png *.gif *.jpg *.bmp *.jpeg *.svg"
|
|
||||||
|
|
||||||
FileResourcesModel {
|
FileResourcesModel {
|
||||||
|
id: fileModel
|
||||||
modelNodeBackendProperty: modelNodeBackend
|
modelNodeBackendProperty: modelNodeBackend
|
||||||
filter: urlChooser.filter
|
filter: urlChooser.filter
|
||||||
id: fileModel
|
|
||||||
}
|
}
|
||||||
|
|
||||||
ColorLogic {
|
ColorLogic {
|
||||||
@@ -57,35 +56,31 @@ RowLayout {
|
|||||||
|
|
||||||
ExtendedFunctionLogic {
|
ExtendedFunctionLogic {
|
||||||
id: extFuncLogic
|
id: extFuncLogic
|
||||||
backendValue: comboBox.backendValue
|
backendValue: urlChooser.backendValue
|
||||||
}
|
}
|
||||||
|
|
||||||
property bool isComplete: false
|
property bool isComplete: false
|
||||||
|
|
||||||
property bool dirty: false
|
property bool dirty: false
|
||||||
|
|
||||||
onEditTextChanged: comboBox.dirty = true
|
onEditTextChanged: comboBox.dirty = true
|
||||||
|
|
||||||
function setCurrentText(text) {
|
function setCurrentText(text) {
|
||||||
if (text === "")
|
|
||||||
return
|
|
||||||
|
|
||||||
var index = comboBox.find(text)
|
var index = comboBox.find(text)
|
||||||
if (index === -1)
|
if (index === -1)
|
||||||
currentIndex = -1
|
currentIndex = -1
|
||||||
|
|
||||||
editText = text
|
comboBox.editText = text
|
||||||
comboBox.dirty = false
|
comboBox.dirty = false
|
||||||
}
|
}
|
||||||
|
|
||||||
property string textValue: {
|
property string textValue: {
|
||||||
if (backendValue.isBound)
|
if (urlChooser.backendValue.isBound)
|
||||||
return backendValue.expression
|
return urlChooser.backendValue.expression
|
||||||
|
|
||||||
return backendValue.valueToString
|
return urlChooser.backendValue.valueToString
|
||||||
}
|
}
|
||||||
|
|
||||||
onTextValueChanged: setCurrentText(textValue)
|
onTextValueChanged: comboBox.setCurrentText(comboBox.textValue)
|
||||||
|
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
|
|
||||||
@@ -95,27 +90,27 @@ RowLayout {
|
|||||||
|
|
||||||
onModelChanged: {
|
onModelChanged: {
|
||||||
if (!comboBox.isComplete)
|
if (!comboBox.isComplete)
|
||||||
return;
|
return
|
||||||
|
|
||||||
setCurrentText(textValue)
|
comboBox.setCurrentText(comboBox.textValue)
|
||||||
}
|
}
|
||||||
|
|
||||||
onAccepted: {
|
onAccepted: {
|
||||||
if (!comboBox.isComplete)
|
if (!comboBox.isComplete)
|
||||||
return;
|
return
|
||||||
|
|
||||||
if (backendValue.value !== editText)
|
if (comboBox.backendValue.value !== comboBox.editText)
|
||||||
backendValue.value = editText;
|
comboBox.backendValue.value = comboBox.editText
|
||||||
|
|
||||||
comboBox.dirty = false
|
comboBox.dirty = false
|
||||||
}
|
}
|
||||||
|
|
||||||
onFocusChanged: {
|
onFocusChanged: {
|
||||||
if (comboBox.dirty)
|
if (comboBox.dirty)
|
||||||
handleActivate(comboBox.currentIndex)
|
comboBox.handleActivate(comboBox.currentIndex)
|
||||||
}
|
}
|
||||||
|
|
||||||
onActivated: handleActivate(index)
|
onActivated: comboBox.handleActivate(index)
|
||||||
|
|
||||||
function handleActivate(index)
|
function handleActivate(index)
|
||||||
{
|
{
|
||||||
@@ -125,19 +120,19 @@ RowLayout {
|
|||||||
cText = comboBox.editText
|
cText = comboBox.editText
|
||||||
|
|
||||||
if (urlChooser.backendValue === undefined)
|
if (urlChooser.backendValue === undefined)
|
||||||
return;
|
return
|
||||||
|
|
||||||
if (!comboBox.isComplete)
|
if (!comboBox.isComplete)
|
||||||
return;
|
return
|
||||||
|
|
||||||
if (urlChooser.backendValue.value !== cText)
|
if (urlChooser.backendValue.value !== cText)
|
||||||
urlChooser.backendValue.value = cText;
|
urlChooser.backendValue.value = cText
|
||||||
|
|
||||||
comboBox.dirty = false
|
comboBox.dirty = false
|
||||||
}
|
}
|
||||||
|
|
||||||
Component.onCompleted: {
|
Component.onCompleted: {
|
||||||
//Hack to style the text input
|
// Hack to style the text input
|
||||||
for (var i = 0; i < comboBox.children.length; i++) {
|
for (var i = 0; i < comboBox.children.length; i++) {
|
||||||
if (comboBox.children[i].text !== undefined) {
|
if (comboBox.children[i].text !== undefined) {
|
||||||
comboBox.children[i].color = urlChooser.textColor
|
comboBox.children[i].color = urlChooser.textColor
|
||||||
@@ -145,55 +140,18 @@ RowLayout {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
comboBox.isComplete = true
|
comboBox.isComplete = true
|
||||||
setCurrentText(textValue)
|
comboBox.setCurrentText(comboBox.textValue)
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
RoundedPanel {
|
StudioControls.AbstractButton {
|
||||||
roundLeft: true
|
buttonIcon: "..."
|
||||||
roundRight: true
|
iconFont: StudioTheme.Constants.font.family
|
||||||
width: 24
|
iconColor: urlChooser.textColor
|
||||||
height: 18
|
onClicked: {
|
||||||
|
fileModel.openFileDialog()
|
||||||
RoundedPanel {
|
if (fileModel.fileName !== "")
|
||||||
id: darkPanel
|
urlChooser.backendValue.value = fileModel.fileName
|
||||||
roundLeft: true
|
|
||||||
roundRight: true
|
|
||||||
|
|
||||||
anchors.fill: parent
|
|
||||||
|
|
||||||
opacity: 0
|
|
||||||
|
|
||||||
Behavior on opacity {
|
|
||||||
PropertyAnimation {
|
|
||||||
duration: 100
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
gradient: Gradient {
|
|
||||||
GradientStop {color: '#444' ; position: 0}
|
|
||||||
GradientStop {color: '#333' ; position: 1}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
Text {
|
|
||||||
renderType: Text.NativeRendering
|
|
||||||
text: "..."
|
|
||||||
color: urlChooser.textColor
|
|
||||||
anchors.centerIn: parent
|
|
||||||
}
|
|
||||||
|
|
||||||
MouseArea {
|
|
||||||
anchors.fill: parent
|
|
||||||
onClicked: {
|
|
||||||
darkPanel.opacity = 1
|
|
||||||
fileModel.openFileDialog()
|
|
||||||
if (fileModel.fileName != "")
|
|
||||||
backendValue.value = fileModel.fileName
|
|
||||||
darkPanel.opacity = 0
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -1,3 +1,4 @@
|
|||||||
|
AbstractButton 2.0 AbstractButton.qml
|
||||||
ActionIndicator 2.0 ActionIndicator.qml
|
ActionIndicator 2.0 ActionIndicator.qml
|
||||||
AligmentHorizontalButtons 2.0 AligmentHorizontalButtons.qml
|
AligmentHorizontalButtons 2.0 AligmentHorizontalButtons.qml
|
||||||
AligmentVerticalButtons 2.0 AligmentVerticalButtons.qml
|
AligmentVerticalButtons 2.0 AligmentVerticalButtons.qml
|
||||||
|
@@ -32,6 +32,7 @@ T.AbstractButton {
|
|||||||
|
|
||||||
property alias buttonIcon: buttonIcon.text
|
property alias buttonIcon: buttonIcon.text
|
||||||
property alias iconColor: buttonIcon.color
|
property alias iconColor: buttonIcon.color
|
||||||
|
property alias iconFont: buttonIcon.font.family
|
||||||
property alias backgroundVisible: buttonBackground.visible
|
property alias backgroundVisible: buttonBackground.visible
|
||||||
property alias backgroundRadius: buttonBackground.radius
|
property alias backgroundRadius: buttonBackground.radius
|
||||||
|
|
||||||
|
@@ -44,8 +44,8 @@ QtObject {
|
|||||||
readonly property string anchorLeft: "\u0026"
|
readonly property string anchorLeft: "\u0026"
|
||||||
readonly property string anchorRight: "\u0027"
|
readonly property string anchorRight: "\u0027"
|
||||||
readonly property string anchorTop: "\u0028"
|
readonly property string anchorTop: "\u0028"
|
||||||
readonly property string centerHorizontal: "\u0029"
|
readonly property string centerHorizontal: "\u002A"
|
||||||
readonly property string centerVertical: "\u002A"
|
readonly property string centerVertical: "\u0029"
|
||||||
readonly property string closeCross: "\u002B"
|
readonly property string closeCross: "\u002B"
|
||||||
readonly property string fontStyleBold: "\u002C"
|
readonly property string fontStyleBold: "\u002C"
|
||||||
readonly property string fontStyleItalic: "\u002D"
|
readonly property string fontStyleItalic: "\u002D"
|
||||||
|
@@ -122,4 +122,7 @@ QtObject {
|
|||||||
property string themeControlBackgroundInteraction: "#404040" // TODO Name. Right now themeFocusEdit is used for all 'edit' states. Is that correct? Different color!
|
property string themeControlBackgroundInteraction: "#404040" // TODO Name. Right now themeFocusEdit is used for all 'edit' states. Is that correct? Different color!
|
||||||
|
|
||||||
property string themeTranslationIndicatorBorder: "#7f7f7f"
|
property string themeTranslationIndicatorBorder: "#7f7f7f"
|
||||||
|
|
||||||
|
// Taken out of Constants.js
|
||||||
|
property string themeChangedStateText: "#99ccff"
|
||||||
}
|
}
|
||||||
|
@@ -1,9 +1,11 @@
|
|||||||
|
set(CLANG_VERSION ${LLVM_VERSION_MAJOR}.${LLVM_VERSION_MINOR}.${LLVM_VERSION_PATCH})
|
||||||
|
|
||||||
add_qtc_library(ClangSupport
|
add_qtc_library(ClangSupport
|
||||||
PUBLIC_DEPENDS Utils Sqlite Qt5::Core Qt5::Network
|
PUBLIC_DEPENDS Utils Sqlite Qt5::Core Qt5::Network
|
||||||
PUBLIC_DEFINES
|
PUBLIC_DEFINES
|
||||||
CLANG_VERSION="${CLANG_VERSION}"
|
CLANG_VERSION="${CLANG_VERSION}"
|
||||||
CLANG_RESOURCE_DIR="${CLANG_RESOURCE_DIR}"
|
CLANG_RESOURCE_DIR="${LLVM_LIBRARY_DIR}/clang/${CLANG_VERSION}/include"
|
||||||
CLANG_BINDIR="${CLANG_BIN_DIR}"
|
CLANG_BINDIR="${LLVM_TOOLS_BINARY_DIR}"
|
||||||
DEFINES CLANGSUPPORT_BUILD_LIB
|
DEFINES CLANGSUPPORT_BUILD_LIB
|
||||||
SOURCES
|
SOURCES
|
||||||
alivemessage.cpp alivemessage.h
|
alivemessage.cpp alivemessage.h
|
||||||
|
@@ -87,7 +87,7 @@ static CppTools::ClangDiagnosticConfig configFor(const QString &tidyChecks,
|
|||||||
config.setIsReadOnly(true);
|
config.setIsReadOnly(true);
|
||||||
config.setClangOptions(QStringList{QStringLiteral("-Wno-everything")});
|
config.setClangOptions(QStringList{QStringLiteral("-Wno-everything")});
|
||||||
config.setClangTidyMode(CppTools::ClangDiagnosticConfig::TidyMode::ChecksPrefixList);
|
config.setClangTidyMode(CppTools::ClangDiagnosticConfig::TidyMode::ChecksPrefixList);
|
||||||
config.setClangTidyChecks(tidyChecks);
|
config.setClangTidyChecks("-*," + tidyChecks);
|
||||||
config.setClazyChecks(clazyChecks);
|
config.setClazyChecks(clazyChecks);
|
||||||
return config;
|
return config;
|
||||||
}
|
}
|
||||||
|
@@ -198,9 +198,13 @@ void toFront(const SelectionContext &selectionState)
|
|||||||
try {
|
try {
|
||||||
QmlItemNode node = selectionState.firstSelectedModelNode();
|
QmlItemNode node = selectionState.firstSelectedModelNode();
|
||||||
if (node.isValid()) {
|
if (node.isValid()) {
|
||||||
signed int maximumZ = getMaxZValue(siblingsForNode(node));
|
ModelNode modelNode = selectionState.currentSingleSelectedNode();
|
||||||
maximumZ++;
|
NodeListProperty parentProperty = modelNode.parentProperty().toNodeListProperty();
|
||||||
node.setVariantProperty("z", maximumZ);
|
const int index = parentProperty.indexOf(modelNode);
|
||||||
|
const int lastIndex = parentProperty.count() - 1;
|
||||||
|
|
||||||
|
if (index != lastIndex)
|
||||||
|
parentProperty.slide(index, lastIndex);
|
||||||
}
|
}
|
||||||
} catch (const RewritingException &e) { //better save then sorry
|
} catch (const RewritingException &e) { //better save then sorry
|
||||||
e.showException();
|
e.showException();
|
||||||
@@ -215,9 +219,12 @@ void toBack(const SelectionContext &selectionState)
|
|||||||
try {
|
try {
|
||||||
QmlItemNode node = selectionState.firstSelectedModelNode();
|
QmlItemNode node = selectionState.firstSelectedModelNode();
|
||||||
if (node.isValid()) {
|
if (node.isValid()) {
|
||||||
signed int minimumZ = getMinZValue(siblingsForNode(node));
|
ModelNode modelNode = selectionState.currentSingleSelectedNode();
|
||||||
minimumZ--;
|
NodeListProperty parentProperty = modelNode.parentProperty().toNodeListProperty();
|
||||||
node.setVariantProperty("z", minimumZ);
|
const int index = parentProperty.indexOf(modelNode);
|
||||||
|
|
||||||
|
if (index != 0)
|
||||||
|
parentProperty.slide(index, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
} catch (const RewritingException &e) { //better save then sorry
|
} catch (const RewritingException &e) { //better save then sorry
|
||||||
|
@@ -969,13 +969,13 @@ void RewriterView::delayedSetup()
|
|||||||
|
|
||||||
static QString annotationsEnd()
|
static QString annotationsEnd()
|
||||||
{
|
{
|
||||||
const static QString end = QString(" %1*/").arg(annotationsEscapeSequence);
|
const static QString end = QString("%1*/").arg(annotationsEscapeSequence);
|
||||||
return end;
|
return end;
|
||||||
}
|
}
|
||||||
|
|
||||||
static QString annotationsStart()
|
static QString annotationsStart()
|
||||||
{
|
{
|
||||||
const static QString start = QString("/*%1 ").arg(annotationsEscapeSequence);
|
const static QString start = QString("/*%1").arg(annotationsEscapeSequence);
|
||||||
return start;
|
return start;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1000,29 +1000,27 @@ void RewriterView::writeAuxiliaryData()
|
|||||||
|
|
||||||
const QString oldText = m_textModifier->text();
|
const QString oldText = m_textModifier->text();
|
||||||
|
|
||||||
QString newText = oldText;
|
const int startIndex = oldText.indexOf(annotationsStart());
|
||||||
|
const int endIndex = oldText.indexOf(annotationsEnd());
|
||||||
int startIndex = newText.indexOf(annotationsStart());
|
|
||||||
int endIndex = newText.indexOf(annotationsEnd());
|
|
||||||
|
|
||||||
if (startIndex > 0 && endIndex > 0)
|
|
||||||
newText.remove(startIndex, endIndex - startIndex + annotationsEnd().length());
|
|
||||||
|
|
||||||
newText = newText.trimmed();
|
|
||||||
newText.append("\n");
|
|
||||||
|
|
||||||
QString auxData = auxiliaryDataAsQML();
|
QString auxData = auxiliaryDataAsQML();
|
||||||
|
|
||||||
|
const bool replace = startIndex > 0 && endIndex > 0;
|
||||||
|
|
||||||
if (!auxData.isEmpty()) {
|
if (!auxData.isEmpty()) {
|
||||||
auxData.prepend("\n" + annotationsStart());
|
auxData.prepend("\n");
|
||||||
auxData.append(annotationsEnd() + "\n");
|
auxData.prepend(annotationsStart());
|
||||||
newText.append(auxData);
|
if (!replace)
|
||||||
|
auxData.prepend("\n");
|
||||||
|
auxData.append(annotationsEnd());
|
||||||
|
if (!replace)
|
||||||
|
auxData.append("\n");
|
||||||
}
|
}
|
||||||
|
|
||||||
QTextCursor tc(m_textModifier->textDocument());
|
if (replace)
|
||||||
Utils::ChangeSet changeSet;
|
m_textModifier->replace(startIndex, endIndex - startIndex + annotationsEnd().length(), auxData);
|
||||||
changeSet.replace(0, oldText.length(), newText);
|
else
|
||||||
changeSet.apply(&tc);
|
m_textModifier->replace(oldText.length(), 0, auxData);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void checkNode(const QmlJS::SimpleReaderNode::Ptr &node, RewriterView *view);
|
static void checkNode(const QmlJS::SimpleReaderNode::Ptr &node, RewriterView *view);
|
||||||
|
Reference in New Issue
Block a user