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

#include <guilib.h>

Public Member Functions

 HTableBrowserElement (QString k, QStringList *c)
 
 HTableBrowserElement (QString k, QString v1, QString v2="", QString v3="", QString v4="", QString v5="", QString v6="", QString v7="", QString v8="", QString v9="")
 
 ~HTableBrowserElement (void)
 
HTableBrowserElementclearColor (void)
 
QString getCVal (int i)
 
HTableBrowserElementoperator= (HTableBrowserElement &e)
 
HTableBrowserElementoperator= (HTableBrowserElement *e)
 
QString operator[] (int i)
 
HTableBrowserElementsetColor (int r, int g, int b)
 
int size (void)
 
void swapWith (HTableBrowserElement *x)
 

Public Attributes

QPixmap * cachePixmap
 
int index
 Index of the element.
 
QString key
 Key value of the element.
 
HTableBrowserElementnext
 Pointer to the next element.
 
int ocb
 If the owncolor is true these variables holds the color.
 
int ocg
 
int ocr
 
bool owncolor
 If this attribute is true the element has own color.
 
HTableBrowserElementprev
 Pointer to the previous element.
 
QStringList * rows
 The visible data of the element.
 

Detailed Description

One item (record) of the HTableBrowser. Every row in HTableBrowser correspond to a HTableBrowserElement. When you add a new element to the browser you have to create this kind of object.

See Also
HTableBrowser()

Definition at line 465 of file guilib.h.

Constructor & Destructor Documentation

HTableBrowserElement::HTableBrowserElement ( QString  k,
QStringList *  c 
)

Creates an element. You have to specify the key of the element and a QString array which will be the visible fields.

Parameters
kthe key of the item
cthe QString array of the visible field values.

Definition at line 2037 of file guilib.cpp.

HTableBrowserElement::HTableBrowserElement ( QString  k,
QString  v1,
QString  v2 = "",
QString  v3 = "",
QString  v4 = "",
QString  v5 = "",
QString  v6 = "",
QString  v7 = "",
QString  v8 = "",
QString  v9 = "" 
)

Creates an element. You have to specify the key of the element and at least one visible value. You can specify the other visible value fields by adding more parameters. (Maximum 10 with this constructor. If you would like to more use the other constructor)

Parameters
kthe key of the item

Definition at line 2048 of file guilib.cpp.

HTableBrowserElement::~HTableBrowserElement ( void  )

Desctructor

Definition at line 2085 of file guilib.cpp.

Member Function Documentation

HTableBrowserElement * HTableBrowserElement::clearColor ( void  )

Clears the redefined color data

See Also
setColor()
Returns
It returns the pointer of HTableBrowserElement object (this)

Definition at line 2103 of file guilib.cpp.

QString HTableBrowserElement::getCVal ( int  i)
inline

Returns the displayed value of the the i index column.

Definition at line 496 of file guilib.h.

QString HTableBrowserElement::operator[] ( int  i)

Returns the displayed value of the the i index column.

Definition at line 2113 of file guilib.cpp.

HTableBrowserElement * HTableBrowserElement::setColor ( int  r,
int  g,
int  b 
)

Redefine the color of the element (Every cell in the row) If you don't call this function the cells are colored according to the column data.

Returns
It returns the pointer of HTableBrowserElement object (this)

Definition at line 2094 of file guilib.cpp.

int HTableBrowserElement::size ( void  )

Returns the number of columns.

Definition at line 2122 of file guilib.cpp.

void HTableBrowserElement::swapWith ( HTableBrowserElement x)

Swap this HTableBrowserElement element with the parameter passed element. The sort function of the HTableBrowser uses this function

Definition at line 2161 of file guilib.cpp.

Member Data Documentation

QPixmap* HTableBrowserElement::cachePixmap

DO NOT MODIFY OR USE THIS ATTRIBUTE! IT CONTROLLS THE PIXMAP CACHE.

Definition at line 476 of file guilib.h.


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