changes in arhitecture, some improvments, much optimising and simplify,
many bagfixes and new graphics engine
This commit is contained in:
40
touch_butt.h
Normal file
40
touch_butt.h
Normal file
@@ -0,0 +1,40 @@
|
||||
#ifndef TOUCH_BUTT_H
|
||||
#define TOUCH_BUTT_H
|
||||
|
||||
#include <QPushButton>
|
||||
#include <QPalette>
|
||||
#include <QEvent>
|
||||
#include <QTimer>
|
||||
#include <QDebug>
|
||||
|
||||
class touch_butt : public QPushButton
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
touch_butt(int butt_index, QString caption, QColor colr, QColor colg, QColor colw, QColor colp, QPushButton * parent = 0);
|
||||
int index;
|
||||
void setRed();
|
||||
void setGreen();
|
||||
void setWhite();
|
||||
void setColor(QColor colr, QColor colg, QColor colw, QColor colp);
|
||||
QColor color() const {return next_col;}
|
||||
public slots:
|
||||
void butt_click();
|
||||
void butt_toggle(bool checked);
|
||||
private:
|
||||
QTimer * timer;
|
||||
QColor aim_col, next_col;
|
||||
QColor cr,cg,cw,cp;
|
||||
bool is_push;
|
||||
void setPush();
|
||||
private slots:
|
||||
void butt_push();
|
||||
void butt_release();
|
||||
void timerDone();
|
||||
signals:
|
||||
void touch_push(int index);
|
||||
void touch_click(int index);
|
||||
void touch_toggle(int index, bool checked);
|
||||
};
|
||||
|
||||
#endif // TOUCH_BUTT_H
|
||||
Reference in New Issue
Block a user