diff --git a/src/app/CMakeLists.txt b/src/app/CMakeLists.txt index f94e57b..38a964b 100644 --- a/src/app/CMakeLists.txt +++ b/src/app/CMakeLists.txt @@ -1,112 +1,113 @@ set(itinerary_srcs applicationcontroller.cpp contenttypeprober.cpp countryinformation.cpp pkpassmanager.cpp pkpassimageprovider.cpp reservationmanager.cpp timelinemodel.cpp ) ecm_qt_declare_logging_category(itinerary_srcs HEADER logging.h IDENTIFIER Log CATEGORY_NAME org.kde.itinerary ) add_library(itinerary STATIC ${itinerary_srcs}) target_link_libraries(itinerary PUBLIC itinerary-weather KPim::Itinerary KPim::PkPass KF5::I18n Qt5::Network Qt5::Quick ) if (Qt5QuickCompiler_FOUND) qtquick_compiler_add_resources(qml_srcs qml.qrc) else () set(qml_srcs qml.qrc) endif() add_executable(itinerary-app main.cpp countrymodel.cpp localizer.cpp settings.cpp tickettokenmodel.cpp util.cpp weatherforecastmodel.cpp ${qml_srcs} ) target_include_directories(itinerary-app PRIVATE ${CMAKE_BINARY_DIR}) target_link_libraries(itinerary-app PRIVATE itinerary KF5::Contacts ) if (ANDROID) # explicitly add runtime dependencies and transitive link dependencies, # so androiddeployqt picks them up target_link_libraries(itinerary PUBLIC Qt5::AndroidExtras) target_link_libraries(itinerary-app PRIVATE KF5::Archive KF5::Kirigami2 Qt5::Svg KF5::Prison OpenSSL::SSL ) kirigami_package_breeze_icons(ICONS checkmark dialog-cancel document-edit document-open document-save + documentinfo edit-delete edit-download edit-paste go-home go-next-symbolic help-about map-symbolic meeting-attending settings-configure view-calendar-day view-refresh weather-clear weather-clear-night weather-few-clouds weather-few-clouds-night weather-clouds weather-clouds-night weather-showers-day weather-showers-night weather-showers-scattered-day weather-showers-scattered-night weather-snow-scattered-day weather-snow-scattered-night weather-storm-day weather-storm-night weather-many-clouds weather-fog weather-showers weather-showers-scattered weather-hail weather-snow weather-snow-scattered weather-storm ) else () target_link_libraries(itinerary PRIVATE Qt5::Positioning) target_link_libraries(itinerary-app PRIVATE KF5::DBusAddons Qt5::Widgets ) set_target_properties(itinerary-app PROPERTIES OUTPUT_NAME "itinerary") endif() install(TARGETS itinerary-app ${INSTALL_TARGETS_DEFAULT_ARGS}) if (NOT ANDROID) install(PROGRAMS org.kde.itinerary.desktop DESTINATION ${KDE_INSTALL_APPDIR}) install(FILES org.kde.itinerary.appdata.xml DESTINATION ${KDE_INSTALL_METAINFODIR}) endif() diff --git a/src/app/CountryInfoDelegate.qml b/src/app/CountryInfoDelegate.qml index f8ba2ab..f12aaa9 100644 --- a/src/app/CountryInfoDelegate.qml +++ b/src/app/CountryInfoDelegate.qml @@ -1,80 +1,88 @@ /* Copyright (C) 2018 Volker Krause This program is free software; you can redistribute it and/or modify it under the terms of the GNU Library General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program 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 Library General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see . */ import QtQuick 2.5 import QtQuick.Layouts 1.1 import QtQuick.Controls 2.1 as QQC2 import org.kde.kirigami 2.4 as Kirigami import org.kde.kitinerary 1.0 as KItinerary import org.kde.itinerary 1.0 import "." as App Kirigami.AbstractCard { id: root property var countryInfo; header: Rectangle { id: headerBackground Kirigami.Theme.colorSet: Kirigami.Theme.Complementary Kirigami.Theme.inherit: false color: Kirigami.Theme.backgroundColor implicitHeight: headerLayout.implicitHeight + Kirigami.Units.largeSpacing * 2 anchors.leftMargin: -root.leftPadding anchors.topMargin: -root.topPadding anchors.rightMargin: -root.rightPadding RowLayout { id: headerLayout anchors.fill: parent anchors.margins: Kirigami.Units.largeSpacing + Kirigami.Icon { + source: "documentinfo" + width: Kirigami.Units.iconSizes.smallMedium + height: width + color: Kirigami.Theme.neutralTextColor + isMask: true + } QQC2.Label { - text: i18n("⚠ Entering %1", Localizer.countryName(countryInfo.isoCode)) + text: i18n("Entering %1", Localizer.countryName(countryInfo.isoCode)) color: Kirigami.Theme.neutralTextColor + Layout.fillWidth: true } } } contentItem: ColumnLayout { id: topLayout QQC2.Label { text: countryInfo.drivingSide == KItinerary.KnowledgeDb.DrivingSide.Right ? i18n("People are driving on the right side.") : i18n("People are driving on the wrong side.") color: Kirigami.Theme.negativeTextColor visible: countryInfo.drivingSideDiffers } QQC2.Label { text: i18n("No compatible power sockets: %1", countryInfo.powerSocketTypes) color: Kirigami.Theme.negativeTextColor visible: countryInfo.powerPlugCompatibility == CountryInformation.Incompatible } QQC2.Label { text: i18n("Some incompatible power sockets: %1", countryInfo.powerSocketTypes) color: Kirigami.Theme.neutralTextColor visible: countryInfo.powerPlugCompatibility == CountryInformation.PartiallyCompatible && countryInfo.powerSocketTypes != "" } QQC2.Label { text: i18n("Some incompatible power plugs: %1", countryInfo.powerPlugTypes) color: Kirigami.Theme.neutralTextColor visible: countryInfo.powerPlugCompatibility == CountryInformation.PartiallyCompatible && countryInfo.powerPlugTypes != "" } } }