Index: kstars/CMakeLists.txt =================================================================== --- kstars/CMakeLists.txt +++ kstars/CMakeLists.txt @@ -823,6 +823,7 @@ kstarslite/qml/dialogs/FindDialog.qml kstarslite/qml/dialogs/LocationDialog.qml kstarslite/qml/dialogs/DetailsDialog.qml + kstarslite/qml/dialogs/AboutDialog.qml kstarslite/qml/dialogs/helpers/DetailsItem.qml kstarslite/qml/dialogs/helpers/DetailsAddLink.qml Index: kstars/kstarslite.cpp =================================================================== --- kstars/kstarslite.cpp +++ kstars/kstarslite.cpp @@ -23,6 +23,7 @@ #include "ksutils.h" #include "Options.h" #include "skymaplite.h" +#include "version.h" #include "indi/clientmanagerlite.h" #include "kstarslite/imageprovider.h" #include "kstarslite/dialogs/finddialoglite.h" @@ -103,6 +104,14 @@ m_RootObject = m_Engine.rootObjects()[0]; m_clientManager->setIndiControlPage(*m_RootObject->findChild("indiControlPanel")); + // Set the About information + QObject *aboutDialog = m_RootObject->findChild("aboutDialog"); + + aboutDialog->setProperty("versionText", i18n("Version: %1", KSTARS_VERSION)); + aboutDialog->setProperty("buildText", i18n("Build: %1", KSTARS_BUILD_TS)); + aboutDialog->setProperty("teamText", QString("2001-" + QString::number(QDate::currentDate().year()) + i18n("(c), The KStars Team"))); + aboutDialog->setProperty("licenseText", i18n("License: GPLv2")); + QQuickItem *skyMapLiteWrapper = m_RootObject->findChild("skyMapLiteWrapper"); m_SkyMapLite->initialize(skyMapLiteWrapper); Index: kstars/kstarslite/qml/CMakeLists.txt =================================================================== --- kstars/kstarslite/qml/CMakeLists.txt +++ kstars/kstarslite/qml/CMakeLists.txt @@ -25,6 +25,7 @@ install( FILES dialogs/FindDialog.qml dialogs/LocationDialog.qml dialogs/DetailsDialog.qml + dialogs/AboutDialog.qml DESTINATION ${KDE_INSTALL_DATADIR}/kstars/kstarslite/qml/dialogs ) install( FILES dialogs/helpers/DetailsAddLink.qml Index: kstars/kstarslite/qml/dialogs/AboutDialog.qml =================================================================== --- /dev/null +++ kstars/kstarslite/qml/dialogs/AboutDialog.qml @@ -0,0 +1,67 @@ +// Copyright (C) 2018 Csaba Kertesz +/*************************************************************************** +* * +* This program 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 2 of the License, or * +* (at your option) any later version. * +* * +***************************************************************************/ + +import QtQuick 2.6 +import QtQuick.Window 2.2 +import QtQuick.Layouts 1.1 +import QtQuick.Controls 2.0 +import QtQuick.Controls.Material 2.0 +import QtQuick.Controls.Universal 2.0 +import "../constants" 1.0 +import "../modules" + +KSPage { + id: aboutDialog + objectName: "aboutDialog" + title: xi18n("About") + + property alias versionText: versionLabel.text + property alias buildText: buildLabel.text + property alias teamText: teamLabel.text + property alias licenseText: licenseLabel.text + + ColumnLayout { + Layout.fillWidth: true + Layout.fillHeight: true + + KSLabel { + text: xi18n("KStars") + } + + KSLabel { + id: versionLabel + text: "" + } + + KSLabel { + text: xi18n("Desktop Planetarium") + } + + KSLabel { + id: buildLabel + text: "" + } + + KSLabel { + id: teamLabel + text: "" + } + + KSLabel { + textFormat: Text.RichText + text: "https://edu.kde.org/kstars" + } + + KSLabel { + id: licenseLabel + text: "" + } + } +} Index: kstars/kstarslite/qml/main.qml =================================================================== --- kstars/kstarslite/qml/main.qml +++ kstars/kstarslite/qml/main.qml @@ -167,6 +167,10 @@ id: locationLoading } + AboutDialog { + id: aboutDialog + } + //Pages INDIControlPanel { id: indiControlPanel @@ -320,6 +324,7 @@ append({objID: indiControlPanel}); append({objID: findDialog}); append({objID: locationDialog}); + append({objID: aboutDialog}); } }