/*!
 *
 * Copyright (c) 2019-2020 Diality Inc. - All Rights Reserved.
 * \copyright                                                       \n
 *          THIS CODE MAY NOT BE COPIED OR REPRODUCED IN ANY FORM,  \n
 *          IN PART OR IN WHOLE,                                    \n
 *          WITHOUT THE EXPLICIT PERMISSION OF THE COPYRIGHT OWNER. \n
 *
 * \file    AutoHideInfo.qml
 * \date    2020/02/11
 * \author  Behrouz NematiPour
 *
 */

// Qt
import QtQuick 2.12

// Project
//  Qml imports
import "qrc:/globals"
import "qrc:/components"

/*!
 * \brief   Contains the and Auto Hide Dialog Implementation
 *          for a quick information for user
 *          and will be hidden in a second
 */
ModalDialog { id : _root
    contentItem.objectName: "AutoHideInfoDialog"  //SquishQt testability

    property string message: "<message>"

    autoHide: true

    TitleText { id: _titleText
        anchors.centerIn: parent
        width: parent.width
        text: message
    }

    function showDialog(vMessage, vDuration) {
        _root.message = vMessage
        _root.autoHideDuration = vDuration
        _root.open()
    }
}
