summaryrefslogtreecommitdiffstats
path: root/src/designer/src/lib/shared/qdesigner_objectinspector.cpp
blob: 9d546503164cd3f9fa456256639a8b4403a8df62 (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
32
33
34
35
36
37
38
39
40
41
42
// Copyright (C) 2016 The Qt Company Ltd.
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0

#include "qdesigner_objectinspector_p.h"

QT_BEGIN_NAMESPACE

namespace qdesigner_internal {

QDesignerObjectInspector::QDesignerObjectInspector(QWidget *parent, Qt::WindowFlags flags) :
    QDesignerObjectInspectorInterface(parent, flags)
{
}

void QDesignerObjectInspector::mainContainerChanged()
{
}

void Selection::clear()
{
    managed.clear();
    unmanaged.clear();
    objects.clear();
}

bool Selection::empty() const
{
    return managed.isEmpty() && unmanaged.isEmpty() && objects.isEmpty();
}

QObjectList Selection::selection() const
{
    QObjectList rc(objects);
    for (QObject *o : managed)
        rc.push_back(o);
    for (QObject *o : unmanaged)
        rc.push_back(o);
    return rc;
}
}

QT_END_NAMESPACE