Make addItem() a slot to be able adding items using a signal.
[Rockbox.git] / rbutil / rbutilqt / progressloggerinterface.h
blobc5b8654b7adcca3bf46fa8cdb83ae64993404f71
1 /***************************************************************************
2 * __________ __ ___.
3 * Open \______ \ ____ ____ | | _\_ |__ _______ ___
4 * Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /
5 * Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
6 * Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
7 * \/ \/ \/ \/ \/
9 * Copyright (C) 2007 by Dominik Wenger
10 * $Id$
12 * All files in this archive are subject to the GNU General Public License.
13 * See the file COPYING in the source tree root for full license agreement.
15 * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
16 * KIND, either express or implied.
18 ****************************************************************************/
20 #ifndef PROGRESSLOGGERINTERFACE_H
21 #define PROGRESSLOGGERINTERFACE_H
23 #include <QtCore>
25 enum {
26 LOGNOICON, LOGOK, LOGINFO, LOGWARNING, LOGERROR
31 class ProgressloggerInterface : public QObject
33 Q_OBJECT
35 public:
36 ProgressloggerInterface(QObject* parent) : QObject(parent) {}
38 virtual void setProgressValue(int value)=0;
39 virtual void setProgressMax(int max)=0;
40 virtual int getProgressMax()=0;
42 signals:
43 virtual void aborted()=0;
46 public slots:
47 virtual void addItem(const QString &text)=0; //! add a string to the progress
48 virtual void addItem(const QString &text, int flag)=0; //! add a string to the list, with icon
50 virtual void abort()=0;
51 virtual void undoAbort()=0;
52 virtual void close()=0;
53 virtual void show()=0;
55 private:
59 #endif