next up previous contents
Up: A tool to modify Previous: Checking   Contents

A small comment on the code

The source includes three important files main.cpp, edfhea.cpp and edfhea.h (main.cpp is the standard file in Qt).

Since I am a modest programmer (in previous tutorials I used to say that I was not a programmer), I think that you should invest less time in creating a program from scratch than trying to understand the code :-).

If you insist in knowing the source, the code is based on reading and writing a QString. To know the length of this string, it is only necessary to know the number of signals: the header has a length of

256 * (signals + 1)

The header of the file is stored in two different strings, header and origHeader. The former is modified as the edition takes place, the latter is not modified and is used to restore the original values to header.

The changes are stored in the string header and the different fields are read when the values of the signalSpinBox change. createFrame, restoreHeader, updateHeader and displayHeader do not deserve further comment.

In version 1.0 three additional dialogs have been added: patient recording and check, each of them including a .cpp and a .h file (patient and recording are modal dialogs, check is a modeless dialog). The code of the checking is included in the slot analyze of check. It is a very repetitive code, very easy to understand and modify. It could be tailored to check,for example, whether the report follows some predetermined pattern.

The program is under GPL license.

Enjoy!


next up previous contents
Up: A tool to modify Previous: Checking   Contents
je 2006-10-13