gSAFE  1.3.8
Public Member Functions | Public Attributes | List of all members
HDialogData Class Reference

#include <dialib.h>

Inheritance diagram for HDialogData:
HDialog

Public Member Functions

 HDialogData (void)
 
int makeGui (QWidget *basew, QString caption=0, HBase *dobj1=NULL, HBase *dobj2=NULL, QString func="Ok|EscC|Vert", QString ttext="", QString tbutt1="", QString tbutt2="", QList< QPixmap * > *toolbuttons=NULL, int xsize=320, int ysize=240)
 

Public Attributes

QPushButton * closebutton
 
bool declose
 
bool deletedata
 
HDispPlainDataMatrixdmatrix1
 
HDispPlainDataMatrixdmatrix2
 
bool EscC
 
bool inscroll
 
HDispListlist1
 
HDispListlist2
 
QToolButton * pixTool [8]
 
QScrollArea * sv1
 
QScrollArea * sv2
 
bool t1AC
 
bool t1C
 
bool t2AC
 
bool t2C
 
HDispTabletable1
 
HDispTabletable2
 
bool tb1clicked
 
bool tb2clicked
 
QPushButton * toolbutton1
 
QPushButton * toolbutton2
 

Detailed Description

Standard quick paramerized GUI builder class.
You can build GUI of dialog box, widget or frame, easily by parameters. You have to call the makeGui() function to build the necessary GUI. The gui will be resizeable, with stretch.
Possible parts of the builded gui:

Some standard composition of builded GUI. In the picture all possible parts is enabled, keep in mind that most of them is optional!

hdialib.png

The functions parameter is text which can be the combination of the following words ("Ok|EscC|Vert")

If you would like to generate the dialog box too, you can use the HDialog class instead this.

A small code part from the tutorial:

MyDialog::MyDialog(QWidget *parent) : QDialog(parent)
{
HList *plist = ... ;
...
//build the gui with the hdialog lib
makeGui(this,"My tasks (gSAFE tutorial)",plist,NULL,
"EscC|Vert|StrToE|DeleteData|DestructiveClose|NonModal|InScroll",
"Hit doubleclick to edit!","insert","refresh list",NULL,640,480);
connect(plist,SIGNAL(actionOnRecord(QString)),this,SLOT(editRecord(QString)));
connect(toolbutton2,SIGNAL(clicked()),plist,SLOT(readList()));
connect(toolbutton1,SIGNAL(clicked()),this,SLOT(insertRecord()));
...

Definition at line 81 of file dialib.h.

Constructor & Destructor Documentation

HDialogData::HDialogData ( void  )

Constructor. Does nothing

Definition at line 18 of file dialib.cpp.

Member Function Documentation

int HDialogData::makeGui ( QWidget *  basew,
QString  caption = 0,
HBase dobj1 = NULL,
HBase dobj2 = NULL,
QString  func = "Ok|EscC|Vert",
QString  ttext = "",
QString  tbutt1 = "",
QString  tbutt2 = "",
QList< QPixmap * > *  toolbuttons = NULL,
int  xsize = 320,
int  ysize = 240 
)

Generate the necessary GUI (See the class description for details)

Parameters
basewthe base QWidget descendant where the GUI is builded.
captionthe Caption text
dobj1Data object 1
dobj2Data object 2
funcThe function modifiers (See class description)
ttexttitle text
tbutt1the text of Button1
tbutt2the text of Button2
toolbuttonsThe pixmaps of toolbuttons.
xsizethe initial horizontal size
ysizethe initial vertical size

Definition at line 41 of file dialib.cpp.

Member Data Documentation

bool HDialogData::tb1clicked

Inticates (after the dialog exec) wheter the toolbutton 1 is pressed

Definition at line 123 of file dialib.h.

bool HDialogData::tb2clicked

Inticates (after the dialog exec) wheter the toolbutton 2 is pressed

Definition at line 125 of file dialib.h.


The documentation for this class was generated from the following files: