NEW: added JKQTBasePlotterStyle::plotLabelTopBorder and made plot labels BOLD
@ -91,6 +91,7 @@ Changes, compared to \ref page_whatsnew_V4_0_0 "v4.0.0" include:
|
|||||||
<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: 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: 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 JKQTBasePlotterStyle::plotLabelColor to set the plot label color</li>
|
<li>NEW: added entry for JKQTBasePlotterStyle::plotLabelColor to set the plot label color</li>
|
||||||
|
<li>NEW: added JKQTBasePlotterStyle::plotLabelTopBorder to set the spacing between top and plot label</li>
|
||||||
<li>NEW: Due to addition of JKQTMathText::setFontOptions() and the matchign extension of JKQTMathText::setFontSpecial() (see below) you can now add modifiers like <tt>+BOLD+ITALIC</tt> to any font-name provided to JKQTPlotter and in style INI-files</li>
|
<li>NEW: Due to addition of JKQTMathText::setFontOptions() and the matchign extension of JKQTMathText::setFontSpecial() (see below) you can now add modifiers like <tt>+BOLD+ITALIC</tt> to any font-name provided to JKQTPlotter and in style INI-files</li>
|
||||||
</ul></li>
|
</ul></li>
|
||||||
|
|
||||||
|
Before Width: | Height: | Size: 22 KiB After Width: | Height: | Size: 22 KiB |
Before Width: | Height: | Size: 46 KiB After Width: | Height: | Size: 47 KiB |
Before Width: | Height: | Size: 18 KiB After Width: | Height: | Size: 18 KiB |
Before Width: | Height: | Size: 21 KiB After Width: | Height: | Size: 21 KiB |
Before Width: | Height: | Size: 6.5 KiB After Width: | Height: | Size: 6.6 KiB |
Before Width: | Height: | Size: 44 KiB After Width: | Height: | Size: 43 KiB |
Before Width: | Height: | Size: 9.3 KiB After Width: | Height: | Size: 9.7 KiB |
Before Width: | Height: | Size: 135 KiB After Width: | Height: | Size: 135 KiB |
Before Width: | Height: | Size: 31 KiB After Width: | Height: | Size: 30 KiB |
Before Width: | Height: | Size: 134 KiB After Width: | Height: | Size: 135 KiB |
Before Width: | Height: | Size: 30 KiB After Width: | Height: | Size: 30 KiB |
Before Width: | Height: | Size: 146 KiB After Width: | Height: | Size: 148 KiB |
Before Width: | Height: | Size: 30 KiB After Width: | Height: | Size: 30 KiB |
Before Width: | Height: | Size: 137 KiB After Width: | Height: | Size: 138 KiB |
Before Width: | Height: | Size: 32 KiB After Width: | Height: | Size: 31 KiB |
Before Width: | Height: | Size: 143 KiB After Width: | Height: | Size: 144 KiB |
Before Width: | Height: | Size: 30 KiB After Width: | Height: | Size: 30 KiB |
Before Width: | Height: | Size: 137 KiB After Width: | Height: | Size: 138 KiB |
Before Width: | Height: | Size: 26 KiB After Width: | Height: | Size: 26 KiB |
Before Width: | Height: | Size: 106 KiB After Width: | Height: | Size: 106 KiB |
Before Width: | Height: | Size: 29 KiB After Width: | Height: | Size: 29 KiB |
Before Width: | Height: | Size: 148 KiB After Width: | Height: | Size: 150 KiB |
Before Width: | Height: | Size: 30 KiB After Width: | Height: | Size: 30 KiB |
Before Width: | Height: | Size: 131 KiB After Width: | Height: | Size: 133 KiB |
Before Width: | Height: | Size: 30 KiB After Width: | Height: | Size: 30 KiB |
Before Width: | Height: | Size: 133 KiB After Width: | Height: | Size: 136 KiB |
Before Width: | Height: | Size: 30 KiB After Width: | Height: | Size: 30 KiB |
Before Width: | Height: | Size: 139 KiB After Width: | Height: | Size: 141 KiB |
Before Width: | Height: | Size: 30 KiB After Width: | Height: | Size: 30 KiB |
@ -821,7 +821,7 @@ void JKQTBasePlotter::calcPlotScaling(JKQTPEnhancedPainter& painter){
|
|||||||
|
|
||||||
if (!plotLabel.isEmpty()) {
|
if (!plotLabel.isEmpty()) {
|
||||||
QSizeF s=getTextSizeSize(plotterStyle.plotLabelFontName, plotterStyle.plotLabelFontSize*fontSizeMultiplier, plotLabel, painter);
|
QSizeF s=getTextSizeSize(plotterStyle.plotLabelFontName, plotterStyle.plotLabelFontSize*fontSizeMultiplier, plotLabel, painter);
|
||||||
internalTitleHeight=s.height()+2.0*pt2px(painter, plotterStyle.plotLabelOffset);
|
internalTitleHeight=s.height()+pt2px(painter, plotterStyle.plotLabelOffset)+pt2px(painter, plotterStyle.plotLabelTopBorder);
|
||||||
internalPlotBorderTop+=internalTitleHeight;
|
internalPlotBorderTop+=internalTitleHeight;
|
||||||
|
|
||||||
}
|
}
|
||||||
@ -1378,7 +1378,7 @@ void JKQTBasePlotter::drawPlot(JKQTPEnhancedPainter& painter) {
|
|||||||
double a=0,d=0,so=0,w=0;
|
double a=0,d=0,so=0,w=0;
|
||||||
getTextSizeDetail(plotterStyle.plotLabelFontName,plotterStyle.plotLabelFontSize*fontSizeMultiplier,plotLabel, painter, w, a, d, so);
|
getTextSizeDetail(plotterStyle.plotLabelFontName,plotterStyle.plotLabelFontSize*fontSizeMultiplier,plotLabel, painter, w, a, d, so);
|
||||||
QSizeF s=QSizeF(w, a+d);
|
QSizeF s=QSizeF(w, a+d);
|
||||||
mathText.draw(painter, internalPlotBorderLeft+(internalPlotWidth-s.width())/2.0,plotterStyle.plotBorderTop+a+pt2px(painter, plotterStyle.plotLabelOffset), plotterStyle.debugShowTextBoxes);
|
mathText.draw(painter, internalPlotBorderLeft+(internalPlotWidth-s.width())/2.0,plotterStyle.plotBorderTop+a+pt2px(painter, plotterStyle.plotLabelTopBorder), plotterStyle.debugShowTextBoxes);
|
||||||
if (plotterStyle.debugShowRegionBoxes) {
|
if (plotterStyle.debugShowRegionBoxes) {
|
||||||
painter.save(); auto __finalpaint=JKQTPFinally([&painter]() {painter.restore();});
|
painter.save(); auto __finalpaint=JKQTPFinally([&painter]() {painter.restore();});
|
||||||
QPen p("blue");
|
QPen p("blue");
|
||||||
@ -3011,6 +3011,20 @@ double JKQTBasePlotter::getPlotLabelOffset() const
|
|||||||
{
|
{
|
||||||
return this->plotterStyle.plotLabelOffset;
|
return this->plotterStyle.plotLabelOffset;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void JKQTBasePlotter::setPlotLabelTopBorder(double __value)
|
||||||
|
{
|
||||||
|
if (jkqtp_approximatelyUnequal(this->plotterStyle.plotLabelTopBorder , __value)) {
|
||||||
|
this->plotterStyle.plotLabelTopBorder = __value;
|
||||||
|
redrawPlot();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
double JKQTBasePlotter::getPlotLabelTopBorder() const
|
||||||
|
{
|
||||||
|
return this->plotterStyle.plotLabelTopBorder;
|
||||||
|
}
|
||||||
|
|
||||||
void JKQTBasePlotter::setPlotLabelColor(QColor __value)
|
void JKQTBasePlotter::setPlotLabelColor(QColor __value)
|
||||||
{
|
{
|
||||||
if (this->plotterStyle.plotLabelColor != __value) {
|
if (this->plotterStyle.plotLabelColor != __value) {
|
||||||
|
@ -1139,6 +1139,8 @@ class JKQTPLOTTER_LIB_EXPORT JKQTBasePlotter: public QObject {
|
|||||||
double getPlotLabelFontSize() const;
|
double getPlotLabelFontSize() const;
|
||||||
/** \copydoc JKQTBasePlotterStyle::plotLabelOffset */
|
/** \copydoc JKQTBasePlotterStyle::plotLabelOffset */
|
||||||
double getPlotLabelOffset() const;
|
double getPlotLabelOffset() const;
|
||||||
|
/** \copydoc JKQTBasePlotterStyle::plotLabelTopBorder */
|
||||||
|
double getPlotLabelTopBorder() const;
|
||||||
/** \copydoc JKQTBasePlotterStyle::plotLabelFontName */
|
/** \copydoc JKQTBasePlotterStyle::plotLabelFontName */
|
||||||
QString getplotLabelFontName() const;
|
QString getplotLabelFontName() const;
|
||||||
/** \copydoc JKQTBasePlotterStyle::plotLabelColor */
|
/** \copydoc JKQTBasePlotterStyle::plotLabelColor */
|
||||||
@ -2017,6 +2019,8 @@ class JKQTPLOTTER_LIB_EXPORT JKQTBasePlotter: public QObject {
|
|||||||
void setPlotLabelFontSize(double __value);
|
void setPlotLabelFontSize(double __value);
|
||||||
/** \copydoc JKQTBasePlotterStyle::plotLabelOffset */
|
/** \copydoc JKQTBasePlotterStyle::plotLabelOffset */
|
||||||
void setPlotLabelOffset(double __value);
|
void setPlotLabelOffset(double __value);
|
||||||
|
/** \copydoc JKQTBasePlotterStyle::plotLabelTopBorder */
|
||||||
|
void setPlotLabelTopBorder(double __value);
|
||||||
/** \copydoc JKQTBasePlotterStyle::plotLabelFontName */
|
/** \copydoc JKQTBasePlotterStyle::plotLabelFontName */
|
||||||
void setplotLabelFontName(const QString & __value);
|
void setplotLabelFontName(const QString & __value);
|
||||||
/** \copydoc JKQTBasePlotterStyle::plotLabelColor */
|
/** \copydoc JKQTBasePlotterStyle::plotLabelColor */
|
||||||
|
@ -21,9 +21,10 @@ JKQTBasePlotterStyle::JKQTBasePlotterStyle():
|
|||||||
plotFrameWidth(1),
|
plotFrameWidth(1),
|
||||||
plotFrameRounding(0),
|
plotFrameRounding(0),
|
||||||
plotFrameVisible(false),
|
plotFrameVisible(false),
|
||||||
plotLabelFontName("GUI"),
|
plotLabelFontName("GUI+BOLD"),
|
||||||
plotLabelFontSize(qCeil(QApplication::font().pointSizeF()*1.2)),
|
plotLabelFontSize(qCeil(QApplication::font().pointSizeF()*1.5)),
|
||||||
plotLabelOffset(qCeil(QApplication::font().pointSizeF()*0.4)),
|
plotLabelOffset(qCeil(QApplication::font().pointSizeF()*0.4)),
|
||||||
|
plotLabelTopBorder(qCeil(QApplication::font().pointSizeF()*0.25)),
|
||||||
useAntiAliasingForSystem(true),
|
useAntiAliasingForSystem(true),
|
||||||
useAntiAliasingForText(true),
|
useAntiAliasingForText(true),
|
||||||
defaultTextColor(QColor("black")),
|
defaultTextColor(QColor("black")),
|
||||||
@ -54,6 +55,7 @@ void JKQTBasePlotterStyle::loadSettings(const QSettings &settings, const QString
|
|||||||
plotLabelFontName=settings.value(group+"plot_label_font_name", defaultStyle.plotLabelFontName).toString();
|
plotLabelFontName=settings.value(group+"plot_label_font_name", defaultStyle.plotLabelFontName).toString();
|
||||||
plotLabelFontSize=settings.value(group+"plot_label_font_size", defaultStyle.plotLabelFontSize).toDouble();
|
plotLabelFontSize=settings.value(group+"plot_label_font_size", defaultStyle.plotLabelFontSize).toDouble();
|
||||||
plotLabelOffset=settings.value(group+"plot_label_offset", defaultStyle.plotLabelOffset).toDouble();
|
plotLabelOffset=settings.value(group+"plot_label_offset", defaultStyle.plotLabelOffset).toDouble();
|
||||||
|
plotLabelTopBorder=settings.value(group+"plot_label_top_border", defaultStyle.plotLabelTopBorder).toDouble();
|
||||||
plotLabelColor=jkqtp_String2QColor(settings.value(group+"plot_label_color", jkqtp_QColor2String(defaultStyle.plotLabelColor)).toString());
|
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()));
|
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()));
|
exportBackgroundBrush=QBrush(jkqtp_String2QColor(settings.value(group+"widget_background_color_for_export", jkqtp_QColor2String(defaultStyle.exportBackgroundBrush.color())).toString()));
|
||||||
@ -103,6 +105,7 @@ void JKQTBasePlotterStyle::saveSettings(QSettings &settings, const QString &grou
|
|||||||
settings.setValue(group+"plot_label_font_name", plotLabelFontName);
|
settings.setValue(group+"plot_label_font_name", plotLabelFontName);
|
||||||
settings.setValue(group+"plot_label_font_size", plotLabelFontSize);
|
settings.setValue(group+"plot_label_font_size", plotLabelFontSize);
|
||||||
settings.setValue(group+"plot_label_offset", plotLabelOffset);
|
settings.setValue(group+"plot_label_offset", plotLabelOffset);
|
||||||
|
settings.setValue(group+"plot_label_top_border", plotLabelTopBorder);
|
||||||
settings.setValue(group+"plot_label_color", jkqtp_QColor2String(plotLabelColor));
|
settings.setValue(group+"plot_label_color", jkqtp_QColor2String(plotLabelColor));
|
||||||
settings.setValue(group+"plot_frame_visible", plotFrameVisible);
|
settings.setValue(group+"plot_frame_visible", plotFrameVisible);
|
||||||
settings.setValue(group+"plot_frame_color", jkqtp_QColor2String(plotFrameColor));
|
settings.setValue(group+"plot_frame_color", jkqtp_QColor2String(plotFrameColor));
|
||||||
|
@ -141,8 +141,10 @@ class JKQTPLOTTER_LIB_EXPORT JKQTBasePlotterStyle {
|
|||||||
double plotLabelFontSize;
|
double plotLabelFontSize;
|
||||||
/** \brief the plot label color */
|
/** \brief the plot label color */
|
||||||
QColor plotLabelColor;
|
QColor plotLabelColor;
|
||||||
/** \brief offset of the plot label from the next element [pt]. This offset is added below AND above the plot label! */
|
/** \brief offset of the plot label from the next element of the graph, i.e. below the label [pt]. \see plotLabelTopBorder for spacing above */
|
||||||
double plotLabelOffset;
|
double plotLabelOffset;
|
||||||
|
/** \brief offset of the plot label from the top [pt]. \see plotLabelOffset for spacing between label and graph */
|
||||||
|
double plotLabelTopBorder;
|
||||||
/** \brief specifies whether to use antialiasing for plotting the coordinate system */
|
/** \brief specifies whether to use antialiasing for plotting the coordinate system */
|
||||||
bool useAntiAliasingForSystem;
|
bool useAntiAliasingForSystem;
|
||||||
/** \brief specifies whether to use antialiasing when drawing any text
|
/** \brief specifies whether to use antialiasing when drawing any text
|
||||||
|
@ -56,8 +56,10 @@ plot_border_bottom=5
|
|||||||
text_default_color=black
|
text_default_color=black
|
||||||
text_default_size=9
|
text_default_size=9
|
||||||
text_default_font_name=GUI
|
text_default_font_name=GUI
|
||||||
plot_label_font_name=GUI
|
plot_label_font_name=GUI+BOLD
|
||||||
plot_label_font_size=11
|
plot_label_font_size=14
|
||||||
|
plot_label_offset=4
|
||||||
|
plot_label_top_border=3
|
||||||
plot_label_color=black
|
plot_label_color=black
|
||||||
plot_frame_visible=false
|
plot_frame_visible=false
|
||||||
plot_frame_color=black
|
plot_frame_color=black
|
||||||
|
Before Width: | Height: | Size: 36 KiB After Width: | Height: | Size: 36 KiB |
Before Width: | Height: | Size: 8.5 KiB After Width: | Height: | Size: 8.5 KiB |
Before Width: | Height: | Size: 7.3 KiB After Width: | Height: | Size: 7.3 KiB |
Before Width: | Height: | Size: 5.5 KiB After Width: | Height: | Size: 5.5 KiB |
Before Width: | Height: | Size: 28 KiB After Width: | Height: | Size: 28 KiB |
Before Width: | Height: | Size: 23 KiB After Width: | Height: | Size: 23 KiB |
Before Width: | Height: | Size: 5.5 KiB After Width: | Height: | Size: 5.6 KiB |
Before Width: | Height: | Size: 190 KiB After Width: | Height: | Size: 196 KiB |
Before Width: | Height: | Size: 32 KiB After Width: | Height: | Size: 34 KiB |
Before Width: | Height: | Size: 42 KiB After Width: | Height: | Size: 44 KiB |
Before Width: | Height: | Size: 53 KiB After Width: | Height: | Size: 56 KiB |
Before Width: | Height: | Size: 42 KiB After Width: | Height: | Size: 43 KiB |
Before Width: | Height: | Size: 30 KiB After Width: | Height: | Size: 31 KiB |
Before Width: | Height: | Size: 34 KiB After Width: | Height: | Size: 36 KiB |
Before Width: | Height: | Size: 50 KiB After Width: | Height: | Size: 52 KiB |
Before Width: | Height: | Size: 58 KiB After Width: | Height: | Size: 59 KiB |
Before Width: | Height: | Size: 11 KiB After Width: | Height: | Size: 11 KiB |
Before Width: | Height: | Size: 119 KiB After Width: | Height: | Size: 118 KiB |
Before Width: | Height: | Size: 121 KiB After Width: | Height: | Size: 120 KiB |
Before Width: | Height: | Size: 11 KiB After Width: | Height: | Size: 11 KiB |
Before Width: | Height: | Size: 17 KiB After Width: | Height: | Size: 17 KiB |
Before Width: | Height: | Size: 18 KiB After Width: | Height: | Size: 19 KiB |
Before Width: | Height: | Size: 19 KiB After Width: | Height: | Size: 19 KiB |
Before Width: | Height: | Size: 22 KiB After Width: | Height: | Size: 22 KiB |
Before Width: | Height: | Size: 31 KiB After Width: | Height: | Size: 30 KiB |
Before Width: | Height: | Size: 56 KiB After Width: | Height: | Size: 56 KiB |
Before Width: | Height: | Size: 12 KiB After Width: | Height: | Size: 12 KiB |
Before Width: | Height: | Size: 38 KiB After Width: | Height: | Size: 39 KiB |
Before Width: | Height: | Size: 9.2 KiB After Width: | Height: | Size: 9.7 KiB |
Before Width: | Height: | Size: 29 KiB After Width: | Height: | Size: 29 KiB |
Before Width: | Height: | Size: 11 KiB After Width: | Height: | Size: 12 KiB |
Before Width: | Height: | Size: 20 KiB After Width: | Height: | Size: 21 KiB |
Before Width: | Height: | Size: 12 KiB After Width: | Height: | Size: 13 KiB |
Before Width: | Height: | Size: 68 KiB After Width: | Height: | Size: 68 KiB |
Before Width: | Height: | Size: 10 KiB After Width: | Height: | Size: 10 KiB |
Before Width: | Height: | Size: 23 KiB After Width: | Height: | Size: 23 KiB |
Before Width: | Height: | Size: 6.1 KiB After Width: | Height: | Size: 6.1 KiB |
Before Width: | Height: | Size: 16 KiB After Width: | Height: | Size: 17 KiB |
Before Width: | Height: | Size: 6.3 KiB After Width: | Height: | Size: 6.6 KiB |
Before Width: | Height: | Size: 35 KiB After Width: | Height: | Size: 35 KiB |
Before Width: | Height: | Size: 7.3 KiB After Width: | Height: | Size: 7.3 KiB |
Before Width: | Height: | Size: 40 KiB After Width: | Height: | Size: 40 KiB |
Before Width: | Height: | Size: 33 KiB After Width: | Height: | Size: 33 KiB |
Before Width: | Height: | Size: 9.4 KiB After Width: | Height: | Size: 9.6 KiB |
Before Width: | Height: | Size: 19 KiB After Width: | Height: | Size: 19 KiB |
Before Width: | Height: | Size: 6.5 KiB After Width: | Height: | Size: 6.6 KiB |
Before Width: | Height: | Size: 9.3 KiB After Width: | Height: | Size: 9.7 KiB |
Before Width: | Height: | Size: 42 KiB After Width: | Height: | Size: 43 KiB |
Before Width: | Height: | Size: 18 KiB After Width: | Height: | Size: 18 KiB |