mirror of
https://port.numenaute.org/aleajactaest/khanat-opennel-code.git
synced 2024-11-27 09:36:15 +00:00
Changed: #1193 added ability changing render mode.
This commit is contained in:
parent
6b8b28b908
commit
5eed88050b
3 changed files with 24 additions and 1 deletions
|
@ -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 */
|
||||
|
||||
|
|
|
@ -81,6 +81,9 @@ private Q_SLOTS:
|
|||
void updateStatusBar();
|
||||
void updateRender();
|
||||
|
||||
protected:
|
||||
virtual void keyPressEvent(QKeyEvent *keyEvent);
|
||||
|
||||
private:
|
||||
void createActions();
|
||||
void createMenus();
|
||||
|
|
|
@ -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">
|
||||
|
|
Loading…
Reference in a new issue