1 #ifndef Header_Clean_Dialog 2 #define Header_Clean_Dialog 3 4 #include "latexdocument.h" 5 #include "mostQtHeaders.h" 6 7 namespace Ui { 8 class CleanDialog; 9 } 10 11 class CleanDialog : public QDialog 12 { 13 Q_OBJECT 14 15 public: 16 explicit CleanDialog(QWidget *parent = nullptr); 17 ~CleanDialog(); 18 19 bool checkClean(const LatexDocuments &docs); 20 21 private slots: 22 void updateFilesToRemove(); 23 void resetExtensions(); 24 void onAccept(); 25 void onReject(); 26 27 private: 28 enum Scope {None, Project, CurrentTexFile, CurrentFileFolder, OpenTexFiles, MAX_SCOPE}; 29 30 Ui::CleanDialog *ui; 31 static QString defaultExtensions; 32 static QString currentExtensions; 33 static int scopeID; 34 35 QString masterFile; 36 QString currentTexFile; 37 QStringList openTexFiles; 38 39 QStringList filesToRemove(CleanDialog::Scope scope, const QStringList &extensionFilter); 40 QStringList filesToRemoveFromDir(const QDir &dir, const QStringList &extensionFilter, bool recursive = true); 41 }; 42 43 #endif // CLEANDIALOG_H 44