So far I was not a great finisher. I mean I usually didn’t finish my personal projects. After solving the challenging parts, I usually loose interest and abandon the project. I decided I will change and I will finish Arthur. If you followed this blog you might remember that the original goal was to get familiar with QT and not to write a full featured fractal generator. I think this mission is completed now, but the program itself was missing some crucial parts. Especially saving and loading the fractals. You could already save the generated images earlier, but you could not load the fractal for further editing. I really thought is is boring to write some code to save and load the necessary data. I can tell you it was boring
However I feel better now, since I have a more or less completed program.
OK. To make the boring stuff a bit more interesting I decided that I will store the fractal data in XML format. There is no particular reason for that apart from the fact that I am a great fan of XML. However it was a good opportunity to have a look at the XML library in QT. Yeah, nothing special. The usual stuff. If you used other XML libraries before, everything will be familiar.
While thinking what data I should actually save I faced a problem with the palette. Actually I was thinking whether I should save the palette or just a reference to the palette file. Finally I decided to put the palette to the fractal description file. This way it is easier it share fractal files, since everything is packed to one file. As a side effect I introduced a very simple XML format for the palette and added a new feature to Arthur that one can load the palette of a fractal.
From now on I will not develop Arthur further until someone starts begging to me to do so
I admit there might be lots of design issues with it (it wasn’t actually designed eh eh) and it is far from industrial quality, but it was not the aim. I learned quite much about QT while I was making it and I hope some parts of it can be used as examples to solve your problems.
You can get the sources from here: fractal017