~neon/plasmate/frameworks

« back to all changes in this revision

Viewing changes to plasmate/plugins/savesystemview/qml/CommitsView/BranchView/InputBranchView.qml

  • Committer: Giorgos Tsiapaliokas
  • Date: 2015-03-14 12:58:48 UTC
  • mfrom: (972.1.19)
  • Revision ID: git-v1:7b24cb2599e2bea0612cb492d2395bb6c44722ed
Merge branch 'review_savesystem_updated' into frameworks

REVIEW: 121206

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/*
 
2
    Copyright 2014 Giorgos Tsiapaliokas <giorgos.tsiapaliokas@kde.org>
 
3
 
 
4
    This library is free software; you can redistribute it and/or
 
5
    modify it under the terms of the GNU Library General Public
 
6
    License as published by the Free Software Foundation; either
 
7
    version 2 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
    Library General Public License for more details.
 
13
 
 
14
    You should have received a copy of the GNU Library General Public License
 
15
    along with this library; see the file COPYING.LIB.  If not, write to
 
16
    the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
 
17
    Boston, MA 02110-1301, USA.
 
18
*/
 
19
 
 
20
import QtQuick 2.3
 
21
import QtQuick.Controls 1.2 as QtControls
 
22
import QtQuick.Layouts 1.1 as QtLayouts
 
23
 
 
24
QtLayouts.ColumnLayout {
 
25
    id: inputBranchView
 
26
    property alias buttonText: button.text
 
27
    property alias input: textField.text
 
28
    property alias placeholderText: textField.placeholderText
 
29
    property alias title: label.text
 
30
 
 
31
    signal doWork
 
32
 
 
33
    QtControls.Label {
 
34
        id: label
 
35
    }
 
36
 
 
37
    QtControls.TextField {
 
38
        id: textField
 
39
    }
 
40
 
 
41
    QtLayouts.RowLayout {
 
42
        QtControls.Button {
 
43
            id: button
 
44
            enabled: textField.text != ""
 
45
            onClicked: {
 
46
                inputBranchView.doWork()
 
47
            }
 
48
        }
 
49
 
 
50
        QtControls.Button {
 
51
            text: i18n("Cancel")
 
52
            onClicked: {
 
53
                stackView.pop()
 
54
            }
 
55
        }
 
56
    }
 
57
}
 
58