QGCColoredImage.qml 1.46 KB
Newer Older
1 2
import QtQuick 2.3
import QtQuick.Controls 1.2
3
import QtQuick.Controls.Styles 1.4
Don Gagne's avatar
Don Gagne committed
4 5 6 7 8 9 10
import QtGraphicalEffects 1.0

import QGroundControl.Palette 1.0

Item {
    property color color: "white"   // Image color

dogmaphobic's avatar
dogmaphobic committed
11 12 13
    property alias asynchronous:        image.asynchronous
    property alias cache:               image.cache
    property alias fillMode:            image.fillMode
Don Gagne's avatar
Don Gagne committed
14
    property alias horizontalAlignment: image.horizontalAlignment
dogmaphobic's avatar
dogmaphobic committed
15 16 17 18 19 20 21 22 23 24
    property alias mirror:              image.mirror
    property alias paintedHeight:       image.paintedHeight
    property alias paintedWidth:        image.paintedWidth
    property alias progress:            image.progress
    property alias smooth:              image.smooth
    property alias mipmap:              image.mipmap
    property alias source:              image.source
    property alias sourceSize:          image.sourceSize
    property alias status:              image.status
    property alias verticalAlignment:   image.verticalAlignment
Don Gagne's avatar
Don Gagne committed
25

26
    width:  image.width
Don Gagne's avatar
Don Gagne committed
27 28 29
    height: image.height

    Image {
Gus Grubba's avatar
Gus Grubba committed
30 31 32 33 34 35 36 37
        id:                 image
        smooth:             true
        mipmap:             true
        antialiasing:       true
        visible:            false
        fillMode:           Image.PreserveAspectFit
        anchors.fill:       parent
        sourceSize.height:  height
Don Gagne's avatar
Don Gagne committed
38 39 40
    }

    ColorOverlay {
Gus Grubba's avatar
Gus Grubba committed
41 42 43
        anchors.fill:       image
        source:             image
        color:              parent.color
Don Gagne's avatar
Don Gagne committed
44
    }
dogmaphobic's avatar
dogmaphobic committed
45
}