Commit 5fcec148 authored by Volker Krause's avatar Volker Krause
Browse files

Integrate Kirigami Addons copy

This enables the "Add train trip" feature by default on all platforms.
parent 102ca6a3
Pipeline #201140 passed with stage
in 5 minutes and 34 seconds
......@@ -24,6 +24,7 @@ include(FeatureSummary)
include(KDEInstallDirs)
include(KDECMakeSettings)
include(GenerateExportHeader)
include(ECMQmlModule)
set(CMAKE_CXX_STANDARD 17)
set(CMAKE_AUTOMOC ON)
......
......@@ -8,6 +8,7 @@ add_subdirectory(weather)
add_subdirectory(kandroidextras)
add_subdirectory(gpx)
add_subdirectory(calendarextras)
add_subdirectory(kirigami-addons/dateandtime)
add_subdirectory(app)
if (TARGET KF5::FileMetaData)
......
......@@ -7,7 +7,7 @@ import QtQuick 2.15
import QtQuick.Layouts 1.15
import QtQuick.Controls 2.15 as QQC2
import org.kde.kirigami 2.17 as Kirigami
import org.kde.kirigamiaddons.dateandtime 0.1 as Addon
import org.kde.itinerary.kirigamiaddons.dateandtime 0.1 as Addon
import org.kde.kpublictransport 1.0
import org.kde.itinerary 1.0
import "." as App
......
......@@ -35,7 +35,6 @@ Kirigami.ScrollablePage {
Kirigami.Action {
text: i18n("Add train trip...")
iconName: "list-add-symbolic"
visible: Settings.developmentMode
onTriggered: {
// find date/time at the current screen center
var row = -1;
......
#!/bin/bash
# SPDX-FileCopyrightText: 2022 Volker Krause <vkrause@kde.org>
# SPDX-License-Identifier: CC0-1.0
# apply changes on top of the upstream copy of kirigami-addons
perl -p -i -e 's/org.kde.kirigamiaddons.dateandtime/org.kde.itinerary.kirigamiaddons.dateandtime/' dateandtime/CMakeLists.txt
perl -p -i -e 's/(?<!-)dateandtimeplugin/itinerary-dateandtimeplugin/g' dateandtime/CMakeLists.txt
perl -p -i -e 's/(^target_compile_definitions.*TRANSLATION_DOMAIN.*$)/#\1/' dateandtime/CMakeLists.txt
for i in `find -name *.qml`; do
perl -p -i -e 's/import org.kde.kirigamiaddons.dateandtime 0.1/import org.kde.itinerary.kirigamiaddons.dateandtime 0.1/' $i
done
......@@ -13,11 +13,11 @@ if (ANDROID)
install(TARGETS KF5KirigamiDateAndTime ${KDE_INSTALL_TARGETS_DEFAULT_ARGS})
endif()
ecm_add_qml_module(dateandtimeplugin URI "org.kde.kirigamiaddons.dateandtime" VERSION 0.1)
ecm_add_qml_module(itinerary-dateandtimeplugin URI "org.kde.itinerary.kirigamiaddons.dateandtime" VERSION 0.1)
target_compile_definitions(dateandtimeplugin PRIVATE -DTRANSLATION_DOMAIN=\"kirigami_dateandtime\")
#target_compile_definitions(itinerary-dateandtimeplugin PRIVATE -DTRANSLATION_DOMAIN=\"kirigami_dateandtime\")
target_sources(dateandtimeplugin PRIVATE
target_sources(itinerary-dateandtimeplugin PRIVATE
lib/yearmodel.cpp
lib/monthmodel.cpp
lib/plugin.cpp
......@@ -26,7 +26,7 @@ target_sources(dateandtimeplugin PRIVATE
lib/infinitecalendarviewmodel.cpp
)
ecm_target_qml_sources(dateandtimeplugin SOURCES
ecm_target_qml_sources(itinerary-dateandtimeplugin SOURCES
ClockElement.qml
ClockFace.qml
DateInput.qml
......@@ -40,13 +40,13 @@ ecm_target_qml_sources(dateandtimeplugin SOURCES
TimeInput.qml
)
target_link_libraries(dateandtimeplugin
target_link_libraries(itinerary-dateandtimeplugin
Qt${QT_MAJOR_VERSION}::Quick
Qt${QT_MAJOR_VERSION}::Qml
KF5::I18n
)
if (TARGET KF5KirigamiDateAndTime)
target_link_libraries(dateandtimeplugin KF5KirigamiDateAndTime)
target_link_libraries(itinerary-dateandtimeplugin KF5KirigamiDateAndTime)
endif()
ecm_finalize_qml_module(dateandtimeplugin DESTINATION ${KDE_INSTALL_QMLDIR})
ecm_finalize_qml_module(itinerary-dateandtimeplugin DESTINATION ${KDE_INSTALL_QMLDIR})
......@@ -10,7 +10,7 @@ import QtQuick.Controls 2.3
import org.kde.kirigami 2.4 as Kirigami
import org.kde.kirigamiaddons.dateandtime 0.1
import org.kde.itinerary.kirigamiaddons.dateandtime 0.1
/**
* A small in-line field to input a date.
......
......@@ -5,7 +5,7 @@ import QtQuick 2.15
import QtQuick.Controls 2.15 as QQC2
import QtQuick.Layouts 1.15
import org.kde.kirigami 2.15 as Kirigami
import org.kde.kirigamiaddons.dateandtime 0.1
import org.kde.itinerary.kirigamiaddons.dateandtime 0.1
QQC2.Control {
id: datepicker
......
......@@ -9,7 +9,7 @@ import QtQuick.Layouts 1.2
import QtQuick.Controls 2.3
import org.kde.kirigami 2.4 as Kirigami
import org.kde.kirigamiaddons.dateandtime 0.1
import org.kde.itinerary.kirigamiaddons.dateandtime 0.1
RowLayout {
id: layout
......
......@@ -7,7 +7,7 @@ import QtQuick.Window 2.15
import QtQuick.Layouts 1.2
import QtQuick.Controls 2.3 as Controls
import org.kde.kirigami 2.8 as Kirigami
import org.kde.kirigamiaddons.dateandtime 0.1 as KDT
import org.kde.itinerary.kirigamiaddons.dateandtime 0.1 as KDT
Controls.TextField { //inherited for style reasons to show we're interactive
id: root
......
......@@ -6,7 +6,7 @@
import QtQuick 2.15
import QtQuick.Controls 2.5
import org.kde.kirigamiaddons.dateandtime 0.1
import org.kde.itinerary.kirigamiaddons.dateandtime 0.1
/**
* TimeInput is a single line time editor.
......
Supports Markdown
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