Commit c39d9e9e authored by Claudio Cambra's avatar Claudio Cambra
Browse files

Move all filter handling of incidence info components into IncidenceInfoContents.qml



Signed-off-by: Claudio Cambra's avatarClaudio Cambra <claudio.cambra@gmail.com>
parent ddb41c21
Pipeline #230652 passed with stage
in 2 minutes
......@@ -13,9 +13,6 @@ import org.kde.kalendar 1.0
Item {
id: root
signal closeParentContainer
signal tagClicked(string tagName)
/**
* We use both incidenceData and incidenceWrapper to get info about the occurrence.
* IncidenceData contains information about the specific occurrence (i.e. date of occurrence)
......@@ -28,10 +25,9 @@ Item {
property var incidenceData
property var incidenceWrapper
property var collectionData
property var activeTags : []
readonly property var activeTags : Filter.tags
readonly property int relatedIncidenceDelegateHeight: Kirigami.Units.gridUnit * 3
readonly property alias scrollView: contentsView
component HoverLabel: QQC2.Label {
......@@ -182,7 +178,7 @@ Item {
implicitWidth: itemLayout.implicitWidth > tagFlow.width ? tagFlow.width : itemLayout.implicitWidth
activeFocusOnTab: true
backgroundColor: mainDrawer.activeTags.includes(modelData) ? Kirigami.Theme.highlightColor : Kirigami.Theme.backgroundColor
onClicked: root.tagClicked(modelData)
onClicked: Filter.toggleFilterTag(modelData)
}
}
}
......
......@@ -13,10 +13,7 @@ import org.kde.kalendar 1.0
QQC2.Popup {
id: root
signal tagClicked(string tagName)
property var incidenceData
property var activeTags : []
property alias scrollView: incidenceInfoContents.scrollView
......@@ -33,7 +30,5 @@ QQC2.Popup {
id: incidenceInfoContents
anchors.fill: parent
incidenceData: root.incidenceData
activeTags: root.activeTags
onTagClicked: root.tagClicked(tagName)
}
}
......@@ -20,7 +20,6 @@ Kirigami.OverlayDrawer {
property var incidenceData
property var incidenceWrapper
property var collectionData
readonly property var activeTags : Filter.tags
enabled: true
interactive: enabled
......@@ -116,8 +115,6 @@ Kirigami.OverlayDrawer {
Layout.fillHeight: true
incidenceData: root.incidenceData
activeTags: root.activeTags
onTagClicked: Filter.toggleFilterTag(modelData)
}
}
}
......
......@@ -641,14 +641,11 @@ Kirigami.ApplicationWindow {
width: Kirigami.Units.gridUnit * 30
height: Math.min(Kirigami.Units.gridUnit * 50, scrollView.contentHeight)
activeTags: root.filter && root.filter.tags ? root.filter.tags : []
onIncidenceDataChanged: root.openOccurrence = incidenceData
onVisibleChanged: {
reposition();
visible ? root.openOccurrence = incidenceData : root.openOccurrence = null;
}
onTagClicked: root.toggleFilterTag(tagName)
}
}
......
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