comparison filestatuswidget.cpp @ 103:0bd32aedc6f6

* Start to use the confirm-comment dialog for commits; much work still needed
author Chris Cannam
date Wed, 24 Nov 2010 22:44:40 +0000
parents f70ccc15c9d0
children 729438d70af8
comparison
equal deleted inserted replaced
102:f70ccc15c9d0 103:0bd32aedc6f6
173 } 173 }
174 } 174 }
175 return files; 175 return files;
176 } 176 }
177 177
178 QStringList FileStatusWidget::getAllCommittableFiles() const
179 {
180 QStringList files;
181 files << m_fileStates.getFilesInState(FileStates::Modified);
182 files << m_fileStates.getFilesInState(FileStates::Added);
183 files << m_fileStates.getFilesInState(FileStates::Removed);
184 return files;
185 }
186
178 QStringList FileStatusWidget::getSelectedAddableFiles() const 187 QStringList FileStatusWidget::getSelectedAddableFiles() const
179 { 188 {
180 QStringList files; 189 QStringList files;
181 foreach (QString f, m_selectedFiles) { 190 foreach (QString f, m_selectedFiles) {
182 switch (m_fileStates.getStateOfFile(f)) { 191 switch (m_fileStates.getStateOfFile(f)) {
185 files.push_back(f); 194 files.push_back(f);
186 break; 195 break;
187 default: break; 196 default: break;
188 } 197 }
189 } 198 }
199 return files;
200 }
201
202 QStringList FileStatusWidget::getAllAddableFiles() const
203 {
204 QStringList files;
205 files << m_fileStates.getFilesInState(FileStates::Removed);
206 files << m_fileStates.getFilesInState(FileStates::Unknown);
190 return files; 207 return files;
191 } 208 }
192 209
193 QStringList FileStatusWidget::getSelectedRemovableFiles() const 210 QStringList FileStatusWidget::getSelectedRemovableFiles() const
194 { 211 {
202 files.push_back(f); 219 files.push_back(f);
203 break; 220 break;
204 default: break; 221 default: break;
205 } 222 }
206 } 223 }
224 return files;
225 }
226
227 QStringList FileStatusWidget::getAllRemovableFiles() const
228 {
229 QStringList files;
230 files << m_fileStates.getFilesInState(FileStates::Clean);
231 files << m_fileStates.getFilesInState(FileStates::Added);
232 files << m_fileStates.getFilesInState(FileStates::Modified);
233 files << m_fileStates.getFilesInState(FileStates::Missing);
207 return files; 234 return files;
208 } 235 }
209 236
210 void 237 void
211 FileStatusWidget::setLocalPath(QString p) 238 FileStatusWidget::setLocalPath(QString p)