PopupWindow QML Type

A window used from applications to display modal popups in sysui. More...

Since: Qt 5.11
Inherits:

NeptuneWindow

Properties

Detailed Description

The popup window of a Neptune 3 application is displayed on the Center Console. This component gives the application the flexibility to create a popup containing any kind of custom content and display it in system ui as a system modal popup.

Example Usage

//DevicesListPopup.qml

PopupWindow {
    id: root

    property var deviceModel

    Item {
        id: popupContent
        anchors.fill: parent

        Label {
            id: headerText
            text: "Please choose device"
        }

        ListView {
            id: deviceList
            model: root.deviceModel
            delegate: RadioButton {
                .....
            }
            .....
        }
    }
}


//DevicesMenu.qml

Item {
    id: root

    Button {
        id: button
        text: "Choose Device"
        onClicked: {
            var pos = button.mapToItem(root, button.width/2, button.height/2);
            devicesListPopup.originItemX = pos.x;
            devicesListPopup.originItemY = pos.y;
            deviceListPopup.visible = true;
        }
    }
    ......
    DevicesListPopup {
        width: 910
        height: 500
        id: devicesListPopup
    }
}

The application's custom popup component should inherit from PopupWindow. That said, the custom popup should then be instantiated inside the file which will use it and the element responsible of opening it should set its originItemX, originItemY, width and height and then request to show it by setting the visible property to true as shown in the example.

Property Documentation

originItemX : real

This property holds the x position from the item that called the popup. It is used internally in PopupItem to trigger transition animations.


originItemY : real

This property holds the y position from the item that called the popup. It is used internally in PopupItem to trigger transition animations.


popupY : real

This property holds the y position of the popup.


© 2018 Pelagicore AG. Documentation contributions included herein are the copyrights of their respective owners. The documentation provided herein is licensed under the terms of the GNU Free Documentation License version 1.3 as published by the Free Software Foundation. Qt and respective logos are trademarks of The Qt Company Ltd. in Finland and/or other countries worldwide. All other trademarks are property of their respective owners.