Libksieve

sievetreewidgetitem.h
1/*
2 SPDX-FileCopyrightText: 2013-2024 Laurent Montel <montel@kde.org>
3
4 SPDX-License-Identifier: GPL-2.0-only
5*/
6
7#pragma once
8
9#include "ksieveui_export.h"
10#include <KPixmapSequence>
11#include <QTreeWidgetItem>
12#include <memory>
13
14class QTimer;
15class QTreeWidget;
16
17namespace KSieveUi
18{
19class SieveTreeWidgetProgress;
20class SieveTreeWidgetItemPrivate;
21/**
22 * @brief The SieveTreeWidgetItem class
23 * @author Laurent Montel <montel@kde.org>
24 */
25class KSIEVEUI_EXPORT SieveTreeWidgetItem : public QTreeWidgetItem
26{
27public:
29 ~SieveTreeWidgetItem() override;
30
31 void startAnimation();
32 void stopAnimation();
33 void setDefaultIcon();
34 void setProgressAnimation(const QPixmap &pix);
35
36private:
37 std::unique_ptr<SieveTreeWidgetItemPrivate> const d;
38};
39
40class SieveTreeWidgetProgress : public QObject
41{
43public:
44 explicit SieveTreeWidgetProgress(SieveTreeWidgetItem *item, QObject *parent = nullptr);
45 ~SieveTreeWidgetProgress() override;
46
47 void startAnimation();
48 void stopAnimation();
49
50private:
51 Q_DISABLE_COPY(SieveTreeWidgetProgress)
52 void slotTimerDone();
53 int mProgressCount = 0;
54 KPixmapSequence mProgressPix;
55 QTimer *mProgressTimer = nullptr;
56 SieveTreeWidgetItem *const mItem;
57};
58}
The SieveTreeWidgetItem class.
Q_OBJECTQ_OBJECT
QObject * parent() const const
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Mon Nov 18 2024 12:14:30 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.