2
* This file is part of Checkbox
4
* Copyright 2015 Canonical Ltd.
7
* - Maciej Kisielewski <maciej.kisielewski@canonical.com>
9
* This program is free software; you can redistribute it and/or modify
10
* it under the terms of the GNU General Public License as published by
11
* the Free Software Foundation; version 3.
13
* This program is distributed in the hope that it will be useful,
14
* but WITHOUT ANY WARRANTY; without even the implied warranty of
15
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16
* GNU General Public License for more details.
18
* You should have received a copy of the GNU General Public License
19
* along with this program. If not, see <http://www.gnu.org/licenses/>.
22
import Ubuntu.Components 1.1
23
import Ubuntu.Components.Popups 0.1
25
/*! \brief Comment addition dialog.
28
This component is a prompt for user comments regarding test.
33
property alias dialogComponent: component
34
property var commentDefaultText: ""
35
signal commentAdded(string comment)
41
title: i18n.tr("Add comment")
52
color: UbuntuColors.green
54
PopupUtils.close(dialog);
55
commentAdded(commentText.text);
56
commentText.text = "";
60
Component.onCompleted: {
61
commentText.text = commentDefaultText
62
commentText.cursorPosition = commentText.text.length;
63
commentText.forceActiveFocus();