advotracker_qml: advotracker variant with Qt/Qml GUI
Signed-off-by: Ralf Zerres <ralf.zerres@networkx.de>
This commit is contained in:
70
advotracker_qml/resources/pages/UserImage.qml
Executable file
70
advotracker_qml/resources/pages/UserImage.qml
Executable file
@@ -0,0 +1,70 @@
|
||||
/*
|
||||
* AdvoTracker - Hotline tackingtool for Advocats
|
||||
*
|
||||
* Copyright (c) 2017 Ralf Zerres <ralf.zerres@networkx.de
|
||||
*
|
||||
* AdvoTracker is free software; you can redistribute it and/or modify it
|
||||
* under the terms of the GNU Lesser General Public License as published by
|
||||
* the Free Software Foundation; either version 2.1 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* AdvoTracker is distributed in the hope that it will be useful, but
|
||||
* WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public License
|
||||
* along with AdvoTracker; If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
import QtQuick 2.10 // Qt 5.10
|
||||
import QtQuick.Controls 2.3 // Qt 5.10
|
||||
import QtQuick.Layouts 1.3 // Qt 5.10
|
||||
import QtGraphicalEffects 1.0
|
||||
|
||||
Item {
|
||||
property Component mycomponent: userImage
|
||||
|
||||
QtObject {
|
||||
id: internalSettings
|
||||
// Hiedemann: Logo-Farbe "Rot"
|
||||
property color color: "#6f1a32"
|
||||
//property radius radius: 48
|
||||
}
|
||||
|
||||
Component {
|
||||
id: userImage
|
||||
|
||||
Rectangle {
|
||||
id: imageRoot;
|
||||
width: 96
|
||||
height: 96
|
||||
radius: 48
|
||||
|
||||
Image {
|
||||
id: sourceImage
|
||||
sourceSize: Qt.size(parent.width, parent.height)
|
||||
//height: parent.height
|
||||
//height: parent.width
|
||||
fillMode: Image.PreserveAspectFit
|
||||
smooth: false
|
||||
anchors.fill: parent
|
||||
source: "/images/nobody.png"
|
||||
//sourceSize: Qt.size(parent.width, parent.height)
|
||||
}
|
||||
|
||||
Rectangle {
|
||||
id: maskImage
|
||||
//sourceSize: Qt.size(parent.width, parent.height)
|
||||
radius: parent.radius
|
||||
color: internalSettings.color
|
||||
}
|
||||
|
||||
OpacityMask {
|
||||
anchors.fill: sourceImage
|
||||
source: sourceImage
|
||||
maskSource: maskImage
|
||||
}
|
||||
} // imageRoot
|
||||
} // userImage
|
||||
} // Item
|
||||
Reference in New Issue
Block a user