28 #ifndef FUNCCANCELLATIONANDOBSERVER_H
29 #define FUNCCANCELLATIONANDOBSERVER_H
31 #include "commonGlobal.h"
32 #include <qscopedpointer.h>
37 #if !defined(Q_MOC_RUN) || defined(ITOMCOMMONQT_MOC) //only moc this file in itomCommonQtLib but not in other libraries or executables linking against this itomCommonQtLib
42 class FunctionCancellationAndObserverPrivate;
61 enum CancellationReason
64 ReasonKeyboardInterrupt = 2
85 bool isCancelled()
const;
88 CancellationReason cancellationReason();
91 int progressMinimum()
const;
94 int progressMaximum()
const;
103 void setProgressValue(
int value);
106 int progressValue()
const;
115 void setProgressText(
const QString &text);
118 QString progressText();
121 void progressTextChanged(QString text);
122 void progressValueChanged(
int value);
123 void cancellationRequested();
138 void requestCancellation(CancellationReason reason = CancellationReason::ReasonGeneral);
149 QScopedPointer<FunctionCancellationAndObserverPrivate> d_ptr;
155 #endif //#if !defined(Q_MOC_RUN) || defined(ITOMCOMMONQT_MOC)
Definition: apiFunctionsGraph.cpp:39
This class can be passed to a long running method (e.g. as QSharedPointer instance) for two reasons: ...
Definition: functionCancellationAndObserver.h:56