Allow changing the 3D Editor's background color

Task-number: QDS-6585
Change-Id: Ibcac69d3792b521b29dfbdce2d49557d36de99a9
Reviewed-by: Mahmoud Badri <mahmoud.badri@qt.io>
This commit is contained in:
Samuel Ghinet
2022-05-31 16:19:29 +03:00
parent d99a6d2efe
commit c3b90c0ce5
24 changed files with 369 additions and 44 deletions

View File

@@ -141,6 +141,9 @@ Edit3DWidget::Edit3DWidget(Edit3DView *view) :
m_visibilityTogglesMenu = new Edit3DVisibilityTogglesMenu(this);
handleActions(view->visibilityToggleActions(), m_visibilityTogglesMenu, false);
m_backgroundColorMenu = new Edit3DVisibilityTogglesMenu(this);
handleActions(view->backgroundColorActions(), m_backgroundColorMenu, false);
view->setSeeker(seeker);
seeker->setToolTip(QLatin1String("Seek particle system time when paused."));
@@ -201,6 +204,21 @@ void Edit3DWidget::showVisibilityTogglesMenu(bool show, const QPoint &pos)
m_visibilityTogglesMenu->close();
}
QMenu *Edit3DWidget::backgroundColorMenu() const
{
return m_backgroundColorMenu.data();
}
void Edit3DWidget::showBackgroundColorMenu(bool show, const QPoint &pos)
{
if (m_backgroundColorMenu.isNull())
return;
if (show)
m_backgroundColorMenu->popup(pos);
else
m_backgroundColorMenu->close();
}
void Edit3DWidget::linkActivated(const QString &link)
{
Q_UNUSED(link)