stereotypeicon.cpp 2.47 KB
Newer Older
1
/****************************************************************************
Jochen Becher's avatar
Jochen Becher committed
2
**
3 4
** Copyright (C) 2016 Jochen Becher
** Contact: https://www.qt.io/licensing/
Jochen Becher's avatar
Jochen Becher committed
5 6 7 8 9 10 11
**
** This file is part of Qt Creator.
**
** Commercial License Usage
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
12 13 14
** a written agreement between you and The Qt Company. For licensing terms
** and conditions see https://www.qt.io/terms-conditions. For further
** information use the contact form at https://www.qt.io/contact-us.
Jochen Becher's avatar
Jochen Becher committed
15
**
16 17 18 19 20 21 22
** GNU General Public License Usage
** Alternatively, this file may be used under the terms of the GNU
** General Public License version 3 as published by the Free Software
** Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
** included in the packaging of this file. Please review the following
** information to ensure the GNU General Public License requirements will
** be met: https://www.gnu.org/licenses/gpl-3.0.html.
Jochen Becher's avatar
Jochen Becher committed
23 24 25 26 27 28 29 30 31
**
****************************************************************************/

#include "stereotypeicon.h"

namespace qmt {

void StereotypeIcon::setId(const QString &id)
{
32
    m_id = id;
Jochen Becher's avatar
Jochen Becher committed
33 34
}

35
QString StereotypeIcon::title() const
Jochen Becher's avatar
Jochen Becher committed
36
{
37
    if (m_title.isEmpty())
38 39
        return m_id;
    return m_title;
Jochen Becher's avatar
Jochen Becher committed
40 41 42 43
}

void StereotypeIcon::setTitle(const QString &title)
{
44
    m_title = title;
Jochen Becher's avatar
Jochen Becher committed
45 46 47 48
}

void StereotypeIcon::setElements(const QSet<Element> &elements)
{
49
    m_elements = elements;
Jochen Becher's avatar
Jochen Becher committed
50 51 52 53
}

void StereotypeIcon::setStereotypes(const QSet<QString> &stereotypes)
{
54
    m_stereotypes = stereotypes;
Jochen Becher's avatar
Jochen Becher committed
55 56 57 58
}

void StereotypeIcon::setWidth(qreal width)
{
59
    m_width = width;
Jochen Becher's avatar
Jochen Becher committed
60 61 62 63
}

void StereotypeIcon::setHeight(qreal height)
{
64
    m_height = height;
Jochen Becher's avatar
Jochen Becher committed
65 66
}

67
void StereotypeIcon::setMinWidth(qreal minWidth)
Jochen Becher's avatar
Jochen Becher committed
68
{
69
    m_minWidth = minWidth;
Jochen Becher's avatar
Jochen Becher committed
70 71
}

72
void StereotypeIcon::setMinHeight(qreal minHeight)
Jochen Becher's avatar
Jochen Becher committed
73
{
74
    m_minHeight = minHeight;
Jochen Becher's avatar
Jochen Becher committed
75 76
}

77
void StereotypeIcon::setSizeLock(StereotypeIcon::SizeLock sizeLock)
Jochen Becher's avatar
Jochen Becher committed
78
{
79
    m_sizeLock = sizeLock;
Jochen Becher's avatar
Jochen Becher committed
80 81 82 83
}

void StereotypeIcon::setDisplay(StereotypeIcon::Display display)
{
84
    m_display = display;
Jochen Becher's avatar
Jochen Becher committed
85 86
}

87
void StereotypeIcon::setTextAlignment(StereotypeIcon::TextAlignment textAlignment)
Jochen Becher's avatar
Jochen Becher committed
88
{
89
    m_textAlignment = textAlignment;
Jochen Becher's avatar
Jochen Becher committed
90 91
}

92
void StereotypeIcon::setBaseColor(const QColor &baseColor)
Jochen Becher's avatar
Jochen Becher committed
93
{
94
    m_baseColor = baseColor;
Jochen Becher's avatar
Jochen Becher committed
95 96
}

97
void StereotypeIcon::setIconShape(const IconShape &iconShape)
Jochen Becher's avatar
Jochen Becher committed
98
{
99
    m_iconShape = iconShape;
Jochen Becher's avatar
Jochen Becher committed
100 101 102
}

} // namespace qmt