Mercurial > hg > easyhg
comparison hgtabwidget.cpp @ 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 | f7cdd5b31aed d40294e164da |
children | 4811eb34e819 |
comparison
equal
deleted
inserted
replaced
278:f7cdd5b31aed | 307:5b4aa1c24407 |
---|---|
25 #include <QApplication> | 25 #include <QApplication> |
26 | 26 |
27 #include <iostream> | 27 #include <iostream> |
28 | 28 |
29 HgTabWidget::HgTabWidget(QWidget *parent, | 29 HgTabWidget::HgTabWidget(QWidget *parent, |
30 QString remoteRepo, | |
31 QString workFolderPath) : | 30 QString workFolderPath) : |
32 QTabWidget(parent) | 31 QTabWidget(parent) |
33 { | 32 { |
34 // Work page | 33 // Work page |
35 m_fileStatusWidget = new FileStatusWidget; | 34 m_fileStatusWidget = new FileStatusWidget; |
36 m_fileStatusWidget->setLocalPath(workFolderPath); | 35 m_fileStatusWidget->setLocalPath(workFolderPath); |
37 m_fileStatusWidget->setRemoteURL(remoteRepo); | |
38 connect(m_fileStatusWidget, SIGNAL(selectionChanged()), | 36 connect(m_fileStatusWidget, SIGNAL(selectionChanged()), |
39 this, SIGNAL(selectionChanged())); | 37 this, SIGNAL(selectionChanged())); |
40 connect(m_fileStatusWidget, SIGNAL(showAllChanged(bool)), | 38 connect(m_fileStatusWidget, SIGNAL(showAllChanged(bool)), |
41 this, SIGNAL(showAllChanged(bool))); | 39 this, SIGNAL(showAllChanged(bool))); |
42 addTab(m_fileStatusWidget, tr("My work")); | 40 addTab(m_fileStatusWidget, tr("My work")); |
67 this, SIGNAL(diffToCurrent(QString))); | 65 this, SIGNAL(diffToCurrent(QString))); |
68 | 66 |
69 connect(m_historyWidget, SIGNAL(diffToParent(QString, QString)), | 67 connect(m_historyWidget, SIGNAL(diffToParent(QString, QString)), |
70 this, SIGNAL(diffToParent(QString, QString))); | 68 this, SIGNAL(diffToParent(QString, QString))); |
71 | 69 |
70 connect(m_historyWidget, SIGNAL(showSummary(Changeset *)), | |
71 this, SIGNAL(showSummary(Changeset *))); | |
72 | |
72 connect(m_historyWidget, SIGNAL(mergeFrom(QString)), | 73 connect(m_historyWidget, SIGNAL(mergeFrom(QString)), |
73 this, SIGNAL(mergeFrom(QString))); | 74 this, SIGNAL(mergeFrom(QString))); |
74 | 75 |
75 connect(m_historyWidget, SIGNAL(newBranch(QString)), | 76 connect(m_historyWidget, SIGNAL(newBranch(QString)), |
76 this, SIGNAL(newBranch(QString))); | 77 this, SIGNAL(newBranch(QString))); |
241 if (m_historyWidget->haveNewItems()) { | 242 if (m_historyWidget->haveNewItems()) { |
242 showHistoryTab(); | 243 showHistoryTab(); |
243 } | 244 } |
244 } | 245 } |
245 | 246 |
246 void HgTabWidget::setWorkFolderAndRepoNames(QString workFolderPath, QString remoteRepoPath) | 247 void HgTabWidget::setLocalPath(QString workFolderPath) |
247 { | 248 { |
248 m_fileStatusWidget->setLocalPath(workFolderPath); | 249 m_fileStatusWidget->setLocalPath(workFolderPath); |
249 m_fileStatusWidget->setRemoteURL(remoteRepoPath); | |
250 } | |
251 | |
252 void HgTabWidget::setState(QString state) | |
253 { | |
254 m_fileStatusWidget->setState(state); | |
255 } | 250 } |
256 | 251 |
257 void HgTabWidget::showWorkTab() | 252 void HgTabWidget::showWorkTab() |
258 { | 253 { |
259 setCurrentWidget(m_fileStatusWidget); | 254 setCurrentWidget(m_fileStatusWidget); |