mirror of
https://port.numenaute.org/aleajactaest/khanat-opennel-code.git
synced 2024-12-30 12:50:53 +00:00
Changed: #1193 added ability changing render mode.
This commit is contained in:
parent
8dc5927ff4
commit
245b2d78a2
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 */
|
} /* namespace NLQT */
|
||||||
|
|
||||||
|
|
|
@ -81,6 +81,9 @@ private Q_SLOTS:
|
||||||
void updateStatusBar();
|
void updateStatusBar();
|
||||||
void updateRender();
|
void updateRender();
|
||||||
|
|
||||||
|
protected:
|
||||||
|
virtual void keyPressEvent(QKeyEvent *keyEvent);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
void createActions();
|
void createActions();
|
||||||
void createMenus();
|
void createMenus();
|
||||||
|
|
|
@ -110,7 +110,7 @@
|
||||||
</sizepolicy>
|
</sizepolicy>
|
||||||
</property>
|
</property>
|
||||||
<property name="currentIndex">
|
<property name="currentIndex">
|
||||||
<number>1</number>
|
<number>0</number>
|
||||||
</property>
|
</property>
|
||||||
<widget class="QWidget" name="pageGeneral">
|
<widget class="QWidget" name="pageGeneral">
|
||||||
<layout class="QGridLayout" name="gridLayout_2">
|
<layout class="QGridLayout" name="gridLayout_2">
|
||||||
|
|
Loading…
Reference in a new issue