blob: 42a8347214ab630f22e64fe3aa99becdd617525c (
plain) (
blame)
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
36
|
#include "dbsqlitewx.h"
#include "dbsqlitewxinstance.h"
DbSqliteWx::DbSqliteWx()
{
}
QString DbSqliteWx::getLabel() const
{
return "WxSQLite3";
}
QList<DbPluginOption> DbSqliteWx::getOptionsList() const
{
QList<DbPluginOption> opts;
DbPluginOption opt;
opt.type = DbPluginOption::PASSWORD;
opt.key = PASSWORD_OPT;
opt.label = tr("Password (key)");
opt.toolTip = tr("Leave empty to create or connect to decrypted database.");
opt.placeholderText = tr("Encryption password");
opts << opt;
return opts;
}
bool DbSqliteWx::checkIfDbServedByPlugin(Db *db) const
{
return (db && dynamic_cast<DbSqliteWxInstance*>(db));
}
Db *DbSqliteWx::newInstance(const QString &name, const QString &path, const QHash<QString, QVariant> &options)
{
return new DbSqliteWxInstance(name, path, options);
}
|