Libkleo

progressbar.h
1/*
2 progressbar.h
3
4 This file is part of libkleopatra, the KDE keymanagement library
5 SPDX-FileCopyrightText: 2004 Klarälvdalens Datakonsult AB
6
7 SPDX-License-Identifier: GPL-2.0-or-later
8*/
9
10#pragma once
11
12#include "kleo_export.h"
13
14#include <QProgressBar>
15
16class QTimer;
17
18namespace Kleo
19{
20
21/**
22 @short A QProgressBar with self-powered busy indicator
23*/
24class KLEO_EXPORT ProgressBar : public QProgressBar
25{
26 Q_OBJECT
27public:
28 explicit ProgressBar(QWidget *parent = nullptr);
29
30public Q_SLOTS:
31 void slotProgress(const QString &message, int type, int current, int total);
32 void slotProgress(const QString &message, int current, int total);
33 /*! reimplementation to support self-powered busy indicator */
34 void setValue(int progress);
35 /*! reimplementation to support self-powered busy indicator */
36 void setMaximum(int total);
37 /*! reimplementation to support self-powered busy indicator */
38 void reset();
39 /*! reimplementation to preserve visibility */
40 void setRange(int cur, int tot)
41 {
42 QProgressBar::setRange(cur, tot);
43 }
44
45private Q_SLOTS:
46 void slotBusyTimerTick();
47
48private:
49 void fixup(bool);
50
51private:
52 QTimer *mBusyTimer = nullptr;
53 int mRealProgress;
54};
55}
A QProgressBar with self-powered busy indicator.
Definition progressbar.h:25
void setRange(int cur, int tot)
Definition progressbar.h:40
void setRange(int minimum, int maximum)
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Sun Feb 25 2024 18:39:42 by doxygen 1.10.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.