Libkdepim

statusbarprogresswidget.h
1#pragma once
2/*
3 statusbarprogresswidget.h
4
5 SPDX-FileCopyrightText: 2004 Till Adam <adam@kde.org>
6 SPDX-FileCopyrightText: 2004 Don Sanders
7 SPDX-FileCopyrightText: 2004 David Faure <faure@kde.org>
8
9 SPDX-License-Identifier: GPL-2.0-or-later
10*/
11/**
12 * A specialized progress widget class, heavily based on
13 * kio_littleprogress_dlg (it looks similar)
14 */
15
16#include "kdepim_export.h"
17
18#include <QFrame>
19
20class QEvent;
21class QProgressBar;
22class QPushButton;
23class QStackedWidget;
24class QLabel;
25class QTimer;
26
27namespace KPIM
28{
29class SSLLabel;
30class ProgressItem;
31class ProgressDialog;
32
33class KDEPIM_EXPORT StatusbarProgressWidget : public QFrame
34{
35 Q_OBJECT
36
37public:
38 explicit StatusbarProgressWidget(ProgressDialog *progressDialog, QWidget *parent, bool button = true);
39
40 void setShowTypeProgressItem(unsigned int type);
41public Q_SLOTS:
42
43 void slotClean();
44
45 void slotProgressItemAdded(KPIM::ProgressItem *i);
46 void slotProgressItemCompleted(KPIM::ProgressItem *i);
47 void slotProgressItemProgress(KPIM::ProgressItem *i, unsigned int value);
48 void slotProgressButtonClicked();
49
50protected Q_SLOTS:
51 void slotProgressDialogVisible(bool);
52 void slotShowItemDelayed();
53 void slotBusyIndicator();
54 void updateBusyMode(KPIM::ProgressItem *);
55
56protected:
57 bool eventFilter(QObject *, QEvent *) override;
58
59private:
60 enum Mode {
61 Progress,
62 Clean,
63 };
64 KDEPIM_NO_EXPORT void setMode(Mode mode);
65 KDEPIM_NO_EXPORT void updateProgressButton(bool showingProgress);
66 KDEPIM_NO_EXPORT void connectSingleItem();
67 KDEPIM_NO_EXPORT void activateSingleItemMode();
68
69 unsigned int mShowTypeProgressItem = 0;
70 QProgressBar *mProgressBar = nullptr;
71 QLabel *mLabel = nullptr;
72 SSLLabel *mSslLabel = nullptr;
73 QPushButton *mButton = nullptr;
74
75 Mode mMode = Clean;
76 const bool mShowButton = false;
77 bool mShowDetailedProgress = false;
78
79 QStackedWidget *mStackedWidget = nullptr;
80 ProgressItem *mCurrentItem = nullptr;
81 ProgressDialog *const mProgressDialog;
82 QTimer *mDelayTimer = nullptr;
83 QTimer *mBusyTimer = nullptr;
84 QTimer *mCleanTimer = nullptr;
85};
86} // namespace
The ProgressItem class.
Class KCheckComboBox::KCheckComboBoxPrivate.
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Mon Nov 18 2024 12:18:17 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.