mirror of
				https://github.com/ciphervance/supercell-wx.git
				synced 2025-10-31 02:20:04 +00:00 
			
		
		
		
	Add generic progress dialog, and derived download dialog
This commit is contained in:
		
							parent
							
								
									4ac2626b65
								
							
						
					
					
						commit
						2f397106f9
					
				
					 6 changed files with 374 additions and 0 deletions
				
			
		
							
								
								
									
										66
									
								
								scwx-qt/source/scwx/qt/ui/progress_dialog.cpp
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										66
									
								
								scwx-qt/source/scwx/qt/ui/progress_dialog.cpp
									
										
									
									
									
										Normal file
									
								
							|  | @ -0,0 +1,66 @@ | |||
| #include "progress_dialog.hpp" | ||||
| #include "ui_progress_dialog.h" | ||||
| 
 | ||||
| namespace scwx | ||||
| { | ||||
| namespace qt | ||||
| { | ||||
| namespace ui | ||||
| { | ||||
| 
 | ||||
| class ProgressDialog::Impl | ||||
| { | ||||
| public: | ||||
|    explicit Impl() = default; | ||||
|    ~Impl()         = default; | ||||
| }; | ||||
| 
 | ||||
| ProgressDialog::ProgressDialog(QWidget* parent) : | ||||
|     QDialog(parent), p {std::make_unique<Impl>()}, ui(new Ui::ProgressDialog) | ||||
| { | ||||
|    ui->setupUi(this); | ||||
| } | ||||
| 
 | ||||
| ProgressDialog::~ProgressDialog() | ||||
| { | ||||
|    delete ui; | ||||
| } | ||||
| 
 | ||||
| QDialogButtonBox* ProgressDialog::button_box() const | ||||
| { | ||||
|    return ui->buttonBox; | ||||
| } | ||||
| 
 | ||||
| void ProgressDialog::SetTopLabelText(const QString& text) | ||||
| { | ||||
|    ui->topLabel->setText(text); | ||||
| } | ||||
| 
 | ||||
| void ProgressDialog::SetBottomLabelText(const QString& text) | ||||
| { | ||||
|    ui->bottomLabel->setText(text); | ||||
| } | ||||
| 
 | ||||
| void ProgressDialog::SetMinimum(int minimum) | ||||
| { | ||||
|    ui->progressBar->setMinimum(minimum); | ||||
| } | ||||
| 
 | ||||
| void ProgressDialog::SetMaximum(int maximum) | ||||
| { | ||||
|    ui->progressBar->setMaximum(maximum); | ||||
| } | ||||
| 
 | ||||
| void ProgressDialog::SetRange(int minimum, int maximum) | ||||
| { | ||||
|    ui->progressBar->setRange(minimum, maximum); | ||||
| } | ||||
| 
 | ||||
| void ProgressDialog::SetValue(int value) | ||||
| { | ||||
|    ui->progressBar->setValue(value); | ||||
| } | ||||
| 
 | ||||
| } // namespace ui
 | ||||
| } // namespace qt
 | ||||
| } // namespace scwx
 | ||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 Dan Paulat
						Dan Paulat