blob: c1fdf0c7c629430bb04e961378d8e04ffac4bb84 [file] [log] [blame]
Dominik Wenger917e0ac2007-07-29 18:07:31 +00001/***************************************************************************
2 * __________ __ ___.
3 * Open \______ \ ____ ____ | | _\_ |__ _______ ___
4 * Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /
5 * Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
6 * Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
7 * \/ \/ \/ \/ \/
8 *
9 * Copyright (C) 2007 by Dominik Wenger
Dominik Riebeling1dc307a2007-08-23 22:11:50 +000010 * $Id$
Dominik Wenger917e0ac2007-07-29 18:07:31 +000011 *
Daniel Stenberg2acc0ac2008-06-28 18:10:04 +000012 * 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 Wenger917e0ac2007-07-29 18:07:31 +000016 *
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 Cellerier78d7ece2007-09-15 22:13:41 +000023
Dominik Wenger917e0ac2007-07-29 18:07:31 +000024#include <QtGui>
25
26#include "progressloggerinterface.h"
Dominik Riebelingc70f81f2008-03-28 17:30:37 +000027#include "ui_progressloggerfrm.h"
Dominik Wenger917e0ac2007-07-29 18:07:31 +000028
Antoine Cellerier78d7ece2007-09-15 22:13:41 +000029class ProgressLoggerGui :public ProgressloggerInterface
Dominik Wenger917e0ac2007-07-29 18:07:31 +000030{
31 Q_OBJECT
32public:
Dominik Wengeracccee42008-05-10 17:53:15 +000033 ProgressLoggerGui(QWidget * parent);
Antoine Cellerier78d7ece2007-09-15 22:13:41 +000034
Dominik Wenger917e0ac2007-07-29 18:07:31 +000035 virtual void setProgressValue(int value);
36 virtual void setProgressMax(int max);
37 virtual int getProgressMax();
Dominik Riebeling64e77052008-05-23 21:07:58 +000038 virtual void setProgressVisible(bool);
Dominik Wenger917e0ac2007-07-29 18:07:31 +000039
40signals:
41 virtual void aborted();
42 virtual void closed();
43
44public slots:
Dominik Riebeling2da68682008-05-21 20:57:19 +000045 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 Riebeling64e77052008-05-23 21:07:58 +000047 virtual void setProgress(int, int); //! set progress bar
Dominik Riebeling2da68682008-05-21 20:57:19 +000048
Dominik Wenger917e0ac2007-07-29 18:07:31 +000049 virtual void abort();
Dominik Wenger388506e2007-08-26 19:06:40 +000050 virtual void undoAbort();
Dominik Wenger917e0ac2007-07-29 18:07:31 +000051 virtual void close();
52 virtual void show();
Antoine Cellerier78d7ece2007-09-15 22:13:41 +000053
54private:
Dominik Riebelingc70f81f2008-03-28 17:30:37 +000055 Ui::ProgressLoggerFrm dp;
Dominik Wenger917e0ac2007-07-29 18:07:31 +000056 QDialog *downloadProgress;
57
58};
59
60#endif
61