File indexing completed on 2025-02-02 04:11:26

0001 /*
0002  * SPDX-FileCopyrightText: 2019-2023 Mattia Basaglia <dev@dragon.best>
0003  *
0004  * SPDX-License-Identifier: GPL-3.0-or-later
0005  */
0006 #ifndef GLAXNIMATE_GUI_STALEFILESDIALOG_H
0007 #define GLAXNIMATE_GUI_STALEFILESDIALOG_H
0008 
0009 #include <memory>
0010 #include <QDialog>
0011 #include <KAutoSaveFile>
0012 
0013 namespace glaxnimate {
0014 namespace gui {
0015 
0016 class StalefilesDialog : public QDialog
0017 {
0018     Q_OBJECT
0019 
0020 public:
0021     StalefilesDialog(const QList<KAutoSaveFile*>& stale, QWidget* parent = nullptr);
0022     ~StalefilesDialog();
0023 
0024     KAutoSaveFile* selected() const;
0025 
0026     void cleanup(KAutoSaveFile* keep);
0027 
0028 private Q_SLOTS:
0029     void delete_all();
0030     void delete_selected();
0031     void current_changed(int index);
0032 
0033 protected:
0034     void changeEvent ( QEvent* e ) override;
0035 
0036 private:
0037     class Private;
0038     std::unique_ptr<Private> d;
0039 };
0040 
0041 }}
0042 
0043 #endif // GLAXNIMATE_GUI_STALEFILESDIALOG_H