sAlarm 0.5
Public Types | Public Member Functions
Database Class Reference

Database objects handles connection to database. More...

#include <database.h>

List of all members.

Public Types

enum  DriverTypes { SQLite, MySQL }
 Enumerates supported database backends. More...

Public Member Functions

 Database (QString connName="")
 ~Database ()
bool connect ()
 Connects the database.
QString connectionName () const
 Returns database connection name.
DriverTypes driverType () const
 Returns current driver type.
QSqlDatabase sqlDb ()
 Returns pointer to QSqlDatabase.

Detailed Description

Database objects handles connection to database.

Database class is used for establishing database connection.

Member Enumeration Documentation

Enumerates supported database backends.

DriverTypes provide enumeration of supported database drivers.

See also:

Constructor & Destructor Documentation

Database::Database ( QString  connName = "")


Initializes the database. Recieves connection name as parameter.

connNamedatabase connection name
See also:

Member Function Documentation

bool Database::connect ( )

Connects the database.

Returns true if connection was successful
QString Database::connectionName ( ) const [inline]

Returns database connection name.

Returns the database connection name
DriverTypes Database::driverType ( ) const [inline]

Returns current driver type.

Returns current database driver type
QSqlDatabase Database::sqlDb ( ) [inline]

Returns pointer to QSqlDatabase.

Returns pointer to QSqlDatabase object

The documentation for this class was generated from the following files:
 All Classes Functions Enumerations