void WMessageBox::onFinished() { if (result() == Rejected) { if (escapeButton_) { for (unsigned i = 0; i < buttons_.size(); ++i) { if (buttons_[i].button == escapeButton_) { onButtonClick(buttons_[i].result); return; } } } else { if (buttons_.size() == 1) { onButtonClick(buttons_[0].result); return; } else { WPushButton *b = button(Cancel); if (b) { onButtonClick(Cancel); return; } b = button(No); if (b) { onButtonClick(No); return; } onButtonClick(NoButton); } } } }
void WMessageBox::onFinished() { if (result() == DialogCode::Rejected) { if (escapeButton_) { for (unsigned i = 0; i < buttons_.size(); ++i) { if (buttons_[i].button == escapeButton_) { onButtonClick(buttons_[i].result); return; } } } else { if (buttons_.size() == 1) { onButtonClick(buttons_[0].result); return; } else { WPushButton *b = button(StandardButton::Cancel); if (b) { onButtonClick(StandardButton::Cancel); return; } b = button(StandardButton::No); if (b) { onButtonClick(StandardButton::No); return; } onButtonClick(StandardButton::None); } } } }
INT_PTR OptionsPageMore::handleCommand(UINT code, UINT ctrlId, HWND ctrlHandle) { if (code == BN_CLICKED) { onButtonClick(ctrlId, ctrlHandle); return TRUE; } else if (code == EN_CHANGE) { onEditChange(ctrlId, ctrlHandle); updateHasChanged(); return TRUE; } else if (code == CBN_SELENDOK) { onComboBoxChange(ctrlId, ctrlHandle); updateHasChanged(); return TRUE; } else if (code == EN_KILLFOCUS && ctrlId == IDC_SETTINGS_INTERVALEDIT) { onIntervalEditKillFocus(); return TRUE; } else { return FALSE; } }
ButtonColorPicker::ButtonColorPicker(QWidget* parent) : QPushButton(parent), m_WasEdited(false) { setSizePolicy(QSizePolicy::Fixed, QSizePolicy::Expanding); setText("..."); connect(this, SIGNAL(clicked()), this, SLOT(onButtonClick())); }
void Widget::update(const TCOD_key_t k) { bool curs=TCODMouse::isCursorVisible(); if ( curs ) { if ( mouse.cx >= x && mouse.cx < x+w && mouse.cy >= y && mouse.cy < y+h ) { if ( ! mouseIn ) { mouseIn = true; onMouseIn(); } if ( focus != this ) { focus=this; } } else { if ( mouseIn ) { mouseIn = false; onMouseOut(); } mouseL=false; if ( this == focus ) { focus = NULL; } } } if ( mouseIn || (! curs && this == focus ) ) { if ( mouse.lbutton && ! mouseL ) { mouseL = true; onButtonPress(); } else if (! mouse.lbutton && mouseL ) { onButtonRelease(); keyboardFocus=NULL; if ( mouseL ) onButtonClick(); mouseL=false; } else if ( mouse.lbutton_pressed ) { keyboardFocus=NULL; onButtonClick(); } } }
void UserScene::onNodeTouchedBegan(Node* node,Point tp){ if(node ==NULL){ CCLOG("NULL node touched"); } auto tag = node->getTag(); CCLOG("touch at node: %d",tag); if (tag == 99){ auto basic = node->getPosition(); onButtonClick(dynamic_cast<BattleLayer*>( node)->ButtonClick(Point(tp.x-basic.x,tp.y-basic.y))); getPhysicsWorld()->setSpeed(3.0f); player->setBattleState(BattleState::NORMALSTATE); unbattlescale(); GamePlay::getInstance()->unFollow(); } }
MainWindow::MainWindow(QWidget *parent) : QMainWindow(parent), ui(new Ui::MainWindow) { ui->setupUi(this); connect(ui->actionExit, SIGNAL(triggered()), this, SLOT(close())); connect(ui->hbButton, SIGNAL(clicked()), this, SLOT(onButtonClick())); initButtonState(); #ifdef Q_WS_QWS // remove title bar setWindowFlags(Qt::CustomizeWindowHint); #endif }
void CBSlideBar::onClick(float x,float y) { if(m_optionButton->isTrigger(x, y)) { onOptionClick(); } if(m_status == SlideBarShow) { for(int i = 0 ; i < m_options.size() ; i++) { if(m_options[i]->isTrigger(x,y)) { onButtonClick(m_options[i], i); break; } } } }
int FrmCatch::qt_metacall(QMetaObject::Call _c, int _id, void **_a) { _id = PreviewTab::qt_metacall(_c, _id, _a); if (_id < 0) return _id; if (_c == QMetaObject::InvokeMetaMethod) { switch (_id) { case 0: createRecord(); break; case 1: previewRow((*reinterpret_cast< QModelIndex(*)>(_a[1]))); break; case 2: { bool _r = onButtonClick((*reinterpret_cast< QAbstractButton*(*)>(_a[1]))); if (_a[0]) *reinterpret_cast< bool*>(_a[0]) = _r; } break; case 3: onItemSelection(); break; default: ; } _id -= 4; } return _id; }
void LoginView::onTextBoxSend(int ID, std::string s) { onButtonClick(1); }