I’m supposed to be working on Stellarium’s time zone support. The only work so far is on what I should have left for the end: the GUI.
I need to cram somehow three radio buttons, a spin box, a drop-down list and the label that describes the whole group in the existing window, while keeping it simple. The best I could come up with so far:
One of the advantages of putting the name field at the top is that it puts it at the top of the tab order, solving some of the problems we had (and still have) with changing focus when certain controls are disabled. The internal logic of the window will also have to be overhauled anyway, though.
I’m back home. I was hoping that I can use my limited free time to work on Stellarium, but I’m getting severely unpleasant feelings even thinking of all the stuff I’ll have to do. Burn out? Or I just need some rest?
Rest is probably a good idea anyway.
…is mostly ready for a merge, though I couldn’t finish everything I wanted to do before running out of free time at the end of April. I wanted to propose the merge today, but I’m too sleep-deprived to do the necessary writeup and cleanup, so I’ll leave it for tomorrow. It’s eating from my study time, but don’t worry, you’ll have your improved Satellites on the next release.
The code and a list of work done (and work unfinished) is here:
After the introduction of ΔT computations to Stellarium, there has been a sequence of bugs “fixed” like this. In other words, some piece of code needs the time, uses the ΔT corrected time, then subtracts the correction, because it doesn’t need it. (Do I need to spell out the obvious solution?)
This pattern has repeated at least three times by now. It is one of the reasons I’m often wondering why I’m still involved with this project.
(Oh, and if I see another incomplete URL in the commit message instead of a bug report or a proper explanation… :evil:)
Just something I figured out how to do, and it’s not in the top Google results:
The items in a QListWidget can be user-checkable, though by default they are not: QListWidget doesn’t display a (checked or unchecked) check box for a given item unless you set its check state to any value.
Once you set a check status, it’s seemingly impossible to remove the checkbox, even if you un-check it or use QListWidgetItem::setFlags() to remove the Qt::ItemIsUserCheckable flag.
The trick is to use QListWidgetItem::setData() to set the data in the Qt::CheckStateRole to an empty QVariant(). The same method can be used to set the item’s check state.
Unfortunately, this doesn’t preserve the check state, which is the reason why I investigated hiding the checkbox (I hoped that the state can be preserved while the box is hidden). Now I’ll probably store the original check state as user data.
Posted in Programming, Qt
I just had a version control scare: I managed to wipe out last week’s commits from a local branch of mine (and perhaps in the corresponding global branch). I managed to restore them from the backup files (*.~1~) created either by Bazaar or by Qt Creator. Whoever is responsible for that feature has a major “thank you” from me.
Note to self: for a given branch, either keep it bound all the time, or don’t bind it at all. Also, “revert to revision” in Bazaar Explorer’s log screen doesn’t do what you thought it did.
I’ve decided to have somewhat complete version of the Telescope Control plug-in merged in trunk before Stellarum’s 0.12 release. At the very least it should implement some basic ASCOM support, at the level now offered by StellariumScope. I’m almost done with that. INDI support will have to wait, as it is not usable yet. While the current INDI client seems to work, it lacks polish. It alos seems that parsing the INDI streams should be done in a separate thread, which means another re-write.
Imagine that you are a Stellarium developer. You are working on a computer (or more precisely, on an OS) that is so slow that rebuilding Stellarium takes a long time even after small changes. Most of your changes are limited to a single plug-in and you are working on a dedicated Bazaar branch. You notice that you are wasting a lot of time even linking the Stellarium executable. What do you do?
You re-run CMake with command line options like the following:
-DUSE_PLUGIN_ANGLEMEASURE=0 -DUSE_PLUGIN_COMPASSMARKS=0 -DUSE_PLUGIN_EXOPLANETS=0 -DUSE_PLUGIN_OBSERVABILITY=0 -DUSE_PLUGIN_OCULARS=0 -DUSE_PLUGIN_PULSARS=0 -DUSE_PLUGIN_QUASARS=0 -DUSE_PLUGIN_RENDERERSTATISTICS=0 -DUSE_PLUGIN_SATELLITES=0 -DUSE_PLUGIN_SOLARSYSTEMEDITOR=0 -DUSE_PLUGIN_SUPERNOVAE=0 -DUSE_PLUGIN_TEXTUSERINTERFACE=0 -DUSE_PLUGIN_TIMEZONECONFIGURATION=0
Guessing on which plug-in I’m working at the moment is left as an exercise for the reader.
P.S. The first rebuild after this change will include a rebuild of the whole StelGui library, as static plug-ins are linked against it.