/** * @brief Actions that are performed when the mouse button is clicked * * Actions that are performed when the mouse button is clicked. Updates the * coordinates of the clicked point and sends them to the GPU * * @param event The QMouseEvent object created by the GUI on the click */ void ClickTool::MouseClick(QMouseEvent *event) { mousePressed = true; mouseMoved = false; visible = true; xPixel = oldX = event->x(); yPixel = oldY = event->y(); UpdateCoordinates(); if (glLoaded) UpdateGL(); emit Instructions(QString("Release to select Element, move to pan")); }
HRESULT GLWindow::OnTimer(WPARAM wParam, LPARAM lParam) { UpdateGL(); // 消息处理:键盘等 return ::InvalidateRect(m_hWnd, NULL, FALSE); // 使窗口失效 }