~neon/project-neon/kscreen

« back to all changes in this revision

Viewing changes to kcm/qml/main.qml

  • Committer: Dan Vrátil
  • Date: 2012-11-13 11:22:10 UTC
  • mfrom: (0.1.48)
  • Revision ID: git-v1:14fdbb224dc8a85b623b394662458a62675e977c
Merge branch 'kcm_import'

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/*
 
2
    Copyright (C) 2012  Dan Vratil <dvratil@redhat.com>
 
3
 
 
4
    This library is free software; you can redistribute it and/or
 
5
    modify it under the terms of the GNU Lesser General Public
 
6
    License as published by the Free Software Foundation; either
 
7
    version 2.1 of the License, or (at your option) any later version.
 
8
 
 
9
    This library is distributed in the hope that it will be useful,
 
10
    but WITHOUT ANY WARRANTY; without even the implied warranty of
 
11
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 
12
    Lesser General Public License for more details.
 
13
 
 
14
    You should have received a copy of the GNU Lesser General Public
 
15
    License along with this library; if not, write to the Free Software
 
16
    Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
 
17
*/
 
18
 
 
19
import QtQuick 1.1
 
20
import org.kde.plasma.core 0.1 as PlasmaCore
 
21
import org.kde.plasma.components 0.1 as PlasmaComponents
 
22
 
 
23
Item {
 
24
        signal identifyOutputsRequested();
 
25
 
 
26
 
 
27
        id: root;
 
28
        objectName: "root";
 
29
        focus: true;
 
30
 
 
31
        SystemPalette {
 
32
                id: palette;
 
33
        }
 
34
        /* Don't use colors from theme, we want to be consistent with KCM, not
 
35
         * with Plasma here. Font sizes are the same though */
 
36
        PlasmaCore.Theme {
 
37
                id: theme;
 
38
        }
 
39
 
 
40
        FocusScope {
 
41
                id: outputViewFocusScope;
 
42
                anchors.fill: parent;
 
43
 
 
44
                OutputView {
 
45
                        id: outputView;
 
46
                        objectName: "outputView";
 
47
                        root: parent;
 
48
 
 
49
                        anchors.fill: parent;
 
50
 
 
51
                        Text {
 
52
                                id: tip;
 
53
                                anchors {
 
54
                                        left: parent.left;
 
55
                                        bottom: parent.bottom;
 
56
                                        margins: 5;
 
57
                                }
 
58
                                color: palette.text;
 
59
                                text: i18n("Tip: Hold Ctrl while dragging a display to disable snapping");
 
60
                        }
 
61
 
 
62
                        VirtualScreen {
 
63
                                id: virtualScreen;
 
64
                                objectName: "virtualScreen";
 
65
 
 
66
                                viewWidth: parent.width;
 
67
                                viewHeight: parent.height;
 
68
 
 
69
                                anchors.centerIn: parent;
 
70
                        }
 
71
 
 
72
                        IconButton {
 
73
                                id: identifyButton;
 
74
                                anchors {
 
75
                                        right: parent.right;
 
76
                                        bottom: parent.bottom;
 
77
                                        margins: 5;
 
78
                                }
 
79
 
 
80
                                enabledIcon: "documentinfo"
 
81
                                iconSize: 44;
 
82
 
 
83
                                onClicked: root.identifyOutputsRequested();
 
84
                        }
 
85
                }
 
86
        }
 
87
}