summaryrefslogtreecommitdiff
path: root/src/plugins/scxmleditor/plugin_interface/layoutitem.cpp
blob: 0f58e506611265d035456e500d766be90a8ef93f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
// Copyright (C) 2016 The Qt Company Ltd.
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0+ OR GPL-3.0 WITH Qt-GPL-exception-1.0

#include "layoutitem.h"

using namespace ScxmlEditor::PluginInterface;

LayoutItem::LayoutItem(const QRectF &br, QGraphicsItem *parent)
    : QGraphicsObject(parent)
    , m_boundingRect(br)
{
    setZValue(-100);
}

QRectF LayoutItem::boundingRect() const
{
    return m_boundingRect;
}

void LayoutItem::paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget)
{
    Q_UNUSED(painter)
    Q_UNUSED(option)
    Q_UNUSED(widget)
}

void LayoutItem::setBoundingRect(const QRectF &r)
{
    prepareGeometryChange();
    m_boundingRect = r;
}