|
Project Documentation Manager BRIGADOON-0002
Project Documentation Manager
|
Class to control the opening of the Database. More...
#include <databasemanager.h>
Public Slots | |
| void | ReconnectDatabase (void) |
| Reconnect to the databse using the current parameters. | |
| void | LoadDefaultDBParameters (void) |
| Load the default Database Paranmeters. | |
Signals | |
| void | SendLogEntry (REMOTE_LOG_ENTRY LogEntry) |
| Send Log Entry via the Signal-Slot Method. | |
Public Member Functions | |
| DatabaseManager (Ui::MainWindow *UI_Window) | |
| Database Class Constructor. | |
| ~DatabaseManager () | |
| Database Manager Deconstructor. | |
Private Member Functions | |
| void | LoadDatabaseDrivers (QComboBox *DriverList) |
| Load the know Database Drivers. | |
| bool | Open (void) |
| Open the Database witht selected parameters. | |
| void | RemoveDatabase (void) |
| Remove the current active database. | |
| bool | CheckIfOpen (bool IsOpen) |
| Set the Database Image based on IsOpenFlag. | |
| void | LogAdd (LOGGING_SEVERITY Severity, LOGGING_MODE Mode, QString Message) |
| Send Message to the Log. | |
Private Attributes | |
| Ui::MainWindow * | ui |
| Pointer to the Main Window. | |
| bool | is_database |
| Flag to indicate if there is a database. | |
| bool | is_open |
| Flag to indicate if database is open. | |
Class to control the opening of the Database.
Definition at line 18 of file databasemanager.h.
|
explicit |
Database Class Constructor.
| UI_Window | The Program's main Window |
Definition at line 7 of file databasemanager.cpp.
References is_database, is_open, LoadDatabaseDrivers(), LoadDefaultDBParameters(), ReconnectDatabase(), and ui.
| DatabaseManager::~DatabaseManager | ( | ) |
Database Manager Deconstructor.
Definition at line 26 of file databasemanager.cpp.
References RemoveDatabase(), and ui.
|
private |
Set the Database Image based on IsOpenFlag.
If the database is open, the database state image is set to green. If the database is closed, the databse state images is set to ref.
Definition at line 113 of file databasemanager.cpp.
References LOG_DEBUG, LOG_WARNING, LogAdd(), MODE_DATABASE, and ui.
Referenced by Open(), and RemoveDatabase().
|
private |
Load the know Database Drivers.
| Database | Driver List |
Definition at line 43 of file databasemanager.cpp.
References LOG_DEBUG, LogAdd(), and MODE_DATABASE.
Referenced by DatabaseManager().
|
slot |
Load the default Database Paranmeters.
Definition at line 52 of file databasemanager.cpp.
References LOG_DEBUG, LogAdd(), MODE_DATABASE, and ui.
Referenced by DatabaseManager().
|
private |
Send Message to the Log.
| Severity | Severity of the Log Message |
| Mode | Which part of the program does the message relate to |
| Message | Text message to be added to the Log |
Definition at line 134 of file databasemanager.cpp.
References REMOTE_LOG_ENTRY::Message, REMOTE_LOG_ENTRY::Mode, SendLogEntry(), and REMOTE_LOG_ENTRY::Severity.
Referenced by CheckIfOpen(), LoadDatabaseDrivers(), LoadDefaultDBParameters(), and RemoveDatabase().
|
private |
Open the Database witht selected parameters.
Definition at line 91 of file databasemanager.cpp.
References CheckIfOpen(), is_database, is_open, and ui.
Referenced by ReconnectDatabase().
|
slot |
Reconnect to the databse using the current parameters.
Definition at line 106 of file databasemanager.cpp.
References Open(), and RemoveDatabase().
Referenced by DatabaseManager().
|
private |
Remove the current active database.
Definition at line 72 of file databasemanager.cpp.
References CheckIfOpen(), is_database, is_open, LOG_INFO, LogAdd(), and MODE_DATABASE.
Referenced by ReconnectDatabase(), and ~DatabaseManager().
|
signal |
Send Log Entry via the Signal-Slot Method.
| LogEntry | Structure holding the Log Entry parameters |
Referenced by LogAdd().
|
private |
Flag to indicate if there is a database.
Definition at line 84 of file databasemanager.h.
Referenced by DatabaseManager(), Open(), and RemoveDatabase().
|
private |
Flag to indicate if database is open.
Definition at line 90 of file databasemanager.h.
Referenced by DatabaseManager(), Open(), and RemoveDatabase().
|
private |
Pointer to the Main Window.
Definition at line 79 of file databasemanager.h.
Referenced by CheckIfOpen(), DatabaseManager(), LoadDefaultDBParameters(), Open(), and ~DatabaseManager().