Commit 5847f325 authored by Thomas Hartmann's avatar Thomas Hartmann

Manual tests for UI split

This adds a couple of projects for testing the ui split.

Change-Id: I9056702e724541a43895f28453ce31516a348e70
Reviewed-by: default avatarAlessandro Portale <alessandro.portale@digia.com>
parent 087d1f5c
/****************************************************************************
**
** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies).
** Contact: http://www.qt-project.org/legal
**
** 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 Digia. For licensing terms and
** conditions see http://qt.digia.com/licensing. For further information
** use the contact form at http://qt.digia.com/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
** General Public License version 2.1 as published by the Free Software
** Foundation and appearing in the file LICENSE.LGPL included in the
** packaging of this file. Please review the following information to
** ensure the GNU Lesser General Public License version 2.1 requirements
** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
** In addition, as a special exception, Digia gives you certain additional
** rights. These rights are described in the Digia Qt LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
****************************************************************************/
import QtQuick 2.2
import QtQuick.Controls 1.2
import QtQuick.Layouts 1.0
ColumnLayout {
property alias rowBox_1: rowBox_1
property alias rowLayout_1: rowLayout_1
property alias textField_1: textField_1
property alias button_1: button_1
property alias gridBox_1: gridBox_1
property alias gridLayout_1: gridLayout_1
property alias label_1: label_1
property alias label_2: label_2
property alias label_3: label_3
property alias textField_2: textField_2
property alias textField_3: textField_3
property alias textField_4: textField_4
property alias textField_5: textField_5
property alias textArea_1: textArea_1
anchors.fill: parent
GroupBox {
id: rowBox_1
title: "Row layout"
Layout.fillWidth: true
RowLayout {
id: rowLayout_1
anchors.fill: parent
TextField {
id: textField_1
placeholderText: "This wants to grow horizontally"
Layout.fillWidth: true
}
Button {
id: button_1
text: "Button"
}
}
}
GroupBox {
id: gridBox_1
title: "Grid layout"
Layout.fillWidth: true
GridLayout {
id: gridLayout_1
rows: 3
flow: GridLayout.TopToBottom
anchors.fill: parent
Label { id: label_1; text: "Line 1" }
Label { id: label_2; text: "Line 2" }
Label { id: label_3; text: "Line 3" }
TextField { id: textField_2 }
TextField { id: textField_3 }
TextField { id: textField_4 }
TextArea {
id: textField_5
text: "This widget spans over three rows in the GridLayout.\n"
+ "All items in the GridLayout are implicitly positioned from top to bottom."
Layout.rowSpan: 3
Layout.fillHeight: true
Layout.fillWidth: true
}
}
}
TextArea {
id: textArea_1
text: "This fills the whole cell"
Layout.minimumHeight: 30
Layout.fillHeight: true
Layout.fillWidth: true
}
}
QT += qml quick
TARGET = basiclayouts
!no_desktop: QT += widgets
include(src/src.pri)
include(../shared/shared.pri)
OTHER_FILES += \
main.qml \
MainForm.qml \
RESOURCES += \
resources.qrc
import QmlProject 1.1
Project {
mainFile: "main.qml"
/* Include .qml, .js, and image files from current directory and subdirectories */
QmlFiles {
directory: "."
}
JavaScriptFiles {
directory: "."
}
ImageFiles {
directory: "."
}
}
/****************************************************************************
**
** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies).
** Contact: http://www.qt-project.org/legal
**
** 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 Digia. For licensing terms and
** conditions see http://qt.digia.com/licensing. For further information
** use the contact form at http://qt.digia.com/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
** General Public License version 2.1 as published by the Free Software
** Foundation and appearing in the file LICENSE.LGPL included in the
** packaging of this file. Please review the following information to
** ensure the GNU Lesser General Public License version 2.1 requirements
** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
** In addition, as a special exception, Digia gives you certain additional
** rights. These rights are described in the Digia Qt LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
****************************************************************************/
import QtQuick 2.2
import QtQuick.Controls 1.2
import QtQuick.Layouts 1.0
ApplicationWindow {
visible: true
title: "Basic layouts"
property int margin: 11
width: mainForm.implicitWidth + 2 * margin
height: mainForm.implicitHeight + 2 * margin
minimumWidth: mainForm.Layout.minimumWidth + 2 * margin
minimumHeight: mainForm.Layout.minimumHeight + 2 * margin
MainForm {
id: mainForm
anchors.margins: margin
}
}
/****************************************************************************
**
** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies).
** Contact: http://www.qt-project.org/legal
**
** 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 Digia. For licensing terms and
** conditions see http://qt.digia.com/licensing. For further information
** use the contact form at http://qt.digia.com/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
** General Public License version 2.1 as published by the Free Software
** Foundation and appearing in the file LICENSE.LGPL included in the
** packaging of this file. Please review the following information to
** ensure the GNU Lesser General Public License version 2.1 requirements
** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
** In addition, as a special exception, Digia gives you certain additional
** rights. These rights are described in the Digia Qt LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
****************************************************************************/
import QtQuick 2.2
import QtQuick.Controls 1.2
import QtQuick.Layouts 1.0
import QtQuick.Dialogs 1.0
import "content"
TabView {
id: tabView
tabPosition: controlPage.item ? controlPage.item.tabPosition : Qt.TopEdge
width: 640
height: 420
Tab {
id: controlPage
title: "Controls"
Controls {
anchors.fill: parent
enabled: tabView.enabled
}
}
Tab {
title: "Itemviews"
ModelView {
anchors.fill: parent
anchors.margins: Qt.platform.os === "osx" ? 12 : 6
}
}
Tab {
title: "Styles"
Styles {
anchors.fill: parent
}
}
Tab {
title: "Layouts"
Layouts {
anchors.fill:parent
anchors.margins: 8
}
}
}
/****************************************************************************
**
** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies).
** Contact: http://www.qt-project.org/legal
**
** 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 Digia. For licensing terms and
** conditions see http://qt.digia.com/licensing. For further information
** use the contact form at http://qt.digia.com/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
** General Public License version 2.1 as published by the Free Software
** Foundation and appearing in the file LICENSE.LGPL included in the
** packaging of this file. Please review the following information to
** ensure the GNU Lesser General Public License version 2.1 requirements
** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
** In addition, as a special exception, Digia gives you certain additional
** rights. These rights are described in the Digia Qt LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
****************************************************************************/
import QtQuick 2.2
import QtQuick.Dialogs 1.1
MessageDialog {
icon: StandardIcon.Information
text: "QtQuick.Controls gallery example"
detailedText: "This example demonstrates most of the available Qt Quick Controls."
title: "About Gallery"
}
/****************************************************************************
**
** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies).
** Contact: http://www.qt-project.org/legal
**
** 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 Digia. For licensing terms and
** conditions see http://qt.digia.com/licensing. For further information
** use the contact form at http://qt.digia.com/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
** General Public License version 2.1 as published by the Free Software
** Foundation and appearing in the file LICENSE.LGPL included in the
** packaging of this file. Please review the following information to
** ensure the GNU Lesser General Public License version 2.1 requirements
** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
** In addition, as a special exception, Digia gives you certain additional
** rights. These rights are described in the Digia Qt LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
****************************************************************************/
import QtQuick 2.2
import QtQuick.Window 2.1
import QtQuick.Controls 1.2
Window {
id: window1
width: 400
height: 400
title: "child window"
flags: Qt.Dialog
Rectangle {
color: syspal.window
anchors.fill: parent
Label {
id: dimensionsText
anchors.horizontalCenter: parent.horizontalCenter
anchors.top: parent.top
width: parent.width
horizontalAlignment: Text.AlignHCenter
}
Label {
id: availableDimensionsText
anchors.horizontalCenter: parent.horizontalCenter
anchors.top: dimensionsText.bottom
width: parent.width
horizontalAlignment: Text.AlignHCenter
}
Label {
id: closeText
anchors.horizontalCenter: parent.horizontalCenter
anchors.top: availableDimensionsText.bottom
text: "This is a new Window, press the\nbutton below to close it again."
}
Button {
anchors.horizontalCenter: closeText.horizontalCenter
anchors.top: closeText.bottom
id: closeWindowButton
text:"Close"
width: 98
tooltip:"Press me, to close this window again"
onClicked: window1.visible = false
}
Button {
anchors.horizontalCenter: closeText.horizontalCenter
anchors.top: closeWindowButton.bottom
id: maximizeWindowButton
text:"Maximize"
width: 98
tooltip:"Press me, to maximize this window again"
onClicked: window1.visibility = Window.Maximized;
}
Button {
anchors.horizontalCenter: closeText.horizontalCenter
anchors.top: maximizeWindowButton.bottom
id: normalizeWindowButton
text:"Normalize"
width: 98
tooltip:"Press me, to normalize this window again"
onClicked: window1.visibility = Window.Windowed;
}
Button {
anchors.horizontalCenter: closeText.horizontalCenter
anchors.top: normalizeWindowButton.bottom
id: minimizeWindowButton
text:"Minimize"
width: 98
tooltip:"Press me, to minimize this window again"
onClicked: window1.visibility = Window.Minimized;
}
}
}
/****************************************************************************
**
** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies).
** Contact: http://www.qt-project.org/legal
**
** 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 Digia. For licensing terms and
** conditions see http://qt.digia.com/licensing. For further information
** use the contact form at http://qt.digia.com/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
** General Public License version 2.1 as published by the Free Software
** Foundation and appearing in the file LICENSE.LGPL included in the
** packaging of this file. Please review the following information to
** ensure the GNU Lesser General Public License version 2.1 requirements
** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
** In addition, as a special exception, Digia gives you certain additional
** rights. These rights are described in the Digia Qt LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
****************************************************************************/
import QtQuick 2.2
import QtQuick.Controls 1.2
import QtQuick.Layouts 1.1
import QtQuick.Controls.Styles 1.1
ControlsForm {
id: flickable
button2.menu: Menu {
MenuItem { text: "This Button" }
MenuItem { text: "Happens To Have" }
MenuItem { text: "A Menu Assigned" }
}
editableCombo.onAccepted: {
if (editableCombo.find(currentText) === -1) {
choices.append({text: editText})
currentIndex = editableCombo.find(editText)
}
}
rowLayout1.data: [ ExclusiveGroup { id: tabPositionGroup } ]
}
/****************************************************************************
**
** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies).
** Contact: http://www.qt-project.org/legal
**
** 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 Digia. For licensing terms and
** conditions see http://qt.digia.com/licensing. For further information
** use the contact form at http://qt.digia.com/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
** General Public License version 2.1 as published by the Free Software
** Foundation and appearing in the file LICENSE.LGPL included in the
** packaging of this file. Please review the following information to
** ensure the GNU Lesser General Public License version 2.1 requirements
** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
** In addition, as a special exception, Digia gives you certain additional
** rights. These rights are described in the Digia Qt LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
****************************************************************************/
import QtQuick 2.2
import QtQuick.Controls 1.2
import QtQuick.Layouts 1.1
import QtQuick.Controls.Styles 1.1
Item {
id: flickable
width: 640
height: 420
property alias rowLayout1: rowLayout1
property alias button2: button2
property alias editableCombo: editableCombo
property int tabPosition: tabPositionGroup.current === r2 ? Qt.BottomEdge : Qt.TopEdge
RowLayout {
id: contentRow
anchors.fill:parent
anchors.margins: 8
spacing: 16
ColumnLayout {
id: firstColumn
Layout.minimumWidth: implicitWidth
Layout.fillWidth: false
RowLayout {
id: buttonrow
Button {
id: button1
text: "Button 1"
tooltip:"This is an interesting tool tip"
Layout.fillWidth: true
}
Button {
id:button2
text:"Button 2"
Layout.fillWidth: true
}
}
ComboBox {
id: combo
model: choices
currentIndex: 2
Layout.fillWidth: true
}
ComboBox {
model: Qt.fontFamilies()
Layout.fillWidth: true
currentIndex: 47
}
ComboBox {
id: editableCombo
editable: true
model: choices
Layout.fillWidth: true
currentIndex: 2
}
RowLayout {
SpinBox {
id: t1
Layout.fillWidth: true
minimumValue: -50
value: -20
}
SpinBox {
id: t2
Layout.fillWidth: true
}
}
TextField {
id: t3
placeholderText: "This is a placeholder for a TextField"
Layout.fillWidth: true
}
ProgressBar {
// normalize value [0.0 .. 1.0]
value: (slider.value - slider.minimumValue) / (slider.maximumValue - slider.minimumValue)
Layout.fillWidth: true
}
ProgressBar {
indeterminate: true
Layout.fillWidth: true
}
Slider {
id: slider
value: 0.5
Layout.fillWidth: true
tickmarksEnabled: tickmarkCheck.checked
stepSize: tickmarksEnabled ? 0.1 : 0
}
MouseArea {
id: busyCheck
Layout.fillWidth: true
Layout.fillHeight: true