DianLi/LandslidePredict/QtGDALProcessBar.h
2023-03-13 16:17:55 +08:00

63 lines
935 B
C++

#pragma once
#include <QProgressBar>
#include "CProcessBase.h"
class QtGDALProcessBar : public QProgressBar,public CProcessBase
{
Q_OBJECT
public:
QtGDALProcessBar(QWidget *parent = Q_NULLPTR);
~QtGDALProcessBar();
/**
* @brief 设置进度信息
* @param pszMsg 进度信息
*/
void SetMessage(const char* pszMsg);
/**
* @brief 设置进度值
* @param dPosition 进度值
*/
bool SetPosition(double dPosition);
/// <summary>
/// 设置进度条开始结束值
/// </summary>
/// <param name="i_start_value"></param>
/// <returns></returns>
bool SetStartEndValue(int i_start_value,int i_end_value);
/**
* @brief 进度条前进一步
*/
bool StepIt();
/// <summary>
/// 当前进度值
/// </summary>
int current_value;
public slots:
void updateProgress(int);
private:
/// <summary>
/// 进度条开始值
/// </summary>
int m_start_value;
/// <summary>
/// 进度条结束值
/// </summary>
int m_end_value;
float m_scale;
};