void CommandeGen::trans_right(int times,int percent) { m_status = translate_right(times,to_percent(percent)) ; }
void Scene3D::keyPressEvent(QKeyEvent* pe) { //qDebug() << "key: " << pe->key() << " "<< (int)pe->modifiers() << " " << Qt::CTRL <<"\n"; switch (pe->key()) { case Qt::Key_Plus: scale_plus(); break; case Qt::Key_Equal: scale_plus(); break; case Qt::Key_Minus: scale_minus(); break; case Qt::Key_Up: rotate_up(); break; case Qt::Key_Down: rotate_down(); break; case Qt::Key_Left: rotate_left(); break; case Qt::Key_Right: rotate_right(); break; case Qt::Key_1: rotate_forward(); break; case Qt::Key_2: rotate_backward(); break; case Qt::Key_S: translate_up(); break; case Qt::Key_W: translate_down(); break; case Qt::Key_A: translate_right(); break; case Qt::Key_D: translate_left(); break; case Qt::Key_Space: defaultScene(); break; case Qt::Key_B: xRot = anX; zRot = anZ; break; case Qt::Key_Escape: this->close(); break; } updateGL(); }