This chapter describes the general usage of QTravel. It mainly describes the GUI interface which is designed to be used on touchscreen handhelds using QTopia.
To fulfill this requirement the interface mainly consists out of a ToolBar and multi column listviews, which allow the system to present the information in a "overview" way. The listviews come with some toolbuttons itself. The main listviews are located on a central tabwidget, which has an overview page, a costs page and a tip page.
So called editors are used to change/add information. This editors on her part consist of a listview and an input field which allows different methods for data input. The left column of the editors listview normally contains key words, which are used to trigger different input methods found all on top of the listview.
QTravel reads a file qtravel.cfg out of its QTRAVELCFG
directory first,
to define its configuration parameters (path to the data directory). QTRAVELCFG is
an environment variable you have to export before starting QTravel (see Configuration).
The data directory contains an empty template qtrtemp.qtt
and all
travel files (*.qtr
). which are used to store the data. Also a file
last.session
is found here, where qtravel memorizes the last
session (file) you edited.
The file format is plain ascii with sections defining the different entries. The file contains all information belonging to the journey including the different lists of costtypes, currency, users or tiptypes. This guarantees that you can read the files also, if you extended e.g. the tiptype list.
The data structure is splitted into several lists.
Typelists are used to fill the editors comboboxes
to type e.g. different cost types. At the moment, a tiptype list, coststype
list, and a quality- and service list is available. Quality and service
lists are used to rate the tips. They are fixed (e.g. *** to ---
).
Tiptype and coststype lists are used to categorize the tip / costs. At the moment, they are fixed, but in the near future, they will be allowed to be extended by user data.
!!!Hint!!!
To have a better overwiev in the listview, tiptypes and coststypes contain
each one unique upper case letter, while all other letters are lowercase. This
uppercase letter is extracted from the type-string and inserted into the listview
instead. The user has to make sure, that this feature works (unique uppercase
letters are used) when extending the tiptype or coststype list.
The currency list is used to store the currency exchange rates and the short terms. The exchange rate is defined for a free selectable currency named "base currency". The base currency can be changed during the running program. The program recalculates all value data after an online change.
The user list is used to store the users data and the entry of that special user to the group.
As QTopia does not include the class QFileDialog, I designed my own. It is easy to use and does not support all the rubbish of standard file dialogs.
The filedialog consists out of a listview to show the files (name, size and type). On top of that, it has a filter combobox (editable), where file filters can be entered or selected. The combobox will store the last 7 entered filters and the filter "*".
A lineedit to show the selected filename comes below. It shows the filename selected until it isn't a link or dir.
Another combobox (editable) is the directory combobox, where the directory can be entered or selected. The combobox will store the last 7 entered directories and the dir "/".
The OK
toolbutton confirms the selection and closes the dialog, while the
Cancel
toolbutton only closes the dialog (without selecting a file).
The following figure shows the filedialog selecting a journey file.
In case of file->saveAs
the file extension will (e.g. .qtr
will
be added automatically, if not done manually.
The following image shows the toolbar of QTravel. In the left area, the user finds the file buttons, in the middle some program buttons are arranged, while the right part shows the online help buttons.
The following list describes the functions behind the single buttons.
QTravel presents its data mainly in listviews, which allow an overview presentation. A QTravel listview normally constist of the listview itself and some toolbuttons to work with the listview. This tool buttons are explained below.
Buttons are enabled only if usefull in the actual environment.
new
button in self sorting listviews
like costslist or tiplist.
The following figure shows an example list view (currency list).
Changing or adding data to the different lists requires some input fields.
For this QTravel comes with some dialogs called entry editor
.
Entry editors are used to change/add information. This editors on her part consist of a listview and an input field on top which allows different methods for data input. The left column of the editors listview normally contains key words, which are used to trigger different input methods found all on top of the listview. These keywords are translatable using i18n (for international use).
By selecting one item of the listview, the input fields are setuped properly. Either you can choose a lineedit, a combobox or a toolbutton (e.g. for date input). All data entered into the input fields is transfered automagically into the listview. By pressing the "OK" toolbutton the data is stored into the global data structure. "Cancel" cancels the input.
The input fields are arranged dependent on the type of data, the user wants to input. The lineedit is used for direct string input, added are a clear-button (which clears the actual input field) and an overview button, which is used e.g. to open a dateview, to allow easy entry of well formatted date strings.
Beside that the user finds a combobox, which is filled and enabled in case of selecting out of a list of choises.
The following figure shows an example tip editor with open combobox.
For easy to use date input, a special editor is included. It includes a month combobox to select the date month, a year spinbox, and a dayfield arranged in a table. The user can select a date using the month combobox, year spinbox and the appropriate day field.
By pressing the "OK" toolbutton the data is stored into the return variable.
"Cancel" cancels the input. The format is DD.MM.YYYY
.
The following figure shows an example date editor.