You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

32 lines
759 B
C

#pragma once
#include "qobject.h"
#include "qstring.h"
class ProgressView:public QObject
{
Q_OBJECT
public:
ProgressView(QWidget* parent);
ProgressView(QString strTitle, QString strLabel, int nMax, QString strIcon);
~ProgressView();
bool show(QString strTitle, QString strLabel, int nMax, QString strIcon);
bool setValue(int nValue);
bool finish();
bool setTitle(QString strTitle);
void setLabel(QString strText);
void setRange(int nMax, int nMin = 0);
void setUseCancel(bool m_cancel){ nCancel = m_cancel; };
void hide();
signals:
void cancel();
private:
class QProgressDialog *m_pProgressDialog{nullptr};
bool nCancel;
};
class FileOper {
public:
static QStringList selectFiles(QString strTitle, QString strFilter, QString strDir);
};