mirror of
https://github.com/jkriege2/JKQtPlotter.git
synced 2024-12-24 09:31:40 +08:00
added several setter variants for colors that have the alpha transparency value as separate parameter
This commit is contained in:
parent
1c0d0cb262
commit
e2fba9957e
@ -19,7 +19,6 @@
|
||||
|
||||
#include "jkqtplotter/jkqtpgraphsbasestylingmixins.h"
|
||||
#include "jkqtplotter/jkqtpbaseplotter.h"
|
||||
#include "jkqtplotter/jkqtplotter.h"
|
||||
#include <QApplication>
|
||||
#include <QDebug>
|
||||
|
||||
@ -57,6 +56,13 @@ void JKQTPGraphLineStyleMixin::setLineColor(const QColor &__value)
|
||||
m_linePen.setColor(__value);
|
||||
}
|
||||
|
||||
void JKQTPGraphLineStyleMixin::setLineColor(const QColor &__value, double alpha)
|
||||
{
|
||||
QColor c=__value;
|
||||
c.setAlphaF(alpha);
|
||||
setLineColor(c);
|
||||
}
|
||||
|
||||
QColor JKQTPGraphLineStyleMixin::getLineColor() const
|
||||
{
|
||||
return m_linePen.color();
|
||||
@ -254,6 +260,12 @@ void JKQTPGraphSymbolStyleMixin::setSymbolColor(const QColor &__value)
|
||||
m_symbolColor=__value;
|
||||
}
|
||||
|
||||
void JKQTPGraphSymbolStyleMixin::setSymbolColor(const QColor &__value, double alpha)
|
||||
{
|
||||
m_symbolColor=__value;
|
||||
m_symbolColor.setAlphaF(alpha);
|
||||
}
|
||||
|
||||
QColor JKQTPGraphSymbolStyleMixin::getSymbolColor() const
|
||||
{
|
||||
return m_symbolColor;
|
||||
@ -264,11 +276,23 @@ void JKQTPGraphSymbolStyleMixin::setSymbolFillColor(const QColor &__value)
|
||||
m_symbolFillColor=__value;
|
||||
}
|
||||
|
||||
void JKQTPGraphSymbolStyleMixin::setSymbolFillColor(const QColor &__value, double alpha)
|
||||
{
|
||||
m_symbolFillColor=__value;
|
||||
m_symbolFillColor.setAlphaF(alpha);
|
||||
}
|
||||
|
||||
QColor JKQTPGraphSymbolStyleMixin::getSymbolFillColor() const
|
||||
{
|
||||
return m_symbolFillColor;
|
||||
}
|
||||
|
||||
void JKQTPGraphSymbolStyleMixin::setSymbolAlpha(double alpha)
|
||||
{
|
||||
m_symbolColor.setAlphaF(alpha);
|
||||
m_symbolFillColor.setAlphaF(alpha);
|
||||
}
|
||||
|
||||
void JKQTPGraphSymbolStyleMixin::setSymbolLineWidth(double __value)
|
||||
{
|
||||
m_symbolLineWidth=__value;
|
||||
@ -404,6 +428,13 @@ void JKQTPGraphFillStyleMixin::setFillColor(const QColor &__value)
|
||||
m_fillBrush.setColor(m_fillColor);
|
||||
}
|
||||
|
||||
void JKQTPGraphFillStyleMixin::setFillColor(const QColor &__value, double alpha)
|
||||
{
|
||||
m_fillColor=__value;
|
||||
m_fillColor.setAlphaF(alpha);
|
||||
m_fillBrush.setColor(m_fillColor);
|
||||
}
|
||||
|
||||
QColor JKQTPGraphFillStyleMixin::getFillColor() const
|
||||
{
|
||||
return m_fillBrush.color();
|
||||
@ -464,6 +495,12 @@ void JKQTPGraphLineStyleMixin::setHighlightingLineColor(const QColor &__value)
|
||||
m_highlightingLineColor=__value;
|
||||
}
|
||||
|
||||
void JKQTPGraphLineStyleMixin::setHighlightingLineColor(const QColor &__value, double alpha)
|
||||
{
|
||||
m_highlightingLineColor=__value;
|
||||
m_highlightingLineColor.setAlphaF(alpha);
|
||||
}
|
||||
|
||||
QColor JKQTPGraphLineStyleMixin::getHighlightingLineColor() const
|
||||
{
|
||||
return m_highlightingLineColor;
|
||||
@ -538,6 +575,12 @@ void JKQTPGraphTextStyleMixin::setTextColor(const QColor &__value)
|
||||
m_textColor=__value;
|
||||
}
|
||||
|
||||
void JKQTPGraphTextStyleMixin::setTextColor(const QColor &__value, double alpha)
|
||||
{
|
||||
m_textColor=__value;
|
||||
m_textColor.setAlphaF(alpha);
|
||||
}
|
||||
|
||||
QColor JKQTPGraphTextStyleMixin::getTextColor() const
|
||||
{
|
||||
return m_textColor;
|
||||
|
@ -60,6 +60,8 @@ class JKQTPLOTTER_LIB_EXPORT JKQTPGraphLineStyleMixin {
|
||||
|
||||
/** \brief set the color of the graph line */
|
||||
void setLineColor(const QColor & __value);
|
||||
/** \brief set the color of the graph line */
|
||||
void setLineColor(const QColor & __value, double alpha);
|
||||
/** \brief get the color of the graph line */
|
||||
QColor getLineColor() const;
|
||||
|
||||
@ -117,6 +119,8 @@ class JKQTPLOTTER_LIB_EXPORT JKQTPGraphLineStyleMixin {
|
||||
|
||||
/** \brief set the color of the graph line when highlighted */
|
||||
void setHighlightingLineColor(const QColor & __value);
|
||||
/** \brief set the color of the graph line when highlighted */
|
||||
void setHighlightingLineColor(const QColor & __value, double alpha);
|
||||
/** \brief get the color of the graph line when highlighted */
|
||||
QColor getHighlightingLineColor() const;
|
||||
|
||||
@ -391,13 +395,20 @@ class JKQTPLOTTER_LIB_EXPORT JKQTPGraphSymbolStyleMixin {
|
||||
/** \brief set the color of the graph symbols */
|
||||
void setSymbolColor(const QColor & __value);
|
||||
/** \brief set the color of the graph symbols */
|
||||
void setSymbolColor(const QColor & __value, double alpha);
|
||||
/** \brief set the color of the graph symbols */
|
||||
QColor getSymbolColor() const;
|
||||
|
||||
/** \brief set the color of filling of the graph symbols */
|
||||
void setSymbolFillColor(const QColor & __value);
|
||||
/** \brief set the color of filling of the graph symbols */
|
||||
void setSymbolFillColor(const QColor & __value, double alpha);
|
||||
/** \brief set the color of filling of the graph symbols */
|
||||
QColor getSymbolFillColor() const;
|
||||
|
||||
/** \brief set alpha-value of symbol outline and filling */
|
||||
void setSymbolAlpha(double alpha);
|
||||
|
||||
/** \brief set the line width of the graph symbol outline (in pt) */
|
||||
void setSymbolLineWidth(double __value);
|
||||
/** \brief get the line width of the graph symbol outline (in pt) */
|
||||
@ -532,6 +543,8 @@ class JKQTPLOTTER_LIB_EXPORT JKQTPGraphFillStyleMixin {
|
||||
/** \brief set the color of the graph filling */
|
||||
void setFillColor(const QColor & __value);
|
||||
/** \brief set the color of the graph filling */
|
||||
void setFillColor(const QColor & __value, double alpha);
|
||||
/** \brief set the color of the graph filling */
|
||||
QColor getFillColor() const;
|
||||
|
||||
/** \brief set the color of the graph filling and sets fill style to Qt::TexturePattern */
|
||||
@ -644,6 +657,8 @@ class JKQTPLOTTER_LIB_EXPORT JKQTPGraphTextStyleMixin {
|
||||
/** \brief set the color of the text */
|
||||
void setTextColor(const QColor & __value);
|
||||
/** \brief set the color of the text */
|
||||
void setTextColor(const QColor & __value, double alpha);
|
||||
/** \brief set the color of the text */
|
||||
QColor getTextColor() const;
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user