diff filestatuswidget.h @ 94:44ed7766d55a

* Clear selections when Esc pressed; some refactoring
author Chris Cannam
date Wed, 24 Nov 2010 14:41:52 +0000
parents dfb7a274b90f
children d1be9712818a
line wrap: on
line diff
--- a/filestatuswidget.h	Wed Nov 24 13:50:33 2010 +0000
+++ b/filestatuswidget.h	Wed Nov 24 14:41:52 2010 +0000
@@ -44,11 +44,18 @@
     void setFileStates(FileStates sp);
 
     bool haveChangesToCommit() const {
-        return !m_fileStates.added.empty() ||
-               !m_fileStates.removed.empty() ||
-               !m_fileStates.modified.empty();
+        return !m_fileStates.added().empty() ||
+               !m_fileStates.removed().empty() ||
+               !m_fileStates.modified().empty();
     }
 
+    QStringList getSelectedCommittableFiles();
+    QStringList getSelectedAddableFiles();
+    QStringList getSelectedRemoveableFiles();
+
+public slots:
+    void clearSelections();
+
 private:
     QString m_localPath;
     QLabel *m_localPathLabel;
@@ -57,12 +64,7 @@
     QLabel *m_remoteURLLabel;
     
     FileStates m_fileStates;
-
-    QListWidget *m_modifiedList;
-    QListWidget *m_addedList;
-    QListWidget *m_unknownList;
-    QListWidget *m_removedList;
-    QListWidget *m_missingList;
+    QMap<FileStates::State, QListWidget *> m_stateListMap;
 
     QFileInfo *m_dateReference;