kwave  18.07.70
StatusWidget.h
Go to the documentation of this file.
1 /*************************************************************************
2  StatusWidget.h - little widget with status icons
3  -------------------
4  begin : Sat Apr 15 2006
5  copyright : (C) 2006 by Thomas Eschenbacher
6  email : Thomas.Eschenbacher@gmx.de
7  ***************************************************************************/
8 
9 /***************************************************************************
10  * *
11  * This program is free software; you can redistribute it and/or modify *
12  * it under the terms of the GNU General Public License as published by *
13  * the Free Software Foundation; either version 2 of the License, or *
14  * (at your option) any later version. *
15  * *
16  ***************************************************************************/
17 
18 #ifndef STATUS_WIDGET_H
19 #define STATUS_WIDGET_H
20 
21 #include "config.h"
22 
23 #include <QPixmap>
24 #include <QTimer>
25 #include <QVector>
26 #include <QWidget>
27 
28 namespace Kwave
29 {
33  class StatusWidget: public QWidget
34  {
35  Q_OBJECT
36  public:
37 
39  explicit StatusWidget(QWidget *parent = Q_NULLPTR);
40 
42  virtual ~StatusWidget() Q_DECL_OVERRIDE;
43 
51  void setPixmaps(const QVector<QPixmap> &pixmaps,
52  unsigned int speed = 150);
53 
54  protected:
56  virtual void paintEvent(QPaintEvent *) Q_DECL_OVERRIDE;
57 
58  private slots:
59 
61  void nextPixmap();
62 
63  private:
64 
66  QVector<QPixmap> m_pixmaps;
67 
69  unsigned int m_index;
70 
72  QTimer m_timer;
73 
74  };
75 }
76 
77 #endif /* STATUS_WIDGET_H */
78 
79 //***************************************************************************
80 //***************************************************************************
void setPixmaps(const QVector< QPixmap > &pixmaps, unsigned int speed=150)
Definition: App.h:33
virtual void paintEvent(QPaintEvent *) Q_DECL_OVERRIDE
StatusWidget(QWidget *parent=Q_NULLPTR)
QVector< QPixmap > m_pixmaps
Definition: StatusWidget.h:66
virtual ~StatusWidget() Q_DECL_OVERRIDE
unsigned int m_index
Definition: StatusWidget.h:69