Rabbit Remote Control
0.1.0-bate14
Toggle main menu visibility
Loading...
Searching...
No Matches
Src
Database
DatabaseFilter.h
1
// Author: Kang Lin <kl222@126.com>
2
3
#pragma once
4
5
#include "Database.h"
6
11
class
PLUGIN_EXPORT CDatabaseFilter :
public
CDatabase
12
{
13
public
:
14
explicit
CDatabaseFilter(
const
QString& szSuffix = QString(), QObject* parent =
nullptr
);
15
16
[[nodiscard]]
bool
contains(
const
QString& szKey);
17
int
AddKey(
const
QString& szKey);
18
int
RemoveKey(
const
QString& szKey);
19
int
Clear();
20
[[nodiscard]]
virtual
bool
isEmpty();
21
int
OnProcess(std::function<
int
(
const
QString& key)> cb,
bool
bErrExit =
false
);
22
23
[[nodiscard]]
virtual
bool
ExportToJson(QJsonObject &obj)
override
;
24
[[nodiscard]]
virtual
bool
ImportFromJson(
const
QJsonObject &obj)
override
;
25
26
private
:
27
QString m_szTableName;
28
29
protected
:
30
[[nodiscard]]
virtual
bool
OnInitializeSqliteDatabase()
override
;
31
[[nodiscard]]
virtual
bool
OnInitializeMySqlDatabase()
override
;
32
};
33
Author: Kang Lin (kl222@126.com)
Copyright (c) Kang Lin Studios All Rights Reserved