WorkTracker, a Little Open Source Tool

Up until my last post I was working on a little tool that helps me track the time of all (or just one) the different tasks at work. Since the work intensity went down it opened up time (yay!) for some personal stuff. We’re required to record our everyday labor and sometimes it became quite complicated to calculate how much time was spent on a single task, especially when the day didn’t start at 08:00 o’clock but some randome time earlier and ended at some random time.

Introducing: WorkTracker

This is a very simple tool tailored towards just one thing: recording the time you spend on different tasks at work. The main principle is that you start a day, add tasks, finish the day and let the application show you a summary of your work.

Workflow in Pictures

Everything starts with a new workday, so to start off the measurment you click “Start New Workday”.

Start Day

Next up is to add tasks by clicking “Start Task” and entering a short description in the edit field that pops up.

Add Task

Clicking “Select” saves the description to the database (more on that later) and remembers the current time as the starting point of the recording. Perform the same steps to stop recording but this time punch the “Stop Task” button (you don’t have much of a choice anyway) and confirm your description or enter a new one if something had changed. Repeat this process until you can call it a day and finally hit “Stop Workday” followed by “Summary” to see the results.


To get exact results it is very important to always use the same description when finishing a task. This value is used to group a bunch of tasks together and sum their individual duration to get the total result. To facilitate this the application provides you with suggestions based on what you have entered previously (remember that I had mentioned a database some paragraphs earlier?).

Technologies Used

This little application is based on the excellent Qt libraries which have made development pretty easy. By the time of writing the latest version is v5.2.1. I make use of C++11 techniques so your compiler must be one of the recent kind. For now, all that is used are some lambdas, maybe auto and nullptr, things that have in general been implemented pretty early. This means everything starting from Visual Studio 2010, GCC 4.6 and Clang 3.1 should do the trick. I am using the precompiled MSVC 2012 versions for Windows, so I can’t be sure about all those compilers but from experience working with VS 2010 this should definitely be able to compile the code. If you are using recent versions you’re definetely on the safe side, regardless which platform and compiler you prefer.

The database is an XML file which can be looked at in the Github repository. It consists of two sections, the list of tasks used for suggestions and the list of workdays with the individual tasks. Right now I’m not making use of all the information the database provides, e.g. the individual tasks contain a last_used attribute which could be used to sort the list of suggestions of previous and similarly named tasks. For now the data is mostly just stored, “for future use” as you might say. One thing that is read in addition to the tasks is whether you’ve finished the last workday. If not, then its data is loaded on startup and you can continue from (almost) where you have left off.

Only “almost” as a task is not saved until it is finished. However, if you accidentally quit the application you can recover most of the data. It is important though, that the application is closed correctly. Saving the state happens just shortly before passing the last curly brace of main.

The database is stored in the application data folder of the user that is logged in. On Windows this means:

C:\Users\Nerd\AppData\Local\Typical Nerd\WorkTracker\Database.xml

You can also supply a complete path to a database file on the command line if you wish to store to another location. This has to be done every time though.

Future Plans

As you can see in the Readme on the Github page there are a few known issues that just didn’t keep me from seeing the application as feature complete, which it is. One of the things that I really want to add is global hotkeys and a UI that hides in the sys-tray. It should only pop up to input a task description and show the summary but apart from that hide itself and not take up screen real estate and precious space in the taskbar. Before I’ll tackle this rather big change I will soften a few rough edges and add more polish to the current appearance. What it already does right now is complete control via the keyboard.

Translation into at least German is also planned. Maybe sometime further away I might also add a simple todo list. However, for this to work for me I must be able to easily sync these tasks between my workplace and my home office. Something that needs a few thoughts.


I almost forgot to mention where you can get the latest Windows binaries. To be honest, I waited this long to make you read it all before you can get the application and just quit early.
The files are hosted on Sourceforge.

Famous Last Words

It works on my machine, I can't reproduce it...

I’ve never done this before but in this case I’d really like to ask you for your feedback, or even for bug reports (actually, no, keep them to yourself).

Maybe this proves as useful to you as it has already done to me.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.