提交测试,基本完成
This commit is contained in:
@ -31,7 +31,13 @@ typedef struct tagRecord{
|
||||
bool status;
|
||||
}Record;
|
||||
#include "netio.h"
|
||||
|
||||
struct Categrory
|
||||
{
|
||||
int id;
|
||||
QString name;
|
||||
bool display;
|
||||
int sort;
|
||||
};
|
||||
class SQLiteHelper : public QObject
|
||||
{
|
||||
Q_OBJECT
|
||||
@ -39,8 +45,16 @@ class SQLiteHelper : public QObject
|
||||
public:
|
||||
SQLiteHelper(QObject *parent = nullptr);
|
||||
bool update_software();
|
||||
bool insert_software(QString name, QString orig_name, QString path, QString sort, bool* categories);
|
||||
bool edit_software(QString name, QString orig_name, QString path, QString sort, bool* categories,QString type="");
|
||||
bool get_software(QList<ButtonStruct>* buttons, ConfigResponse* config_response);
|
||||
bool update_app();
|
||||
bool get_buttons(QList<ButtonStruct> &buttons);
|
||||
bool get_category(QList<Categrory> &categrories);
|
||||
bool set_category(QList<Categrory>& categrories);
|
||||
bool get_all_software(QList<Record> &softwares,int category);
|
||||
QSqlDatabase db;
|
||||
|
||||
~SQLiteHelper();
|
||||
|
||||
private:
|
||||
@ -48,6 +62,5 @@ private:
|
||||
QEventLoop eventLoop;
|
||||
bool downloadSuccess;
|
||||
|
||||
QSqlDatabase db;
|
||||
void cancelDownload();
|
||||
};
|
||||
|
Reference in New Issue
Block a user