PDA

View Full Version : Timekeeper, a handy little application



Michiel
6th June 2007, 10:08
I had an earlier working version of Timekeeper, but I improved it significantly for the Qt contest.

Basically, it's a desktop application (which could potentially / easily be ported to Qtopia) to track the time you spend on specific tasks. I've used it myself in my programming job.

More complete end-user information can be found in help.pdf. The code itself is documented Doxygen-style.

You can download the archive here (http://files.michiel.eu/timekeeper.tar.gz).

I would appreciate feedback on this program. It is relatively new. What features is it missing? Is there a bug I haven't found?

Thanks!

jpn
6th June 2007, 11:32
Hey, that indeed looks like something handy! Let's see how it works out.. :)

One suggestion comes to my mind immediately: please compile the images as resources (unless it's against license or something).

Michiel
6th June 2007, 11:41
One suggestion comes to my mind immediately: please compile the images as resources (unless it's against license or something).

Wysota told me that it is against the KDE-icons LGPL license to make them part of the executable in that way.

I haven't been able to confirm or deny this. But I didn't see the harm in doing it this way until I could.

jpn
6th June 2007, 11:48
But I didn't see the harm in doing it this way until I could.
The only negative side effect is that I have to make sure that the current working directory is the application dir. For example launching the application via Konqueror (or release subdir in Windows) is a no. Not a biggie, though. :)

Another suggestion: I'd like the main window to get raised (and why not activated too) while toggling visibility on via systray icon. Currently it gets restored behind other windows.

Michiel
6th June 2007, 12:11
Another suggestion: I'd like the main window to get raised (and why not activated too) while toggling visibility on via systray icon. Currently it gets restored behind other windows.

Edit: I've tried it under Linux. With the current code, the window is always restored raised and activated anyway. Is it different under Windows/Mac?

magland
14th June 2007, 14:26
Michiel, for some reason I cannot open that archive, says its corrupt when I try extracting with various windows programs - I don't know why. Perhaps you could also pack it as a .zip?

Michiel
14th June 2007, 14:49
Strange. I just tarred and gzipped it. But here (http://files.michiel.eu/timekeeper.zip) you go.

PS: I also updated timekeeper.tar.gz. The icons now look a bit nicer.

buckadl
15th June 2007, 21:22
Ran into a bit of trouble compiling your project. Where does "common.h" come from? I've tried compiling with MinGW and Visual Studio (obviously on Windows) and there doesn't seem to be a "common.h" as part of either of their include files. What am I missing?

Thanks.

Michiel
16th June 2007, 10:13
How silly of me. There are two source-files in there called parameters.cpp and parameters.h. I once intended to use them, but later decided not to. But I forgot to remove them from the folder and they also got into the archives.

It's those files that include common.h. But since they aren't mentioned in the Qt project file, I don't see why it wouldn't compile.

In any case, either remove those two files or download the new archive I've just uploaded.

Thanks for catching my mistake.

stevey
24th July 2007, 01:31
This is a terrific little application, but...it doesn't load the file log file I select when I launch it.
I've log some periods of work and closed the application. The tkl file lists the times correctly, but it won't load again.

Also, the duration is always starts at 12 hours in the List View.


Great work though :)
I'll be using this application daily.

stevey
24th July 2007, 01:46
It turns out that it saves the file correctly, but when I specify the file to open when launching Timekeeper, it leaves the entries in the xml but blanks out the time entries.
eg.
<activities>
<activity>
<category>a</category>
<from></from>
<to></to>
</activity>
<activity>
<category>a</category>
<from></from>
<to></to>
</activity>
</activities>

Also there's a problem with importing. If I select import it asks if I want to save changes before selecting a file for import, but where there are two activities in the above example, it saves four empty activities.

Michiel
24th July 2007, 02:12
How strange. I haven't experienced any of those problems during testing. Regrettably, I have no Windows OS to test with. But someone else has tested it under Windows for me and didn't report anything like this either.

I'm going to need some more information.

* Which OS are you using? Which version of Qt? What's your locale (country)? I see you do use Unix/X11. Does it have these bugs there?

* Can you easily reproduce the saving/loading/importing errors?

* The duration always starts with 12:00? So, it just counts upwards from there and not 0:00? Sounds unlikely, but it might be a locale thing (which is why I asked). I'll look into it.

Anyway, I'm glad you like it. I'm not sure I would, if it really has all these bugs. ;-)

stevey
24th July 2007, 02:27
[quote]
Anyway, I'm glad you like it. I'm not sure I would, if it really has all these bugs. ;-)
[/quote.
Hey man, I'm a professional developer myself, I understand that a few bugs doesn't make an application not worth using :D , shizzle happens.
It's still a very nice, easy to use tool, and something I've been considering writing for quite some time now.

I'm running Win XP SP2 and don't currently have a linux machine at my disposal as the CPU fan died on my home machine :( I may install a linux VM at some point and test it out.
Now that I think about it, the issue may be in that I'm building against Qt 4.3.0 rc1.
I'm at work out the moment and that's all I have access to for the moment. If I download a dist of Qt here then eyebrows will raise. I'll try rebuilding it tonight when I get home on 4.3.0 proper and let you know the result.


--
Steve

stevey
24th July 2007, 13:51
Righto, must have been in a bug in the qt xml libs in 4.3.0 rc1.
I just built against 4.3.0 commercial and I can now open a previously saved file.

The timing issue persists though, after a 7 second job, the duration reads '12:00:07 AM'.
Seems a little odd that the duration has AM included as well as the 12 at the beginning.
I'm guessing a new date time object has a default value of 12:00:00 AM.

Michiel
24th July 2007, 16:20
Seems like that's an actual bug in my program then. :-)

It's a QTime object. And I thought that it didn't know anything about locale. But this is easily fixed. I'll upload the fixed version in a little while.

Thanks for the heads up.

Edit: Ok. Could you try again now?

stevey
25th July 2007, 00:40
I just tried the old link from above and the file was different to the previous one I downloaded so I'm assuming it's the new one.

The duration is still formatted as 12:00:00 AM.
The weird thing is that I've now installed the final release of Qt 4.3.0 (Open Source) at work, but even this release version won't load the tkl file as with yesterday's experience, so it wasn't RC1 after all. Maybe my work PC is just dodgy.

PS
It's actually a runtime issue. I brought the binaries from the build I did at home along with the Qt binaries I compiled against, and it doesn't load the tkl on my work machine either.
:(

Michiel
25th July 2007, 10:51
Well, I'm not sure what to do with that.. I actually gave a string this time, not a QTime, using format "h:mm:ss". I feared the 12 might have stayed, but how could the AM still be there?...

I see I'm actually using Qt 4.2.3-r1 (open source). I'll upgrade later and see if that makes a difference for me.

Michiel
25th July 2007, 13:38
Seems not. With Qt 4.3, I can still load the files and the duration correctly starts with 0:00. (However, compiling against Qt 4.3 does make the layout look a bit worse.)

Maybe if you have time, you could take a look at timekeepermodel.cpp, line 52. Try a few things until the duration format looks normal again. I can't do it myself, since I don't get the same bug.

stevey
27th July 2007, 12:06
Yup, now worries, I'll try to look at it this weekend.

magland
8th January 2008, 13:32
Hi Michiel, great program... I just started using it to get myself more organized.

Was wondering if you have any report templates (.tkt) for summarizing total time spent in each category. Also, I am using the version in your .zip file (remember I couldn't open the tar.gz for some reason), so please let me know if you have a more recent version.

Thanks very much!

stevey
8th January 2008, 14:19
Thanks for the appreciation, but I didn't write it :)

magland
8th January 2008, 15:47
Thanks for the appreciation, but I didn't write it :)

Funny, it seems that I edited my post (correcting "Stevey" to "Michiel") at the same time that you replied to it :).