Switches.qml 1.91 KB
Newer Older
1
import Qt 4.6
2
import Bauhaus 1.0
3 4 5 6 7

QFrame {
    styleSheetFile: "switch.css";
    property var specialModeIcon;
    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: "special properties";
22
            //iconFromFile: "images/rect-icon.png";
23
            text: backendValues === undefined ? "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 35
		
		QPushButton {
            id: layoutMode;
36
            checkable: true;
37
            checked: false;
38 39
            toolTip: qsTr("layout and geometry");
            text: qsTr("Geometry");
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: "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
    }
}