summaryrefslogtreecommitdiffstats
path: root/util/qt3d/assetviewer/qml/ButtonBarPane.qml
blob: bd85d5c8eddc9d62d986bee1d8cd918f31898865 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
import QtQuick 1.0
import Qt3D 1.0
import AssetViewer 1.0
import "fileHandling.js" as FileHandler
import "Widgets"

Flow {
    id: menu
    anchors.left: parent.left
    anchors.leftMargin: 2
    anchors.top: parent.top
    anchors.topMargin: 2
    width: buttonWidth * 4 + spacing * 3
    height: parent.height
    spacing: 5

    property double buttonWidth: 105

    SaveButton {
        id: save
        width: buttonWidth
        buttonText: "Save QML"
        imageSrc: "images/save.png"
    }

    BlenderToggle {
        id: load
        width: buttonWidth
        onClicked:
        {
            if (outerWindow.changed)
            {
                FileHandler.save_qml(true);
            }
            var useEffect = useCustomEffect;
            useCustomEffect = false;
            quickFile.load();
            useCustomEffect = useEffect;
        }
        buttonText: "Load Asset"
        imageSrc: "images/model.png"
    }

    BlenderToggle {
        id: help
        width: buttonWidth
        onClicked: helpOverlay.visible = true
        buttonText: "Help!"
        imageSrc: "images/help.png"
    }
}