diff --git a/lib/jkqtplotter/jkqtpcoordinateaxes.h b/lib/jkqtplotter/jkqtpcoordinateaxes.h index d6052dd0cb..f6a7d44af2 100644 --- a/lib/jkqtplotter/jkqtpcoordinateaxes.h +++ b/lib/jkqtplotter/jkqtpcoordinateaxes.h @@ -370,8 +370,8 @@ class JKQTPLOTTER_LIB_EXPORT JKQTPCoordinateAxis: public QObject { inline QString getTickPrintfFormat() const { return this->axisStyle.tickPrintfFormat; } /** \copydoc JKQTPCoordinateAxisStyle::tickMode */ inline JKQTPLabelTickMode getTickMode() const { return this->axisStyle.tickMode; } -#if __cplusplus >= 202002L -# ifdef __cpp_lib_format +#if __cplusplus >= 202002L || DOXYGEN +# if defined(__cpp_lib_format) || DOXYGEN /** \copydoc JKQTPCoordinateAxisStyle::tickFormatFormat */ inline QString getTickFormatfFormat() const { return this->axisStyle.tickFormatFormat; } # endif @@ -618,8 +618,8 @@ class JKQTPLOTTER_LIB_EXPORT JKQTPCoordinateAxis: public QObject { /** \copydoc JKQTPCoordinateAxisStyle::tickPrintfFormat */ void setTickPrintfFormat(const QString& __value); -#if __cplusplus >= 202002L -# ifdef __cpp_lib_format +#if __cplusplus >= 202002L || DOXYGEN +# if defined(__cpp_lib_format) || DOXYGEN /** \copydoc JKQTPCoordinateAxisStyle::tickFormatFormat */ void setTickFormatFormat(const QString& __value); # endif diff --git a/tools/jkqtplotter_doc_imagegenerator/jkqtplotter_doc_imagegenerator.cpp b/tools/jkqtplotter_doc_imagegenerator/jkqtplotter_doc_imagegenerator.cpp index 24c9a3c4d3..56a1ca3eb9 100644 --- a/tools/jkqtplotter_doc_imagegenerator/jkqtplotter_doc_imagegenerator.cpp +++ b/tools/jkqtplotter_doc_imagegenerator/jkqtplotter_doc_imagegenerator.cpp @@ -290,11 +290,13 @@ void doListAxisStyling(const QDir& outputDir, int iconsize, QColor /*backgroundC plot.getYAxis()->setTickLabelType(JKQTPCALTprintf); plot.getYAxis()->setTickPrintfFormat("y=%+.2f"); plot.grabPixelImage(QSize(plot.getWidth(),plot.getHeight()), false).copy(0,0,iconsize*2.5,plot.getHeight()).save(outputDir.absoluteFilePath("JKQTPCALTprintf.png"), "png"); -#ifdef __cpp_lib_format +#if __cplusplus >= 202002L +# ifdef __cpp_lib_format plot.setY(-1,1); plot.getYAxis()->setTickLabelType(JKQTPCALTformat); plot.getYAxis()->setTickFormatFormat("\\texttt{{ y={:*^+8.1f}}}"); plot.grabPixelImage(QSize(plot.getWidth(),plot.getHeight()), false).copy(0,0,iconsize*2.5,plot.getHeight()).save(outputDir.absoluteFilePath("JKQTPCALTformat.png"), "png"); +# endif #endif