digiKam
Loading...
Searching...
No Matches
statusprogressbar.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 : 2007-01-24
7 * Description : a progress bar used to display action
8 * progress or a text in status bar.
9 * Progress events are dispatched to ProgressManager.
10 *
11 * SPDX-FileCopyrightText: 2007-2024 by Gilles Caulier <caulier dot gilles at gmail dot com>
12 *
13 * SPDX-License-Identifier: GPL-2.0-or-later
14 *
15 * ============================================================ */
16
17#pragma once
18
19// Qt includes
20
21#include <QStackedWidget>
22#include <QString>
23
24// Local includes
25
26#include "digikam_export.h"
27
28namespace Digikam
29{
30class ProgressItem;
31
32class DIGIKAM_EXPORT StatusProgressBar : public QStackedWidget
33{
34 Q_OBJECT
35
36public:
37
39 {
40 TextMode = 0,
42 CancelProgressBarMode
43 };
44
45public:
46
47 explicit StatusProgressBar(QWidget* const parent = nullptr);
48 ~StatusProgressBar() override;
49
50 void setAlignment(Qt::Alignment a);
51
52 void setProgressBarMode(int mode, const QString& text = QString());
53
54 int progressValue() const;
55
56 int progressTotalSteps() const;
57 void setProgressTotalSteps(int v);
58
59 void setNotify(bool b);
60 void setNotificationTitle(const QString& title, const QIcon& icon);
61
62public Q_SLOTS:
63
64 void setText(const QString& text);
65 void setProgressValue(int v);
66 void setProgressText(const QString& text);
67
68Q_SIGNALS:
69
71
72private:
73
74 ProgressItem* currentProgressItem() const;
75
76private:
77
78 class Private;
79 Private* const d = nullptr;
80};
81
82} // namespace Digikam
Definition progressmanager.h:35
Definition statusprogressbar.h:33
StatusProgressBarMode
Definition statusprogressbar.h:39
@ ProgressBarMode
Definition statusprogressbar.h:41
Definition datefolderview.cpp:34