Changed: #1193 added ability changing render mode.

This commit is contained in:
dnk-88 2011-01-20 10:26:45 +02:00
parent 8dc5927ff4
commit 245b2d78a2
3 changed files with 24 additions and 1 deletions

View file

@ -649,6 +649,26 @@ void CMainWindow::updateRender()
}
}
void CMainWindow::keyPressEvent(QKeyEvent *keyEvent)
{
if (keyEvent->key() == Qt::Key_F1)
{
// Change render mode
switch (Modules::objView().getDriver()->getPolygonMode())
{
case NL3D::UDriver::Filled:
Modules::objView().getDriver()->setPolygonMode (NL3D::UDriver::Line);
break;
case NL3D::UDriver::Line:
Modules::objView().getDriver()->setPolygonMode (NL3D::UDriver::Point);
break;
case NL3D::UDriver::Point:
Modules::objView().getDriver()->setPolygonMode (NL3D::UDriver::Filled);
break;
}
}
QMainWindow::keyPressEvent(keyEvent);
}
} /* namespace NLQT */

View file

@ -81,6 +81,9 @@ private Q_SLOTS:
void updateStatusBar();
void updateRender();
protected:
virtual void keyPressEvent(QKeyEvent *keyEvent);
private:
void createActions();
void createMenus();

View file

@ -110,7 +110,7 @@
</sizepolicy>
</property>
<property name="currentIndex">
<number>1</number>
<number>0</number>
</property>
<widget class="QWidget" name="pageGeneral">
<layout class="QGridLayout" name="gridLayout_2">