-
-
Notifications
You must be signed in to change notification settings - Fork 127
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Integrate ProgressWidget with status bar in MainWindow.
- Loading branch information
Showing
8 changed files
with
205 additions
and
173 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
#include "ProgressWidget.h" | ||
#include "ui_ProgressWidget.h" | ||
|
||
ProgressWidget::ProgressWidget(QWidget *parent) | ||
: QWidget(parent) | ||
, ui(new Ui::ProgressWidget) | ||
{ | ||
ui->setupUi(this); | ||
} | ||
|
||
ProgressWidget::~ProgressWidget() | ||
{ | ||
delete ui; | ||
} | ||
|
||
void ProgressWidget::setProgress(float progress) | ||
{ | ||
ui->label_bar->setProgress(progress); | ||
} | ||
|
||
void ProgressWidget::setText(const QString &text) | ||
{ | ||
ui->label_text->setText(text); | ||
} | ||
|
||
void ProgressWidget::clear() | ||
{ | ||
setText({}); | ||
setProgress(0.0f); | ||
setVisible(false); | ||
} |
Oops, something went wrong.