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>
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 |
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.
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;
}
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); }
QSqlDatabase QueryResults::db |
The QSqlDatabase to use in the query.
Definition at line 31 of file queryresults.h.
Referenced by ServerEditor::executeQuery().
QString QueryResults::dbName |
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().
QString QueryResults::query |
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().