Add View::setZOrder()
Only relevant to QtQuick. Removes some ifdefs.
This commit is contained in:
@@ -239,6 +239,9 @@ public:
|
||||
/// only the specific frontend can know what's the actual type
|
||||
virtual bool is(Type) const;
|
||||
|
||||
/// @brief Sets the z order
|
||||
/// Not supported on all platforms
|
||||
virtual void setZOrder(int) {};
|
||||
|
||||
/// @brief if this view is a FloatingWindow, then returns its controller
|
||||
/// Mostly to save the call sites from having too many casts
|
||||
|
||||
@@ -932,16 +932,10 @@ void DockWidget::setMDISize(QSize size)
|
||||
|
||||
void DockWidget::setMDIZ(int z)
|
||||
{
|
||||
#ifdef KDDOCKWIDGETS_QTQUICK
|
||||
if (Frame *frame = d->frame()) {
|
||||
if (!frame->isMDI())
|
||||
return;
|
||||
frame->setZ(z);
|
||||
if (frame->isMDI())
|
||||
frame->view()->setZOrder(z);
|
||||
}
|
||||
#else
|
||||
Q_UNUSED(z);
|
||||
qWarning() << Q_FUNC_INFO << "Not implemented for QtQuick";
|
||||
#endif
|
||||
}
|
||||
|
||||
bool DockWidget::isPersistentCentralDockWidget() const
|
||||
|
||||
@@ -821,4 +821,9 @@ QQuickItem *View_qtquick::createQQuickItem(const QString &filename, QQuickItem *
|
||||
return qquickitem;
|
||||
}
|
||||
|
||||
void View_qtquick::setZOrder(int z)
|
||||
{
|
||||
QQuickItem::setZ(z);
|
||||
}
|
||||
|
||||
#include "View_qtquick.moc"
|
||||
|
||||
@@ -157,6 +157,7 @@ public:
|
||||
void setCursor(Qt::CursorShape shape) override;
|
||||
void setMouseTracking(bool enable) override;
|
||||
QVector<std::shared_ptr<View>> childViews() const override;
|
||||
void setZOrder(int) override;
|
||||
|
||||
/// @brief This is equivalent to "anchors.fill: parent but in C++
|
||||
void makeItemFillParent(QQuickItem *item);
|
||||
|
||||
Reference in New Issue
Block a user