1 /* dvbcut 2 Copyright (c) 2005 Sven Over <svenover@svenover.de> 3 4 This program is free software; you can redistribute it and/or modify 5 it under the terms of the GNU General Public License as published by 6 the Free Software Foundation; either version 2 of the License, or 7 (at your option) any later version. 8 9 This program is distributed in the hope that it will be useful, 10 but WITHOUT ANY WARRANTY; without even the implied warranty of 11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 GNU General Public License for more details. 13 14 You should have received a copy of the GNU General Public License 15 along with this program; if not, write to the Free Software 16 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 17 */ 18 19 /* $Id$ */ 20 21 #ifndef _DVBCUT_PROGRESSWINDOW_H 22 #define _DVBCUT_PROGRESSWINDOW_H 23 24 #include <string> 25 #include <qstring.h> 26 #include "ui_progresswindowbase.h" 27 #include "logoutput.h" 28 29 class progresswindow: public QDialog, public logoutput 30 { 31 Q_OBJECT 32 protected: 33 bool cancelwasclicked; 34 bool waitingforclose; 35 QTextCharFormat fc_normal; 36 QTextCharFormat fc_head; 37 QTextCharFormat fc_info; 38 QTextCharFormat fc_warn; 39 QTextCharFormat fc_error; 40 void printmsg(const QString&str, const QTextCharFormat &format); 41 42 void closeEvent(QCloseEvent *e); 43 Ui::progresswindowbase* ui; 44 public: 45 progresswindow(QWidget *parent = 0); 46 ~progresswindow(); cancelled()47 virtual bool cancelled() 48 { 49 return cancelwasclicked; 50 } 51 virtual void finish(); 52 virtual void print(const QString &str); 53 virtual void printheading(const QString &str); 54 virtual void printinfo(const QString &str); 55 virtual void printerror(const QString &str); 56 virtual void printwarning(const QString &str); 57 58 public slots: 59 virtual void setprogress(int permille); 60 virtual void clickedcancel(); 61 }; 62 63 #endif 64