Displacement Activity

I know, I know, I'm supposed to be working on the Print Dialog, but I've reached a tricky part and while my brain ticks away on that in the background I thought I would do something a little more fun.  Seeing as I'm the 'official' maintainer for Calendar Systems (i.e. I was the last person to work on them...), and to be part of the cool crowd hacking on Plasma, I thought I'd have a crack at fixing the Plasma Calendar and Clock widgets to allow the users to select which Calendar System to display, just like you can currently choose which timezone to display.  Long story short, here's what I now have:

Plasma Calendar Widgets

So that's the four different supported Calendar Systems (Gregorian, Hebrew, Hijri, Jalali) all being displayed at once in separate Calendar widgets.  Hmmm, I wonder if we need a label at the top of the widget to show which Calendar System is being displayed?

Plasma Digital Clock Widgets

And again, but this time in four Digital Clock widgets. The left-click pop-up calendar from each obviously also shows the correct Calendar System.

Plasma Calendar Config Widget

There's a common configuration widget used in both the Digital Clock and Calendar widgets.  In 'Use Calendar System' you can choose from Local, Gregorian, Hebrew, Hijri, or Jalali, where Local is the default and will use whatever the Locale setting is. The Holidays settings are the same as currently available in 4.3, but obviously you could choose to have different holiday regions on each Calendar or Clock widget.

Plasma Digital clock Copy Menu

Right-click on a Digital Clock widget and you can choose a 'Copy To Clipboard' menu option to which I've added the date in other Calendar Systems.

There's still a little polishing to be done, especially on the Digital Clock to sort out some date format localisation issues on the main widget and the copy menu, but look for this to pop-up on ReviewBoard in the next day or so.  I've got some thoughts on other improvements especially for Holidays, and there's a fairly long bug list in bko, but I'll get this sorted first.

Oh, and while I have my official maintainers hat on, could I just remind developers that you can't use most of QDate's methods like formatDate() or addMonths() as these only work on the Gregorian calendar system.  To ensure your KDE app localises the Calendar System displayed and performs the right date maths on it you need to use the methods provided by KCalendarSystem through KGlobal::locale() and KGlobal::locale()->calendar().  QDate is essentially only a storage medium that KCalendarSystem then interprets for you.  OK, the API is not very friendly and definately longer to type, but that's the way it is until either Qt5 or KDE5 comes along with Calendar System support built directly into QDate / KDate (and yes Trolls, that is an offer to help write it the correct way :-)

[Edit: For some reason comments were turned off, back on now if you want to add soemthing :-)]

Comments

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.

What I am waiting is that

What I am waiting is that double clickin the calender date, opens up the calender and to-do list of Kontact or other application. Just like on Gnome.It would be so easy just to open calender and double click day to add new meeting or to-do.Great work for better calender!

Don't miss the freeze!

I know, I know, I'm supposed to be working on the Print Dialog
Just be sure to don't miss the freeze: it would be a pain to wait for Qt 4.7 (spreading in 2011) just to have odd/even page support!
http://labs.trolltech.com/blogs/2009/08/13/its-getting-colder/
Or has it already merged?

What is that week

What is that week "29/30"?Isnt it always a single week shown on each line - no matter if the week starts at sunday, monday or whatever?-Michael

Displacement Activity - Very

Displacement Activity - Very good news.

thx

thanks a lot.. it's very good article.

 Oyun | Okey | Oyunlar | Okey Oyna

Re

If make a choice to write the essay writing, you should know that this takes a lot of efforts! Different students fail their essay, because they do not know how to write! It is tragic, but the order an essay service can support such kind of people any time they need it.

Well quite interesting post

Well quite interesting post keep sharing good stuff!
logo design brochure design website design

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.