Source i (link to git-repo or to original if based on someone elses unmodified work):

Add the source-code for this project on opencode.net

1
Become a Fan
7.1

Available as/for:
Description:
A simple progress bar, in pure QML, indicating the time elapsed since the beginning of the year, as a percentage (inspired by https://twitter.com/ProgressBar201X)
Last changelog:

Less CPU intensive

Date check done only when the day actually changes


Ratings & Comments

26 Comments

stepan-zubkov

I want contribute this project, how I can? Can I create github repository with this source code and add some of my code? I leave a link to original widget

Refused

Sure you can! Thank you!

funmlg

Hi! Did you create the git repo? I'd like to contribute too. Well, not code-contributing but in terms of translation for my native language

stepan-zubkov

No, I did not create, because i forgot, lol. I will create repo today night or tomorrow.

funmlg

Okay x) Btw I'm not a programmer so I don't know how translations work for plasmoids, but I really wanna contribute. Do you know how can I achieve that?

stepan-zubkov

Now you cannot make translations, because there is not scripts for translations. I will create this scripts in https://github.com/stepanzubkov/year-progress-extended

stepan-zubkov

I create scripts and guide for translators, so you can start https://github.com/stepanzubkov/year-progress-extended/issues/8

funmlg

Thanks!

stepan-zubkov

10 Simple and nice)

mehant

It's awesome! I want to add some more stuff... But how do I access the source code?

Refused

just open the .plasmoid file as a zip archive ;)

adomas

10 Interesting idea! I like it!

Refused

Thank you!!

oldfield

10 10 the best

Refused

Thanks!!

avlas

It doesn't seem to update the percentage automatically, does it? I mean, if plasma is running for days, one needs to restart plasma manually to get the % updated...

Refused

Yes it does: the day is checked one every hour. You can try it by yourself (don't forget to revert the canges, rebuild and reinstall): - edit src/yearprogressplasmoid.cpp replacing 60000 with 2000 at row 47, so it will be updated every two seconds, - make && sudo make install && plasmoidviewer -a org.kde.yearprogressplasmoid. - change the system date by some weeks ahead and you will see the percentage changing.

avlas

Sounds great! It was few days since I used my laptop last time, and realized of this. Now I understand that less than an hour passed and that explains it wasn't updated (yet).

Zren

Every 2 seconds seems excessive. The "time" dataengine, which the Digital Clock, Fuzzy Clock, etc uses, has a property to show the current time. It also has the ability to AlignToHour, which means it only updates when the hour changes. You ought to look into the fuzzyclock widget for a simple example. https://github.com/KDE/kdeplasma-addons/blob/master/applets/fuzzy-clock/package/contents/ui/main.qml Here's where AlignToSecond, AlignToMinute, and AlignToHour is defined if you're interested in that enum. https://github.com/KDE/plasma-framework/blob/38431eebfa1286c11d5bb716f7d65c1a660b535d/src/plasma/plasma.h#L207 You could bind to: onCurrentDateTimeChanged: { updateYearProgressSlider() }

Refused

Thanks for your feedback! 2 seconds were suggested just for testing. It is actually one hour. I've already tried the time dataengine but I could not find the currentDateTimeChanged signal: I believe that just newData is available and I should do the "date check" manually. I could anyway use the current timer and correct just the first cycle. Hints are welcome!

Zren

Notice how fuzzyclock has a property named currentDateTime? Every property you define has a on_____Changed signal you can bind to. Since currentDateTime has a binding to dataSource.data.Local.DateTime, every time the dataengine updates, it will update currentDateTime too. Here's an example you can use to test the differences between AlignToHour, AlignToMinute and AlignToSecond. https://gist.github.com/Zren/01d81eb74037fd038358b0fa426243c4

Refused

Oh well, it was quite easy :D Thanks for your support!

avlas

9 + Nice minimalistic year progress bar!

Refused

Thank you!

avlas

Thanks! Very nice and minimalistic plasmoid :) May I suggest a tiny improvement? Please add +0.5 to properly round l_result -> in yearprogressplasmoid.cpp (line 69) -> l_result = ((qreal)l_days_elapsed/(qreal)l_days_total) * 100 + 0.5;

Pling
0 Affiliates
Details
license GPLv2 or later
version 1.0.4
updated
added
downloads 24h 0
mediaviews 24h 0
pageviews 24h 1

Other Plasma 5 Calendars:

Day of month
kdea
last update date: 9 years ago

Score 6.5

Day of week
kdea
last update date: 9 years ago

Score 5.9

Plasma Week Number
anselmolsm
last update date: 6 years ago

Score 6.6

Event Calendar
Zren
last update date: 3 years ago

Score 9.0

gealach
Koffeinfriedhof
last update date: 8 years ago

Score 6.1

Calendar WL
x-varlesh-x
last update date: 3 years ago

Score 5.8