Skip to content

Commit

Permalink
Load the new elements.
Browse files Browse the repository at this point in the history
  • Loading branch information
hjtappe committed Mar 27, 2024
1 parent aa5b323 commit 39ad701
Showing 1 changed file with 60 additions and 0 deletions.
60 changes: 60 additions & 0 deletions qmlui/virtualconsole/vcframe.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1086,6 +1086,66 @@ bool VCFrame::loadWidgetXML(QXmlStreamReader &root, bool render)
slider->render(m_vc->view(), m_item);
}
}
else if (root.name() == KXMLQLCVCAnimation)
{
/* Create a new clock into its parent */
VCAnimation *animation = new VCAnimation(m_doc, this);
if (animation->loadXML(root) == false)
delete animation;
else
{
QQmlEngine::setObjectOwnership(animation, QQmlEngine::CppOwnership);
setupWidget(animation, animation->page());
m_vc->addWidgetToMap(animation);
if (render && m_item)
animation->render(m_vc->view(), m_item);
}
}
else if (root.name() == KXMLQLCVCAudioTriggers)
{
/* Create a new clock into its parent */
VCAnimation *animation = new VCAnimation(m_doc, this);
if (animation->loadXML(root) == false)
delete animation;
else
{
QQmlEngine::setObjectOwnership(animation, QQmlEngine::CppOwnership);
setupWidget(animation, animation->page());
m_vc->addWidgetToMap(animation);
if (render && m_item)
animation->render(m_vc->view(), m_item);
}
}
else if (root.name() == KXMLQLCVCSpeedDial)
{
/* Create a new speedDial into its parent */
VCSpeedDial *speedDial = new VCSpeedDial(m_doc, this);
if (speedDial->loadXML(root) == false)
delete speedDial;
else
{
QQmlEngine::setObjectOwnership(speedDial, QQmlEngine::CppOwnership);
setupWidget(speedDial, speedDial->page());
m_vc->addWidgetToMap(speedDial);
if (render && m_item)
speedDial->render(m_vc->view(), m_item);
}
}
else if (root.name() == KXMLQLCVCXYPad)
{
/* Create a new xyPad into its parent */
VCXYPad *xyPad = new VCXYPad(m_doc, this);
if (xyPad->loadXML(root) == false)
delete xyPad;
else
{
QQmlEngine::setObjectOwnership(xyPad, QQmlEngine::CppOwnership);
setupWidget(xyPad, xyPad->page());
m_vc->addWidgetToMap(xyPad);
if (render && m_item)
xyPad->render(m_vc->view(), m_item);
}
}
else if (root.name() == KXMLQLCVCClock)
{
/* Create a new clock into its parent */
Expand Down

0 comments on commit 39ad701

Please sign in to comment.