# class toResultView

This class defines a list which displays the result of a query. More...

Definition | `#include <toresultview.h>`
Inherits | toListView [public ], toResult [public ]
Inherited by | toResultConstraint, toResultDepend, toResultIndexes, toResultLong, toResultPlan, toResultReferences, toResultStats
List of all Methods

Annotated List
Files
Globals
Hierarchy
Index

#### Public Methods

- toResultView (bool readable,bool numCol,QWidget *parent,const char *name=NULL)
- toResultView (QWidget *parent,const char *name=NULL)
- ~toResultView ()
- void setReadAll (bool all)
- virtual void editReadAll (void)
- int queryColumns () const
- void setFilter (toResultFilter *filter)
- toResultFilter * filter (void)
- bool numberColumn () const
- void setNumberColumn (bool val)
- bool readableColumn () const
- void setReadableColumns (bool val)
- virtual QListViewItem * createItem (QListViewItem *last,const QString &str)
- virtual void query (const QString &sql,const toQList ¶m)
- virtual QString sqlName (void)
- virtual void setSQLName (const QString &name)
- void setSQL (const QString &sql)
- void setSQL (toSQL &sql)
- void query (const QString &sql)
- void query (toSQL &sql)
- void query (toSQL &sql,toQList &par)
- virtual void editPrint (void)
- virtual QString middleString ()
- virtual void addMenues (QPopupMenu *)

#### Public Slots

- virtual void refresh (void)
- virtual void changeParams (const QString &Param1)
- virtual void changeParams (const QString &Param1,const QString &Param2)
- virtual void changeParams (const QString &Param1,const QString &Param2,const QString &Param3)
- virtual void addItem (void)
- virtual bool canHandle (toConnection &)

#### Protected Methods

- void setup (bool readable,bool dispCol)
- virtual bool eof (void)

#### Protected Slots

- virtual void menuCallback (int)

#### Protected Members

- toQuery *Query
- QListViewItem *LastItem
- int RowNumber
- bool ReadableColumns
- bool NumberColumn
- bool ReadAll
- toResultFilter *Filter

## Detailed Description

This class defines a list which displays the result of a query.

One special thing to know about this class is that columns at the end in which the description start with a '-' characters are not displayed.

toQuery * Query

### Query

[protected]

QListViewItem * LastItem

### LastItem

[protected]

int RowNumber

### RowNumber

[protected]

bool ReadableColumns

### ReadableColumns

[protected]

bool NumberColumn

### NumberColumn

[protected]

bool ReadAll

### ReadAll

[protected]

toResultFilter * Filter

### Filter

[protected]

void setup (bool readable,bool dispCol)

### setup

[protected]

Setup the list.

Parameters:

readable | Wether to display first number column or not.
dispCol | Wether to display first number column or not.

bool eof (void)

### eof

[protected virtual]

Check if end of query is detected yet or not.

toResultView (bool readable,bool numCol,QWidget *parent,const char *name=NULL)

### toResultView

Create list.

Parameters:

readable | Indicate if columns are to be made more readable. This means that the descriptions are capitalised and '_' are converted to ' '.
numCol | If number column is to be displayed.
parent | Parent of list.
name | Name of widget.

toResultView (QWidget *parent,const char *name=NULL)

### toResultView

Create list. The columns are not readable and the number column is displayed.

Parameters:

parent | Parent of list.
name | Name of widget.

~toResultView ()

### ~toResultView

void setReadAll (bool all)

### setReadAll

Set the read all flag.

Parameters:

all | New value of flag.

void editReadAll (void)

### editReadAll

[virtual]

Get read all flag

Returns: Value of read all flag.

Reimplemented from toEditWidget.

int queryColumns ()

### queryColumns

[const]

Get the number of columns in query.

Returns: Columns in query.

void setFilter (toResultFilter *filter)

### setFilter

Set a filter to this list.

Parameters:

filter | The new filter or NULL if no filter is to be used.

toResultFilter * filter (void)

### filter

Get the current filter.

Returns: Current filter or NULL if no filter.

bool numberColumn ()

### numberColumn

[const]

Get number column flag.

Returns: Wether or not the numbercolumn is displayed.

void setNumberColumn (bool val)

### setNumberColumn

Set number column flag. Don't change this while a query is running. Observe that not all descendants of this class support changing this on the fly. The base class and toResultLong does though.

Parameters:

val | New value of number column.

bool readableColumn ()

### readableColumn

[const]

Get readable column flag.

Returns: Wether or not the readable column names.

void setReadableColumns (bool val)

### setReadableColumns

Set readable column flag.

QListViewItem * createItem (QListViewItem *last,const QString &str)

### createItem

[virtual]

Create a new item in this list. Can be used if a special kind of item is wanted in the list. The rest of the columns will be filled with setText.

Parameters:

last | Where to insert the item.
str | String to set first column to.

Returns: Allocated item.

void query (const QString &sql,const toQList ¶m)

### query

[virtual]

Reimplemented for internal reasons.

Reimplemented from toResult.

QString sqlName (void)

### sqlName

[virtual]

Get SQL name of list.

Reimplemented from toListView.

void setSQLName (const QString &name)

### setSQLName

[virtual]

Set SQL name of list.

Reimplemented from toListView.

void setSQL (const QString &sql)

### setSQL

Set the SQL statement of this list

Parameters:

sql | String containing statement.

Reimplemented from toResult.

void setSQL (toSQL &sql)

### setSQL

Set the SQL statement of this list. This will also affect Name.

Parameters:

sql | SQL containing statement.

Reimplemented from toResult.

void query (const QString &sql)

### query

Set new SQL and run query.

Parameters:

sql | New sql.

See also: setSQL

Reimplemented from toResult.

void query (toSQL &sql)

### query

Set new SQL and run query.

Parameters:

sql | New sql.

See also: setSQL

Reimplemented from toResult.

void query (toSQL &sql,toQList &par)

### query

Set new SQL and run query.

Parameters:

sql | New sql.

See also: setSQL

Reimplemented from toResult.

void editPrint (void)

### editPrint

[virtual]

Reimplemented for internal reasons.

Reimplemented from toListView.

QString middleString ()

### middleString

[virtual]

Reimplemented for internal reasons.

Reimplemented from toListView.

void addMenues (QPopupMenu *)

### addMenues

[virtual]

Reimplemented for internal reasons.

Reimplemented from toListView.

void refresh (void)

### refresh

[virtual slot]

Reimplemented for internal reasons.

Reimplemented from toResult.

void changeParams (const QString &Param1)

### changeParams

[virtual slot]

Reimplemented for internal reasons.

Reimplemented from toResult.

void changeParams (const QString &Param1,const QString &Param2)

### changeParams

[virtual slot]

Reimplemented For internal reasons.

Reimplemented from toResult.

void changeParams (const QString &Param1,const QString &Param2,const QString &Param3)

### changeParams

[virtual slot]

Reimplemented for internal reasons.

Reimplemented from toResult.

void addItem (void)

### addItem

[virtual slot]

Try to add an item to the list if available.

bool canHandle (toConnection &)

### canHandle

[virtual slot]

Handle any connection by default

Reimplemented from toResult.

void menuCallback (int)

### menuCallback

[protected slots virtual slot]

Reimplemented for internal reasons.

Reimplemented from toListView.