Disable unsupported properties if qtForMCUs is set

When qtForMCUs is enable in the project, disables the action to open
the easing curve editor in the timeline and the actions to set an
interpolation to anything else than linear in the animation curve editor.
Shows the disabled reason in the tooltip and paint non linear curve
segments in the error color and without handles.

Fixes: QDS-10061
Change-Id: I71b2af0dd6f6c10714fceb75ff3ac16c88504adf
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
Reviewed-by: Qt CI Patch Build Bot <ci_patchbuild_bot@qt.io>
This commit is contained in:
Knud Dollereder
2023-06-26 15:57:45 +02:00
parent 8537d96270
commit 185ce52561
16 changed files with 142 additions and 40 deletions

View File

@@ -8,6 +8,7 @@
#include "detail/graphicsview.h"
#include "detail/treeview.h"
#include <designermcumanager.h>
#include <utils/fileutils.h>
#include <QDoubleSpinBox>
@@ -106,6 +107,7 @@ CurveEditor::CurveEditor(CurveEditorModel *model, QWidget *parent)
auto updateTimeline = [this, model](bool validTimeline) {
if (validTimeline) {
updateStatusLine();
updateMcuState();
m_view->setCurrentFrame(m_view->model()->currentFrame(), false);
m_toolbar->updateBoundsSilent(model->minimumTime(), model->maximumTime());
m_toolbar->show();
@@ -163,4 +165,11 @@ void CurveEditor::updateStatusLine()
m_statusLine->setText(currentText);
}
void CurveEditor::updateMcuState()
{
bool isMcu = DesignerMcuManager::instance().isMCUProject();
m_toolbar->setIsMcuProject(isMcu);
m_view->setIsMcu(isMcu);
}
} // End namespace QmlDesigner.