Kooky
cMySQLPlugin Class Reference

MySQL Database Connector Plugin class. More...

#include <cmysqlplugin.h>

+ Inheritance diagram for cMySQLPlugin:
+ Collaboration diagram for cMySQLPlugin:

Public Member Functions

qint16 pluginAPIVersion ()
 Returns the version of the plugin API. More...
 
QString pluginName ()
 Returns the name of the plugin. More...
 
qint16 pluginVersion ()
 returns the version of the plugin More...
 
iType pluginType ()
 returns the type of the plugin. More...
 
bool connect ()
 connects to the database. More...
 
bool init ()
 initializes default settings for the plugin. More...
 
QString lastError ()
 returns the last error string. More...
 
bool config ()
 calls the configuration dialog. More...
 
- Public Member Functions inherited from cDBInterface
 cDBInterface ()
 Constructor. More...
 
virtual ~cDBInterface ()
 Destructor. More...
 
bool connected ()
 Returns the current connection status. More...
 
QString lastError ()
 Returns the last error message of the last operation. More...
 

Protected Member Functions

bool open ()
 opens the database. More...
 

Protected Attributes

QSqlDatabase m_db
 
QString m_szLastError
 
- Protected Attributes inherited from cDBInterface
bool m_bConnected
 

Additional Inherited Members

- Public Types inherited from cInterface
enum  iType { iTypeImport = 0, iTypeExport = 1, iTypeDB = 2 }
 Defines the type of the interface. More...
 

Detailed Description

This class implements the database connector for MySQL. All functions may be overwritten by derriving classes.

Note
Author
Herwig Birke
Version
1.0
Date
$Date: 2016/02/09

Member Function Documentation

bool cMySQLPlugin::config ( )
virtual
Returns
bool true if the configuration has been changed successfully or false otherwise.

Implements cInterface.

References cConfigDialog::database(), cConfigDialog::hostname(), cDBInterface::m_bConnected, m_db, open(), cConfigDialog::password(), pluginName(), cConfigDialog::setDatabase(), cConfigDialog::setHostname(), cConfigDialog::setPassword(), cConfigDialog::setUserName(), and cConfigDialog::userName().

Referenced by pluginType().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

bool cMySQLPlugin::connect ( )
virtual
Returns
bool true on success or false otherwise

Implements cDBInterface.

References m_db, open(), and pluginName().

Referenced by pluginType().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

bool cMySQLPlugin::init ( )
virtual
Returns
bool true if settings where successfully tested or false otherwise.

Implements cDBInterface.

References cDBInterface::m_bConnected, m_db, m_szLastError, and pluginName().

Referenced by pluginType().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

QString cMySQLPlugin::lastError ( )
Returns
QString last error

References m_szLastError.

Referenced by pluginType().

+ Here is the caller graph for this function:

bool cMySQLPlugin::open ( )
protected
Returns
bool true on success or false otherwise.

References cDBInterface::m_bConnected, m_db, and m_szLastError.

Referenced by config(), connect(), and pluginType().

+ Here is the caller graph for this function:

qint16 cMySQLPlugin::pluginAPIVersion ( )
inlinevirtual
Returns
qint16 plugin API version

Implements cInterface.

QString cMySQLPlugin::pluginName ( )
inlinevirtual
Returns
QString name of the plugin

Implements cInterface.

Referenced by config(), connect(), and init().

+ Here is the caller graph for this function:

iType cMySQLPlugin::pluginType ( )
inlinevirtual
Returns
iType type of the plugin.

Returns the type of the plugin. Possible values are:

Implements cInterface.

References config(), connect(), init(), cInterface::iTypeDB, lastError(), and open().

+ Here is the call graph for this function:

qint16 cMySQLPlugin::pluginVersion ( )
inlinevirtual
Returns
qint16 version of the plugin

Implements cInterface.

Member Data Documentation

QSqlDatabase cMySQLPlugin::m_db
protected

holds the database connection

Referenced by config(), connect(), init(), and open().

QString cMySQLPlugin::m_szLastError
protected

holds the last error message

Referenced by init(), lastError(), and open().


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