openscad/src/ProgressWidget.h

32 lines
544 B
C++

#ifndef PROGRESSWIDGET_H_
#define PROGRESSWIDGET_H_
#include "ui_ProgressWidget.h"
#include <QTime>
class ProgressWidget : public QWidget, public Ui::ProgressWidget
{
Q_OBJECT;
Q_PROPERTY(bool wasCanceled READ wasCanceled);
public:
ProgressWidget(QWidget *parent = NULL);
bool wasCanceled() const;
int elapsedTime() const;
public slots:
void setRange(int minimum, int maximum);
void setValue(int progress);
int value() const;
void cancel();
signals:
void requestShow();
private:
bool wascanceled;
QTime starttime;
};
#endif