2023-08-04 14:10:47 +02:00
|
|
|
#ifndef PROGRESS_EVENT_H_INCLUDED
|
|
|
|
#define PROGRESS_EVENT_H_INCLUDED
|
|
|
|
|
|
|
|
#include <QEvent>
|
|
|
|
|
|
|
|
class ProgressEvent : public QEvent {
|
|
|
|
|
2023-08-06 20:44:26 +02:00
|
|
|
QObject const *m_sender;
|
2023-08-04 14:10:47 +02:00
|
|
|
int m_progressPercent;
|
|
|
|
public:
|
2023-08-06 20:44:26 +02:00
|
|
|
explicit ProgressEvent(QObject const *sender, int progressPercent);
|
2023-08-04 14:10:47 +02:00
|
|
|
virtual ~ProgressEvent();
|
|
|
|
static QEvent::Type type();
|
|
|
|
|
2023-08-06 20:44:26 +02:00
|
|
|
QObject const *sender() { return m_sender; }
|
|
|
|
QObject const *sender() const { return m_sender; }
|
|
|
|
|
2023-08-04 14:10:47 +02:00
|
|
|
void setProgress(int progressPercent) { m_progressPercent = progressPercent; }
|
|
|
|
int progressPercent() { return m_progressPercent; }
|
|
|
|
int progressPercent() const { return m_progressPercent; }
|
|
|
|
private:
|
|
|
|
static QEvent::Type customEventType;
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
#endif // PROGRESS_EVENT_H_INCLUDED
|