aboutsummaryrefslogtreecommitdiffstats
path: root/sources/shiboken6/tests/libsample/objectview.cpp
blob: 5717053a7a6a3290fa891b5ca41f535a88364ab7 (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
// 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 "objectview.h"
#include "objectmodel.h"
#include "str.h"

Str
ObjectView::displayModelData()
{
    if (!m_model)
        return Str("(NULL)");
    return Str("Name: %VAR").arg(m_model->objectName());
}

void
ObjectView::modifyModelData(Str& data)
{
    if (m_model)
        m_model->setObjectName(data);
}


ObjectType*
ObjectView::getRawModelData()
{
    return m_model->data();
}