Add shortcut 'W' for toggling wireframe.

master
Jeremy Hu 2019-02-23 10:11:56 +09:30
parent b2fdb7f4e8
commit b86837b4b0
3 changed files with 6 additions and 0 deletions

View File

@ -723,6 +723,10 @@ DocumentWindow::DocumentWindow() :
}); });
connect(m_document, &Document::editModeChanged, graphicsWidget, &SkeletonGraphicsWidget::editModeChanged); connect(m_document, &Document::editModeChanged, graphicsWidget, &SkeletonGraphicsWidget::editModeChanged);
connect(graphicsWidget, &SkeletonGraphicsWidget::shortcutToggleWireframe, [=]() {
m_modelRenderWidget->toggleWireframe();
});
connect(graphicsWidget, &SkeletonGraphicsWidget::zoomRenderedModelBy, m_modelRenderWidget, &ModelWidget::zoom); connect(graphicsWidget, &SkeletonGraphicsWidget::zoomRenderedModelBy, m_modelRenderWidget, &ModelWidget::zoom);

View File

@ -45,4 +45,5 @@ void initShortCuts(QWidget *widget, SkeletonGraphicsWidget *graphicsWidget)
defineKey(Qt::Key_M, &SkeletonGraphicsWidget::shortcutXmirrorOnOrOffSelectedPart); defineKey(Qt::Key_M, &SkeletonGraphicsWidget::shortcutXmirrorOnOrOffSelectedPart);
defineKey(Qt::Key_B, &SkeletonGraphicsWidget::shortcutSubdivedOrNotSelectedPart); defineKey(Qt::Key_B, &SkeletonGraphicsWidget::shortcutSubdivedOrNotSelectedPart);
defineKey(Qt::Key_U, &SkeletonGraphicsWidget::shortcutRoundEndOrNotSelectedPart); defineKey(Qt::Key_U, &SkeletonGraphicsWidget::shortcutRoundEndOrNotSelectedPart);
defineKey(Qt::Key_W, &SkeletonGraphicsWidget::shortcutToggleWireframe);
} }

View File

@ -385,6 +385,7 @@ signals:
void switchChainSide(std::set<QUuid> nodeIds); void switchChainSide(std::set<QUuid> nodeIds);
void enableAllPositionRelatedLocks(); void enableAllPositionRelatedLocks();
void disableAllPositionRelatedLocks(); void disableAllPositionRelatedLocks();
void shortcutToggleWireframe();
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;