mirror of
https://github.com/JakubMelka/PDF4QT.git
synced 2025-06-05 21:59:17 +02:00
Asynchronous calculation of document text layout
This commit is contained in:
@ -27,19 +27,25 @@
|
||||
namespace pdf
|
||||
{
|
||||
|
||||
struct ProgressStartupInfo
|
||||
{
|
||||
bool showDialog = false;
|
||||
QString text;
|
||||
};
|
||||
|
||||
class PDFFORQTLIBSHARED_EXPORT PDFProgress : public QObject
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
explicit PDFProgress(QObject* parent) : QObject(parent) { }
|
||||
explicit PDFProgress(QObject* parent);
|
||||
|
||||
void start(size_t stepCount);
|
||||
void start(size_t stepCount, ProgressStartupInfo startupInfo);
|
||||
void step();
|
||||
void finish();
|
||||
|
||||
signals:
|
||||
void progressStarted();
|
||||
void progressStarted(ProgressStartupInfo info);
|
||||
void progressStep(int percentage);
|
||||
void progressFinished();
|
||||
|
||||
@ -49,6 +55,8 @@ private:
|
||||
std::atomic<int> m_percentage = 0;
|
||||
};
|
||||
|
||||
Q_DECLARE_METATYPE(ProgressStartupInfo)
|
||||
|
||||
} // namespace pdf
|
||||
|
||||
#endif // PDFPROGRESS_H
|
||||
|
Reference in New Issue
Block a user