Libksieve

sievetreewidgetitem.h
1 /*
2  Copyright (C) 2013-2020 Laurent Montel <[email protected]>
3 
4  This program is free software; you can redistribute it and/or modify it
5  under the terms of the GNU General Public License, version 2, as
6  published by the Free Software Foundation.
7 
8  This program is distributed in the hope that it will be useful, but
9  WITHOUT ANY WARRANTY; without even the implied warranty of
10  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
11  General Public License for more details.
12 
13  You should have received a copy of the GNU General Public License along
14  with this program; if not, write to the Free Software Foundation, Inc.,
15  51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
16 */
17 
18 #ifndef SIEVETREEWIDGETITEM_H
19 #define SIEVETREEWIDGETITEM_H
20 
21 #include <KPixmapSequence>
22 #include <QTreeWidgetItem>
23 
24 #include "ksieveui_export.h"
25 
26 class QTimer;
27 class QTreeWidget;
28 class QTreeWidgetItem;
29 
30 namespace KSieveUi {
31 class SieveTreeWidgetProgress;
32 class SieveTreeWidgetItemPrivate;
37 class KSIEVEUI_EXPORT SieveTreeWidgetItem : public QTreeWidgetItem
38 {
39 public:
42 
43  void startAnimation();
44  void stopAnimation();
45  void setDefaultIcon();
46  void setProgressAnimation(const QPixmap &pix);
47 
48 private:
49  SieveTreeWidgetItemPrivate *const d;
50 };
51 
52 class SieveTreeWidgetProgress : public QObject
53 {
54  Q_OBJECT
55 public:
56  explicit SieveTreeWidgetProgress(SieveTreeWidgetItem *item, QObject *parent = nullptr);
57  ~SieveTreeWidgetProgress();
58 
59  void startAnimation();
60  void stopAnimation();
61 
62 private:
63  Q_DISABLE_COPY(SieveTreeWidgetProgress)
64  void slotTimerDone();
65  int mProgressCount = 0;
66  KPixmapSequence mProgressPix;
67  QTimer *mProgressTimer = nullptr;
68  SieveTreeWidgetItem *mItem = nullptr;
69 };
70 }
71 
72 #endif // SIEVETREEWIDGETITEM_H
The SieveTreeWidgetItem class.
This file is part of the KDE documentation.
Documentation copyright © 1996-2020 The KDE developers.
Generated on Fri Jun 5 2020 23:09:20 by doxygen 1.8.11 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.