summaryrefslogtreecommitdiffstats
path: root/Plugins/DbSqliteWx/dbsqlitewx.cpp
diff options
context:
space:
mode:
authorLibravatarUnit 193 <unit193@ubuntu.com>2017-02-09 04:36:04 -0500
committerLibravatarUnit 193 <unit193@ubuntu.com>2017-02-09 04:36:04 -0500
commitd9aa870e5d509cc7309ab82dd102a937ab58613a (patch)
treed92d03d76b5c390b335f1cfd761f1a0b59ec8496 /Plugins/DbSqliteWx/dbsqlitewx.cpp
parent68ee4cbcbe424b95969c70346283a9f217f63825 (diff)
Imported Upstream version 3.1.1+dfsg1upstream/3.1.1+dfsg1
Diffstat (limited to 'Plugins/DbSqliteWx/dbsqlitewx.cpp')
-rw-r--r--Plugins/DbSqliteWx/dbsqlitewx.cpp36
1 files changed, 36 insertions, 0 deletions
diff --git a/Plugins/DbSqliteWx/dbsqlitewx.cpp b/Plugins/DbSqliteWx/dbsqlitewx.cpp
new file mode 100644
index 0000000..42a8347
--- /dev/null
+++ b/Plugins/DbSqliteWx/dbsqlitewx.cpp
@@ -0,0 +1,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);
+}