~ubuntu-branches/ubuntu/trusty/gwenview/trusty-proposed

« back to all changes in this revision

Viewing changes to lib/hud/hudcountdown.h

  • Committer: Package Import Robot
  • Author(s): Jonathan Riddell
  • Date: 2014-03-19 10:34:35 UTC
  • mto: This revision was merged to the branch mainline in revision 51.
  • Revision ID: package-import@ubuntu.com-20140319103435-r20hzcnkejmkcxp4
Tags: upstream-4.12.90
Import upstream version 4.12.90

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
// vim: set tabstop=4 shiftwidth=4 expandtab:
 
2
/*
 
3
Gwenview: an image viewer
 
4
Copyright 2014 Aurélien Gâteau <agateau@kde.org>
 
5
 
 
6
This program is free software; you can redistribute it and/or
 
7
modify it under the terms of the GNU General Public License
 
8
as published by the Free Software Foundation; either version 2
 
9
of the License, or (at your option) any later version.
 
10
 
 
11
This program is distributed in the hope that it will be useful,
 
12
but WITHOUT ANY WARRANTY; without even the implied warranty of
 
13
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 
14
GNU General Public License for more details.
 
15
 
 
16
You should have received a copy of the GNU General Public License
 
17
along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
18
*/
 
19
#ifndef HUDCOUNTDOWN_H
 
20
#define HUDCOUNTDOWN_H
 
21
 
 
22
// Local
 
23
 
 
24
// KDE
 
25
 
 
26
// Qt
 
27
#include <QGraphicsWidget>
 
28
 
 
29
namespace Gwenview
 
30
{
 
31
 
 
32
struct HudCountDownPrivate;
 
33
 
 
34
/**
 
35
 * Displays a count-down pie-chart
 
36
 */
 
37
class HudCountDown : public QGraphicsWidget
 
38
{
 
39
    Q_OBJECT
 
40
public:
 
41
    HudCountDown(QGraphicsWidget* parent = 0);
 
42
    ~HudCountDown();
 
43
 
 
44
    void start(qreal ms);
 
45
 
 
46
    void paint(QPainter* painter, const QStyleOptionGraphicsItem*, QWidget*);
 
47
 
 
48
Q_SIGNALS:
 
49
    void timeout();
 
50
 
 
51
private Q_SLOTS:
 
52
    void doUpdate();
 
53
 
 
54
private:
 
55
    HudCountDownPrivate* const d;
 
56
};
 
57
 
 
58
} // namespace
 
59
 
 
60
#endif /* HUDCOUNTDOWN_H */