MarkerContextMenu.qml 596 Bytes
Newer Older
luyikei's avatar
luyikei committed
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29
import QtQuick 2.0
import QtQuick.Controls 1.4
import QtQuick.Dialogs 1.2

Menu {
    id: markerContextMenu
    title: "Edit"

    property var marker

    MenuItem {
        text: "Delete"

        onTriggered: {
            removeMarkerDialog.visible = true;
        }
    }

    MessageDialog {
        id: removeMarkerDialog
        title: "VLMC"
        text: qsTr( "Do you really want to remove the marker?" )
        icon: StandardIcon.Question
        standardButtons: StandardButton.Yes | StandardButton.No
        onYes: {
            removeMarker( marker.position );
        }
    }
}