Changeset View
Changeset View
Standalone View
Standalone View
src/kcm/package/contents/ui/Devices.qml
- This file was added.
1 | /* | ||||
---|---|---|---|---|---|
2 | Copyright 2014-2015 Harald Sitter <sitter@kde.org> | ||||
3 | | ||||
4 | This program is free software; you can redistribute it and/or | ||||
5 | modify it under the terms of the GNU General Public License as | ||||
6 | published by the Free Software Foundation; either version 2 of | ||||
7 | the License or (at your option) version 3 or any later version | ||||
8 | accepted by the membership of KDE e.V. (or its successor approved | ||||
9 | by the membership of KDE e.V.), which shall act as a proxy | ||||
10 | defined in Section 14 of version 3 of the license. | ||||
11 | | ||||
12 | This program is distributed in the hope that it will be useful, | ||||
13 | but WITHOUT ANY WARRANTY; without even the implied warranty of | ||||
14 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||||
15 | GNU General Public License for more details. | ||||
16 | | ||||
17 | You should have received a copy of the GNU General Public License | ||||
18 | along with this program. If not, see <http://www.gnu.org/licenses/>. | ||||
19 | */ | ||||
20 | | ||||
21 | import QtQuick 2.0 | ||||
22 | import QtQuick.Layouts 1.1 | ||||
23 | import QtQuick.Controls 1.3 | ||||
24 | | ||||
25 | ScrollView { | ||||
26 | id: scrollView | ||||
27 | | ||||
28 | ColumnLayout { | ||||
29 | width: scrollView.viewport.width | ||||
30 | | ||||
31 | Header { | ||||
32 | Layout.fillWidth: true | ||||
33 | enabled: 0 < sinks.count | ||||
34 | text: i18n("Outputs") | ||||
35 | disabledText: i18nc("@label", "No Output Devices Available") | ||||
36 | } | ||||
37 | | ||||
38 | ListView { | ||||
39 | id: sinks | ||||
40 | Layout.fillWidth: true | ||||
41 | Layout.preferredHeight: contentHeight | ||||
42 | Layout.margins: units.gridUnit / 2 | ||||
43 | interactive: false | ||||
44 | spacing: units.smallSpacing * 2 | ||||
45 | model: sinkModel | ||||
46 | delegate: DeviceListItem {} | ||||
47 | } | ||||
48 | | ||||
49 | Header { | ||||
50 | Layout.fillWidth: true | ||||
51 | enabled: sources.count > 0 | ||||
52 | text: i18n("Inputs") | ||||
53 | disabledText: i18nc("@label", "No Input Devices Available") | ||||
54 | } | ||||
55 | | ||||
56 | ListView { | ||||
57 | id: sources | ||||
58 | Layout.fillWidth: true | ||||
59 | Layout.preferredHeight: contentHeight | ||||
60 | Layout.margins: units.gridUnit / 2 | ||||
61 | interactive: false | ||||
62 | model: sourceModel | ||||
63 | delegate: DeviceListItem {} | ||||
64 | } | ||||
65 | } | ||||
66 | } |