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

« back to all changes in this revision

Viewing changes to lib/hud/hudbuttonbox.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 HUDBUTTONBOX_H
 
20
#define HUDBUTTONBOX_H
 
21
 
 
22
#include <lib/gwenviewlib_export.h>
 
23
 
 
24
// Local
 
25
#include <lib/hud/hudwidget.h>
 
26
 
 
27
// KDE
 
28
 
 
29
// Qt
 
30
 
 
31
class QAction;
 
32
class QGraphicsWidget;
 
33
 
 
34
namespace Gwenview
 
35
{
 
36
 
 
37
class HudButton;
 
38
 
 
39
struct HudButtonBoxPrivate;
 
40
/**
 
41
 * A hud widget which shows a list of buttons
 
42
 */
 
43
class GWENVIEWLIB_EXPORT HudButtonBox : public HudWidget
 
44
{
 
45
    Q_OBJECT
 
46
public:
 
47
    HudButtonBox(QGraphicsWidget* parent = 0);
 
48
    ~HudButtonBox();
 
49
 
 
50
    void setText(const QString& text);
 
51
 
 
52
    HudButton* addButton(const QString& text);
 
53
 
 
54
    HudButton* addAction(QAction* action, const QString& overrideText = QString());
 
55
 
 
56
    void addCountDown(qreal ms);
 
57
 
 
58
protected:
 
59
    void showEvent(QShowEvent* event);
 
60
 
 
61
private:
 
62
    HudButtonBoxPrivate* const d;
 
63
};
 
64
 
 
65
} // namespace
 
66
 
 
67
#endif /* HUDBUTTONBOX_H */