Mercurial > hg > easyhg
diff filestatuswidget.cpp @ 106:729438d70af8
* Retrieve and store current branch and heads; some refactoring
author | Chris Cannam |
---|---|
date | Thu, 25 Nov 2010 17:54:35 +0000 |
parents | 0bd32aedc6f6 |
children | 1721c580c10e |
line wrap: on
line diff
--- a/filestatuswidget.cpp Thu Nov 25 17:21:32 2010 +0000 +++ b/filestatuswidget.cpp Thu Nov 25 17:54:35 2010 +0000 @@ -47,8 +47,15 @@ m_remoteURLLabel = new QLabel; layout->addWidget(m_remoteURLLabel, row, 1); + ++row; + layout->addWidget(new QLabel(tr("Branch:")), row, 0); + m_branchLabel = new QLabel; + layout->addWidget(m_branchLabel, row, 1); + layout->setColumnStretch(1, 20); + layout->addWidget(new QLabel("<qt><hr></qt>"), ++row, 0, 1, 2); + m_simpleLabels[FileStates::Clean] = tr("Unmodified:"); m_simpleLabels[FileStates::Modified] = tr("Modified:"); m_simpleLabels[FileStates::Added] = tr("Added:"); @@ -79,7 +86,7 @@ boxlayout->setMargin(0); box->setLayout(boxlayout); - boxlayout->addItem(new QSpacerItem(5, 8), 0, 0); + boxlayout->addItem(new QSpacerItem(5, 5), 0, 0); boxlayout->addWidget(new QLabel(labelFor(s)), 1, 0); @@ -268,6 +275,13 @@ } void +FileStatusWidget::setBranch(QString b) +{ + m_branch = b; + m_branchLabel->setText(b); +} + +void FileStatusWidget::updateWidgets() { QDateTime lastInteractionTime;