summaryrefslogblamecommitdiffstats
path: root/src/timeoutdialog.h
blob: eb853f3972327f901aeacbd170833707dabdc444 (plain) (tree)
1
2
3
4
5
6
7
8
9
10
11


                                          


                       




                                            
                
 

                                                     
                                                           
 


                               
 

                                                   
 




                      


                         
// Copyright 2013, University of Freiburg,
// Author: Manuel Schneider <ms1144>

#ifndef TIMEOUTDIALOG_H
#define TIMEOUTDIALOG_H

#include <QProgressDialog>
#include <QTimer>

class TimeOutDialog : public QProgressDialog
{
	Q_OBJECT

public:
	TimeOutDialog(int time, QWidget *parent = 0);
	bool isActive() const { return _timer.isActive(); }

private:
	int             _time;
	QTimer          _timer;

protected:
	void hideEvent(QHideEvent *event) override;

public slots:
	void cancel();

private slots:
	void update();
};

#endif // TIMEOUTDIALOG_H