comparison filestatuswidget.h @ 326:6e1fdda1dff2 filelist_right_button_menu

Implement right-button menu functions for file lists; convert the toolbar-button functions (apart from Add and Remove) to modal only on working copy state rather than selection state
author Chris Cannam
date Fri, 11 Mar 2011 15:33:16 +0000
parents 5fa5c908ca00
children acfe9390d5c6
comparison
equal deleted inserted replaced
325:5fa5c908ca00 326:6e1fdda1dff2
44 void setFileStates(FileStates sp); 44 void setFileStates(FileStates sp);
45 45
46 bool haveChangesToCommit() const; 46 bool haveChangesToCommit() const;
47 bool haveSelection() const; 47 bool haveSelection() const;
48 48
49 QStringList getAllSelectedFiles() const;
50
51 QStringList getSelectedCommittableFiles() const;
52 QStringList getAllCommittableFiles() const; 49 QStringList getAllCommittableFiles() const;
53
54 QStringList getSelectedRevertableFiles() const;
55 QStringList getAllRevertableFiles() const; 50 QStringList getAllRevertableFiles() const;
51 QStringList getAllUnresolvedFiles() const;
56 52
57 QStringList getSelectedAddableFiles() const; 53 QStringList getSelectedAddableFiles() const;
58 QStringList getAllAddableFiles() const; 54 QStringList getSelectedRemovableFiles() const;
59 55
60 QStringList getSelectedRemovableFiles() const;
61 QStringList getAllRemovableFiles() const;
62
63 QStringList getSelectedUnresolvedFiles() const;
64 QStringList getAllUnresolvedFiles() const;
65
66 signals: 56 signals:
67 void selectionChanged(); 57 void selectionChanged();
68 void showAllChanged(bool); 58 void showAllChanged(bool);
59
60 void annotateFiles(QStringList);
61 void diffFiles(QStringList);
62 void commitFiles(QStringList);
63 void revertFiles(QStringList);
64 void addFiles(QStringList);
65 void removeFiles(QStringList);
66 void redoFileMerges(QStringList);
67 void markFilesResolved(QStringList);
68 void ignoreFiles(QStringList);
69 void unIgnoreFiles(QStringList);
69 70
70 public slots: 71 public slots:
71 void clearSelections(); 72 void clearSelections();
72 void updateWidgets(); 73 void updateWidgets();
73 74
74 private slots: 75 private slots:
76 void menuActionActivated();
75 void itemSelectionChanged(); 77 void itemSelectionChanged();
76 78
77 private: 79 private:
78 QString m_localPath; 80 QString m_localPath;
79 QLabel *m_noModificationsLabel; 81 QLabel *m_noModificationsLabel;
98 void layoutBoxesGridly(int count); 100 void layoutBoxesGridly(int count);
99 void layoutBoxesLinearly(); 101 void layoutBoxesLinearly();
100 void setNoModificationsLabelText(); 102 void setNoModificationsLabelText();
101 QString labelFor(FileStates::State, bool addHighlightExplanation = false); 103 QString labelFor(FileStates::State, bool addHighlightExplanation = false);
102 void setLabelFor(QWidget *w, FileStates::State, bool addHighlightExplanation); 104 void setLabelFor(QWidget *w, FileStates::State, bool addHighlightExplanation);
105
106 QStringList getSelectedFilesInState(FileStates::State s) const;
107 QStringList getSelectedFilesSupportingActivity(FileStates::Activity) const;
103 }; 108 };
104 109
105 #endif 110 #endif