digiKam
Loading...
Searching...
No Matches
dbusydlg.h
Go to the documentation of this file.
1/* ============================================================
2 *
3 * This file is a part of digiKam project
4 * https://www.digikam.org
5 *
6 * Date : 2009-11-03
7 * Description : a busy dialog for digiKam
8 *
9 * SPDX-FileCopyrightText: 2009-2024 by Gilles Caulier <caulier dot gilles at gmail dot com>
10 *
11 * SPDX-License-Identifier: GPL-2.0-or-later
12 *
13 * ============================================================ */
14
15#pragma once
16
17// Qt includes
18
19#include <QThread>
20#include <QString>
21#include <QProgressDialog>
22
23// Local includes
24
25#include "digikam_export.h"
26
27namespace Digikam
28{
29
30class DIGIKAM_EXPORT DBusyThread : public QThread
31{
32 Q_OBJECT
33
34public:
35
36 explicit DBusyThread(QObject* const parent);
37 ~DBusyThread() override;
38
39Q_SIGNALS:
40
42
43protected:
44
46 void run() override {};
47};
48
49// ----------------------------------------------------------------------------------
50
51class DIGIKAM_EXPORT DBusyDlg : public QProgressDialog
52{
53 Q_OBJECT
54
55public:
56
57 explicit DBusyDlg(const QString& txt, QWidget* const parent = nullptr);
58 ~DBusyDlg() override;
59
60 void setBusyThread(DBusyThread* const thread);
61
62public Q_SLOTS:
63
64 void slotComplete();
65
66private:
67
68 class Private;
69 Private* const d = nullptr;
70};
71
72} // namespace Digikam
Definition dbusydlg.h:52
Definition dbusydlg.h:31
void run() override
Reimplement this method with your code to run in a separate thread.
Definition dbusydlg.h:46
Definition datefolderview.cpp:34