Switches.qml 1.98 KB
Newer Older
1
import Qt 4.7
2
import Bauhaus 1.0
3 4 5

QFrame {
    styleSheetFile: "switch.css";
6
    property variant specialModeIcon;
7
    specialModeIcon: "images/standard.png";
8 9
    maximumWidth: 300;
    minimumWidth: 300;
10
    layout: QHBoxLayout {
11
        topMargin: 0;
12
        bottomMargin: 0;
13 14
        leftMargin: 0;
        rightMargin: 40;
15 16 17 18 19 20
        spacing: 0;

        QPushButton {
            checkable: true;
            checked: true;
            id: standardMode;
21
            toolTip: qsTr("Special properties");
22
            //iconFromFile: "images/rect-icon.png";
23
            text: backendValues === undefined || backendValues.className === undefined || backendValues.className == "empty" ? "empty" : backendValues.className.value
24 25 26 27 28 29 30 31
            onClicked: {
                extendedMode.checked = false;
                layoutMode.checked = false;
                checked = true;
                standardPane.visible = true;
                extendedPane.visible = false;
                layoutPane.visible = false;
            }
32
        }
33 34

        QPushButton {
35
            id: layoutMode;
36
            checkable: true;
37
            checked: false;
38
            toolTip: qsTr("Layout");
39
            text: qsTr("Layout");
40
            onClicked: {
41
                extendedMode.checked = false;
42 43 44
                standardMode.checked = false;
                checked = true;
                standardPane.visible = false;
45 46
                extendedPane.visible = false;
                layoutPane.visible = true;
47 48
            }
        }
49

50
        QPushButton {
51
            id: extendedMode;
52
            toolTip: qsTr("Advanced properties");
53 54
            checkable: true;
            checked: false;
55
            text: qsTr("Advanced")
56 57
            onClicked: {
                standardMode.checked = false;
58
                layoutMode.checked = false;
59 60
                checked = true;
                standardPane.visible = false;
61 62
                extendedPane.visible = true;
                layoutPane.visible = false;
63 64
            }
        }
65

66 67
    }
}