File indexing completed on 2024-10-06 09:40:02
0001 /* 0002 This file is part of the KDE project 0003 SPDX-FileCopyrightText: 2003 Waldo Bastian <bastian@kde.org> 0004 0005 SPDX-License-Identifier: LGPL-2.0-only 0006 */ 0007 0008 #ifndef KBUILDSYCOCAPROGRESSDIALOG_H 0009 #define KBUILDSYCOCAPROGRESSDIALOG_H 0010 0011 #include "kiowidgets_export.h" 0012 #include <QProgressDialog> 0013 #include <QTimer> 0014 0015 #include <memory> 0016 0017 class KBuildSycocaProgressDialogPrivate; 0018 /** 0019 * @class KBuildSycocaProgressDialog kbuildsycocaprogressdialog.h <KBuildSycocaProgressDialog> 0020 * 0021 * Progress dialog while ksycoca is being rebuilt (by kbuildsycoca). 0022 * Usage: KBuildSycocaProgressDialog::rebuildKSycoca(parentWidget) 0023 */ 0024 class KIOWIDGETS_EXPORT KBuildSycocaProgressDialog : public QProgressDialog 0025 { 0026 Q_OBJECT 0027 public: 0028 /** 0029 * Rebuild KSycoca and show a progress dialog while doing so. 0030 * @param parent Parent widget for the progress dialog 0031 */ 0032 static void rebuildKSycoca(QWidget *parent); 0033 0034 private: 0035 KIOWIDGETS_NO_EXPORT KBuildSycocaProgressDialog(QWidget *parent, const QString &title, const QString &text); 0036 KIOWIDGETS_NO_EXPORT ~KBuildSycocaProgressDialog() override; 0037 0038 private: 0039 std::unique_ptr<KBuildSycocaProgressDialogPrivate> const d; 0040 }; 0041 0042 #endif