/** * @RDE_HEADER@ * TextStyle * $Id$ * $HeadURL$ * $Author$ */ // Own #include "text_style.h" // ESRI namespace SituationMap { TextStyle::TextStyle(const QColor &textColor, float size) : m_textColor(textColor) , m_size(size) {} TextStyle::TextStyle(const QColor &textColor) : m_textColor(textColor) {} QColor TextStyle::textColor() const { return m_textColor; } void TextStyle::setTextColor(const QColor &textColor) { m_textColor = textColor; } float TextStyle::size() const { return m_size; } void TextStyle::setSize(float size) { m_size = size; } bool TextStyle::bold() const { return m_bold; } void TextStyle::setBold(bool bold) { m_bold = bold; } bool TextStyle::italic() const { return m_italic; } void TextStyle::setItalic(bool italic) { m_italic = italic; } bool TextStyle::underline() const { return m_underline; } void TextStyle::setUnderline(bool underline) { m_underline = underline; } bool TextStyle::strikeThrough() const { return m_strikeThrough; } void TextStyle::setStrikeThrough(bool strikeThrough) { m_strikeThrough = strikeThrough; } float TextStyle::textOutlineWidth() const { return m_textOutlineWidth; } void TextStyle::setTextOutlineWidth(float textOutlineWidth) { m_textOutlineWidth = textOutlineWidth; } QColor TextStyle::textOutlineColor() const { return m_textOutlineColor; } void TextStyle::setTextOutlineColor(const QColor &textOutlineColor) { m_textOutlineColor = textOutlineColor; } QColor TextStyle::backgroundColor() const { return m_backgroundColor; } void TextStyle::setBackgroundColor(const QColor &backgroundColor) { m_backgroundColor = backgroundColor; } bool TextStyle::antiAliased() const { return m_antiAliased; } void TextStyle::setAntiAliased(bool antiAliased) { m_antiAliased = antiAliased; } HorizontalAlignment TextStyle::horizontalAlignment() const { return m_horizontalAlignment; } void TextStyle::setHorizontalAlignment(const HorizontalAlignment &horizontalAlignment) { m_horizontalAlignment = horizontalAlignment; } VerticalAlignment TextStyle::verticalAlignment() const { return m_verticalAlignment; } void TextStyle::setVerticalAlignment(const VerticalAlignment &verticalAlignment) { m_verticalAlignment = verticalAlignment; } float TextStyle::angle() const { return m_angle; } void TextStyle::setAngle(float angleDegree) { m_angle = angleDegree; } const QString &TextStyle::fontFamily() const { return m_fontFamily; } void SituationMap::TextStyle::setFontFamily(const QString &fontFamily) { m_fontFamily = fontFamily; } //----------------------------------------------------------------------------- // output operator: //----------------------------------------------------------------------------- std::ostream &operator<< (std::ostream &stream, const TextStyle &value) { QString str; str.append(QStringLiteral(" textColor='%1'").arg(value.textColor().name(QColor::HexArgb))); str.append(QStringLiteral(" size=%1").arg(value.size())); str.append(QStringLiteral(" angle=%1").arg(value.angle())); str.append(QStringLiteral(" fontFamily='%1'").arg(value.fontFamily())); str.append(QStringLiteral(" bold=%1").arg(value.bold())); str.append(QStringLiteral(" italic=%1").arg(value.italic())); str.append(QStringLiteral(" underline=%1").arg(value.underline())); str.append(QStringLiteral(" strikeThrough=%1").arg(value.strikeThrough())); str.append(QStringLiteral(" textOutlineWidth=%1").arg(value.textOutlineWidth())); str.append(QStringLiteral(" textOutlineColor=%1").arg(value.textOutlineColor().name(QColor::HexArgb))); str.append(QStringLiteral(" backgroundColor=%1").arg(value.backgroundColor().name(QColor::HexArgb))); str.append(QStringLiteral(" horizontalAlignment=%1").arg(static_cast(value.horizontalAlignment()))); str.append(QStringLiteral(" verticalAlignment=%1").arg(static_cast(value.verticalAlignment()))); str.append(QStringLiteral(" antiAliased=%1").arg(value.antiAliased())); stream << str.toStdString(); return stream; } } // namespace SituationMap