Clock
Open, Needs TriagePublic

Description

A standalone application with functionalities like:

  • Display time
  • Set alarms
  • Stopwatch
  • Timer

Knowledge Requirements: Willing to learn Qt/QML, CMake.

System Requirements: You can develop this application on normal Linux system, and test it in native Linux system. If you want to test it on Plasma Mobile system, you can use actual Mobile device or Plasma Mobile x86 ISO in emulated environment.

Design Resources:

Development Resources:

lnj added a subscriber: lnj.Jun 24 2018, 1:25 PM

I think for alarms cron could be used, so the clock itself doesn't need be a daemon. But is/will cron be included in the images?

nickre added a subscriber: nickre.Jun 25 2018, 12:19 PM

I would like to contribute to this application. I have already started working on it, but where should I submit the code for review?

I would like to contribute to this application. I have already started working on it, but where should I submit the code for review?

It's best to use arcanist to upload patches to phabricator. https://community.kde.org/Infrastructure/Phabricator

Unfortunately, for new plasma mobile applications, no relative phabricator place exists for the review to take place. So, for the first reviews and before the new app code reaches KDE repository, we cannot avoid using an external code hosting provider (e.g. gitlab). It is an important issue that we will discuss at Akademy BoF. @nickre if this is not a problem for you, could you please put your code there and put the relative link here so as our devs to review it?

dkardarakos updated the task description. (Show Details)Jun 26 2018, 4:35 PM

@dkardarakos Here is my code: https://gitlab.com/nickre/kirigamiclock. Currently it is in a mockup state. Should I also submit a mockup to Pholio?

Great, this was fast! Right, it would also be nice to have a mockup at Pholio, as described in T8963, to let KDE designers review it. You may also find helpful the already in progress design review task M129 (regarding plasma mobile weather app).

@nickre awesome work, Just as sidenote, I learned that @alex-l from VDG and @tcanabrava form dev side is working on re-designed KTimer, See M130 for reference. Maybe you can join forces with them :-)

@nickre This is really nice work! I'd like to move this forward and bring it to a KDE repository. However, I see that your files don't have any license information/headers. Would you please clarify this by adding license headers according to https://community.kde.org/Policies/Licensing_Policy so we don't "steal" your work?

nickre added a comment.Aug 2 2019, 9:14 PM

@nicolasfella I added license headers and uploaded it to Invent.

For the alarm clock, we may adopt an approach like calindac of Calindori.

In such a case, I see these options:

  • Add alarm entries to a calendar, using kcalendarcore events. Enhance calindac to search in this calendar and support ringing alarms. We may move calindac to a separate repository.
  • Add alarm entries to a calendar, using kcalendarcore events. Create a new background app.
  • Add alarm entries to a configuration file. Create a new background app.

Hello, I am Sashmita Raghav, from India. I am very much interested in contributing to this application.
I have some experience working with Qt, C++ and QML. I would be greatful if someone could tell me where I could start 😄

Welcome @sassycode ! I would start by looking into the code of kirigamiclock in invent, which I think is still a personal project of @nickre, find some area that needs improvement or a missing feature, forking the repository and submitting a merge request.

Hey @dkardarakos, can I build and run the source code on my system (KDE neon) first and then test the changes I make later in the emulated environment?
Or do I have to do everything in the emulated environment only?
Thanks,

You can test it on the desktop

mbruchert edited projects, added Plasma: Mobile; removed Plasma: Mobile (PM 1.0).
mbruchert renamed this task from Clock to Clock (ubports).
mbruchert assigned this task to jbbgameich.
mbruchert renamed this task from Clock (ubports) to Clock.
mbruchert removed jbbgameich as the assignee of this task.
mbruchert added a subscriber: jbbgameich.
EspiDev added a subscriber: EspiDev.EditedApr 16 2020, 10:26 PM

Hey, I've forked kirigamiclock (from @nickre), and made good progress in polishing the interface and adding functionality.
https://invent.kde.org/devinlin/kirigamiclock

Here is a preview:
https://imgur.com/a/Ys97fdx

There is something really wrong with the fonts on my system, which is making "24 hour time" turn into "35 hour time", and making some numbers look glitched on the stopwatch, so ignore that in the gif...
https://i.imgur.com/pqDBMl9.png

