mirror of
https://port.numenaute.org/aleajactaest/khanat-code-old.git
synced 2024-12-26 02:20:54 +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 */
|
||||
|
||||
|
|
|
@ -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