files: renamed LoadSaveDialog to ProgressDialog

This commit is contained in:
itsmattkc
2020-02-17 02:05:11 +11:00
parent ceb70a1870
commit dcfa0a5c34
3 changed files with 12 additions and 11 deletions
@@ -16,7 +16,7 @@
set(OLIVE_SOURCES
${OLIVE_SOURCES}
dialog/loadsave/loadsave.h
dialog/loadsave/loadsave.cpp
dialog/progress/progress.h
dialog/progress/progress.cpp
PARENT_SCOPE
)
@@ -1,10 +1,10 @@
#include "loadsave.h"
#include "progress.h"
#include <QLabel>
#include <QPushButton>
#include <QVBoxLayout>
LoadSaveDialog::LoadSaveDialog(const QString& message, const QString& title, QWidget *parent) :
ProgressDialog::ProgressDialog(const QString& message, const QString& title, QWidget *parent) :
QDialog(parent)
{
if (!title.isEmpty()) {
@@ -28,13 +28,13 @@ LoadSaveDialog::LoadSaveDialog(const QString& message, const QString& title, QWi
cancel_layout->addStretch();
QPushButton* cancel_btn = new QPushButton(tr("Cancel"));
connect(cancel_btn, &QPushButton::clicked, this, &LoadSaveDialog::Cancelled);
connect(cancel_btn, &QPushButton::clicked, this, &ProgressDialog::Cancelled);
cancel_layout->addWidget(cancel_btn);
cancel_layout->addStretch();
}
void LoadSaveDialog::SetProgress(int value)
void ProgressDialog::SetProgress(int value)
{
bar_->setValue(value);
}
@@ -1,14 +1,14 @@
#ifndef LOADSAVEDIALOG_H
#define LOADSAVEDIALOG_H
#ifndef PROGRESSDIALOG_H
#define PROGRESSDIALOG_H
#include <QDialog>
#include <QProgressBar>
class LoadSaveDialog : public QDialog
class ProgressDialog : public QDialog
{
Q_OBJECT
public:
LoadSaveDialog(const QString &message, const QString &title, QWidget* parent = nullptr);
ProgressDialog(const QString &message, const QString &title, QWidget* parent = nullptr);
public slots:
void SetProgress(int value);
@@ -18,6 +18,7 @@ signals:
private:
QProgressBar* bar_;
};
#endif // LOADSAVEDIALOG_H
#endif // PROGRESSDIALOG_H