Todo:

  • Figure out how to have alarms go off in the background (it seems that the original code was going to use cron?)
  • Figure out how to send a notification and play a sound when the timer is complete (I attempted to use KNotifications but haven't managed to get it working)
  • Implement the settings (24 hour, local time zone, etc.)
  • https://phabricator.kde.org/T9460 - find a way to make a touch friendly way to select dates and times
  • Polish the front page with timezones and possibly an analog clock?

Also I need to fix my fonts...

EDIT: For alarm functionality; watch this https://phabricator.kde.org/T12900

Here is a not messed up version of the preview: https://imgur.com/a/mh3O6NF

  • Figure out how to send a notification and play a sound when the timer is complete (I attempted to use KNotifications but haven't managed to get it working)

You may check here for the notification part only (not the timer things):

https://invent.kde.org/kde/calindori/-/tree/master/calindac

Hey, I've forked kirigamiclock (from @nickre), and made good progress in polishing the interface and adding functionality.

Cool!

Todo:

  • Figure out how to have alarms go off in the background (it seems that the original code was going to use cron?)

T12900 is relevant here

  • Figure out how to send a notification and play a sound when the timer is complete (I attempted to use KNotifications but haven't managed to get it working)

Notifications work for me, even with sound after I configured a sound in the Plasma notification settings.

https://cgit.kde.org/kirigami-addons.git is supposed to have those controls

  • Figure out how to send a notification and play a sound when the timer is complete (I attempted to use KNotifications but haven't managed to get it working)

You may check here for the notification part only (not the timer things):

https://invent.kde.org/kde/calindori/-/tree/master/calindac

Thanks! Exactly what I was looking for.

Notifications work for me, even with sound after I configured a sound in the Plasma notification settings.

Is there some sort of way I am supposed to build the binary to have notifications working? It doesn't seem to work for me when I simply run the binary.

https://cgit.kde.org/kirigami-addons.git is supposed to have those controls

I'll take a look at that.

is there some sort of way I am supposed to build the binary to have notifications working? It doesn't seem to work for me when I simply run the binary.

Did you install the application? In particular the kirigamiclock.notifyrc file needs to be installed

is there some sort of way I am supposed to build the binary to have notifications working? It doesn't seem to work for me when I simply run the binary.

Did you install the application? In particular the kirigamiclock.notifyrc file needs to be installed

Yeah, I just ran sudo make install, and ran the binary. I guess I'm missing something: https://imgur.com/a/5gImbdo

You are installing to /app, but kdevelop shows "Runtime: Host system". Is that intentional? At least as long as you didn't set up any special environment variables, files in /app will probably not be found by knotifications.

alex-l removed a subscriber: alex-l.Apr 18 2020, 8:36 AM
EspiDev added a comment.EditedApr 18 2020, 3:26 PM

You are installing to /app, but kdevelop shows "Runtime: Host system". Is that intentional? At least as long as you didn't set up any special environment variables, files in /app will probably not be found by knotifications.

Got it thanks, linking the file to /usr/share/knotifications5 worked.

Had some more progress recently: https://imgur.com/a/IsTKoKo

The interface is turning out pretty well, just need to double check the HIG for the stopwatch and timer page for the placement of the tool buttons.
The timer notification works, and loops the sound until the notification is closed.
I added kirigami-addons, and was able to add the time picker. It may need a bit more ui tweaking (larger dots?). The circle around the selected number also doesn't seem to show up (at least under my colour scheme? it seems to work with material: https://i.imgur.com/t9TVYfh.png)

TODO:

  • Possibly allow the plasma analog clock to be used on the time page. I don't really know how to add it (still new to C++ and CMake!), so possibly someone could give me some pointers on how to do that.
  • Implement a QTimer based alarm for now, until https://phabricator.kde.org/T12900
  • Figure out how to add kirigami-addons properly in CMake, rather than just including the binary in the repository
  • Fix some sort of segfault happening randomly on the alarm page

Should this be moved into a KDE repository?

EspiDev claimed this task.Apr 21 2020, 12:02 AM

Had some more progress recently: https://imgur.com/a/IsTKoKo

Very cool!

TODO:

  • Possibly allow the plasma analog clock to be used on the time page. I don't really know how to add it (still new to C++ and CMake!), so possibly someone could give me some pointers on how to do that.

Are you talking about the clock widget in Plasma?

  • Figure out how to add kirigami-addons properly in CMake, rather than just including the binary in the repository

Since it's a runtime-only dependency it should just work. If you have installed kirigami-addons into a non-standard location then you will need to set the QML2_IMPORT_PATH environment variable to your install prefix though.
There is one thing you should do in the CMakeLists.txt still, that is adding

include(ECMQMLModules)
ecm_find_qmlmodule(org.kde.kirigamiaddons.dateandtime 0.1)

This makes sure that the packaging tooling knows about the dependency

Should this be moved into a KDE repository?

I'd say yes

Are you talking about the clock widget in Plasma?

Yes, this one: https://i.imgur.com/sHuMZUn.png

Should this be moved into a KDE repository?

I'd say yes

Someone with permission would need to do it, since I can't

Possible name replacements for kirigamiclock?

  • clock-app
  • klock
  • pmklock
  • klockie
  • kloqki

I've also applied for a KDE developer account.

The repository was moved to the kde namespace: https://invent.kde.org/kde/kclock

I've implemented a simple alarm with QTimer, which requires the application to be open. Snoozing will be added soon.

Currently I am using the freedesktop alarm sound, but of course sound selection should be added. Is there a standardised way to do that, or should I just allow picking from files?