mirror of
https://github.com/chris2511/xca.git
synced 2026-09-12 19:51:05 +05:00
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.
48 lines
808 B
C++
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
|