Dominik Wenger | 917e0ac | 2007-07-29 18:07:31 +0000 | [diff] [blame] | 1 | /*************************************************************************** |
| 2 | * __________ __ ___. |
| 3 | * Open \______ \ ____ ____ | | _\_ |__ _______ ___ |
| 4 | * Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ / |
| 5 | * Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < < |
| 6 | * Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \ |
| 7 | * \/ \/ \/ \/ \/ |
| 8 | * |
| 9 | * Copyright (C) 2007 by Dominik Wenger |
Dominik Riebeling | 1dc307a | 2007-08-23 22:11:50 +0000 | [diff] [blame] | 10 | * $Id$ |
Dominik Wenger | 917e0ac | 2007-07-29 18:07:31 +0000 | [diff] [blame] | 11 | * |
Daniel Stenberg | 2acc0ac | 2008-06-28 18:10:04 +0000 | [diff] [blame^] | 12 | * This program is free software; you can redistribute it and/or |
| 13 | * modify it under the terms of the GNU General Public License |
| 14 | * as published by the Free Software Foundation; either version 2 |
| 15 | * of the License, or (at your option) any later version. |
Dominik Wenger | 917e0ac | 2007-07-29 18:07:31 +0000 | [diff] [blame] | 16 | * |
| 17 | * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY |
| 18 | * KIND, either express or implied. |
| 19 | * |
| 20 | ****************************************************************************/ |
| 21 | #ifndef PROGRESSLOGGERGUI_H |
| 22 | #define PROGRESSLOGGERGUI_H |
Antoine Cellerier | 78d7ece | 2007-09-15 22:13:41 +0000 | [diff] [blame] | 23 | |
Dominik Wenger | 917e0ac | 2007-07-29 18:07:31 +0000 | [diff] [blame] | 24 | #include <QtGui> |
| 25 | |
| 26 | #include "progressloggerinterface.h" |
Dominik Riebeling | c70f81f | 2008-03-28 17:30:37 +0000 | [diff] [blame] | 27 | #include "ui_progressloggerfrm.h" |
Dominik Wenger | 917e0ac | 2007-07-29 18:07:31 +0000 | [diff] [blame] | 28 | |
Antoine Cellerier | 78d7ece | 2007-09-15 22:13:41 +0000 | [diff] [blame] | 29 | class ProgressLoggerGui :public ProgressloggerInterface |
Dominik Wenger | 917e0ac | 2007-07-29 18:07:31 +0000 | [diff] [blame] | 30 | { |
| 31 | Q_OBJECT |
| 32 | public: |
Dominik Wenger | acccee4 | 2008-05-10 17:53:15 +0000 | [diff] [blame] | 33 | ProgressLoggerGui(QWidget * parent); |
Antoine Cellerier | 78d7ece | 2007-09-15 22:13:41 +0000 | [diff] [blame] | 34 | |
Dominik Wenger | 917e0ac | 2007-07-29 18:07:31 +0000 | [diff] [blame] | 35 | virtual void setProgressValue(int value); |
| 36 | virtual void setProgressMax(int max); |
| 37 | virtual int getProgressMax(); |
Dominik Riebeling | 64e7705 | 2008-05-23 21:07:58 +0000 | [diff] [blame] | 38 | virtual void setProgressVisible(bool); |
Dominik Wenger | 917e0ac | 2007-07-29 18:07:31 +0000 | [diff] [blame] | 39 | |
| 40 | signals: |
| 41 | virtual void aborted(); |
| 42 | virtual void closed(); |
| 43 | |
| 44 | public slots: |
Dominik Riebeling | 2da6868 | 2008-05-21 20:57:19 +0000 | [diff] [blame] | 45 | virtual void addItem(const QString &text); //! add a string to the progress list |
| 46 | virtual void addItem(const QString &text, int flag); //! add a string to the list |
Dominik Riebeling | 64e7705 | 2008-05-23 21:07:58 +0000 | [diff] [blame] | 47 | virtual void setProgress(int, int); //! set progress bar |
Dominik Riebeling | 2da6868 | 2008-05-21 20:57:19 +0000 | [diff] [blame] | 48 | |
Dominik Wenger | 917e0ac | 2007-07-29 18:07:31 +0000 | [diff] [blame] | 49 | virtual void abort(); |
Dominik Wenger | 388506e | 2007-08-26 19:06:40 +0000 | [diff] [blame] | 50 | virtual void undoAbort(); |
Dominik Wenger | 917e0ac | 2007-07-29 18:07:31 +0000 | [diff] [blame] | 51 | virtual void close(); |
| 52 | virtual void show(); |
Antoine Cellerier | 78d7ece | 2007-09-15 22:13:41 +0000 | [diff] [blame] | 53 | |
| 54 | private: |
Dominik Riebeling | c70f81f | 2008-03-28 17:30:37 +0000 | [diff] [blame] | 55 | Ui::ProgressLoggerFrm dp; |
Dominik Wenger | 917e0ac | 2007-07-29 18:07:31 +0000 | [diff] [blame] | 56 | QDialog *downloadProgress; |
| 57 | |
| 58 | }; |
| 59 | |
| 60 | #endif |
| 61 | |