# class toResult

Abstract baseclass of widgets that can perform queries. More...

Contains pure virtuals
Definition | `#include <toresult.h>`
Inherited by | toResultBar, toResultCols, toResultConstraint, toResultContent, toResultDepend, toResultField, toResultIndexes, toResultItem, toResultLabel, toResultLine, toResultLong, toResultPie, toResultPlan, toResultReferences, toResultResources, toResultStats, toResultView
List of all Methods

Annotated List
Files
Globals
Hierarchy
Index

#### Public Methods

- toResult (void)
- virtual ~toResult ()
- virtual void clearParams (void)
- virtual void refresh (void)
- virtual void query (const QString &sql,const toQList ¶ms)
- 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 bool canHandle (toConnection &)
- toQList & params (void)
- bool handled (void)
- void setHandle (bool)
- void setTabWidget (QTabWidget *tab)
- void setSQL (const QString &sql)
- void setSQL (toSQL &sql)
- void query (const QString &sql)
- void query (toSQL &sql)
- void query (toSQL &sql,toQList &par)
- QString sql (void)
- virtual QString sqlName (void)
- virtual void setSQLName (const QString &name)

#### Public Members

- friend class toResultObject

#### Protected Methods

- toConnection & connection (void)
- toTimer * timer (void)
- void setParams (const toQList &par)
- bool setSQLParams (const QString &sql,const toQList &par)
- virtual void connectionChanged (void)

## Detailed Description

Abstract baseclass of widgets that can perform queries. Usefull because you can execute the query without knowing how it's UI is presented.

toConnection & connection (void)

### connection

[protected]

Get the current connection from the closest tool.

Returns: Reference to connection.

toTimer * timer (void)

### timer

[protected]

Get the timer associated with the closest tool.

Returns: Pointer to tool timer.

void setParams (const toQList &par)

### setParams

[protected]

Set parameters of last query.

bool setSQLParams (const QString &sql,const toQList &par)

### setSQLParams

[protected]

Set SQL and parameters and return false if query shouldn't be reexecuted.

toResult (void)

### toResult

~toResult ()

### ~toResult

[virtual]

void clearParams (void)

### clearParams

[virtual]

Erase last parameters

void refresh (void)

### refresh

[virtual]

Re execute last query

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

### query

[pure virtual]

Perform a query.

Parameters:

sql | Execute an SQL statement.
params | Parameters needed as input to execute statement.

void changeParams (const QString &Param1)

### changeParams

[virtual]

Reexecute with changed parameters.

Parameters:

Param1 | First parameter.

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

### changeParams

[virtual]

Reexecute with changed parameters.

Parameters:

Param1 | First parameter.
Param1 | Second parameter.

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

### changeParams

[virtual]

Reexecute with changed parameters.

Parameters:

Param1 | First parameter.
Param2 | Second parameter.
Param3 | Third parameter.

bool canHandle (toConnection &)

### canHandle

[virtual]

Reimplemented for internal reasons.

toQList & params (void)

### params

Get last parameters used.

Returns: Don't modify the list returned.

bool handled (void)

### handled

Check if this result is handled by the current connection

void setHandle (bool)

### setHandle

Indicate that this result can not be handled even though indicated otherwise

void setTabWidget (QTabWidget *tab)

### setTabWidget

Indicate what tabbed widget to disable page if not immediate parent if this result is not handled.

void setSQL (const QString &sql)

### setSQL

Set the SQL statement of this list

Parameters:

sql | String containing statement.

void setSQL (toSQL &sql)

### setSQL

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

Parameters:

sql | SQL containing statement.

void query (const QString &sql)

### query

Set new SQL and run query.

Parameters:

sql | New sql.

See also: setSQL

void query (toSQL &sql)

### query

Set new SQL and run query.

Parameters:

sql | New sql.

See also: setSQL

void query (toSQL &sql,toQList &par)

### query

Set new SQL and run query.

Parameters:

sql | New sql.

See also: setSQL

QString sql (void)

### sql

Get SQL to execute

QString sqlName (void)

### sqlName

[virtual]

Get SQL name of list.

void setSQLName (const QString &name)

### setSQLName

[virtual]

Set SQL name of list.

friend class toResultObject

### toResultObject

void connectionChanged (void)

### connectionChanged

[protected virtual]

Called when connection is changed. Be sure to call the parent if you reimplement this.