comparison filestatuswidget.h @ 307:5b4aa1c24407 new-branches-with-status-outside-tabs

Merge branch status_outside_tabs into branch new-branches, and make a new branch
author Chris Cannam
date Mon, 28 Feb 2011 13:09:37 +0000
parents 3fbafca196e4
children 5fa5c908ca00
comparison
equal deleted inserted replaced
278:f7cdd5b31aed 307:5b4aa1c24407
25 25
26 class QLabel; 26 class QLabel;
27 class QListWidget; 27 class QListWidget;
28 class QPushButton; 28 class QPushButton;
29 class QFileInfo; 29 class QFileInfo;
30 class ClickableLabel;
31 class QCheckBox; 30 class QCheckBox;
32 31
33 class FileStatusWidget : public QWidget 32 class FileStatusWidget : public QWidget
34 { 33 {
35 Q_OBJECT 34 Q_OBJECT
36 35
37 public: 36 public:
38 FileStatusWidget(QWidget *parent = 0); 37 FileStatusWidget(QWidget *parent = 0);
39 ~FileStatusWidget(); 38 ~FileStatusWidget();
40 39
41 QString localPath() const { return m_localPath; } 40 QString localPath() const;
42 void setLocalPath(QString p); 41 void setLocalPath(QString p);
43 42
44 QString remoteURL() const { return m_remoteURL; } 43 FileStates fileStates() const;
45 void setRemoteURL(QString u);
46
47 QString state() const { return m_state; }
48 void setState(QString b);
49
50 FileStates fileStates() const { return m_fileStates; }
51 void setFileStates(FileStates sp); 44 void setFileStates(FileStates sp);
52 45
53 bool haveChangesToCommit() const; 46 bool haveChangesToCommit() const;
54 bool haveSelection() const; 47 bool haveSelection() const;
55 48
78 void clearSelections(); 71 void clearSelections();
79 void updateWidgets(); 72 void updateWidgets();
80 73
81 private slots: 74 private slots:
82 void itemSelectionChanged(); 75 void itemSelectionChanged();
83 void openButtonClicked();
84 76
85 private: 77 private:
86 QString m_localPath; 78 QString m_localPath;
87 ClickableLabel *m_openButton;
88
89 QString m_remoteURL;
90 QLabel *m_remoteURLLabel;
91
92 QString m_state;
93 QLabel *m_stateLabel;
94
95 QLabel *m_noModificationsLabel; 79 QLabel *m_noModificationsLabel;
96 80
97 QCheckBox *m_showAllFiles; 81 QCheckBox *m_showAllFiles;
98 82
99 FileStates m_fileStates; 83 FileStates m_fileStates;
110 QList<QWidget *> m_boxes; 94 QList<QWidget *> m_boxes;
111 QWidget *m_boxesParent; 95 QWidget *m_boxesParent;
112 96
113 void layoutBoxesGridly(int count); 97 void layoutBoxesGridly(int count);
114 void layoutBoxesLinearly(); 98 void layoutBoxesLinearly();
115 void updateStateLabel();
116 void setNoModificationsLabelText(); 99 void setNoModificationsLabelText();
117 QString labelFor(FileStates::State, bool addHighlightExplanation = false); 100 QString labelFor(FileStates::State, bool addHighlightExplanation = false);
118 void setLabelFor(QWidget *w, FileStates::State, bool addHighlightExplanation); 101 void setLabelFor(QWidget *w, FileStates::State, bool addHighlightExplanation);
119 }; 102 };
120 103