src/database/database.h

changeset 3
4b95e33ee476
child 6
f8474f2c5db9
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/database/database.h	Fri Feb 11 12:02:09 2022 +0100
@@ -0,0 +1,30 @@
+#ifndef _DATABASE_H
+#define _DATABASE_H
+     
+#include <QSqlDatabase>
+#include <QDebug>
+#include <QSettings>
+
+
+class DataBase : public QObject
+{
+    Q_OBJECT
+
+public:
+    explicit DataBase(QObject *parent = 0);
+    ~DataBase();
+    void connectToDataBase();
+     
+private:
+    QSqlDatabase    db;
+     
+private:
+    bool openDataBase();        
+    void closeDataBase();       
+};
+
+
+static DataBase *db;
+
+
+#endif

mercurial