-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdatabase.h
More file actions
35 lines (28 loc) · 776 Bytes
/
database.h
File metadata and controls
35 lines (28 loc) · 776 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
/// Database.h
/// \author ohanedan ( oznhndn@gmail.com )
#ifndef DATABASE_H
#define DATABASE_H
#include <QtSql/QSqlDatabase>
#include "isaver.h"
class Database : public ISaver
{
Q_OBJECT
public:
Database();
std::shared_ptr<Settings> getSettings();
QString init();
private:
void createTables();
public slots:
QVector<std::shared_ptr<Barcode>> slotGetBarcode(const QString& barcodeData);
void slotSaveBarcode(const QString& barcodeData);
QVector<QString> slotGetAllBarcodeNames();
void slotDeleteBarcode(const QString& barcode);
void slotDeleteData(int id);
void slotSetSettings(std::shared_ptr<Settings> settings);
std::shared_ptr<Settings> slotGetSettings();
void slotDeleteAllBarcodes();
private:
QSqlDatabase mDb;
};
#endif // DATABASE_H