1 | /* |
2 | This file is part of the KDE project |
3 | SPDX-FileCopyrightText: 2003 Waldo Bastian <bastian@kde.org> |
4 | |
5 | SPDX-License-Identifier: LGPL-2.0-only |
6 | */ |
7 | |
8 | #ifndef KBUILDSYCOCAPROGRESSDIALOG_H |
9 | #define KBUILDSYCOCAPROGRESSDIALOG_H |
10 | |
11 | #include "kiowidgets_export.h" |
12 | #include <QProgressDialog> |
13 | #include <QTimer> |
14 | |
15 | #include <memory> |
16 | |
17 | class KBuildSycocaProgressDialogPrivate; |
18 | /** |
19 | * @class KBuildSycocaProgressDialog kbuildsycocaprogressdialog.h <KBuildSycocaProgressDialog> |
20 | * |
21 | * Progress dialog while ksycoca is being rebuilt (by kbuildsycoca). |
22 | * Usage: KBuildSycocaProgressDialog::rebuildKSycoca(parentWidget) |
23 | */ |
24 | class KIOWIDGETS_EXPORT KBuildSycocaProgressDialog : public QProgressDialog |
25 | { |
26 | Q_OBJECT |
27 | public: |
28 | /** |
29 | * Rebuild KSycoca and show a progress dialog while doing so. |
30 | * @param parent Parent widget for the progress dialog |
31 | */ |
32 | static void rebuildKSycoca(QWidget *parent); |
33 | |
34 | private: |
35 | KIOWIDGETS_NO_EXPORT KBuildSycocaProgressDialog(QWidget *parent, const QString &title, const QString &text); |
36 | KIOWIDGETS_NO_EXPORT ~KBuildSycocaProgressDialog() override; |
37 | |
38 | private: |
39 | std::unique_ptr<KBuildSycocaProgressDialogPrivate> const d; |
40 | }; |
41 | |
42 | #endif |
43 | |