You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
44 lines
617 B
44 lines
617 B
|
|
#ifndef CSCI_DATABASE_CONFIG_H
|
|
#define CSCI_DATABASE_CONFIG_H
|
|
|
|
#include <QSettings>
|
|
|
|
class DatabaseConfig {
|
|
|
|
private:
|
|
QString _host;
|
|
int _port;
|
|
QString _database;
|
|
QString _username;
|
|
QString _password;
|
|
QString _driver;
|
|
|
|
private:
|
|
DatabaseConfig();
|
|
|
|
public:
|
|
~DatabaseConfig();
|
|
|
|
void load(QSettings* configs);
|
|
|
|
QString getHost() const;
|
|
|
|
int getPort() const;
|
|
|
|
QString getDatabase() const;
|
|
|
|
QString getUsername() const;
|
|
|
|
QString getPassword() const;
|
|
|
|
QString getDriver() const;
|
|
|
|
public:
|
|
static DatabaseConfig* getIns();
|
|
|
|
};
|
|
|
|
|
|
#endif //CSCI_DATABASE_CONFIG_H
|