Warning, /education/gcompris/src/activities/superbrain/SearchItem.qml is written in an unsupported language. File is not indexed.
0001 /* GCompris - SearchItem.qml 0002 * 0003 * SPDX-FileCopyrightText: 2015 Holger Kaelberer <holger.k@elberer.de> 0004 * 0005 * Authors: 0006 * Holger Kaelberer <holger.k@elberer.de> 0007 * 0008 * SPDX-License-Identifier: GPL-3.0-or-later 0009 */ 0010 0011 import QtQuick 2.12 0012 import GCompris 1.0 0013 //import QtGraphicalEffects 1.0 0014 import "superbrain.js" as Activity 0015 0016 Item { 0017 id: root 0018 property int searchItemIndex: 0 0019 property alias border: color.border 0020 property alias radius: color.radius 0021 property bool highlightSymbol: false 0022 0023 Image { 0024 id: symbol 0025 visible: items.mode === "symbol" 0026 fillMode: Image.PreserveAspectFit 0027 source: Activity.symbols[root.searchItemIndex] 0028 anchors.left: parent.left 0029 anchors.top: parent.top 0030 anchors.margins: 3 0031 width: parent.width - 6 0032 height: parent.height - 6 0033 } 0034 Rectangle { 0035 id: symbolHighlighter 0036 visible: (items.mode === "symbol") && root.highlightSymbol 0037 anchors.fill: parent 0038 width: parent.width 0039 height: parent.height 0040 border.width: 3 0041 border.color: "white" 0042 color: "transparent" 0043 } 0044 0045 Rectangle { 0046 id: color 0047 visible: items.mode === "color" 0048 color: Activity.colors[root.searchItemIndex] 0049 anchors.fill: parent 0050 width: parent.width 0051 height: parent.height 0052 radius: width / 2 0053 } 0054 }