int Visor::cQMainWindow::qt_metacall(QMetaObject::Call _c, int _id, void **_a) { _id = QMainWindow::qt_metacall(_c, _id, _a); if (_id < 0) return _id; if (_c == QMetaObject::InvokeMetaMethod) { switch (_id) { case 0: OnLayout(); break; case 1: OnSliderMoved((*reinterpret_cast< int(*)>(_a[1]))); break; case 2: OnRotate(); break; case 3: OnMove(); break; case 4: OnWatchTimer(); break; case 5: OnShot(); break; default: ; } _id -= 6; } return _id; }
bool CGUIDialogKeyboardGeneric::OnMessage(CGUIMessage& message) { switch ( message.GetMessage() ) { case GUI_MSG_CLICKED: { int iControl = message.GetSenderId(); switch (iControl) { case CTL_BUTTON_DONE: OnOK(); break; case CTL_BUTTON_CANCEL: Close(); break; case CTL_BUTTON_SHIFT: OnShift(); break; case CTL_BUTTON_CAPS: if (m_keyType == LOWER) m_keyType = CAPS; else if (m_keyType == CAPS) m_keyType = LOWER; UpdateButtons(); break; case CTL_BUTTON_LAYOUT: OnLayout(); break; case CTL_BUTTON_SYMBOLS: OnSymbols(); break; case CTL_BUTTON_LEFT: MoveCursor( -1); break; case CTL_BUTTON_RIGHT: MoveCursor(1); break; case CTL_BUTTON_IP_ADDRESS: OnIPAddress(); break; case CTL_BUTTON_CLEAR: SetEditText(""); break; case CTL_EDIT: { CGUIMessage msg(GUI_MSG_ITEM_SELECTED, GetID(), CTL_EDIT); OnMessage(msg); // update callback I guess? if (m_pCharCallback) { // we did _something_, so make sure our search message filter is reset m_pCharCallback(this, msg.GetLabel()); } m_text = msg.GetLabel(); return true; } default: OnClickButton(iControl); break; } } break; case GUI_MSG_SET_TEXT: case GUI_MSG_INPUT_TEXT_EDIT: { // the edit control only handles these messages if it is either focues // or its specific control ID is set in the message. As neither is the // case here (focus is on one of the keyboard buttons) we have to force // the control ID of the message to the control ID of the edit control // (unfortunately we have to create a whole copy of the message object for that) CGUIMessage messageCopy(message.GetMessage(), message.GetSenderId(), CTL_EDIT, message.GetParam1(), message.GetParam2(), message.GetItem()); messageCopy.SetLabel(message.GetLabel()); // ensure this goes to the edit control CGUIControl *edit = GetControl(CTL_EDIT); if (edit) edit->OnMessage(messageCopy); // close the dialog if requested if (message.GetMessage() == GUI_MSG_SET_TEXT && message.GetParam1() > 0) OnOK(); return true; } } return CGUIDialog::OnMessage(message); }
void CHTMLControlSection::MoveXY( int nOffsetX, int nOffsetY ) { CHTMLSectionABC::MoveXY( nOffsetX, nOffsetY ); OnLayout( *this ); }
void OpSpeedDialView::Layout() { if (OpWidget::IsVisible()) OnLayout(); }
void CHTMLComboSection::MoveY( int nOffsetY ) { CHTMLSectionABC::MoveY( nOffsetY ); OnLayout( *this ); }
BOOL CBotThread::PreTranslateMessage( MSG* pMsg ) { BOOL bProcessed = TRUE; switch( pMsg->message ) { // System Messages case QB_SYSTEM_ERROR_NETWORK: OnNetworkError(); break; case QB_SYSTEM_ERROR_OTHER: OnOtherError(); break; case QB_SYSTEM_SHUTDOWN: OnSystemShutdown(); break; // System Objects case QB_SYSOBJ_TEXTMESSAGE: OnTextMessage( (CTextMessage*)pMsg->wParam); break; case QB_SYSOBJ_SOUND: OnSound( (CSound*)pMsg->wParam ); break; case QB_SYSOBJ_TEMP_ENT: OnTempEnt( (CTempEntity*)pMsg->wParam ); break; case QB_SYSOBJ_CENTER_MESSAGE: OnCenterMessage( (CTextMessage*)pMsg->wParam ); break; case QB_SYSOBJ_STUFFED_TEXT: OnStuffText( (CTextMessage*)pMsg->wParam ); break; case QB_SYSOBJ_LAYOUT: OnLayout( (CTextMessage*)pMsg->wParam ); break; // Timer Based case QB_TIMER_CHECK_SEND: OnTimerCheckSend(); break; case QB_TIMER_CHECK_RELIABLE: OnTimerCheckReliable(); break; case QB_TIMER_SEND_MOVE: OnTimerSendMove(); break; case QB_TIMER_SEND_STATUS: OnTimerSendStatus(); break; case QB_TIMER_COMPUTE_MOVE: OnTimerComputeMove(); break; // Network Info case QB_NETWORK_MOVE_SENT: OnNetworkMoveSent(); break; case QB_NETWORK_PACKET_DONE: OnNetworkPacketDone(); break; case QB_NETWORK_BEGIN_LEVEL: OnNetworkBeginLevel(); break; case QB_NETWORK_END_LEVEL: OnNetworkEndLevel(); break; // Update Info case QB_INFO_ERR_MESSAGE: OnInfoErrorMessage( (UINT)pMsg->lParam ); break; case QB_INFO_SERVER_DATA: OnInfoServerData(); break; case QB_INFO_INVENTORY: OnInfoInventory( (UINT)pMsg->lParam ); break; // Entity Update Messages case QB_ENTITY_UPDATE_ACTIVE: OnEntityUpdateActive( (WORD)pMsg->lParam ); break; case QB_ENTITY_UPDATE_REMOVE: OnEntityUpdateRemove( (WORD)pMsg->lParam ); break; case QB_ENTITY_UPDATE_ORIGIN: OnEntityUpdateOrigin( (WORD)pMsg->lParam ); break; case QB_ENTITY_UPDATE_MODEL: OnEntityUpdateModel( (WORD)pMsg->lParam ); break; case QB_ENTITY_UPDATE_FRAME: OnEntityUpdateFrame( (WORD)pMsg->lParam ); break; case QB_ENTITY_UPDATE_EFFECTS: OnEntityUpdateEffects( (WORD)pMsg->lParam ); break; case QB_ENTITY_UPDATE_EVENT: OnEntityUpdateEvent( (WORD)pMsg->lParam ); break; case QB_ENTITY_MUZZLEFLASH: OnEntityMuzzleFlash( (WORD)pMsg->lParam ); break; case QB_ENTITY_MUZZLEFLASH2: OnEntityMuzzleFlash2( (WORD)pMsg->lParam ); break; // Player Update Messages case QB_PLAYER_UPDATE_ACTIVE: OnPlayerUpdateActive( (BYTE)pMsg->lParam ); break; case QB_PLAYER_UPDATE_REMOVE: OnPlayerUpdateRemove( (BYTE)pMsg->lParam ); break; case QB_PLAYER_UPDATE_ORIGIN: OnPlayerUpdateOrigin( (BYTE)pMsg->lParam ); break; case QB_PLAYER_UPDATE_MODEL: OnPlayerUpdateModel( (BYTE)pMsg->lParam ); break; case QB_PLAYER_UPDATE_FRAME: OnPlayerUpdateFrame( (BYTE)pMsg->lParam ); break; case QB_PLAYER_UPDATE_EFFECTS: OnPlayerUpdateEffects( (BYTE)pMsg->lParam ); break; case QB_PLAYER_UPDATE_EVENT: OnPlayerUpdateEvent( (BYTE)pMsg->lParam ); break; case QB_PLAYER_MUZZLEFLASH: OnPlayerMuzzleFlash( (BYTE)pMsg->lParam ); break; case QB_PLAYER_MUZZLEFLASH2: OnPlayerMuzzleFlash2( (BYTE)pMsg->lParam ); break; case QB_PLAYER_KILLED: OnPlayerKilled( (BYTE)pMsg->lParam ); break; case QB_PLAYER_RESPAWNED: OnPlayerKilled( (BYTE)pMsg->lParam ); break; case QB_PLAYER_UPDATE_SKIN: OnPlayerUpdateSkin( (BYTE)pMsg->lParam ); break; case QB_PLAYER_UPDATE_NAME: OnPlayerUpdateName( (BYTE)pMsg->lParam ); break; case QB_PLAYER_UPDATE_FRAGS: OnPlayerUpdateFrags( (BYTE)pMsg->lParam ); break; case QB_PLAYER_UPDATE_WEAPON: OnPlayerUpdateWeapon( (BYTE)pMsg->lParam ); break; // Bot Update Messages case QB_BOT_UPDATE_ACTIVE: OnBotUpdateActive(); break; case QB_BOT_UPDATE_REMOVE: OnBotUpdateRemove(); break; case QB_BOT_UPDATE_ORIGIN: OnBotUpdateOrigin(); break; case QB_BOT_UPDATE_MODEL: OnBotUpdateModel(); break; case QB_BOT_UPDATE_FRAME: OnBotUpdateFrame(); break; case QB_BOT_UPDATE_EFFECTS: OnBotUpdateEffects(); break; case QB_BOT_UPDATE_EVENT: OnBotUpdateEvent(); break; case QB_BOT_MUZZLEFLASH: OnBotMuzzleFlash(); break; case QB_BOT_MUZZLEFLASH2: OnBotMuzzleFlash2(); break; case QB_BOT_KILLED: OnBotKilled( (WORD)pMsg->lParam ); break; case QB_BOT_RESPAWNED: OnBotRespawned(); break; case QB_BOT_UPDATE_SKIN: OnBotUpdateSkin(); break; case QB_BOT_UPDATE_NAME: OnBotUpdateName(); break; case QB_BOT_UPDATE_FRAGS: OnBotUpdateFrags( (short)pMsg->lParam ); break; case QB_BOT_UPDATE_WEAPON: OnBotUpdateWeapon(); break; case QB_BOT_UPDATE_ATTACK_TARGET: OnBotUpdateAttackTarget( (CPlayer*)pMsg->lParam ); break; case QB_BOT_UPDATE_MOVE_TARGET: OnBotUpdateMoveTarget( (CMapPoint*)pMsg->lParam ); break; case QB_BOT_UPDATE_AI_INFO: OnBotUpdateAIInfo( (UINT)pMsg->lParam ); break; case QB_BOT_UPDATE_HEALTH: OnBotUpdateHealth( (short)pMsg->lParam ); break; case QB_BOT_UPDATE_AMMO: OnBotUpdateAmmo( (short)pMsg->lParam ); break; case QB_BOT_UPDATE_VELOCITY: OnBotUpdateVelocity(); break; case QB_BOT_UPDATE_GUN_INDEX: OnBotUpdateGunIndex(); break; case QB_BOT_PICKUP_ITEM: OnBotPickupItem(); break; // If the message is none of the above ... default: bProcessed = FALSE; break; } return (bProcessed ? TRUE : CWinThread::PreTranslateMessage(pMsg)); }