| 41 UiEventWrapper *event = new UiEventWrapper(obj, args->onclick, args->onclickdata); |
41 UiEventWrapper *event = new UiEventWrapper(obj, args->onclick, args->onclickdata); |
| 42 button->connect(button, SIGNAL(clicked()), event, SLOT(slot())); |
42 button->connect(button, SIGNAL(clicked()), event, SLOT(slot())); |
| 43 button->connect(button, SIGNAL(destroyed()), event, SLOT(destroy())); |
43 button->connect(button, SIGNAL(destroyed()), event, SLOT(destroy())); |
| 44 } |
44 } |
| 45 |
45 |
| 46 ctn->add(button, false); |
46 ctn->add(button); |
| 47 |
47 |
| 48 return button; |
48 return button; |
| 49 } |
49 } |
| 50 |
50 |
| 51 static void togglebutton_event(UiEvent *event, UiEventWrapper *wrapper) { |
51 static void togglebutton_event(UiEvent *event, UiEventWrapper *wrapper) { |
| 206 event->customdata1 = button; |
206 event->customdata1 = button; |
| 207 event->prepare_event = togglebutton_event; |
207 event->prepare_event = togglebutton_event; |
| 208 button->connect(button, SIGNAL(clicked()), event, SLOT(slot())); |
208 button->connect(button, SIGNAL(clicked()), event, SLOT(slot())); |
| 209 button->connect(button, SIGNAL(destroyed()), event, SLOT(destroy())); |
209 button->connect(button, SIGNAL(destroyed()), event, SLOT(destroy())); |
| 210 |
210 |
| 211 ctn->add(button, false); |
211 ctn->add(button); |
| 212 |
212 |
| 213 return button; |
213 return button; |
| 214 } |
214 } |
| 215 |
215 |
| 216 int64_t ui_radiobutton_get(UiInteger *value) { |
216 int64_t ui_radiobutton_get(UiInteger *value) { |