Warning, /multimedia/kid3/src/qml/app/MessageDialog.qml is written in an unsupported language. File is not indexed.

0001 /**
0002  * \file MessageDialog.qml
0003  * Message dialog.
0004  *
0005  * \b Project: Kid3
0006  * \author Urs Fleisch
0007  * \date 16 Feb 2015
0008  *
0009  * Copyright (C) 2015-2018  Urs Fleisch
0010  *
0011  * This program is free software; you can redistribute it and/or modify
0012  * it under the terms of the GNU Lesser General Public License as published by
0013  * the Free Software Foundation; version 3.
0014  *
0015  * This program is distributed in the hope that it will be useful,
0016  * but WITHOUT ANY WARRANTY; without even the implied warranty of
0017  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
0018  * GNU Lesser General Public License for more details.
0019  *
0020  * You should have received a copy of the GNU Lesser General Public License
0021  * along with this program.  If not, see <http://www.gnu.org/licenses/>.
0022  */
0023 
0024 import QtQuick 2.11
0025 import QtQuick.Controls 2.4
0026 
0027 Dialog {
0028   id: page
0029 
0030   property alias text: msg.text
0031   signal yes
0032   signal no
0033   signal cancel
0034 
0035   width: 320
0036   height: 300
0037   modal: true
0038   standardButtons: Dialog.Yes | Dialog.No | Dialog.Cancel
0039 
0040   Connections {
0041     target: footer
0042     onClicked: {
0043       switch (button.DialogButtonBox.buttonRole) {
0044       case DialogButtonBox.YesRole:
0045         yes()
0046         break;
0047       case DialogButtonBox.NoRole:
0048         no()
0049         break;
0050       case DialogButtonBox.RejectRole:
0051         cancel()
0052         break;
0053       }
0054     }
0055   }
0056 
0057   contentItem: Label {
0058     id: msg
0059     wrapMode: Text.WordWrap
0060   }
0061 }