forked from qt-creator/qt-creator
QmlDesigner: Adding specifics for GridLayout
Task-number: QTCREATORBUG-14821 Change-Id: Ifa037975c99762fb8866ffffa118332044842dff Reviewed-by: Eike Ziller <eike.ziller@theqtcompany.com> Reviewed-by: Tim Jenssen <tim.jenssen@theqtcompany.com>
This commit is contained in:
@@ -0,0 +1,135 @@
|
|||||||
|
/****************************************************************************
|
||||||
|
**
|
||||||
|
** Copyright (C) 2015 The Qt Company Ltd.
|
||||||
|
** Contact: http://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 http://www.qt.io/terms-conditions. For further information
|
||||||
|
** use the contact form at http://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.0 as published by the Free Software
|
||||||
|
** Foundation and appearing in the file LICENSE.GPLv3 included in the
|
||||||
|
** packaging of this file. Please review the following information to
|
||||||
|
** ensure the GNU General Public License version 3.0 requirements will be
|
||||||
|
** met: http://www.gnu.org/copyleft/gpl.html.
|
||||||
|
**
|
||||||
|
****************************************************************************/
|
||||||
|
|
||||||
|
import QtQuick 2.1
|
||||||
|
import HelperWidgets 2.0
|
||||||
|
import QtQuick.Layouts 1.0
|
||||||
|
|
||||||
|
Column {
|
||||||
|
anchors.left: parent.left
|
||||||
|
anchors.right: parent.right
|
||||||
|
|
||||||
|
Section {
|
||||||
|
anchors.left: parent.left
|
||||||
|
anchors.right: parent.right
|
||||||
|
caption: qsTr("GridLayout")
|
||||||
|
|
||||||
|
|
||||||
|
SectionLayout {
|
||||||
|
|
||||||
|
Label {
|
||||||
|
text: qsTr("Columns")
|
||||||
|
}
|
||||||
|
|
||||||
|
SecondColumnLayout {
|
||||||
|
SpinBox {
|
||||||
|
backendValue: backendValues.columns
|
||||||
|
minimumValue: 0
|
||||||
|
maximumValue: 2000
|
||||||
|
decimals: 0
|
||||||
|
}
|
||||||
|
|
||||||
|
ExpandingSpacer {
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
Label {
|
||||||
|
text: qsTr("Rows")
|
||||||
|
}
|
||||||
|
|
||||||
|
SecondColumnLayout {
|
||||||
|
SpinBox {
|
||||||
|
backendValue: backendValues.rows
|
||||||
|
minimumValue: 0
|
||||||
|
maximumValue: 2000
|
||||||
|
decimals: 0
|
||||||
|
}
|
||||||
|
|
||||||
|
ExpandingSpacer {
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
Label {
|
||||||
|
text: qsTr("Flow")
|
||||||
|
}
|
||||||
|
|
||||||
|
SecondColumnLayout {
|
||||||
|
ComboBox {
|
||||||
|
model: ["LeftToRight", "TopToBottom"]
|
||||||
|
backendValue: backendValues.flow
|
||||||
|
Layout.fillWidth: true
|
||||||
|
scope: "GridLayout"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
Label {
|
||||||
|
text: qsTr("Layout Direction")
|
||||||
|
}
|
||||||
|
|
||||||
|
SecondColumnLayout {
|
||||||
|
ComboBox {
|
||||||
|
model: ["LeftToRight", "RightToLeft"]
|
||||||
|
backendValue: backendValues.layoutDirection
|
||||||
|
Layout.fillWidth: true
|
||||||
|
scope: "Qt"
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
Label {
|
||||||
|
text: qsTr("Row Spacing")
|
||||||
|
}
|
||||||
|
|
||||||
|
SecondColumnLayout {
|
||||||
|
SpinBox {
|
||||||
|
backendValue: backendValues.rowSpacing
|
||||||
|
minimumValue: -4000
|
||||||
|
maximumValue: 4000
|
||||||
|
decimals: 0
|
||||||
|
}
|
||||||
|
|
||||||
|
ExpandingSpacer {
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
Label {
|
||||||
|
text: qsTr("Column Spacing")
|
||||||
|
}
|
||||||
|
|
||||||
|
SecondColumnLayout {
|
||||||
|
SpinBox {
|
||||||
|
backendValue: backendValues.columnSpacing
|
||||||
|
minimumValue: -4000
|
||||||
|
maximumValue: 4000
|
||||||
|
decimals: 0
|
||||||
|
}
|
||||||
|
|
||||||
|
ExpandingSpacer {
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
Reference in New Issue
Block a user