Mercurial > hg > easyhg
comparison 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 |
comparison
equal
deleted
inserted
replaced
93:dfb7a274b90f | 94:44ed7766d55a |
---|---|
42 | 42 |
43 FileStates fileStates() const { return m_fileStates; } | 43 FileStates fileStates() const { return m_fileStates; } |
44 void setFileStates(FileStates sp); | 44 void setFileStates(FileStates sp); |
45 | 45 |
46 bool haveChangesToCommit() const { | 46 bool haveChangesToCommit() const { |
47 return !m_fileStates.added.empty() || | 47 return !m_fileStates.added().empty() || |
48 !m_fileStates.removed.empty() || | 48 !m_fileStates.removed().empty() || |
49 !m_fileStates.modified.empty(); | 49 !m_fileStates.modified().empty(); |
50 } | 50 } |
51 | |
52 QStringList getSelectedCommittableFiles(); | |
53 QStringList getSelectedAddableFiles(); | |
54 QStringList getSelectedRemoveableFiles(); | |
55 | |
56 public slots: | |
57 void clearSelections(); | |
51 | 58 |
52 private: | 59 private: |
53 QString m_localPath; | 60 QString m_localPath; |
54 QLabel *m_localPathLabel; | 61 QLabel *m_localPathLabel; |
55 | 62 |
56 QString m_remoteURL; | 63 QString m_remoteURL; |
57 QLabel *m_remoteURLLabel; | 64 QLabel *m_remoteURLLabel; |
58 | 65 |
59 FileStates m_fileStates; | 66 FileStates m_fileStates; |
60 | 67 QMap<FileStates::State, QListWidget *> m_stateListMap; |
61 QListWidget *m_modifiedList; | |
62 QListWidget *m_addedList; | |
63 QListWidget *m_unknownList; | |
64 QListWidget *m_removedList; | |
65 QListWidget *m_missingList; | |
66 | 68 |
67 QFileInfo *m_dateReference; | 69 QFileInfo *m_dateReference; |
68 | 70 |
69 void updateWidgets(); | 71 void updateWidgets(); |
70 void highlightFile(QListWidget *, int); | 72 void highlightFile(QListWidget *, int); |