File indexing completed on 2024-05-19 04:23:37
0001 // SPDX-FileCopyrightText: 2005-2006, 2010 Jesper K. Pedersen <jesper.pedersen@kdab.com> 0002 // SPDX-FileCopyrightText: 2007 Dirk Mueller <mueller@kde.org> 0003 // SPDX-FileCopyrightText: 2013-2023 Johannes Zarl-Zierl <johannes@zarl-zierl.at> 0004 // 0005 // SPDX-License-Identifier: GPL-2.0-or-later 0006 0007 #ifndef NUMBEREDBACKUP_H 0008 #define NUMBEREDBACKUP_H 0009 #include <QStringList> 0010 0011 namespace DB 0012 { 0013 class UIDelegate; 0014 0015 class NumberedBackup 0016 { 0017 public: 0018 explicit NumberedBackup(DB::UIDelegate &ui); 0019 void makeNumberedBackup(); 0020 0021 protected: 0022 int getMaxId() const; 0023 QStringList backupFiles() const; 0024 int idForFile(const QString &fileName, bool &OK) const; 0025 void deleteOldBackupFiles(); 0026 0027 private: 0028 DB::UIDelegate &m_ui; 0029 }; 0030 } 0031 0032 #endif /* NUMBEREDBACKUP_H */ 0033 0034 // vi:expandtab:tabstop=4 shiftwidth=4: