1 #pragma once 2 3 #ifndef SVN_LOCK_FRAME_RANGE_DIALOG_H 4 #define SVN_LOCK_FRAME_RANGE_DIALOG_H 5 6 #include "toonzqt/dvdialog.h" 7 #include "toonzqt/intfield.h" 8 #include "versioncontrol.h" 9 10 #include <QList> 11 12 class QLabel; 13 class QPushButton; 14 class QPlainTextEdit; 15 16 //----------------------------------------------------------------------------- 17 18 class SVNLockFrameRangeDialog final : public DVGui::Dialog { 19 Q_OBJECT 20 21 QLabel *m_waitingLabel; 22 QLabel *m_textLabel; 23 24 QLabel *m_commentLabel; 25 QPlainTextEdit *m_commentTextEdit; 26 27 QLabel *m_fromLabel; 28 QLabel *m_toLabel; 29 DVGui::IntLineEdit *m_fromLineEdit; 30 DVGui::IntLineEdit *m_toLineEdit; 31 32 QPushButton *m_lockButton; 33 QPushButton *m_cancelButton; 34 35 QString m_workingDir; 36 QString m_file; 37 38 QString m_propertyValue; 39 40 VersionControlThread m_thread; 41 42 bool m_hasError; 43 44 bool m_fromIsValid; 45 bool m_toIsValid; 46 47 QList<SVNPartialLockInfo> m_lockInfos; 48 49 public: 50 SVNLockFrameRangeDialog(QWidget *parent, const QString &workingDir, 51 const QString &file, int frameCount); 52 53 private: 54 void switchToCloseButton(); 55 56 protected slots: 57 void onError(const QString &); 58 void onPropGetDone(const QString &); 59 void onPropSetDone(); 60 61 void onLockButtonClicked(); 62 void onCancelButtonClicked(); 63 64 void onLockDone(); 65 66 void finish(); 67 68 void onFromLineEditTextChanged(); 69 void onToLineEditTextChanged(); 70 71 signals: 72 void done(const QStringList &); 73 }; 74 75 //----------------------------------------------------------------------------- 76 77 class SVNLockMultiFrameRangeDialog final : public DVGui::Dialog { 78 Q_OBJECT 79 80 QLabel *m_waitingLabel; 81 QLabel *m_textLabel; 82 83 QLabel *m_commentLabel; 84 QPlainTextEdit *m_commentTextEdit; 85 86 QLabel *m_fromLabel; 87 QLabel *m_toLabel; 88 DVGui::IntLineEdit *m_fromLineEdit; 89 DVGui::IntLineEdit *m_toLineEdit; 90 91 QPushButton *m_lockButton; 92 QPushButton *m_cancelButton; 93 94 QString m_workingDir; 95 QStringList m_files; 96 QStringList m_filesToLock; 97 98 VersionControlThread m_thread; 99 100 bool m_hasError; 101 102 bool m_fromIsValid; 103 bool m_toIsValid; 104 105 QList<SVNStatus> m_status; 106 QList<SVNPartialLockInfo> m_lockInfos; 107 108 public: 109 SVNLockMultiFrameRangeDialog(QWidget *parent, const QString &workingDir, 110 const QStringList &files); 111 112 private: 113 void switchToCloseButton(); 114 115 protected slots: 116 void onError(const QString &); 117 118 void onLockButtonClicked(); 119 120 void onStatusRetrieved(const QString &); 121 122 void onFromLineEditTextChanged(); 123 void onToLineEditTextChanged(); 124 125 void onLockDone(); 126 127 signals: 128 void done(const QStringList &); 129 }; 130 131 //----------------------------------------------------------------------------- 132 133 class SVNUnlockFrameRangeDialog final : public DVGui::Dialog { 134 Q_OBJECT 135 136 QLabel *m_waitingLabel; 137 QLabel *m_textLabel; 138 139 QPushButton *m_unlockButton; 140 QPushButton *m_cancelButton; 141 142 QString m_workingDir; 143 QString m_file; 144 145 QString m_propertyValue; 146 147 VersionControlThread m_thread; 148 149 bool m_hasError; 150 151 QList<SVNPartialLockInfo> m_lockInfos; 152 SVNPartialLockInfo m_myInfo; 153 154 public: 155 SVNUnlockFrameRangeDialog(QWidget *parent, const QString &workingDir, 156 const QString &file); 157 158 private: 159 void switchToCloseButton(); 160 161 protected slots: 162 void onError(const QString &); 163 void onPropGetDone(const QString &); 164 void onPropSetDone(); 165 166 void onUnlockButtonClicked(); 167 168 void onCommitDone(); 169 void onUpdateDone(); 170 void onLockDone(); 171 172 signals: 173 void done(const QStringList &); 174 }; 175 176 //----------------------------------------------------------------------------- 177 178 class SVNUnlockMultiFrameRangeDialog final : public DVGui::Dialog { 179 Q_OBJECT 180 181 QLabel *m_waitingLabel; 182 QLabel *m_textLabel; 183 184 QPushButton *m_unlockButton; 185 QPushButton *m_cancelButton; 186 187 QString m_workingDir; 188 QStringList m_files; 189 190 VersionControlThread m_thread; 191 192 bool m_hasError; 193 194 QList<SVNStatus> m_status; 195 QStringList m_filesToUnlock; 196 197 public: 198 SVNUnlockMultiFrameRangeDialog(QWidget *parent, const QString &workingDir, 199 const QStringList &files); 200 201 private: 202 void switchToCloseButton(); 203 204 protected slots: 205 void onError(const QString &); 206 207 void onStatusRetrieved(const QString &); 208 209 void onUnlockButtonClicked(); 210 211 void onUnlockDone(); 212 213 signals: 214 void done(const QStringList &); 215 }; 216 217 //----------------------------------------------------------------------------- 218 219 class SVNFrameRangeLockInfoDialog final : public DVGui::Dialog { 220 Q_OBJECT 221 222 QString m_workingDir; 223 QString m_file; 224 225 QLabel *m_waitingLabel; 226 QLabel *m_textLabel; 227 228 VersionControlThread m_thread; 229 230 public: 231 SVNFrameRangeLockInfoDialog(QWidget *parent, const QString &workingDir, 232 const QString &file); 233 234 protected slots: 235 void onError(const QString &); 236 void onPropGetDone(const QString &); 237 }; 238 239 //----------------------------------------------------------------------------- 240 241 class SVNMultiFrameRangeLockInfoDialog final : public DVGui::Dialog { 242 Q_OBJECT 243 244 QString m_workingDir; 245 QStringList m_files; 246 247 QLabel *m_waitingLabel; 248 QLabel *m_textLabel; 249 250 VersionControlThread m_thread; 251 252 public: 253 SVNMultiFrameRangeLockInfoDialog(QWidget *parent, const QString &workingDir, 254 const QStringList &files); 255 256 protected slots: 257 void onError(const QString &); 258 void onStatusRetrieved(const QString &); 259 }; 260 261 #endif // SVN_LOCK_FRAME_RANGE_DIALOG_H 262