Revision 6262bb8b
Von Christian Ehringfeld vor fast 9 Jahren hinzugefügt
src/sqlitebackupprocessor.h | ||
---|---|---|
#include <QtSql/QSqlDriver>
|
||
#include <QString>
|
||
#include <QVariant>
|
||
#include <QTimer>
|
||
#include "database.h"
|
||
namespace CuteEntityManager {
|
||
class SqliteBackupProcessor : public QObject {
|
||
public:
|
||
explicit SqliteBackupProcessor(QSharedPointer<Database> database, QString destination);
|
||
explicit SqliteBackupProcessor(QSharedPointer<Database> database,
|
||
QString destination);
|
||
explicit SqliteBackupProcessor(QSharedPointer<Database> database,
|
||
QString destination, QString backupFilename, QTimer timer,
|
||
bool incrementalBackups = false, int backupCount = 1);
|
||
~SqliteBackupProcessor();
|
||
QSharedPointer<Database> getDatabase() const;
|
||
void setDatabase(const QSharedPointer<Database> &value);
|
||
... | ... | |
QString getDestination() const;
|
||
void setDestination(const QString &value);
|
||
|
||
public slots:
|
||
bool sqliteDBMemFile(bool save,QString fileName= "db.sqlite.bak");
|
||
private:
|
||
QString getBackupFilename() const;
|
||
void setBackupFilename(const QString &value);
|
||
|
||
QTimer getTimer() const;
|
||
void setTimer(const QTimer &value);
|
||
|
||
int getBackupCount() const;
|
||
void setBackupCount(int value);
|
||
|
||
bool getIncrementalBackups() const;
|
||
void setIncrementalBackups(bool value);
|
||
|
||
public slots:
|
||
bool sqliteDBMemFile(bool save, QString fileName = "db.sqlite.bak");
|
||
void backup();
|
||
private:
|
||
QSharedPointer<Database> database;
|
||
QString destination;
|
||
QString backupFilename;
|
||
QTimer timer;
|
||
bool incrementalBackups;
|
||
int backupCount;
|
||
int counter = 0;
|
||
};
|
||
}
|
||
|
Auch abrufbar als: Unified diff
pro file update