Work at SourceForge, help us to make it a better place! We have an immediate need for a Support Technician in our San Francisco or Denver office.

Close

[429088]: kwave / multistateimage.h Maximize Restore History

Download this file

multistateimage.h    50 lines (36 with data), 983 Bytes

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
#ifndef _MULTISTATEIMAGE_H_
#define _MULTISTATEIMAGE_H_ 1
#include <stdlib.h>
#include <qapp.h>
#include <qwidget.h>
#include <qpushbt.h>
#include <qdialog.h>
#include <qmlined.h>
#include <qpainter.h>
#include <qpixmap.h>
#include <qimage.h>
#include <qtimer.h>
class MultiStateWidget : public QWidget
{
Q_OBJECT
public:
MultiStateWidget (QWidget *parent=NULL,int=0,int=2);
~MultiStateWidget ();
int addPixmap (char *);
void setStates (int *newstates);
void setState (int newstate);
void nextState ();
signals:
void clicked (int);
public slots:
protected:
void mouseReleaseEvent (QMouseEvent * );
void paintEvent(QPaintEvent *);
private:
QPainter p;
int *states; // maps states to pixmap-list
int act; // current states
int count; // number of states
int number; // number of channels this object represents... used for signals
};
#endif /* multistateimage.h */