first commit
This commit is contained in:
54
project/fm_viewer/ui/rm_dialog_progress.h
Normal file
54
project/fm_viewer/ui/rm_dialog_progress.h
Normal file
@@ -0,0 +1,54 @@
|
||||
#ifndef RM_PROGRESS_DIALOG_H
|
||||
#define RM_PROGRESS_DIALOG_H
|
||||
|
||||
#include <QDialog>
|
||||
#include <QVBoxLayout>
|
||||
#include <QProgressBar>
|
||||
#include <QDebug>
|
||||
#include <QMutexLocker>
|
||||
|
||||
class TitleWidget;
|
||||
class RMDialogProgress : public QDialog
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
static void start(QString title,bool bCancel = false,bool bFileList = false);
|
||||
static void stop();
|
||||
|
||||
static void pause() {
|
||||
if(RMDialogProgress::_progress != NULL) {
|
||||
//qInfo() << "pause";
|
||||
RMDialogProgress::_progress->setHidden(true);
|
||||
}
|
||||
}
|
||||
static void resume() {
|
||||
if(RMDialogProgress::_progress != NULL) {
|
||||
//qInfo() << "resume";
|
||||
RMDialogProgress::_progress->setHidden(false);
|
||||
}
|
||||
}
|
||||
|
||||
private:
|
||||
explicit RMDialogProgress(QWidget *parent = nullptr,QString title = "",bool bCancel = false, bool bFileList = false);
|
||||
static RMDialogProgress* _progress;
|
||||
|
||||
static QMutexLocker* lock;
|
||||
static QMutex mutex;
|
||||
bool _bFileList; // 파일리스트 로딩 모드
|
||||
|
||||
protected:
|
||||
TitleWidget* _title;
|
||||
QVBoxLayout* _layout;
|
||||
QProgressBar* _progressBar;
|
||||
|
||||
signals:
|
||||
//void cancelProcess();
|
||||
|
||||
public slots:
|
||||
void onUpdateValue(int value);
|
||||
void onCancel();
|
||||
|
||||
};
|
||||
|
||||
|
||||
#endif // RM_PROGRESS_DIALOG_H
|
||||
Reference in New Issue
Block a user