• File: CS_mapperio_instance.qml
  • Full Path: /home/insbudnet/domains/insbud.net/public_html/download/software/qml/sieniczno_nowak/qml/pl/commons/CS_mapperio_instance.qml
  • File size: 3.71 KB
  • MIME-type: text/plain
  • Charset: utf-8
 
Open Back
import QtQuick 2.3
import QtQuick.Layouts 1.1

Core {
    id: container

    /*
     * Pojedyńcza instancja MapperIO. Aktualny stan, nastawialny tryb, nastawialna wartość w trybie manualnym
     */

    /*
     * Property do ustawienia przy tworzeniu
     */

    property string     prop_title: ""                          // nagłówek parametru
    property int        prop_index_output_value : -1            // index parametru output.value
    property int        prop_index_setting_mode : -1            // index parametru setting.mode
    property int        prop_index_setting_manual_value : -1    // index parametru setting.manual.value

    /*
     * Property prywatne pozostałe
     */

    property int        prv_initialized : 0                     // kontrolka została zainicjalizowana
    property int        prv_offset : 8                          //

    Layout.fillWidth: true
    Layout.minimumWidth: 150
    Layout.maximumWidth: 600

    Layout.fillHeight: true
    Layout.minimumHeight: 100
    Layout.maximumHeight: 250

    Layout.alignment: Qt.AlignHCenter

    width: 100
    height: 300

    color: "#00000000"

    Component.onCompleted: {
        if (!prv_initialized) {
            valueChanged.connect(menuChanged);

            prv_initialized = 1;
        }
    }

    Item {
        id: itm_group
        x: 0
        y: 0
        width: parent.width
        height: parent.height

        Rectangle {
            id: rec_background
            x: 0
            y: 10
            width: parent.width
            height: parent.height - y
            color: "lightgray"
            border.color: "gray"
            radius: 5
            opacity: 1

        }

        Item {
            id: itm_title
            x: 20
            y: 0
            width: parent.width - 40
            height: 20

            Rectangle {
                x: 0
                y: 0
                width: parent.width
                height: parent.height
                color: "lightgray"
                border.color: "gray"
                opacity: 1
            }

            Text {
                id: txt_title

                x: 10
                y: 0
                width: parent.width - 20
                height: parent.height

                color: "#6e6e6e"
                text: prop_title
                verticalAlignment: Text.AlignVCenter
                horizontalAlignment: Text.AlignHCenter

                font.family: "Mukti Narrow"
                font.strikeout: false
                font.bold: false
                font.italic: false
                fontSizeMode : Text.Fit
                minimumPixelSize: 10
                font.pixelSize: 0.8 * parent.height

            }

        }

        C_value_view_02 {
            id: param_value
            x: prv_offset
            y: 15 + prv_offset
            width: parent.width - 2 * prv_offset
            height: 100

            prop_title: "Stan"
            prop_index: prop_index_output_value
            prop_p_0 : "0;1;%;thermometer_02.svg"

        }

        C_combo_set_01 {
            id: param_mode
            x: prv_offset
            y: param_value.y + param_value.height + prv_offset
            width: parent.width - 2 * prv_offset
            height: 100

            prop_title: "Tryb"
            prop_index: prop_index_setting_mode
            prop_p_0 : "AUTO|Manualny;0|1"
        }

        C_value_set_01 {
            id: param_manual_value
            x: prv_offset
            y: param_mode.y + param_mode.height + prv_offset
            width: parent.width - 2 * prv_offset
            height: 100

            prop_title: "Stan w trybie ręcznym"
            prop_index: prop_index_setting_manual_value
            prop_p_0 : "0;1;0;100;%;1"
        }
    }


}