2013-09-16 16:55:07 +02:00
|
|
|
/****************************************************************************
|
|
|
|
|
**
|
2016-01-15 14:59:14 +01:00
|
|
|
** Copyright (C) 2016 The Qt Company Ltd.
|
|
|
|
|
** Contact: https://www.qt.io/licensing/
|
2013-09-16 16:55:07 +02:00
|
|
|
**
|
|
|
|
|
** 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
|
2016-01-15 14:59:14 +01:00
|
|
|
** 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.
|
2013-09-16 16:55:07 +02:00
|
|
|
**
|
2015-09-18 11:34:48 +02:00
|
|
|
** GNU General Public License Usage
|
|
|
|
|
** Alternatively, this file may be used under the terms of the GNU
|
2016-01-15 14:59:14 +01:00
|
|
|
** 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.
|
2013-09-16 16:55:07 +02:00
|
|
|
**
|
|
|
|
|
****************************************************************************/
|
|
|
|
|
|
|
|
|
|
import QtQuick 2.0
|
|
|
|
|
import HelperWidgets 2.0
|
|
|
|
|
import QtQuick.Layouts 1.0
|
|
|
|
|
|
2013-09-27 17:53:46 +02:00
|
|
|
Rectangle {
|
2013-09-16 16:55:07 +02:00
|
|
|
id: itemPane
|
|
|
|
|
width: 320
|
|
|
|
|
height: 400
|
2016-07-12 12:37:41 +02:00
|
|
|
color: creatorTheme.QmlDesignerBackgroundColorDarkAlternate
|
2013-09-16 16:55:07 +02:00
|
|
|
|
2013-09-27 17:53:46 +02:00
|
|
|
ScrollView {
|
|
|
|
|
anchors.fill: parent
|
2013-09-16 16:55:07 +02:00
|
|
|
|
2013-09-27 17:53:46 +02:00
|
|
|
Column {
|
2013-10-24 14:19:37 +02:00
|
|
|
y: -1
|
2013-09-27 17:53:46 +02:00
|
|
|
width: itemPane.width
|
|
|
|
|
Section {
|
2016-12-21 14:25:32 +01:00
|
|
|
z: 2
|
2013-10-08 17:20:05 +02:00
|
|
|
caption: qsTr("Type")
|
2013-09-16 16:55:07 +02:00
|
|
|
|
2013-09-27 17:53:46 +02:00
|
|
|
anchors.left: parent.left
|
|
|
|
|
anchors.right: parent.right
|
2013-09-16 16:55:07 +02:00
|
|
|
|
2013-09-27 17:53:46 +02:00
|
|
|
SectionLayout {
|
|
|
|
|
Label {
|
2013-10-08 17:20:05 +02:00
|
|
|
text: qsTr("Type")
|
2013-09-16 16:55:07 +02:00
|
|
|
|
2013-09-27 17:53:46 +02:00
|
|
|
}
|
2013-09-16 16:55:07 +02:00
|
|
|
|
2013-10-23 13:35:18 +02:00
|
|
|
SecondColumnLayout {
|
2016-12-21 14:25:32 +01:00
|
|
|
z: 2
|
2013-10-23 13:35:18 +02:00
|
|
|
|
2016-12-15 16:53:58 +01:00
|
|
|
RoundedPanel {
|
|
|
|
|
Layout.fillWidth: true
|
|
|
|
|
height: 24
|
|
|
|
|
|
|
|
|
|
Label {
|
|
|
|
|
x: 6
|
|
|
|
|
anchors.fill: parent
|
|
|
|
|
anchors.leftMargin: 16
|
|
|
|
|
|
|
|
|
|
text: backendValues.className.value
|
|
|
|
|
verticalAlignment: Text.AlignVCenter
|
|
|
|
|
}
|
|
|
|
|
ToolTipArea {
|
|
|
|
|
anchors.fill: parent
|
|
|
|
|
onDoubleClicked: {
|
2016-12-21 14:25:32 +01:00
|
|
|
typeLineEdit.text = backendValues.className.value
|
2016-12-15 16:53:58 +01:00
|
|
|
typeLineEdit.visible = ! typeLineEdit.visible
|
|
|
|
|
typeLineEdit.forceActiveFocus()
|
|
|
|
|
}
|
|
|
|
|
tooltip: qsTr("Change the type of this item.")
|
|
|
|
|
}
|
|
|
|
|
|
2016-12-21 14:25:32 +01:00
|
|
|
ExpressionTextField {
|
|
|
|
|
z: 2
|
2016-12-15 16:53:58 +01:00
|
|
|
id: typeLineEdit
|
2016-12-21 14:25:32 +01:00
|
|
|
completeOnlyTypes: true
|
2016-12-15 16:53:58 +01:00
|
|
|
|
|
|
|
|
anchors.fill: parent
|
|
|
|
|
|
|
|
|
|
visible: false
|
|
|
|
|
|
2016-12-21 14:25:32 +01:00
|
|
|
showButtons: false
|
|
|
|
|
fixedSize: true
|
2016-12-15 16:53:58 +01:00
|
|
|
|
|
|
|
|
onEditingFinished: {
|
|
|
|
|
visible = false
|
2016-12-21 14:25:32 +01:00
|
|
|
changeTypeName(typeLineEdit.text.trim())
|
2016-12-15 16:53:58 +01:00
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
Item {
|
|
|
|
|
Layout.preferredWidth: 16
|
|
|
|
|
Layout.preferredHeight: 16
|
2013-10-23 13:35:18 +02:00
|
|
|
}
|
2013-09-16 16:55:07 +02:00
|
|
|
}
|
|
|
|
|
|
2013-09-27 17:53:46 +02:00
|
|
|
Label {
|
2013-10-08 17:20:05 +02:00
|
|
|
text: qsTr("id")
|
2013-09-16 16:55:07 +02:00
|
|
|
}
|
|
|
|
|
|
2013-09-27 17:53:46 +02:00
|
|
|
SecondColumnLayout {
|
|
|
|
|
LineEdit {
|
|
|
|
|
id: lineEdit
|
2014-06-24 14:17:17 +02:00
|
|
|
|
2013-09-27 17:53:46 +02:00
|
|
|
backendValue: backendValues.id
|
2013-10-08 17:20:05 +02:00
|
|
|
placeholderText: qsTr("id")
|
2013-09-27 17:53:46 +02:00
|
|
|
text: backendValues.id.value
|
|
|
|
|
Layout.fillWidth: true
|
2013-11-08 16:25:39 +01:00
|
|
|
showTranslateCheckBox: false
|
2014-07-30 10:19:02 +02:00
|
|
|
showExtendedFunctionButton: false
|
2013-09-27 17:53:46 +02:00
|
|
|
}
|
2014-08-12 13:19:03 +02:00
|
|
|
// workaround: without this item the lineedit does not shrink to the
|
|
|
|
|
// right size after resizing to a wider width
|
2016-09-19 16:39:46 +02:00
|
|
|
|
|
|
|
|
Image {
|
2016-10-13 14:39:13 +02:00
|
|
|
Layout.preferredWidth: 16
|
|
|
|
|
Layout.preferredHeight: 16
|
2016-09-19 16:39:46 +02:00
|
|
|
source: hasAliasExport ? "image://icons/alias-export-checked" : "image://icons/alias-export-unchecked"
|
|
|
|
|
ToolTipArea {
|
|
|
|
|
anchors.fill: parent
|
|
|
|
|
onClicked: toogleExportAlias()
|
2016-10-17 17:17:37 +02:00
|
|
|
tooltip: qsTr("Toggles whether this item is exported as an alias property of the root item.")
|
2016-09-19 16:39:46 +02:00
|
|
|
}
|
2013-09-27 17:53:46 +02:00
|
|
|
}
|
2013-09-16 16:55:07 +02:00
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
2013-09-27 17:53:46 +02:00
|
|
|
GeometrySection {
|
|
|
|
|
}
|
2013-09-16 16:55:07 +02:00
|
|
|
|
2013-09-27 17:53:46 +02:00
|
|
|
Section {
|
|
|
|
|
anchors.left: parent.left
|
|
|
|
|
anchors.right: parent.right
|
2013-09-16 16:55:07 +02:00
|
|
|
|
2013-10-24 16:48:55 +02:00
|
|
|
caption: qsTr("Visibility")
|
2013-09-16 16:55:07 +02:00
|
|
|
|
2013-09-27 17:53:46 +02:00
|
|
|
SectionLayout {
|
|
|
|
|
rows: 2
|
|
|
|
|
Label {
|
2013-10-24 16:48:55 +02:00
|
|
|
text: qsTr("Visibility")
|
2013-09-16 16:55:07 +02:00
|
|
|
}
|
|
|
|
|
|
2013-09-27 17:53:46 +02:00
|
|
|
SecondColumnLayout {
|
2013-09-16 16:55:07 +02:00
|
|
|
|
2013-09-27 17:53:46 +02:00
|
|
|
CheckBox {
|
2013-10-08 17:20:05 +02:00
|
|
|
text: qsTr("Is Visible")
|
2013-09-27 17:53:46 +02:00
|
|
|
backendValue: backendValues.visible
|
|
|
|
|
}
|
2013-09-16 16:55:07 +02:00
|
|
|
|
2013-09-27 17:53:46 +02:00
|
|
|
Item {
|
|
|
|
|
width: 10
|
|
|
|
|
height: 10
|
2013-09-16 16:55:07 +02:00
|
|
|
|
2013-09-27 17:53:46 +02:00
|
|
|
}
|
2013-09-16 16:55:07 +02:00
|
|
|
|
2013-09-27 17:53:46 +02:00
|
|
|
CheckBox {
|
2013-10-08 17:20:05 +02:00
|
|
|
text: qsTr("Clip")
|
2013-09-27 17:53:46 +02:00
|
|
|
backendValue: backendValues.clip
|
|
|
|
|
}
|
|
|
|
|
Item {
|
|
|
|
|
Layout.fillWidth: true
|
|
|
|
|
}
|
|
|
|
|
}
|
2013-09-16 16:55:07 +02:00
|
|
|
|
2013-09-27 17:53:46 +02:00
|
|
|
Label {
|
2013-10-08 17:20:05 +02:00
|
|
|
text: qsTr("Opacity")
|
2013-09-16 16:55:07 +02:00
|
|
|
}
|
2013-09-27 17:53:46 +02:00
|
|
|
|
|
|
|
|
SecondColumnLayout {
|
|
|
|
|
SpinBox {
|
|
|
|
|
backendValue: backendValues.opacity
|
|
|
|
|
decimals: 2
|
|
|
|
|
|
|
|
|
|
minimumValue: 0
|
|
|
|
|
maximumValue: 1
|
|
|
|
|
hasSlider: true
|
2013-10-23 14:22:22 +02:00
|
|
|
stepSize: 0.1
|
2013-09-27 17:53:46 +02:00
|
|
|
}
|
|
|
|
|
Item {
|
|
|
|
|
Layout.fillWidth: true
|
|
|
|
|
}
|
2013-09-16 16:55:07 +02:00
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
2013-10-24 14:19:37 +02:00
|
|
|
Item {
|
|
|
|
|
height: 4
|
|
|
|
|
width: 4
|
|
|
|
|
}
|
|
|
|
|
|
2013-09-27 17:53:46 +02:00
|
|
|
TabView {
|
|
|
|
|
anchors.left: parent.left
|
|
|
|
|
anchors.right: parent.right
|
|
|
|
|
frameVisible: false
|
2013-09-16 16:55:07 +02:00
|
|
|
|
2014-04-15 14:54:53 +02:00
|
|
|
id: tabView
|
|
|
|
|
height: Math.max(layoutSectionHeight, specficsHeight)
|
|
|
|
|
|
2014-06-17 11:31:56 +02:00
|
|
|
property int layoutSectionHeight: 400
|
2014-04-15 14:54:53 +02:00
|
|
|
property int specficsOneHeight: 0
|
|
|
|
|
property int specficsTwoHeight: 0
|
|
|
|
|
|
|
|
|
|
property int specficsHeight: Math.max(specficsOneHeight, specficsTwoHeight)
|
|
|
|
|
|
2014-06-17 11:31:56 +02:00
|
|
|
property int extraHeight: 40
|
|
|
|
|
|
2013-09-27 17:53:46 +02:00
|
|
|
Tab {
|
|
|
|
|
title: backendValues.className.value
|
2013-09-16 16:55:07 +02:00
|
|
|
|
2013-09-27 17:53:46 +02:00
|
|
|
component: Column {
|
2013-09-16 16:55:07 +02:00
|
|
|
anchors.left: parent.left
|
|
|
|
|
anchors.right: parent.right
|
2013-10-23 17:44:19 +02:00
|
|
|
Loader {
|
|
|
|
|
anchors.left: parent.left
|
|
|
|
|
anchors.right: parent.right
|
2013-10-31 12:48:56 +01:00
|
|
|
visible: theSource !== ""
|
2013-10-23 17:44:19 +02:00
|
|
|
|
|
|
|
|
id: specificsTwo;
|
|
|
|
|
sourceComponent: specificQmlComponent
|
2013-10-29 16:06:07 +01:00
|
|
|
|
|
|
|
|
property string theSource: specificQmlData
|
|
|
|
|
|
|
|
|
|
onTheSourceChanged: {
|
|
|
|
|
active = false
|
|
|
|
|
active = true
|
|
|
|
|
}
|
2014-04-15 14:54:53 +02:00
|
|
|
|
|
|
|
|
onLoaded: {
|
2014-06-17 11:31:56 +02:00
|
|
|
tabView.specficsTwoHeight = specificsTwo.item.height + tabView.extraHeight
|
2014-04-15 14:54:53 +02:00
|
|
|
}
|
2013-10-23 17:44:19 +02:00
|
|
|
}
|
2013-09-27 17:53:46 +02:00
|
|
|
|
|
|
|
|
Loader {
|
|
|
|
|
anchors.left: parent.left
|
|
|
|
|
anchors.right: parent.right
|
|
|
|
|
|
|
|
|
|
id: specificsOne;
|
|
|
|
|
source: specificsUrl;
|
2014-04-15 14:54:53 +02:00
|
|
|
|
|
|
|
|
onLoaded: {
|
2014-06-17 11:31:56 +02:00
|
|
|
tabView.specficsOneHeight = specificsOne.item.height + tabView.extraHeight
|
2014-04-15 14:54:53 +02:00
|
|
|
}
|
2013-09-27 17:53:46 +02:00
|
|
|
}
|
2013-09-16 16:55:07 +02:00
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
2013-09-27 17:53:46 +02:00
|
|
|
Tab {
|
2013-10-08 17:20:05 +02:00
|
|
|
title: qsTr("Layout")
|
2013-09-27 17:53:46 +02:00
|
|
|
component: Column {
|
|
|
|
|
anchors.left: parent.left
|
|
|
|
|
anchors.right: parent.right
|
2013-09-16 16:55:07 +02:00
|
|
|
|
2013-09-27 17:53:46 +02:00
|
|
|
LayoutSection {
|
2014-06-17 11:31:56 +02:00
|
|
|
property int childRectHeight: childrenRect.height
|
|
|
|
|
onChildRectHeightChanged: {
|
|
|
|
|
tabView.layoutSectionHeight = childRectHeight + tabView.extraHeight
|
2014-04-15 14:54:53 +02:00
|
|
|
}
|
2013-09-27 17:53:46 +02:00
|
|
|
}
|
2013-09-16 16:55:07 +02:00
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
2013-09-27 17:53:46 +02:00
|
|
|
Tab {
|
|
|
|
|
anchors.fill: parent
|
2013-10-08 17:20:05 +02:00
|
|
|
title: qsTr("Advanced")
|
2013-09-27 17:53:46 +02:00
|
|
|
component: Column {
|
|
|
|
|
anchors.left: parent.left
|
|
|
|
|
anchors.right: parent.right
|
|
|
|
|
AdvancedSection {
|
|
|
|
|
}
|
2013-09-16 16:55:07 +02:00
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|