summaryrefslogtreecommitdiff
path: root/src/ProgressWidget.h
blob: f610279d9a2a52100dca2b5af94d212c7728ec61 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
#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
contact: Jan Huwald // Impressum