Public Member Functions | Public Attributes

QueryResults Class Reference

This class returns a QWidget that contains a tabular presentation of the current query. This enables the application to be able to 'house' more than one SQL query window. More...

#include <queryresults.h>

List of all members.

Public Member Functions

 QueryResults (QWidget *parent=0)
 ~QueryResults ()
void loadModel ()
 Loads the model into the table.

Public Attributes

QSqlQueryModel * model
 The model holding the table's data.
QString query
 The query resulting to the table's data.
QString dbName
 The name of the database in use.
QSqlDatabase db
 The QSqlDatabase to use in the query.
QTabWidget * tab

Detailed Description

This class returns a QWidget that contains a tabular presentation of the current query. This enables the application to be able to 'house' more than one SQL query window.

Definition at line 14 of file queryresults.h.


Constructor & Destructor Documentation

QueryResults::QueryResults ( QWidget *  parent = 0 ) [explicit]

Definition at line 4 of file queryresults.cpp.

                                          :
    QWidget(parent),
    ui(new Ui::QueryResults)
{
    ui->setupUi(this);
}
QueryResults::~QueryResults (  )

Definition at line 11 of file queryresults.cpp.

{
    delete ui;
}

Member Function Documentation

void QueryResults::loadModel (  )

Loads the model into the table.

Definition at line 16 of file queryresults.cpp.

References model.

Referenced by ServerEditor::executeQuery().

                             {
    ui->tblQuery->setModel(model);
}

Member Data Documentation

QSqlDatabase QueryResults::db

The QSqlDatabase to use in the query.

Definition at line 31 of file queryresults.h.

Referenced by ServerEditor::executeQuery().

The name of the database in use.

Definition at line 28 of file queryresults.h.

Referenced by ServerEditor::executeQuery().

QSqlQueryModel* QueryResults::model

The model holding the table's data.

Definition at line 22 of file queryresults.h.

Referenced by ServerEditor::executeQuery(), and loadModel().

The query resulting to the table's data.

Definition at line 25 of file queryresults.h.

Referenced by ServerEditor::executeQuery().

QTabWidget* QueryResults::tab

The parent tab housing this widget. This is needed so that it can be closed when the user clicks on the close button.

Definition at line 35 of file queryresults.h.

Referenced by ServerEditor::executeQuery().


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