You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

32 lines
521 B
C

#ifndef CONTEXT_H
#define CONTEXT_H
#include <QList>
#include "core_global.h"
#include "transaction.h"
#include <odb/database.hxx>
class IPlugin;
class CORESHARED_EXPORT Context
{
public:
static Context &instance();
QList<IPlugin*> plugins();
void loadPlugins();
void openDb(const QString &path);
odb::database *db() { return m_db; }
private:
friend class Transaction;
Context();
QList<IPlugin*> m_plugins;
odb::database *m_db;
bool m_inTransaction;
};
#endif // CONTEXT_H