mirror of
https://github.com/jkriege2/JKQtPlotter.git
synced 2024-12-25 01:51:49 +08:00
NEW added entry for plotLabelColor to JKQTBasePlotterStyle
This commit is contained in:
parent
97c54916cf
commit
754553568d
@ -87,6 +87,7 @@ Changes, compared to \ref page_whatsnew_V4_0_0 "v4.0.0" include:
|
||||
<li>NEW: add color palettes from Green's HELIX method, see <a href="https://arxiv.org/abs/1108.5083">https://arxiv.org/abs/1108.5083</a>, also see <a href="https://jiffyclub.github.io/palettable/cubehelix/">https://jiffyclub.github.io/palettable/cubehelix/</a>, see JKQTPCreateGreensCubeHelixLUT() and e.g. JKQTPMathImageCubeHelixClassic, JKQTPMathImageCubeHelix1, ...</li>
|
||||
<li>NEW: Using Q_SIGNALS/Q_SLOTS instead of signals/slots MOC-keywords ... this allows for interoperability with other signals/slots frameworks, thanks to <a href="https://github.com/nickmontini">user:nickmontini</a> for the proposal</li>
|
||||
<li>NEW: you can use any (preferably stepped/categorial) JKQTPMathImageColorPalette as default graph colors list in a style.ini file, by setting <tt>auto_styles/use_color_from_palette=PALETTE_NAME</tt></li>
|
||||
<li>NEW added entry for plotLabelColor to JKQTBasePlotterStyle</li>
|
||||
</ul></li>
|
||||
|
||||
<li>JKQTMathText:<ul>
|
||||
|
@ -270,6 +270,7 @@ inline void buildLineSymbolSampler(JKQTBasePlotter* plotExtra, JKQTBasePlotter*
|
||||
plotExtra->setBackgroundColor(baseplot->getBackgroundColor());
|
||||
plotExtra->setExportBackgroundColor(baseplot->getExportBackgroundColor());
|
||||
plotExtra->setPlotBackgroundColor(baseplot->getPlotBackgroundColor());
|
||||
plotExtra->setPlotLabelColor(baseplot->getPlotLabelColor());
|
||||
plotExtra->getXAxis()->setDrawMode1(JKQTPCADMnone);
|
||||
plotExtra->getXAxis()->setDrawMode2(JKQTPCADMnone);
|
||||
plotExtra->getYAxis()->setDrawMode1(JKQTPCADMnone);
|
||||
|
@ -1372,6 +1372,7 @@ void JKQTBasePlotter::drawPlot(JKQTPEnhancedPainter& painter) {
|
||||
if (!plotLabel.isEmpty()) {
|
||||
mathText.setFontSize(plotterStyle.plotLabelFontSize*fontSizeMultiplier);
|
||||
mathText.setFontSpecial(plotterStyle.plotLabelFontName);
|
||||
mathText.setFontColor(plotterStyle.plotLabelColor);
|
||||
|
||||
mathText.parse(plotLabel);
|
||||
double a=0,d=0,so=0,w=0;
|
||||
@ -2998,6 +2999,19 @@ double JKQTBasePlotter::getPlotLabelFontSize() const
|
||||
return this->plotterStyle.plotLabelFontSize;
|
||||
}
|
||||
|
||||
void JKQTBasePlotter::setPlotLabelColor(QColor __value)
|
||||
{
|
||||
if (this->plotterStyle.plotLabelColor != __value) {
|
||||
this->plotterStyle.plotLabelColor = __value;
|
||||
redrawPlot();
|
||||
}
|
||||
}
|
||||
|
||||
QColor JKQTBasePlotter::getPlotLabelColor() const
|
||||
{
|
||||
return this->plotterStyle.plotLabelColor;
|
||||
}
|
||||
|
||||
void JKQTBasePlotter::setplotLabelFontName(const QString &__value)
|
||||
{
|
||||
if (this->plotterStyle.plotLabelFontName != __value) {
|
||||
|
@ -1139,6 +1139,8 @@ class JKQTPLOTTER_LIB_EXPORT JKQTBasePlotter: public QObject {
|
||||
double getPlotLabelFontSize() const;
|
||||
/** \copydoc JKQTBasePlotterStyle::plotLabelFontName */
|
||||
QString getplotLabelFontName() const;
|
||||
/** \copydoc JKQTBasePlotterStyle::plotLabelColor */
|
||||
QColor getPlotLabelColor() const;
|
||||
|
||||
/** \copydoc plotLabel */
|
||||
QString getPlotLabel() const;
|
||||
@ -2013,6 +2015,8 @@ class JKQTPLOTTER_LIB_EXPORT JKQTBasePlotter: public QObject {
|
||||
void setPlotLabelFontSize(double __value);
|
||||
/** \copydoc JKQTBasePlotterStyle::plotLabelFontName */
|
||||
void setplotLabelFontName(const QString & __value);
|
||||
/** \copydoc JKQTBasePlotterStyle::plotLabelColor */
|
||||
void setPlotLabelColor(QColor __value);
|
||||
/** \brief set the plot label text */
|
||||
void setPlotLabel(const QString & __value);
|
||||
/** \copydoc JKQTBasePlotterStyle::defaultTextColor */
|
||||
|
@ -52,6 +52,7 @@ void JKQTBasePlotterStyle::loadSettings(const QSettings &settings, const QString
|
||||
debugTextBoxLineWidth=settings.value(group+"debug_textbox_linewidth", defaultStyle.debugTextBoxLineWidth).toDouble();
|
||||
plotLabelFontName=settings.value(group+"plot_label_font_name", defaultStyle.plotLabelFontName).toString();
|
||||
plotLabelFontSize=settings.value(group+"plot_label_font_size", defaultStyle.plotLabelFontSize).toDouble();
|
||||
plotLabelColor=jkqtp_String2QColor(settings.value(group+"plot_label_color", jkqtp_QColor2String(defaultStyle.plotLabelColor)).toString());
|
||||
widgetBackgroundBrush=QBrush(jkqtp_String2QColor(settings.value(group+"widget_background_color", jkqtp_QColor2String(defaultStyle.widgetBackgroundBrush.color())).toString()));
|
||||
exportBackgroundBrush=QBrush(jkqtp_String2QColor(settings.value(group+"widget_background_color_for_export", jkqtp_QColor2String(defaultStyle.exportBackgroundBrush.color())).toString()));
|
||||
plotBackgroundBrush=QBrush(jkqtp_String2QColor(settings.value(group+"plot_background_color", jkqtp_QColor2String(defaultStyle.plotBackgroundBrush.color())).toString()));
|
||||
@ -99,6 +100,7 @@ void JKQTBasePlotterStyle::saveSettings(QSettings &settings, const QString &grou
|
||||
settings.setValue(group+"text_default_font_name", defaultFontName);
|
||||
settings.setValue(group+"plot_label_font_name", plotLabelFontName);
|
||||
settings.setValue(group+"plot_label_font_size", plotLabelFontSize);
|
||||
settings.setValue(group+"plot_label_color", jkqtp_QColor2String(plotLabelColor));
|
||||
settings.setValue(group+"plot_frame_visible", plotFrameVisible);
|
||||
settings.setValue(group+"plot_frame_color", jkqtp_QColor2String(plotFrameColor));
|
||||
settings.setValue(group+"plot_frame_width", plotFrameWidth);
|
||||
|
@ -139,6 +139,8 @@ class JKQTPLOTTER_LIB_EXPORT JKQTBasePlotterStyle {
|
||||
QString plotLabelFontName;
|
||||
/** \brief the plot label font size [pt] */
|
||||
double plotLabelFontSize;
|
||||
/** \brief the plot label color */
|
||||
QColor plotLabelColor;
|
||||
/** \brief specifies whether to use antialiasing for plotting the coordinate system */
|
||||
bool useAntiAliasingForSystem;
|
||||
/** \brief specifies whether to use antialiasing when drawing any text
|
||||
|
Loading…
Reference in New Issue
Block a user