We are using ShowTypes around the GUI codebase so it makes sense
to have it in its own class. And the class also contains related
helper functions instead of scattering them around different
classes.
ShowTypes also contains the visibility settings for all the
GUI severities. Implementation in this commit makes ShowTypes
class to load the visibility settings when it is created. And save
the settings when it is destroyed.
After previous patches the details view was only updated when the
item was clicked with mouse. This patch improves the updating and
now it works also when changing selected item using keyboard.
This commit adds new rich text panel for the detailed error messages.
When user clicks error item the detailed error text is updated to
the panel. This way we have much more freedom in formatting the
message and user can easily copy/paste (parts of) the message.
At first we created the GUI in the code and so needed all the layouts
etc include to the code. Now when we are using UI files we don't need
all those included. So clean them up. Also use forward declarations
instead of includes in header files when possible.
This commit modifies and registers ErrorItem as proper metatype so it
can be used with Qt signals. Then sending Error-signals is refactored
so that ErrorItem instances are sent instead of several different
arguments that already contained couple of lists.
This commits adds new "Open XML" item to File-menu. Selecting this
menuitem allows user to select report file to open. When the file is
read the error data is printed to debug output. Later patches will
implement adding error data back to the GUI.
Progress signal had also item count with it and then the handler determined
that check is ready when max count of progress was done. Also progressbar
was practically reset in every progress signal. This was simply fragile
code.
After this patch progress signal has only the current progress count. Total
count of items is given when initializing the checking. And there is
separate function for handling check finishing.
This also fixes the bug that progressbar was not hidden after checking
or when interrupting the checking.
CSV files are handy (and commonly used) to export/import data to other programs. CSV reports allow easy import of cppcheck error data to other programs for further processing.
Also added QSetting value names to common.h
Work is halfway on both translations and .ui files.
I added a very quick and rough finnish translation.
The program now requires the translation files to be created before running
that can be done with lrelease gui.pro.
To compile the whole GUI one must do the following
cd gui
qmake
lrelease gui.pro
make
Items are now hidden from the tree and the tree is not recreated everytime it is refreshed.
Also added test.cpp as a sample data for GUI testing.
Added Check all and uncheck all buttons to menu to show/hide all errors more easily.