Warning, /multimedia/amarok/src/context/applets/currenttrack/package/contents/ui/StatsItem.qml is written in an unsupported language. File is not indexed.

0001 /****************************************************************************************
0002  * Copyright (c) 2017 Malte Veerman <malte.veerman@gmail.com>                           *
0003  *                                                                                      *
0004  * This program is free software; you can redistribute it and/or modify it under        *
0005  * the terms of the GNU General Public License as published by the Free Software        *
0006  * Foundation; either version 2 of the License, or (at your option) any later           *
0007  * version.                                                                             *
0008  *                                                                                      *
0009  * This program is distributed in the hope that it will be useful, but WITHOUT ANY      *
0010  * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A      *
0011  * PARTICULAR PURPOSE. See the GNU General Public License for more details.             *
0012  *                                                                                      *
0013  * You should have received a copy of the GNU General Public License along with         *
0014  * this program.  If not, see <http://www.gnu.org/licenses/>.                           *
0015  ****************************************************************************************/
0016 
0017 import QtQuick 2.4
0018 import QtQuick.Controls 2.0
0019 import org.kde.amarok.currenttrack 1.0
0020 
0021 Item {
0022     id: root
0023 
0024     property alias playCount: playCountLabel.text
0025     property alias score: scoreLabel.text
0026     property alias lastPlayed: lastPlayedLabel.text
0027 
0028     Row {
0029         height: parent.height / 2
0030 
0031         Label {
0032             text: i18n("Play Count")
0033             width: root.width / 3
0034             height: parent.height
0035             horizontalAlignment: Text.AlignHCenter
0036             maximumLineCount: 1
0037             fontSizeMode: Text.Fit
0038             font.pointSize: 32
0039             minimumPointSize: 9
0040         }
0041         Label {
0042             text: i18n("Score")
0043             width: root.width / 3
0044             height: parent.height
0045             horizontalAlignment: Text.AlignHCenter
0046             maximumLineCount: 1
0047             fontSizeMode: Text.Fit
0048             font.pointSize: 32
0049             minimumPointSize: 9
0050         }
0051         Label {
0052             text: i18n("Last played")
0053             width: root.width / 3
0054             height: parent.height
0055             horizontalAlignment: Text.AlignHCenter
0056             maximumLineCount: 1
0057             fontSizeMode: Text.Fit
0058             font.pointSize: 32
0059             minimumPointSize: 9
0060         }
0061     }
0062     Rectangle {
0063         width: parent.width
0064         height: parent.height / 2
0065         anchors.bottom: parent.bottom
0066         color: palette.base
0067 
0068         Row {
0069             height: parent.height
0070 
0071             Label {
0072                 id: playCountLabel
0073 
0074                 width: root.width / 3
0075                 height: parent.height
0076                 horizontalAlignment: Text.AlignHCenter
0077                 maximumLineCount: 1
0078                 fontSizeMode: Text.Fit
0079                 font.pointSize: 32
0080                 minimumPointSize: 9
0081                 text: CurrentTrackEngine.timesPlayed
0082                 elide: Text.ElideRight
0083             }
0084             Label {
0085                 id: scoreLabel
0086 
0087                 width: root.width / 3
0088                 height: parent.height
0089                 horizontalAlignment: Text.AlignHCenter
0090                 maximumLineCount: 1
0091                 fontSizeMode: Text.Fit
0092                 font.pointSize: 32
0093                 minimumPointSize: 9
0094                 text: CurrentTrackEngine.score
0095                 elide: Text.ElideRight
0096             }
0097             Label {
0098                 id: lastPlayedLabel
0099 
0100                 width: root.width / 3
0101                 height: parent.height
0102                 horizontalAlignment: Text.AlignHCenter
0103                 maximumLineCount: 1
0104                 fontSizeMode: Text.Fit
0105                 font.pointSize: 32
0106                 minimumPointSize: 9
0107                 text: CurrentTrackEngine.lastPlayed
0108                 elide: Text.ElideRight
0109             }
0110         }
0111     }
0112 
0113     SystemPalette {
0114         id: palette
0115     }
0116 }