From f41be5761352576994198e1e891cde8a882f9f77 Mon Sep 17 00:00:00 2001 From: jkriege2 Date: Fri, 18 Oct 2024 14:17:06 +0200 Subject: [PATCH] minor code improvementa --- lib/jkqtcommon/jkqtpbasicimagetools.cpp | 30 ++++++++++++------------- lib/jkqtplotter/graphs/jkqtpbarchart.h | 2 +- lib/jkqtplotter/jkqtpkey.h | 4 ++-- 3 files changed, 18 insertions(+), 18 deletions(-) diff --git a/lib/jkqtcommon/jkqtpbasicimagetools.cpp b/lib/jkqtcommon/jkqtpbasicimagetools.cpp index 82716437fc..75cbe055ce 100644 --- a/lib/jkqtcommon/jkqtpbasicimagetools.cpp +++ b/lib/jkqtcommon/jkqtpbasicimagetools.cpp @@ -60,7 +60,7 @@ QMap JKQTPImageTools::getDefaultLUTs() { { - const auto palette=JKQTPMathImageDefault_STEP; + static const auto palette=JKQTPMathImageDefault_STEP; const QString palN="jkqtplotterdefault_step"; const QString palNT=QObject::tr("steps: JKQTPlotter Default"); lutstore[palette]=JKQTPImageTools::LUTData(palN, palNT); @@ -232,7 +232,7 @@ QMap JKQTPImageTools::getDefaultLUTs() { } { - JKQTPPaletteList lst { jkqtp_qRgbOpaque(0xB2182B), + static const JKQTPPaletteList lst { jkqtp_qRgbOpaque(0xB2182B), jkqtp_qRgbOpaque(0xD6604D), jkqtp_qRgbOpaque(0xF4A582), jkqtp_qRgbOpaque(0xFDDBC7), @@ -248,7 +248,7 @@ QMap JKQTPImageTools::getDefaultLUTs() { } { - JKQTPPaletteList lst { QColor(165,0,38), + static const JKQTPPaletteList lst { QColor(165,0,38), QColor(253,254,194), QColor(49,54,149) }; @@ -259,7 +259,7 @@ QMap JKQTPImageTools::getDefaultLUTs() { } { - JKQTPPaletteList lst { QColor(49,54,149), + static const JKQTPPaletteList lst { QColor(49,54,149), QColor(253,254,194), QColor(0,104,55) }; @@ -270,7 +270,7 @@ QMap JKQTPImageTools::getDefaultLUTs() { } { - const JKQTPPaletteList lst= { + static const JKQTPPaletteList lst= { jkqtp_qRgbOpaque(0x8C510A), jkqtp_qRgbOpaque(0xBF812D), jkqtp_qRgbOpaque(0xDFC27D), @@ -289,7 +289,7 @@ QMap JKQTPImageTools::getDefaultLUTs() { } { - const JKQTPPaletteList lst= { + static const JKQTPPaletteList lst= { jkqtp_qRgbOpaque(0xB35806), jkqtp_qRgbOpaque(0xE08214), jkqtp_qRgbOpaque(0xFDB863), @@ -307,7 +307,7 @@ QMap JKQTPImageTools::getDefaultLUTs() { } { - const JKQTPPaletteList lst= { + static const JKQTPPaletteList lst= { jkqtp_qRgbOpaque(0xFFFFD9), jkqtp_qRgbOpaque(0xEDF8B1), jkqtp_qRgbOpaque(0xC7E9B4), @@ -326,7 +326,7 @@ QMap JKQTPImageTools::getDefaultLUTs() { { - const JKQTPPaletteList lst= { + static const JKQTPPaletteList lst= { jkqtp_qRgbOpaque(0xF7FCF0), jkqtp_qRgbOpaque(0xE0F3DB), jkqtp_qRgbOpaque(0xCCEBC5), @@ -344,7 +344,7 @@ QMap JKQTPImageTools::getDefaultLUTs() { } { - const JKQTPPaletteList lst= { + static const JKQTPPaletteList lst= { QColor("blue"), QColor("green"), QColor("red") @@ -356,7 +356,7 @@ QMap JKQTPImageTools::getDefaultLUTs() { } { - const JKQTPPaletteList lst= { + static const JKQTPPaletteList lst= { QColor("magenta"), QColor("yellow") }; @@ -365,7 +365,7 @@ QMap JKQTPImageTools::getDefaultLUTs() { } { - const JKQTPPaletteList lst= { + static const JKQTPPaletteList lst= { QColor("red"), QColor("blue") }; @@ -374,7 +374,7 @@ QMap JKQTPImageTools::getDefaultLUTs() { } { - const JKQTPPaletteList lst= { + static const JKQTPPaletteList lst= { QColor(142,1,82), QColor(246,246,246), QColor(39,100,25) @@ -387,7 +387,7 @@ QMap JKQTPImageTools::getDefaultLUTs() { { - const JKQTPPaletteList lst= { + static const JKQTPPaletteList lst= { QColor(103,0,31), QColor(254,254,254), QColor(26,26,26) @@ -399,7 +399,7 @@ QMap JKQTPImageTools::getDefaultLUTs() { } { - const JKQTPPaletteList lst= { + static const JKQTPPaletteList lst= { QColor(58,76,192), QColor(220,220,220), QColor(179,3,38) @@ -411,7 +411,7 @@ QMap JKQTPImageTools::getDefaultLUTs() { } { - const JKQTPPaletteList lst= { + static const JKQTPPaletteList lst= { QColor::fromRgbF(0.0f, 0.0f, 0.3f), QColor::fromRgbF(0.0f, 0.0f, 1.0f), QColor::fromRgbF(1.0f, 1.0f, 1.0f), diff --git a/lib/jkqtplotter/graphs/jkqtpbarchart.h b/lib/jkqtplotter/graphs/jkqtpbarchart.h index 15575ec5b9..515829278d 100644 --- a/lib/jkqtplotter/graphs/jkqtpbarchart.h +++ b/lib/jkqtplotter/graphs/jkqtpbarchart.h @@ -290,7 +290,7 @@ class JKQTPLOTTER_LIB_EXPORT JKQTPBarVerticalStackableGraph: public JKQTPBarVert JKQTPBarVerticalStackableGraph* stackParent; /** \brief used to generate stacked plots: returns the upper boundary of the parent plot in a stack, for the index-th datapoint */ - double getParentStackedMax(int index) const ; + double getParentStackedMax(int index) const override; /** \copydoc JKQTPBarGraphBase::hasStackParent() */ diff --git a/lib/jkqtplotter/jkqtpkey.h b/lib/jkqtplotter/jkqtpkey.h index 23692314ac..dbcfcb8d01 100644 --- a/lib/jkqtplotter/jkqtpkey.h +++ b/lib/jkqtplotter/jkqtpkey.h @@ -384,8 +384,8 @@ class JKQTPLOTTER_LIB_EXPORT JKQTPMainKey: public JKQTPBaseKey { /** \brief returns all graph classes from parent JKQTBasePlotter for the key */ QList getPlotElements() const; /** \brief provides the keyStyle to use for sizing/drawing this object (extracted from the parent JKQTBasePlotters's */ - virtual const JKQTPKeyStyle& keyStyle() const; + virtual const JKQTPKeyStyle& keyStyle() const override; /** \brief provides the keyStyle to use for sizing/drawing this object */ - virtual JKQTPKeyStyle& keyStyle(); + virtual JKQTPKeyStyle& keyStyle() override; }; #endif // JKQTPKEY_H