Signals | Public Member Functions | Public Attributes

NewConnection Class Reference

#include <newconnection.h>

List of all members.

Signals

void connectionSelected (bool)
void connectionChanged (bool)

Public Member Functions

 NewConnection (QWidget *parent=0)
 ~NewConnection ()

Public Attributes

QSqlDatabase db

Detailed Description

Definition at line 11 of file newconnection.h.


Constructor & Destructor Documentation

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

Definition at line 5 of file newconnection.cpp.

References connectionChanged(), and connectionSelected().

                                            :
        QDialog(parent),
        ui(new Ui::NewConnection)
{
    ui->setupUi(this);
    //
    if (!createConnection())
        QMessageBox::critical(0, "Error", "SQL Lite Error: You will not be able to save connections.");
    //
    connect (ui->cmdNewConnection, SIGNAL(clicked()), this, SLOT(newConnection()));
    connect (ui->cmdSave, SIGNAL(clicked()), this, SLOT(saveConnection()));
    connect (ui->cmdDelete, SIGNAL(clicked()), this, SLOT(deleteConnection()));
    connect (ui->cmdRename, SIGNAL(clicked()), this, SLOT(renameConnection()));
    connect (this, SIGNAL(connectionChanged(bool)), ui->cmdSave, SLOT(setEnabled(bool)));
    connect (this, SIGNAL(connectionSelected(bool)), ui->cmdDelete, SLOT(setEnabled(bool)));
    connect (this, SIGNAL(connectionSelected(bool)), ui->txtPassword, SLOT(setEnabled(bool)));
    connect (this, SIGNAL(connectionSelected(bool)), ui->txtServerName, SLOT(setEnabled(bool)));
    connect (this, SIGNAL(connectionSelected(bool)), ui->txtUserName, SLOT(setEnabled(bool)));
    connect (this, SIGNAL(connectionSelected(bool)), ui->cmdRename, SLOT(setEnabled(bool)));
    emit connectionChanged(false);
    emit connectionSelected(false);

    loadConnections();
}
NewConnection::~NewConnection (  )

Definition at line 30 of file newconnection.cpp.

{
    delete ui;
}

Member Function Documentation

void NewConnection::connectionChanged ( bool   ) [signal]

Referenced by NewConnection().

void NewConnection::connectionSelected ( bool   ) [signal]

Referenced by NewConnection().


Member Data Documentation

QSqlDatabase NewConnection::db

Definition at line 17 of file newconnection.h.


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