Hello there, this will be my very first post on this forum
Why I need help
As mentioned in title, I'm a total newbe to projecting my own applications,
I finished C++ course on University and know the general principles of object programing,
but I never really wrote a GUI application from a scratch.
What advice do I need
I need to know the general approach I should take, what Qt elements would fit best for the purpose,
what approach should I take in regards to data representation, save and load mechanics, how to combine it with
the interface and stuff.
If you've got good reading materials in regards to the topic, I'll be glad to read them instead.
I don't want you to write the program for me, because I want to learn how to do it myself, I just want directions.
What I intend to create
I want to create an application that will allow me to easily modify certain .ini files, which represent
HUD elements in a game. I want to easily place them on the screen, easily be able to mess around with the textures of the element
(by selecting region from tga graphic file), and be able to rearange them in fashion of GIMP layers.
The Ini Structure consists of
- A main ini file, containing list of ini files with elements to load.
- ini files containing a header with offset property, and elements separated using a comment line
- elements of 3 types: Text, Icon(aka textures), Effects, all of which are represented on screen as rectangles and contain properties
- properties of various nature, such as ID, hud group, hud layer, rectangle, and various other properties. I could load them all, but I see no need to, as some of them are irrelevant to the program purpose.
- A single tga texture file that some elements such as icons can select an area of to be used as their texture
So let's go through what that application will do from start to end:
- Load (parse) hud data from .ini files/create new project with default data values and store them in a structure of some sort (List? Hash?)
- Represent the hud elements in some kind of view, with list of them, in which I'd be able to select them, move around (accurately), change anchor points, resize them, mess with layers they will be displayed on, also easily group them and break the group on demand.
- Show dialog that will display a tga graphic, and allow me to select the region off this graphic, and then pass it to the view.
- Allow me to Save the modified data in the a structure of .ini files.
Main challenges:
- Coming up with a proper design of application, that wouldn't create a mess in memory, in code, that would be object-oriented,
relatively simple and intuitive.- Finding the best way of representing the elements on screen. I already found out that I can use QGraphicsView, I'm not sure though how to connect the whole graphic elements and loading/saving mechanism, nor how should I approach edit mode changes or event handling.
Bookmarks