1/*
2 Copyright (c) 2008 Volker Krause <vkrause@kde.org>
3
4 This library is free software; you can redistribute it and/or modify it
5 under the terms of the GNU Library General Public License as published by
6 the Free Software Foundation; either version 2 of the License, or (at your
7 option) any later version.
8
9 This library is distributed in the hope that it will be useful, but WITHOUT
10 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
11 FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public
12 License for more details.
13
14 You should have received a copy of the GNU Library General Public License
15 along with this library; see the file COPYING.LIB. If not, write to the
16 Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
17 02110-1301, USA.
18*/
19
20#ifndef INFODIALOG_H
21#define INFODIALOG_H
22
23#include "kmigratorbase.h"
24#include "migratorbase.h"
25
26#include <KDialog>
27
28class QLabel;
29class QListWidget;
30class QProgressBar;
31
32class InfoDialog : public KDialog
33{
34 Q_OBJECT
35 public:
36 InfoDialog( bool closeWhenDone = true );
37 ~InfoDialog();
38
39 public slots:
40 void message( KMigratorBase::MessageType type, const QString &msg );
41 void message( MigratorBase::MessageType type, const QString &msg );
42
43 void migratorAdded();
44 void migratorDone();
45
46 static bool hasError() { return mError; }
47 bool hasChange() const { return mChange; }
48
49 void status( const QString &msg );
50
51 void progress( int value );
52 void progress( int min, int max, int value );
53
54 private slots:
55 void scrollBarMoved( int value );
56
57 private:
58 QListWidget *mList;
59 QLabel *mStatusLabel;
60 QProgressBar *mProgressBar;
61 int mMigratorCount;
62 static bool mError;
63 bool mChange;
64 bool mCloseWhenDone;
65 bool mAutoScrollList;
66};
67
68#endif
69