feat(ui): add currentFileLabel

This commit is contained in:
uncor3
2026-04-04 10:54:12 +00:00
parent 6c01ac735a
commit 5a84831e1d
2 changed files with 15 additions and 2 deletions
+14 -2
View File
@@ -44,6 +44,7 @@ BalloonProcess::BalloonProcess(std::shared_ptr<ProcessItem> item,
// Title
m_titleLabel = new QLabel(m_item->title);
QFont titleFont = m_titleLabel->font();
m_titleLabel->setWordWrap(true);
titleFont.setBold(true);
m_titleLabel->setFont(titleFont);
@@ -89,10 +90,18 @@ BalloonProcess::BalloonProcess(std::shared_ptr<ProcessItem> item,
m_progressBar->setFixedHeight(12);
layout->addWidget(m_progressBar);
// Current file
m_currentFileLabel = new QLabel();
m_currentFileLabel->setWordWrap(true);
QFont currentFileFont = m_currentFileLabel->font();
currentFileFont.setPointSize(currentFileFont.pointSize() - 1);
m_currentFileLabel->setFont(currentFileFont);
layout->addWidget(m_currentFileLabel);
// Stats
m_statsLabel = new QLabel();
QFont statsFont = m_statsLabel->font();
statsFont.setPointSize(statsFont.pointSize() - 1);
statsFont.setPointSize(statsFont.pointSize() - 2);
m_statsLabel->setFont(statsFont);
layout->addWidget(m_statsLabel);
@@ -146,6 +155,7 @@ void BalloonProcess::onCancelClicked()
{
m_cancelButton->setEnabled(false);
m_cancelButton->setText("Cancelling...");
// FIXME
// ExportManager::sharedInstance()->cancel(m_item->jobId);
}
@@ -169,6 +179,8 @@ void BalloonProcess::updateUI()
m_progressBar->setValue(progress);
}
m_currentFileLabel->setText(m_item->currentFile);
QString statsText = QString("%1 of %2 items")
.arg(m_item->completedItems)
.arg(m_item->totalItems);
@@ -452,7 +464,7 @@ QUuid StatusBalloon::startProcess(const QString &title, int totalItems,
handleShow(true);
auto item = std::make_shared<ProcessItem>();
item->processId = QUuid::createUuid();
item->processId = jobId;
item->type = type;
item->status = ProcessStatus::Running;
item->title = title;
+1
View File
@@ -66,6 +66,7 @@ private:
QLabel *m_titleLabel;
QLabel *m_statusLabel;
QLabel *m_statsLabel;
QLabel *m_currentFileLabel;
QProgressBar *m_progressBar;
QPushButton *m_actionButton;
QPushButton *m_cancelButton;