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:
John Toman
2009-08-03 01:01:45 +00:00
committed by virtuoussin13
parent c1ef3fa0b7
commit 345bb5748e
36 changed files with 1152 additions and 1506 deletions

View File

@ -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 );
}