src/database/database.h

Mon, 28 Mar 2022 16:54:08 +0200

author
Michiel Broek <mbroek@mbse.eu>
date
Mon, 28 Mar 2022 16:54:08 +0200
changeset 91
409d9c7214be
parent 6
f8474f2c5db9
permissions
-rw-r--r--

Added websocket connection to the bmsd server. Dropped MQTT, not needed. MySQL and webSockets is enough.

#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();
    bool openDataBase(bool develop);
    void closeDataBase();

private:
    QSqlDatabase    db;
};


static DataBase *db;


#endif

mercurial