projects
/
dorian
/ blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
history
|
raw
|
HEAD
Add minimal documentation.
[dorian]
/
model
/
bookdb.h
1
#ifndef BOOKDB_H
2
#define BOOKDB_H
3
4
#include <QVariantHash>
5
#include <QtSql>
6
7
class QString;
8
9
/** Persistent storage for book meta-data. */
10
class BookDb
11
{
12
public:
13
static BookDb *instance();
14
static void close();
15
QVariantHash load(const QString &book);
16
void save(const QString &book, const QVariantHash &data);
17
void remove(const QString &book);
18
QStringList books();
19
20
private:
21
BookDb();
22
~BookDb();
23
void create();
24
QSqlDatabase db;
25
};
26
27
#endif // BOOKDB_H