添加类、函数注释
This commit is contained in:
@@ -1,11 +1,18 @@
|
||||
#ifndef DATABASEAPI_H
|
||||
#define DATABASEAPI_H
|
||||
|
||||
|
||||
#include <QSqlDatabase>
|
||||
#include <QString>
|
||||
|
||||
|
||||
/**
|
||||
* @class Database
|
||||
* @brief 数据库操作相关接口类
|
||||
* 固定了databaseName为"cardManageSystem",userName为"cardManageSystem"。
|
||||
* 控制本应用中数据库相关变量。
|
||||
* @author 柯劲帆
|
||||
* @date 2024-07-28
|
||||
*/
|
||||
class Database
|
||||
{
|
||||
private:
|
||||
@@ -17,15 +24,19 @@ private:
|
||||
public:
|
||||
Database(QSqlDatabase database);
|
||||
Database(QSqlDatabase database, QString hostName, int port, QString password);
|
||||
QSqlDatabase getDatabase();
|
||||
void setHostName(QString hostName);
|
||||
QString getHostName();
|
||||
void setPort(int port);
|
||||
int getPort();
|
||||
void setPassword(QString password);
|
||||
bool is_connected();
|
||||
bool open();
|
||||
~Database();
|
||||
|
||||
void setHostName(QString hostName);
|
||||
void setPort(int port);
|
||||
void setPassword(QString password);
|
||||
|
||||
QSqlDatabase getDatabase();
|
||||
int getPort();
|
||||
QString getHostName();
|
||||
|
||||
bool is_connected();
|
||||
|
||||
bool open();
|
||||
};
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user