[Digital Clock] Open KOrganizer with event details on click
Needs ReviewPublic

Authored by dvratil on Jun 19 2019, 3:54 PM.

Details

Reviewers
None
Group Reviewers
Plasma
Summary

Note that this depends on API that will be available first in KDE Frameworks 5.61,
so this should not be merged until Plasma master can depend on KF5 5.61, I'm just
putting it here otherwise I'd lose the patch somewhere :) Alternatively this just
adds a simple function call from QML, so if merged before 5.61 it will only cause
a runtime warning and nothing will happen.

Diff Detail

Repository
R120 Plasma Workspace
Branch
master
Lint
No Linters Available
Unit
No Unit Test Coverage
Build Status
Buildable 14441
Build 14459: arc lint + arc unit
dvratil created this revision.Jun 19 2019, 3:54 PM
Restricted Application added a project: Plasma. · View Herald TranscriptJun 19 2019, 3:54 PM
Restricted Application added a subscriber: plasma-devel. · View Herald Transcript
dvratil requested review of this revision.Jun 19 2019, 3:54 PM

What happens when KOrganizer isn't installed?

Also, what about the other clocks?

dvratil added a comment.EditedJun 19 2019, 4:31 PM

Nothing. Same will happen for example when users click on an event from the Holidays or Astronomical Events calendar plugins as there are no viewers for those events and KOrganizer can only open events provided by the PIM plugin. I would argue that it is safe to assume that when you have the kdepim-addons package installed (which provides the events plugin) and you configured your calendars in Akonadi, that you also have KOrganizer installed :-)

As far as I know, the agenda view is only implemented in the Digital Clock applet.

dvratil edited the summary of this revision. (Show Details)Jul 14 2019, 8:17 AM
apol added a subscriber: apol.Jul 15 2019, 1:09 AM
apol added inline comments.
applets/digital-clock/package/contents/ui/CalendarView.qml
196

Maybe it should only be enabled if there's events to show?

this should not be merged until Plasma master can depend on KF5 5.61

Or you do a check of enabled: typeof monthView.daysModel.showEventDetails === "function"

dvratil updated this revision to Diff 62597.Jul 26 2019, 12:05 PM
  • Implement Kai's suggestion
dvratil added inline comments.Jul 26 2019, 12:05 PM
applets/digital-clock/package/contents/ui/CalendarView.qml
196

This ListItem represents an event, so there's always an event :)

Also, could someone take a look at https://phabricator.kde.org/D21902 please? :)

apol added a comment.Mar 21 2020, 4:06 PM

LGTM +1

applets/digital-clock/package/contents/ui/CalendarView.qml
194

I'd use instanceof.

Also you can depend on a new KF5 anyway, I wouldn't make it optional.

+1 in general. Probably needs a rebase as I twiddled with a lot of this code recently.

applets/digital-clock/package/contents/ui/CalendarView.qml
196

If there's an otherwise non-obvious click behavior, make the cursor use the Qt.PointingHand cursor using a mouseArea to let the user know that it's clickable.

bf added a subscriber: bf.Jan 30 2024, 1:28 PM