buttonevent.h 407 B

12345678910111213141516171819202122232425262728
  1. #ifndef BUTTONEVENT_H
  2. #define BUTTONEVENT_H
  3. #include <QAbstractButton>
  4. #include "mainthreadinterface.h"
  5. class AWTLabelEvent : public AWTEvent {
  6. private:
  7. QAbstractButton *widget;
  8. QString *string;
  9. public:
  10. AWTLabelEvent(QAbstractButton *w, QString *s) : AWTEvent()
  11. {
  12. widget = w;
  13. string = s;
  14. }
  15. void runEvent()
  16. {
  17. widget->setText( *string );
  18. delete string;
  19. }
  20. };
  21. #endif