Basic User Interface (uiBase)

Introduction

This module is a set of cooperating classes that enable creating User Interfaces. This layer on top of the already wonderful Qt package was created because of the following problems:

Therefore, as with most external libraries, we chose to make a new layer to combine the power of Qt with the flexibility of more generalised design principles.

Usage

The basic principles are:

The Qt window painting facilities are only used for quick sketching, the code generation capacity is not used. Example:

IntInpSpec spec( lastnrclasses );
spec.setLimits( Interval<int>( 0, 100 ) );
nrclassfld = new uiGenInput( this, "Number of classes", spec );

FloatInpSpec inpspec( lastratiotst*100 );
inpspec.setLimits( Interval<float>( 0, 100 ) );
perctstfld = new uiGenInput( this, "Percentage used for test set", inpspec );
perctstfld->attach( alignedBelow, nrclassfld );

defbut = new uiPushButton( this, "Default" );
defbut->activated.notify( mCB(this,ThisClass,setPercToDefault) );
defbut->attach( rightOf, perctstfld );

Note that all objects could have been made:

Design

In the uiBase directory, you'll find classes that directly communicate with Qt to implement (parts of) this strategy. To keep the header files uncoupled from the Qt header files, there is a mechanism where the 'ui' class has a 'ui'-Body class that is a subclass of a Qt class.

Almost every 'visible' object is a uiObject. Besides the different subclasses, there is also the uiGroup which is just another uiObject. The windows holding these are (like uiObjects) uiBaseObject's. The uiMainWin is a subclass, and the ubiquitous uiDialog.