harbour-batterybuddy/application/qml/harbour-batterybuddy.qml
Matti Viljanen 3ca45a54a8
Update copyright years
There has to be a smarter way to this...
2022-08-28 10:36:38 +03:00

35 lines
1.3 KiB
QML

/**
* Battery Buddy, a Sailfish application to prolong battery lifetime
*
* Copyright (C) 2019-2022 Matti Viljanen
*
* Battery Buddy is free software: you can redistribute it and/or modify it under the terms of the
* GNU General Public License as published by the Free Software Foundation, either version 3 of the
* License, or (at your option) any later version.
*
* Battery Buddy 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 General Public License for more details. You should have received a copy of the GNU
* General Public License along with Battery Buddy. If not, see <http://www.gnu.org/licenses/>.
*
* Author: Matti Viljanen
*/
import QtQuick 2.6
import Sailfish.Silica 1.0
import Nemo.Notifications 1.0
import "pages"
ApplicationWindow
{
initialPage: Component { MainPage { } }
cover: Qt.resolvedUrl("cover/CoverPage.qml")
allowedOrientations: Orientation.LandscapeMask | Orientation.Portrait
function formatTemperature(temp) {
if(Qt.locale().measurementSystem === Locale.ImperialUSSystem) {
return Math.floor((battery.temperature / 10) * 1.8 + 32) + " °F"
}
return Math.floor(battery.temperature / 10) + " °C"
}
}