taskbarprogress.h
1 //------------------------------------------------------------------------------
2 // taskbarprogress.h
3 //------------------------------------------------------------------------------
4 //
5 // This program is free software; you can redistribute it and/or
6 // modify it under the terms of the GNU General Public License
7 // as published by the Free Software Foundation; either version 2
8 // of the License, or (at your option) any later version.
9 //
10 // This program is distributed in the hope that it will be useful,
11 // but WITHOUT ANY WARRANTY; without even the implied warranty of
12 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 // GNU General Public License for more details.
14 //
15 // You should have received a copy of the GNU General Public License
16 // along with this program; if not, write to the Free Software
17 // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
18 // 02110-1301, USA.
19 //
20 //------------------------------------------------------------------------------
21 // Copyright (C) 2015 "Zalewa" <zalewapl@gmail.com>
22 //------------------------------------------------------------------------------
23 #ifndef id3efbc508_293e_46ed_8518_73e88b9ba584
24 #define id3efbc508_293e_46ed_8518_73e88b9ba584
25 
26 #include "dptr.h"
27 #include <QObject>
28 
29 class QWinTaskbarProgress;
30 
39 class TaskbarProgress : public QObject
40 {
41  Q_OBJECT;
42 
43  friend class TaskbarButton;
44 
45 public:
46  TaskbarProgress(QObject *parent = 0);
47 
48  bool isPaused() const;
49  bool isStopped() const;
50  bool isVisible() const;
51  int maximum() const;
52  int minimum() const;
53  int value() const;
54 
55 public slots:
56  void hide();
57  void pause();
58  void reset();
59  void resume();
60  void setMaximum(int maximum);
61  void setMinimum(int minimum);
62  void setPaused(bool paused);
63  void setRange(int minimum, int maximum);
64  void setValue(int value);
65  void setVisible(bool visible);
66  void show();
67  void stop();
68 
69 signals:
70  void maximumChanged(int maximum);
71  void minimumChanged(int minimum);
72  void valueChanged(int value);
73  void visibilityChanged(bool visible);
74 
75 private:
77 
78  TaskbarProgress(QWinTaskbarProgress *progress, QObject *parent = 0);
79  void construct();
80 };
81 
82 #endif
Platform-agnostic wrapper for QWinTaskbarButton.
Definition: taskbarbutton.h:42
Platform-agnostic wrapper for QWinTaskbarProgress.