Class to login into a database.If GUI is not disabled, it requests the login data with help of ESqlLoginWidget, if needed. Otherwise only the specified login data is used.
More...
#include <esqllogin.h>
|
| void | error (const QString &message) |
| |
| void | warning (const QString &message) |
| |
| void | information (const QString &message) |
| |
| void | reloadEnableActions () |
| | Request reloading of enabled actions in EMainWindow. More...
|
| |
| void | addMenu (QMenu *newMenu, const QString &parent, QString before=QString()) |
| |
| void | addAction (QAction *newAction, const QString &parent, QString before=QString()) |
| |
| void | addToolBar (QToolBar *newToolBar, Qt::ToolBarArea area=Qt::TopToolBarArea) |
| |
| void | addNewDockWidget (QDockWidget *widget, const Qt::DockWidgetArea &area) |
| |
| void | setCentralWidget (QWidget *centralWidget) |
| |
| void | showSettings () |
| |
| void | showHelp (const QString &page) |
| |
| void | showStatusWidget (QWidget *widget) |
| |
| void | reloadSettingsRequest () |
| | Indicates, that a reload of the settings is needed. More...
|
| |
| void | doReloadSettings () |
| | Emitted to bring the reload request back to the farest child. More...
|
| |
| virtual void | errorByPass (const QString &message) |
| |
| virtual void | warningByPass (const QString &message) |
| |
| virtual void | informationByPass (const QString &message) |
| |
| virtual void | reloadEnableActionsByPass () |
| |
| virtual void | addMenuByPass (QMenu *newMenu, const QString &parent, QString before=QString()) |
| |
| virtual void | addActionByPass (QAction *newAction, const QString &parent, QString before=QString()) |
| |
| virtual void | addToolBarByPass (QToolBar *newToolBar, Qt::ToolBarArea area=Qt::TopToolBarArea) |
| |
| virtual void | addNewDockWidgetByPass (QDockWidget *widget, const Qt::DockWidgetArea &area) |
| |
| virtual void | setCentralWidgetByPass (QWidget *centralWidget) |
| |
| virtual void | showSettingsByPass () |
| |
| virtual void | showHelpByPass (const QString &page) |
| |
| virtual void | showStatusWidgetByPass (QWidget *widget) |
| |
| virtual void | reloadSettingsRequestByPass () |
| |
| void | addManagedDockWidget (QDockWidget *widget, const Qt::DockWidgetArea &area, QString actionLabel=QString(), QString actionParent=QString()) |
| | Adds an dock widget via addNewDockWidget() and adds widget to the list of managed dock widgets. More...
|
| |
Class to login into a database.
If GUI is not disabled, it requests the login data with help of ESqlLoginWidget, if needed. Otherwise only the specified login data is used.
Usage:
ESqlLogin login(
"Database connection for Super Application",
"",
true,
this);
if(
login.loadAndCheckSettings()){
}
else{
}
}
- Note
- It is used by ESqlInit and some other classes. Since the use of ESqlInit, EDBSettings and ESetupWizardDB is recommended, this class should only be used, if you need a connection with a different user than used within the mentioned class before.
- See also
- ESqlInit
-
ESqlLoginWidget
| ESqlLogin::ESqlLogin |
( |
QObject * |
parent = NULL | ) |
|
| ESqlLogin::ESqlLogin |
( |
bool |
enableGui, |
|
|
QObject * |
parent = NULL |
|
) |
| |
| ESqlLogin::ESqlLogin |
( |
QString |
title, |
|
|
QString |
newConnName, |
|
|
bool |
enableGui = true, |
|
|
QObject * |
parent = NULL |
|
) |
| |
| bool ESqlLogin::checkDBSettings |
( |
| ) |
|
|
static |
Checks the database driver and database name combination.
| bool ESqlLogin::checkDBSettingsPrivate |
( |
| ) |
|
|
private |
| static Q_DECL_DEPRECATED bool ESqlLogin::checkSettings |
( |
| ) |
|
|
inlinestatic |
| QStringList ESqlLogin::data |
( |
| ) |
|
Marked for removel, use login() instead, which does exactly the same, but allows better result distinguishing.
| void ESqlLogin::init |
( |
bool |
enableGui, |
|
|
QString |
connectionName = QString() |
|
) |
| |
|
private |
| bool ESqlLogin::loadAndCheckSettings |
( |
QString |
username = QString(), |
|
|
QString |
host = QString(), |
|
|
QString |
database = QString(), |
|
|
QString |
driver = QString(), |
|
|
QString |
password = QString() |
|
) |
| |
Loads all settings and checks them.
Tries to login into the database.
If needed and enabledGui is true, it tries to get the login data with ESqlLoginWidget, if needed.
| void ESqlLogin::reloadSettings |
( |
| ) |
|
|
virtual |
| void ESqlLogin::showSettingsDialog |
( |
| ) |
|
|
privateslot |
| QString ESqlLogin::connName |
|
private |
| QString ESqlLogin::database |
|
private |
| QString ESqlLogin::dialogTitle |
|
private |
| QString ESqlLogin::driver |
|
private |
| QString ESqlLogin::password |
|
private |
| QString ESqlLogin::username |
|
private |
| QPointer<KWallet::Wallet> ESqlLogin::wallet |
|
private |
| bool ESqlLogin::withoutDatabase |
|
private |
The documentation for this class was generated from the following files:
- /home/abuild/rpmbuild/BUILD/libengsas-0.6.0/src/lib/core/esqllogin.h
- /home/abuild/rpmbuild/BUILD/libengsas-0.6.0/src/lib/core/esqllogin.cpp