Switches.qml 1.85 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 21
        spacing: 0;

        QPushButton {
            checkable: true;
            checked: true;
            id: standardMode;
            toolTip: "general item properties";
22
            //iconFromFile: "images/rect-icon.png";
23
            text: "Common"
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 36
        QPushButton {
            id: extendedMode;
            toolTip: "extended properties";
            checkable: true;
37
            checked: false;            
38
            text: "Advanced"
39 40 41 42 43 44 45 46 47 48 49 50 51
            onClicked: {
                standardMode.checked = false;
                layoutMode.checked = false;
                checked = true;
                standardPane.visible = false;
                extendedPane.visible = true;
                layoutPane.visible = false;
            }
        }
        QPushButton {
            id: layoutMode;
            checkable: true;
            checked: false;
52
            toolTip: "layout properties";            
53
            text: "Anchor";
54 55 56 57 58 59 60 61 62 63 64
            onClicked: {
                extendedMode.checked = false;
                standardMode.checked = false;
                checked = true;
                standardPane.visible = false;
                extendedPane.visible = false;
                layoutPane.visible = true;
            }
        }
    }
}