1 #pragma once 2 3 #ifndef SVN_DELETE_DIALOG_H 4 #define SVN_DELETE_DIALOG_H 5 6 #include "toonzqt/dvdialog.h" 7 #include "versioncontrol.h" 8 9 class QLabel; 10 class QPushButton; 11 class QCheckBox; 12 class QPlainTextEdit; 13 class QTreeWidget; 14 class QFile; 15 16 //----------------------------------------------------------------------------- 17 18 class SVNDeleteDialog final : public DVGui::Dialog { 19 Q_OBJECT 20 21 QLabel *m_waitingLabel; 22 QLabel *m_textLabel; 23 24 QPushButton *m_deleteLocalButton; 25 QPushButton *m_deleteServerButton; 26 QPushButton *m_cancelButton; 27 28 QTreeWidget *m_treeWidget; 29 30 QLabel *m_commentLabel; 31 QPlainTextEdit *m_commentTextEdit; 32 33 QCheckBox *m_keepLocalCopyCheckBox; 34 35 QCheckBox *m_deleteSceneContentsCheckBox; 36 37 QStringList m_sceneResources; 38 39 QString m_workingDir; 40 QStringList m_files; 41 42 VersionControlThread m_thread; 43 44 QFile *m_targetTempFile; 45 46 bool m_isFolder; 47 48 int m_sceneIconAdded; 49 50 public: 51 SVNDeleteDialog(QWidget *parent, const QString &workingDir, 52 const QStringList &filesToDelete, bool isFolder, 53 int sceneIconAdded); 54 55 protected: 56 void showEvent(QShowEvent *) override; 57 58 private: 59 void switchToCloseButton(); 60 61 void updateFileBrowser(); 62 63 void initTreeWidget(); 64 65 protected slots: 66 67 void onError(const QString &); 68 void onDeleteLocalButtonClicked(); 69 void onDeleteServerButtonClicked(); 70 71 void deleteFiles(); 72 void commitDeletedFiles(); 73 74 void onCommitDone(); 75 76 void onDeleteSceneContentsToggled(bool); 77 78 signals: 79 void done(const QStringList &); 80 }; 81 82 #endif // SVN_DELETE_DIALOG_H 83