##// END OF EJS Templates
Adds logs to axe and plottable rendering utils
Alexandre Leroux -
r927:c91efb7c50ed
parent child
Show More
@@ -3,8 +3,11
3
3
4 #include <memory>
4 #include <memory>
5
5
6 #include <QtCore/QLoggingCategory>
6 #include <QtCore/QString>
7 #include <QtCore/QString>
7
8
9 Q_DECLARE_LOGGING_CATEGORY(LOG_AxisRenderingUtils)
10
8 class IDataSeries;
11 class IDataSeries;
9 class QCPAxis;
12 class QCPAxis;
10 class QCPColorScale;
13 class QCPColorScale;
@@ -5,6 +5,10
5
5
6 #include <memory>
6 #include <memory>
7
7
8 #include <QtCore/QLoggingCategory>
9
10 Q_DECLARE_LOGGING_CATEGORY(LOG_PlottablesRenderingUtils)
11
8 class IDataSeries;
12 class IDataSeries;
9 class QCPColorScale;
13 class QCPColorScale;
10 class QCustomPlot;
14 class QCustomPlot;
@@ -6,6 +6,8
6
6
7 #include <Visualization/qcustomplot.h>
7 #include <Visualization/qcustomplot.h>
8
8
9 Q_LOGGING_CATEGORY(LOG_AxisRenderingUtils, "AxisRenderingUtils")
10
9 namespace {
11 namespace {
10
12
11 const auto DATETIME_FORMAT = QStringLiteral("yyyy/MM/dd hh:mm:ss:zzz");
13 const auto DATETIME_FORMAT = QStringLiteral("yyyy/MM/dd hh:mm:ss:zzz");
@@ -57,6 +59,7 struct AxisSetter {
57 static void setProperties(T &, QCustomPlot &, QCPColorScale &)
59 static void setProperties(T &, QCustomPlot &, QCPColorScale &)
58 {
60 {
59 // Default implementation does nothing
61 // Default implementation does nothing
62 qCCritical(LOG_AxisRenderingUtils()) << "Can't set axis properties: unmanaged type of data";
60 }
63 }
61 };
64 };
62
65
@@ -8,6 +8,8
8
8
9 #include <Visualization/qcustomplot.h>
9 #include <Visualization/qcustomplot.h>
10
10
11 Q_LOGGING_CATEGORY(LOG_PlottablesRenderingUtils, "PlottablesRenderingUtils")
12
11 namespace {
13 namespace {
12
14
13 /// Default gradient used for colormap
15 /// Default gradient used for colormap
@@ -21,6 +23,8 struct PlottablesSetter {
21 static void setProperties(T &, PlottablesMap &)
23 static void setProperties(T &, PlottablesMap &)
22 {
24 {
23 // Default implementation does nothing
25 // Default implementation does nothing
26 qCCritical(LOG_PlottablesRenderingUtils())
27 << "Can't set plottables properties: unmanaged type of data";
24 }
28 }
25 };
29 };
26
30
@@ -81,6 +85,9 struct PlottablesSetter<T,
81 colormap->setGradient(DEFAULT_COLORMAP_GRADIENT);
85 colormap->setGradient(DEFAULT_COLORMAP_GRADIENT);
82 colormap->rescaleDataRange();
86 colormap->rescaleDataRange();
83 }
87 }
88 else {
89 qCCritical(LOG_PlottablesRenderingUtils()) << "Can't get colormap of the spectrogram";
90 }
84 }
91 }
85 };
92 };
86
93
General Comments 1
Under Review
author

Auto status change to "Under Review"

You need to be logged in to leave comments. Login now