Hide whole model rotating buttons

master
Jeremy Hu 2019-02-21 21:54:45 +09:30
parent 4922c669ba
commit de133b0838
1 changed files with 11 additions and 11 deletions

View File

@ -160,13 +160,13 @@ DocumentWindow::DocumentWindow() :
Theme::initAwesomeButton(m_radiusLockButton); Theme::initAwesomeButton(m_radiusLockButton);
updateRadiusLockButtonState(); updateRadiusLockButtonState();
QPushButton *rotateCounterclockwiseButton = new QPushButton(QChar(fa::rotateleft)); //QPushButton *rotateCounterclockwiseButton = new QPushButton(QChar(fa::rotateleft));
rotateCounterclockwiseButton->setToolTip(tr("Rotate whole model (CCW)")); //rotateCounterclockwiseButton->setToolTip(tr("Rotate whole model (CCW)"));
Theme::initAwesomeButton(rotateCounterclockwiseButton); //Theme::initAwesomeButton(rotateCounterclockwiseButton);
QPushButton *rotateClockwiseButton = new QPushButton(QChar(fa::rotateright)); //QPushButton *rotateClockwiseButton = new QPushButton(QChar(fa::rotateright));
rotateClockwiseButton->setToolTip(tr("Rotate whole model")); //rotateClockwiseButton->setToolTip(tr("Rotate whole model"));
Theme::initAwesomeButton(rotateClockwiseButton); //Theme::initAwesomeButton(rotateClockwiseButton);
auto updateRegenerateIconAndTips = [&](SpinnableAwesomeButton *regenerateButton, bool isSucceed, bool forceUpdate=false) { auto updateRegenerateIconAndTips = [&](SpinnableAwesomeButton *regenerateButton, bool isSucceed, bool forceUpdate=false) {
if (!forceUpdate) { if (!forceUpdate) {
@ -208,9 +208,9 @@ DocumentWindow::DocumentWindow() :
toolButtonLayout->addWidget(m_zlockButton); toolButtonLayout->addWidget(m_zlockButton);
toolButtonLayout->addWidget(m_radiusLockButton); toolButtonLayout->addWidget(m_radiusLockButton);
toolButtonLayout->addSpacing(10); toolButtonLayout->addSpacing(10);
toolButtonLayout->addWidget(rotateCounterclockwiseButton); //toolButtonLayout->addWidget(rotateCounterclockwiseButton);
toolButtonLayout->addWidget(rotateClockwiseButton); //toolButtonLayout->addWidget(rotateClockwiseButton);
toolButtonLayout->addSpacing(10); //toolButtonLayout->addSpacing(10);
toolButtonLayout->addWidget(regenerateButton); toolButtonLayout->addWidget(regenerateButton);
@ -678,8 +678,8 @@ DocumentWindow::DocumentWindow() :
connect(m_document, &Document::turnaroundChanged, connect(m_document, &Document::turnaroundChanged,
graphicsWidget, &SkeletonGraphicsWidget::turnaroundChanged); graphicsWidget, &SkeletonGraphicsWidget::turnaroundChanged);
connect(rotateCounterclockwiseButton, &QPushButton::clicked, graphicsWidget, &SkeletonGraphicsWidget::rotateAllMainProfileCounterclockwise90DegreeAlongOrigin); //connect(rotateCounterclockwiseButton, &QPushButton::clicked, graphicsWidget, &SkeletonGraphicsWidget::rotateAllMainProfileCounterclockwise90DegreeAlongOrigin);
connect(rotateClockwiseButton, &QPushButton::clicked, graphicsWidget, &SkeletonGraphicsWidget::rotateAllMainProfileClockwise90DegreeAlongOrigin); //connect(rotateClockwiseButton, &QPushButton::clicked, graphicsWidget, &SkeletonGraphicsWidget::rotateAllMainProfileClockwise90DegreeAlongOrigin);
connect(addButton, &QPushButton::clicked, [=]() { connect(addButton, &QPushButton::clicked, [=]() {
m_document->setEditMode(SkeletonDocumentEditMode::Add); m_document->setEditMode(SkeletonDocumentEditMode::Add);