summaryrefslogtreecommitdiffstats
path: root/src/countdowndialog.h
blob: c50b5115db9b37e101ceaa4f710a91b09bd2247a (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
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
/***************************************************************************
 *   Copyright (C) 2007 by Danny Kukawka                                   *
 *                         <[email protected]>, <[email protected]>      *
 *                                                                         *
 *   This program is free software; you can redistribute it and/or modify  *
 *   it under the terms of version 2 of the GNU General Public License     *
 *   as published by the Free Software Foundation.                         *
 *                                                                         *
 *   This program is distributed in the hope that it will be useful,       *
 *   but WITHOUT ANY WARRANTY; without even the implied warranty of        *
 *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the         *
 *   GNU General Public License for more details.                          *
 *                                                                         *
 *   You should have received a copy of the GNU General Public License     *
 *   along with this program; if not, write to the                         *
 *   Free Software Foundation, Inc.,                                       *
 *   51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.             *
 ***************************************************************************/

/*! 
*  \file 	countdowndialog.h
*  \brief 	Headerfile for countdowndialog.cpp and the class \ref countDownDialog.
*/
/*! 
*  \class 	countDownDialog
*  \brief 	class for countdown dialog related funtionality
*  \author 	Danny Kukawka, <[email protected]>, <[email protected]>
*  \date    	2007
*/

#ifndef COUNTDOWNDIALOG_H
#define COUNTDOWNDIALOG_H

#include "countdown_Dialog.h"

class countDownDialog: public countdown_Dialog {

	Q_OBJECT
  

public:
	
	//! default constructor
	countDownDialog(int timeout, TQWidget *parent = 0, const char *name = 0);
	//! default destructor
	~countDownDialog();

	//! set needed icons
	void setPixmap( TQString );
	//! to set the message text for the user
	void setMessageText(TQString text);
	//! to show up the dialog
	bool showDialog();

private: 
	//! Timer for the timeout
	/*!
	* This timer is used to change the progressbar and to close the dialog if
	* the \ref timeOut is over.
	*/
	TQTimer *PROGRESS;

	//! time the dialog should be displayed
	int timeOut;
	//! remaining time to show the dialog
	int remaining;

private slots:

	//! to update the progressbar
	void updateProgress();
	//! to catch the event if the 'Cancel' button get pressed 
	void pB_cancel_pressed();
	//! to catch ESC presses
  void reject();
  
signals:
	//! emited if the dialog get closed
	void dialogClosed( bool result);

};

#endif