xca/lib/XcaProgress.h
Christian Hohnstaedt 993da2d474 Use C++11 initializers for all non-static class members
When XCA started in 2002, there were no C++ initializers.
Drop explicit initializers from the constructors.

 - Fix indentations of section declarators.
 - Replace NULL by nullptr when feasible.
 - Sort private section: properties first, then methods.
2023-10-08 22:19:18 +02:00

48 lines
808 B
C++

/* vi: set sw=4 ts=4:
*
* Copyright (C) 2018 - 2020 Christian Hohnstaedt.
*
* All rights reserved.
*/
#ifndef __XCAPROGRESS_H
#define __XCAPROGRESS_H
#include <QString>
class XcaProgress_i
{
public:
XcaProgress_i() = default;
virtual void start(const QString &what, int max) = 0;
virtual void stop() = 0;
virtual void increment() = 0;
virtual ~XcaProgress_i() = default;
};
class XcaProgressCmd : public XcaProgress_i
{
private:
int i{};
public:
void start(const QString &what, int max);
void stop();
void increment();
};
class XcaProgress
{
private:
static XcaProgress_i *progress;
public:
XcaProgress(const QString &what = QString(), int max = 100);
~XcaProgress();
void increment();
static void inc(int, int, void *p);
static void setGui(XcaProgress_i *p);
};
#endif