Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
ProfileStatusIndicator.qml
GNU nano 2.2.6 File: /usr/share/lipstick-jolla-home-qt5/statusarea/ProfileStatusIndicator.qml
/****************************************************************************
**
** Copyright (C) 2013 Jolla Ltd.
** Contact: Vesa Halttunen <vesa.halttunen@jollamobile.com>
**
****************************************************************************/
import QtQuick 2.0
import org.freedesktop.contextkit 1.0
Image {
id: profileStatusIndicator
property bool enabled: true
source: profileNameContextProperty.value == "silent" ? "image://theme/icon-status-silent" + iconSuffix : ""
width: source != "" ? implicitWidth : 0
height: source != "" ? implicitHeight : 0
ContextProperty {
id: profileNameContextProperty
key: "Profile.Name"
}
onEnabledChanged: {
if (enabled) {
profileNameContextProperty.subscribe()
} else {
profileNameContextProperty.unsubscribe()
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.