int qalq_widget::qt_metacall(QMetaObject::Call _c, int _id, void **_a) { _id = QWidget::qt_metacall(_c, _id, _a); if (_id < 0) return _id; if (_c == QMetaObject::InvokeMetaMethod) { switch (_id) { case 0: on_sqrt_clicked(); break; case 1: on_times_clicked(); break; case 2: on_div_clicked(); break; case 3: on_clear_clicked(); break; case 4: on_seven_clicked(); break; case 5: on_eight_clicked(); break; case 6: on_nine_clicked(); break; case 7: on_minus_clicked(); break; case 8: on_four_clicked(); break; case 9: on_five_clicked(); break; case 10: on_six_clicked(); break; case 11: on_plus_clicked(); break; case 12: on_one_clicked(); break; case 13: on_two_clicked(); break; case 14: on_three_clicked(); break; case 15: on_equals_clicked(); break; case 16: on_zero_clicked(); break; case 17: on_point_clicked(); break; default: ; } _id -= 18; } return _id; }
gboolean on_modular_scale_key_press_event (GtkWidget *widget, GdkEventKey *event, gpointer user_data) { switch( event -> keyval ) { case 65453: on_sub_weight_clicked( (GtkButton *)widget, NULL ); break; //扣重 case 65450: on_zero_clicked( (GtkButton *)widget, NULL ); break; //迴歸零點 } return FALSE; }