aboutsummaryrefslogtreecommitdiffstats
path: root/src/libs/modelinglib/qmt/style/styledrelation.h
blob: 27e8735463db29be69b57bdce396c2b6520e9826 (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
// Copyright (C) 2016 Jochen Becher
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0

#pragma once

#include "qmt/infrastructure/qmt_global.h"

namespace qmt {

class DRelation;
class DObject;
class CustomRelation;

class QMT_EXPORT StyledRelation
{
public:
    StyledRelation(const DRelation *relation, const DObject *endA, const DObject *endB,
                   const CustomRelation *customRelation);
    ~StyledRelation();

    const DRelation *relation() const { return m_relation; }
    const DObject *endA() const { return m_endA; }
    const DObject *endB() const { return m_endB; }
    const CustomRelation *customRelation() const { return m_customRelation; }

private:
    const DRelation *m_relation = nullptr;
    const DObject *m_endA = nullptr;
    const DObject *m_endB = nullptr;
    const CustomRelation *m_customRelation = nullptr;
};

} // namespace qmt