Win7RCAutoShutdownAlarm v0.2

Today I finally discovered why there always remained some garbage in the transparent area of the systrayicon where the piechart had passed by. It also turned out it really pays to read up-to-date Qt docs. I accidentally noticed the difference when reading the source. 🙂

Things learned:

  • when constructing an QImage you plan on using transparency on, always initialize it properly (using some fill you like).
  • when using QPainter on QImage, always use a alpha premultiplied format, for performance reasons.

I thought this new acquired knowledge justifies a new release. 🙂 So welcome v0.2 with the following changelog:


v0.2
- fixed systray render bug leaving garbage in transparent area
- added 128px taskbar icon
- added transparent circle background, otherwise you don't see anything near the end ;)

Project announcement: Win7 RC auto reset alarm

Okay, this is becoming a bit outdated since windows 7 has been released for quite some time now, but you never know there are some other poor lads like me out there still using the RC. =)

Why I am using the RC is quite a story actually.. About a year ago, I bought this really beefy game rig. I tried some games using wine and although in general I managed to play them, I found it a bit silly that I wasn’t enjoying my new box for a 100% since there was always some direct3d feature not implemented yet or subpar framerate. So I decided I’d buy a game console software, aka Windows. But XP was almost EOL, Vista was a mess and Seven wasn’t released yet. So I figured I’d install the release candidate and see how it went from there.

All went well! And for the first time in many years, I even felt Microsoft was back on track. All my games ran very well. Until the day of doom, March 1st 2010. 🙂 On that day, Microsoft started to reboot all windows 7 rc’s every 2 hours. And by reboot, they don’t mean clean shutdown, they mean hard reset! Fair enough, it’s not like I paid for it.

Anyway, since I use Wintendo only for games, I realised it was actually a good thing that windows made me take a brake every few hours. It’s a good time to reassess the situation and maybe conclude to stop and do something else. 😉 No matter how I tried, I would always lose track of time and end up with game progress not being saved, steam stats not updated/lost, etc. So that’s where my little “windows 7 rc auto power off alarm” comes in. =)

This little utility will give an audible warning every minute when 1h45min have passed by. 10 mins later it will warn you with an additional sound, every 2 secs, that now the time really has come to finish your current mission/save your progress and do a proper shutdown. It is advisable to put this program in your startup folder so that it automatically starts when you log in, although it does not really matter when you start it as it initializes the timers using the boot time and not the time the program is started.

When the program is started, it sits in the system tray. Clicking on it will show you how much time is left. If you have a second monitor you can also use the pie chart countdown widget to have a visual indication on when to shutdown. Activate it by right-clicking on the systray icon and click “Show timer”. It shows green and should turn red when 0-hour is approaching. Click and drag it to move it around, scroll on it to scale.
Win7RCAutoShutdownAlarm desktop widget Win7RCAutoShutdownAlarm systray icon

Source is on gitorious, binaries can be download from qt-apps.org.

That’s it!