Commit bca5c580 authored by Fabian Riethmayer's avatar Fabian Riethmayer

added example images to combobox dialog dropdown grid lineedit spinbox textedit togglebutton

Reviewers: romangg

Reviewed By: romangg

Differential Revision: https://phabricator.kde.org/D13693
parent 92f57d87
Combo box
=========
.. figure:: /img/Combobox1.png
:alt: Combobox
:figclass: border
A combination of a drop-down list and an edit control.
Purpose
-------
......
Dialog
======
.. image:: /img/Dialog1.png
:alt: Dialog
:scale: 50%
Purpose
-------
......
Drop-down
=========
.. figure:: /img/Dropdown1.png
:alt: Dropdown
:figclass: border
Control which allows the user to choose one value from a list.
Purpose
-------
......
Grid
====
Purpose
-------
.. image:: /img/Grid1.png
:alt: Grid
Example
Purpose
-------
Guidelines
......
Line edit
=========
.. figure:: /img/Lineedit1.png
:alt: Lineedit
:figclass: border
Single line control to enter unconstrained text.
Purpose
-------
......
Spin box
========
.. figure:: /img/Spinbox1.png
:alt: Spinbox
:figclass: border
Control that accepts a range of values.
Purpose
-------
......
Text edit
=========
.. figure:: /img/Textedit1.png
:alt: Textedit
:figclass: border
Control to enter multiple lines of text.
Purpose
-------
......
Toggle button
=============
.. figure:: /img/Togglebutton1.png
:alt: Togglebutton
:figclass: border
Control to show a change of state.
Purpose
-------
......
/*
* Copyright 2018 Fabian Riethmayer
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU Library General Public License as
* published by the Free Software Foundation; either version 2, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Library General Public License for more details
*
* You should have received a copy of the GNU Library General Public
* License along with this program; if not, write to the
* Free Software Foundation, Inc.,
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
import QtQuick 2.6
import QtQuick.Controls 2.2
import org.kde.kirigami 2.4 as Kirigami
Rectangle {
width: 320
height: 180
Row {
x: Kirigami.Units.gridUnit
y: Kirigami.Units.gridUnit
spacing: 4 * Kirigami.Units.largeSpacing
ComboBox {
editable: true
model: [ "", "Item2", "Item3" ]
focus: true
}
ComboBox {
id: cbx
editable: true
model: [ "Item1", "Item2", "Item3" ]
}
}
// HACK __popup is internal and might change in future versions
Timer {
interval: 1000
repeat: false
running: true
onTriggered: {
cbx.popup.open()
}
}
}
/*
* Copyright 2018 Fabian Riethmayer
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU Library General Public License as
* published by the Free Software Foundation; either version 2, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Library General Public License for more details
*
* You should have received a copy of the GNU Library General Public
* License along with this program; if not, write to the
* Free Software Foundation, Inc.,
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
import QtQuick 2.6
import QtQuick.Controls 2.2
import org.kde.kirigami 2.4 as Kirigami
Rectangle {
width: 320
height: 180
Row {
x: Kirigami.Units.gridUnit
y: Kirigami.Units.gridUnit
spacing: 4 * Kirigami.Units.largeSpacing
ComboBox {
model: [ "Item1", "Item2", "Item3" ]
}
ComboBox {
id: cbx
model: [ "Item1", "Item2", "Item3" ]
focus: true
}
}
// HACK __popup is internal and might change in future versions
Timer {
interval: 1000
repeat: false
running: true
onTriggered: {
cbx.popup.open()
}
}
}
/*
* Copyright 2018 Fabian Riethmayer
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU Library General Public License as
* published by the Free Software Foundation; either version 2, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Library General Public License for more details
*
* You should have received a copy of the GNU Library General Public
* License along with this program; if not, write to the
* Free Software Foundation, Inc.,
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
import QtQuick 2.6
import QtQuick.Controls 2.2
import org.kde.kirigami 2.4 as Kirigami
Rectangle {
width: 240
height: 120
Item {
x: Kirigami.Units.gridUnit
y: Kirigami.Units.gridUnit
TextField {
placeholderText: "user@example.com"
focus: true;
}
}
}
/*
* Copyright 2018 Fabian Riethmayer
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU Library General Public License as
* published by the Free Software Foundation; either version 2, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Library General Public License for more details
*
* You should have received a copy of the GNU Library General Public
* License along with this program; if not, write to the
* Free Software Foundation, Inc.,
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
import QtQuick 2.6
import QtQuick.Controls 2.2
import org.kde.kirigami 2.4 as Kirigami
Rectangle {
width: 120
height: 80
Item {
x: Kirigami.Units.gridUnit
y: Kirigami.Units.gridUnit
SpinBox {
focus: true;
}
}
}
/*
* Copyright 2018 Fabian Riethmayer
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU Library General Public License as
* published by the Free Software Foundation; either version 2, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Library General Public License for more details
*
* You should have received a copy of the GNU Library General Public
* License along with this program; if not, write to the
* Free Software Foundation, Inc.,
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
import QtQuick 2.6
import QtQuick.Controls 2.2
import org.kde.kirigami 2.4 as Kirigami
Rectangle {
width: 240
height: 180
Item {
x: Kirigami.Units.gridUnit
y: Kirigami.Units.gridUnit
TextEdit {
width: 200
focus: true;
wrapMode: TextEdit.WordWrap
text: "The text edit control displays multiple lines of text to the user and allow the user to enter unconstrained text..."
}
}
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment