parent
8e7d1ceb05
commit
dd371387a4
|
@ -72,6 +72,10 @@ Keyboard
|
||||||
+----------------------+--------------------------------------------------------------------------+
|
+----------------------+--------------------------------------------------------------------------+
|
||||||
| F | Bring the part widget of current hovered part to visible area |
|
| F | Bring the part widget of current hovered part to visible area |
|
||||||
+----------------------+--------------------------------------------------------------------------+
|
+----------------------+--------------------------------------------------------------------------+
|
||||||
|
| W | Toggle render wireframe |
|
||||||
|
+----------------------+--------------------------------------------------------------------------+
|
||||||
|
| O | Toggle render flat shading |
|
||||||
|
+----------------------+--------------------------------------------------------------------------+
|
||||||
|
|
||||||
Mouse
|
Mouse
|
||||||
======
|
======
|
||||||
|
|
|
@ -857,6 +857,10 @@ DocumentWindow::DocumentWindow() :
|
||||||
m_modelRenderWidget->toggleWireframe();
|
m_modelRenderWidget->toggleWireframe();
|
||||||
});
|
});
|
||||||
|
|
||||||
|
connect(graphicsWidget, &SkeletonGraphicsWidget::shortcutToggleFlatShading, [=]() {
|
||||||
|
Preferences::instance().setFlatShading(!Preferences::instance().flatShading());
|
||||||
|
});
|
||||||
|
|
||||||
connect(graphicsWidget, &SkeletonGraphicsWidget::zoomRenderedModelBy, m_modelRenderWidget, &ModelWidget::zoom);
|
connect(graphicsWidget, &SkeletonGraphicsWidget::zoomRenderedModelBy, m_modelRenderWidget, &ModelWidget::zoom);
|
||||||
|
|
||||||
connect(graphicsWidget, &SkeletonGraphicsWidget::addNode, m_document, &Document::addNode);
|
connect(graphicsWidget, &SkeletonGraphicsWidget::addNode, m_document, &Document::addNode);
|
||||||
|
|
|
@ -48,4 +48,5 @@ void initShortCuts(QWidget *widget, SkeletonGraphicsWidget *graphicsWidget)
|
||||||
defineKey(Qt::Key_W, &SkeletonGraphicsWidget::shortcutToggleWireframe);
|
defineKey(Qt::Key_W, &SkeletonGraphicsWidget::shortcutToggleWireframe);
|
||||||
defineKey(Qt::Key_F, &SkeletonGraphicsWidget::shortcutCheckPartComponent);
|
defineKey(Qt::Key_F, &SkeletonGraphicsWidget::shortcutCheckPartComponent);
|
||||||
defineKey(Qt::Key_C, &SkeletonGraphicsWidget::shortcutChamferedOrNotSelectedPart);
|
defineKey(Qt::Key_C, &SkeletonGraphicsWidget::shortcutChamferedOrNotSelectedPart);
|
||||||
|
defineKey(Qt::Key_O, &SkeletonGraphicsWidget::shortcutToggleFlatShading);
|
||||||
}
|
}
|
||||||
|
|
|
@ -417,6 +417,7 @@ signals:
|
||||||
void shortcutToggleWireframe();
|
void shortcutToggleWireframe();
|
||||||
void partComponentChecked(QUuid partId);
|
void partComponentChecked(QUuid partId);
|
||||||
void showOrHideAllComponents();
|
void showOrHideAllComponents();
|
||||||
|
void shortcutToggleFlatShading();
|
||||||
public:
|
public:
|
||||||
SkeletonGraphicsWidget(const SkeletonDocument *document);
|
SkeletonGraphicsWidget(const SkeletonDocument *document);
|
||||||
std::map<QUuid, std::pair<SkeletonGraphicsNodeItem *, SkeletonGraphicsNodeItem *>> nodeItemMap;
|
std::map<QUuid, std::pair<SkeletonGraphicsNodeItem *, SkeletonGraphicsNodeItem *>> nodeItemMap;
|
||||||
|
|
Loading…
Reference in New Issue