Project

General

Profile

Support Request #6949 » ExampleFilter.qml

hidden, 2019-04-29 12:19

 
1
import QtQuick 2.7
2
import QtQuick.Controls 1.4
3
import QtQuick.Layouts 1.1
4
import QtGraphicalEffects 1.0
5
import QtQuick.Dialogs 1.2
6

    
7
import EditorPlugin 1.0
8

    
9
import ExamplePlugin 1.0
10

    
11
EditorPluginBase
12
{
13
    id: root
14

    
15
    Example {
16
        id: example
17
        path: "ExamplePath"
18
    }
19

    
20
    Dialog
21
    {
22
        id: dialog;
23
        visible: true
24
        title: "My Filter Editor"
25

    
26
        standardButtons: StandardButton.Save | StandardButton.Cancel
27

    
28
        Slider
29
        {
30
            id: slider
31
            width: parent.width
32
            height: 20
33
            value: 0
34
            minimumValue: 0
35
            maximumValue: 100
36
        }
37

    
38
        Component.onCompleted:
39
        {
40
            slider.value = getPropertyValue(targetModel, "test_property");
41
        }
42

    
43
        onAccepted:
44
        {
45
            setProperty(targetModel, "test_property", slider.value)
46
        }
47
    }
48
}
49

    
(2-2/2)