Commit 67baeedb authored by Nicolas Fella's avatar Nicolas Fella

Add about page

parent 07218461
......@@ -15,7 +15,7 @@ include(KDECMakeSettings)
include(KDEClangFormat)
find_package(Qt5 REQUIRED COMPONENTS Gui Qml Quick)
find_package(KF5 REQUIRED COMPONENTS I18n ItemModels Config)
find_package(KF5 REQUIRED COMPONENTS CoreAddons I18n ItemModels Config)
if (ANDROID)
# runtime dependencies are build-time dependencies on Android
......
......@@ -13,7 +13,7 @@ if (ANDROID)
endif()
add_executable(ktrip ${ktrip_SRCS})
target_link_libraries(ktrip PRIVATE Qt5::Qml Qt5::Gui KF5::I18n KF5::ConfigGui KPublicTransport)
target_link_libraries(ktrip PRIVATE Qt5::Qml Qt5::Gui KF5::CoreAddons KF5::I18n KF5::ConfigGui KPublicTransport)
if (ANDROID)
target_link_libraries(ktrip PRIVATE
......
......@@ -33,6 +33,7 @@
#include <QApplication>
#endif
#include <KAboutData>
#include <KLocalizedContext>
#include <KLocalizedString>
#include <KPublicTransport/LocationRequest>
......@@ -84,6 +85,13 @@ int main(int argc, char *argv[])
settings.save();
});
KAboutData about(QStringLiteral("ktrip"), i18n("KTrip"), QStringLiteral("0.1"), i18n("Public transport assistant"),
KAboutLicense::GPL, i18n("© 2019 KDE Community"));
about.addAuthor(i18n("Nicolas Fella"), QString(), QStringLiteral("nicolas.fella@gmx.de"));
KAboutData::setApplicationData(about);
engine.rootContext()->setContextProperty(QStringLiteral("_aboutData"), QVariant::fromValue(about));
engine.rootContext()->setContextProperty(QStringLiteral("_settings"), &settings);
Formatter formatter;
......
......@@ -20,7 +20,7 @@
import QtQuick 2.2
import QtQuick.Controls 2.4
import org.kde.kirigami 2.0 as Kirigami
import org.kde.kirigami 2.6 as Kirigami
Kirigami.ApplicationWindow
{
......@@ -55,7 +55,18 @@ Kirigami.ApplicationWindow
Kirigami.Action {
text: i18n("Providers")
onTriggered: window.pageStack.push(Qt.resolvedUrl("BackendPage.qml"))
},
Kirigami.Action {
text: i18n("About")
onTriggered: window.pageStack.push(aboutPage)
}
]
}
Component {
id: aboutPage
Kirigami.AboutPage {
aboutData: _aboutData
}
}
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment