1 | /* This file is part of the KDE project |
2 | Copyright (C) 2003 Waldo Bastian <bastian@kde.org> |
3 | |
4 | This library is free software; you can redistribute it and/or |
5 | modify it under the terms of the GNU Library General Public |
6 | License version 2 as published by the Free Software Foundation. |
7 | |
8 | This library is distributed in the hope that it will be useful, |
9 | but WITHOUT ANY WARRANTY; without even the implied warranty of |
10 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
11 | Library General Public License for more details. |
12 | |
13 | You should have received a copy of the GNU Library General Public License |
14 | along with this library; see the file COPYING.LIB. If not, write to |
15 | the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, |
16 | Boston, MA 02110-1301, USA. |
17 | */ |
18 | |
19 | #ifndef KBUILDSYCOCAPROGRESSDIALOG_H |
20 | #define KBUILDSYCOCAPROGRESSDIALOG_H |
21 | |
22 | #include <QtCore/QTimer> |
23 | #include <QtGui/QProgressDialog> |
24 | #include <kio/kio_export.h> |
25 | |
26 | class KBuildSycocaProgressDialogPrivate; |
27 | /** |
28 | * Progress dialog while ksycoca is being rebuilt (by kbuildsycoca). |
29 | * Usage: KBuildSycocaProgressDialog::rebuildKSycoca(parentWidget) |
30 | */ |
31 | class KIO_EXPORT KBuildSycocaProgressDialog : public QProgressDialog |
32 | { |
33 | Q_OBJECT |
34 | public: |
35 | |
36 | /** |
37 | * Rebuild KSycoca and show a progress dialog while doing so. |
38 | * @param parent Parent widget for the progress dialog |
39 | */ |
40 | static void rebuildKSycoca(QWidget *parent); |
41 | |
42 | private: |
43 | KBuildSycocaProgressDialog(QWidget *parent, |
44 | const QString &caption, const QString &text); |
45 | ~KBuildSycocaProgressDialog(); |
46 | |
47 | private: |
48 | KBuildSycocaProgressDialogPrivate * const d; |
49 | |
50 | Q_PRIVATE_SLOT( d, void _k_slotProgress() ) |
51 | Q_PRIVATE_SLOT( d, void _k_slotFinished() ) |
52 | }; |
53 | |
54 | #endif |
55 | |