blob: 2459228e79d775788bde7b437035d2caed6d0194 [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 ****************************************************************************/
Antoine Cellerier78d7ece2007-09-15 22:13:41 +000021
Dominik Wenger917e0ac2007-07-29 18:07:31 +000022#ifndef PROGRESSLOGGERINTERFACE_H
23#define PROGRESSLOGGERINTERFACE_H
Antoine Cellerier78d7ece2007-09-15 22:13:41 +000024
Dominik Riebelingee09cb72008-02-10 18:25:49 +000025#include <QtCore>
Dominik Wenger5df9fc52007-07-31 19:11:44 +000026
Antoine Cellerier78d7ece2007-09-15 22:13:41 +000027enum {
28 LOGNOICON, LOGOK, LOGINFO, LOGWARNING, LOGERROR
29};
30
31
32
Dominik Wenger917e0ac2007-07-29 18:07:31 +000033class ProgressloggerInterface : public QObject
34{
35 Q_OBJECT
Antoine Cellerier78d7ece2007-09-15 22:13:41 +000036
37public:
Dominik Wenger917e0ac2007-07-29 18:07:31 +000038 ProgressloggerInterface(QObject* parent) : QObject(parent) {}
Antoine Cellerier78d7ece2007-09-15 22:13:41 +000039
Dominik Wenger917e0ac2007-07-29 18:07:31 +000040 virtual void setProgressValue(int value)=0;
41 virtual void setProgressMax(int max)=0;
42 virtual int getProgressMax()=0;
Antoine Cellerier78d7ece2007-09-15 22:13:41 +000043
Dominik Wenger917e0ac2007-07-29 18:07:31 +000044signals:
45 virtual void aborted()=0;
Antoine Cellerier78d7ece2007-09-15 22:13:41 +000046
Dominik Wenger917e0ac2007-07-29 18:07:31 +000047
48public slots:
Dominik Riebeling2da68682008-05-21 20:57:19 +000049 virtual void addItem(const QString &text)=0; //! add a string to the progress
50 virtual void addItem(const QString &text, int flag)=0; //! add a string to the list, with icon
51
Dominik Wenger917e0ac2007-07-29 18:07:31 +000052 virtual void abort()=0;
Antoine Cellerier78d7ece2007-09-15 22:13:41 +000053 virtual void undoAbort()=0;
Dominik Wenger917e0ac2007-07-29 18:07:31 +000054 virtual void close()=0;
55 virtual void show()=0;
Antoine Cellerier78d7ece2007-09-15 22:13:41 +000056
Dominik Wenger917e0ac2007-07-29 18:07:31 +000057private:
Antoine Cellerier78d7ece2007-09-15 22:13:41 +000058
Dominik Wenger917e0ac2007-07-29 18:07:31 +000059};
60
61#endif
62