robvdl/MapEditor — Issue #7: Create settings dialog
Author: robvdl
Created: 2012-01-09 23:52:45+00:00
State: open

This task is a bit more meaningful, and should be done over multiple commits,
so please take your time. Please push regularly, so I can see your progress.

I need you to make a settings dialog next. By this stage, we should already be
saving our main window position automatically when the main window is closed
and we restore it when the main window is first created, as well as saving any
customisation the user may have done by docking the toolbars in differrent
positions, etc.

We now need to make a settings dialog, where the user is able to edit any
user customisable settings in the app. We will start by adding one text field
with a label for configuring the projects base path (which defaults to
/home/user/MapEditor if it hasn't been set, but the user can set it to
anything after that). The main window class should therefore have some code
to try to load this project base path settings out of the settings database
first, and if it fails, it should default to the autogenerated path of
/home/user/MapEditor.

Most of these fields will default to some sort of default settings when the app
is run for the first time and there are no settings to load yet. To test this,
we are going to have to find out how to drop the settings database created
by the QSettings object.

For the form, try to use layout managers effectively, such as grid views and
tables to do the layout. You might want to start practicing making dialogs
first in a separate project to get a feel for how to create dialogs using these
layout managers/grids, etc.