straight copy of qt4 branch over to trunk, merge refused to work
git-svn-id: svn://svn.code.sf.net/p/qjoypad/code/trunk@95 c05e91a0-76c8-4ec0-b377-ef19ce7cc080
This commit is contained in:
committed by
virtuoussin13
parent
c1ef3fa0b7
commit
345bb5748e
@ -1,29 +1,30 @@
|
||||
#include "buttonw.h"
|
||||
|
||||
|
||||
ButtonWidget::ButtonWidget( Button* b, QWidget* parent )
|
||||
: FlashButton( "", parent) {
|
||||
button = b;
|
||||
update();
|
||||
on = false;
|
||||
: FlashButton( "", parent) {
|
||||
button = b;
|
||||
update();
|
||||
on = false;
|
||||
}
|
||||
|
||||
void ButtonWidget::jsevent( int val ) {
|
||||
bool newOn = (val == 1);
|
||||
if (on != newOn) {
|
||||
on = newOn;
|
||||
flash();
|
||||
}
|
||||
bool newOn = (val == 1);
|
||||
if (on != newOn) {
|
||||
on = newOn;
|
||||
flash();
|
||||
}
|
||||
}
|
||||
|
||||
void ButtonWidget::update() {
|
||||
setText( button->status());
|
||||
setText( button->status());
|
||||
}
|
||||
|
||||
void ButtonWidget::mouseReleaseEvent( QMouseEvent* e ) {
|
||||
ButtonEdit* be = new ButtonEdit(button);
|
||||
be->exec();
|
||||
delete be;
|
||||
|
||||
update();
|
||||
FlashButton::mouseReleaseEvent( e );
|
||||
ButtonEdit* be = new ButtonEdit(button);
|
||||
be->exec();
|
||||
delete be;
|
||||
|
||||
update();
|
||||
FlashButton::mouseReleaseEvent( e );
|
||||
}
|
||||
|
Reference in New Issue
Block a user