8 #include <pybind11/pybind11.h>
13 using namespace pybind11::literals;
17 py::class_<cloudViewer::GenericProgressCallback>(cccorelib,
"GenericProgressCallback")
26 py::class_<cloudViewer::NormalizedProgress>(cccorelib,
"NormalizedProgress")
27 .def(py::init<cloudViewer::GenericProgressCallback *, unsigned, unsigned>(),
30 "totalPercentage"_a = 100)
34 "totalPercentage"_a = 100,
35 "updateCurrentProgress"_a =
false)
void define_GenericProgressCallback(py::module &cccorelib)
virtual void stop()=0
Notifies the fact that the process has ended.
virtual void setInfo(const char *infoStr)=0
Notifies some information about the ongoing process.
virtual void setMethodTitle(const char *methodTitle)=0
Notifies the algorithm title.
virtual bool textCanBeEdited() const
Returns whether the dialog title and info can be updated or not.
virtual void update(float percent)=0
Notifies the algorithm progress.
virtual bool isCancelRequested()=0
Checks if the process should be canceled.
bool steps(unsigned n)
Increments total progress value of more than a single unit.
void reset()
Resets progress state.
bool oneStep()
Increments total progress value of a single unit.
void scale(unsigned totalSteps, unsigned totalPercentage=100, bool updateCurrentProgress=false)