@@ -19,7 +19,7 | |||||
19 | /*-- Author : Alexis Jeandet |
|
19 | /*-- Author : Alexis Jeandet | |
20 | -- Mail : alexis.jeandet@member.fsf.org |
|
20 | -- Mail : alexis.jeandet@member.fsf.org | |
21 | ----------------------------------------------------------------------------*/ |
|
21 | ----------------------------------------------------------------------------*/ | |
22 |
#include " |
|
22 | #include "MainWindow.h" | |
23 | #include <QProcessEnvironment> |
|
23 | #include <QProcessEnvironment> | |
24 | #include <QThread> |
|
24 | #include <QThread> | |
25 | #include <SqpApplication.h> |
|
25 | #include <SqpApplication.h> |
@@ -89,9 +89,8 using default_copier_t = typename default_copier<T>::type; | |||||
89 |
|
89 | |||
90 | template <class T, class D, class C> |
|
90 | template <class T, class D, class C> | |
91 | struct is_default_manageable |
|
91 | struct is_default_manageable | |
92 | : public std::integral_constant<bool, |
|
92 | : public std::integral_constant<bool, std::is_same<D, default_deleter_t<T> >::value | |
93 |
std::is_same< |
|
93 | && std::is_same<C, default_copier_t<T> >::value> { | |
94 | && std::is_same<C, default_copier_t<T> >::value> { |
|
|||
95 | }; |
|
94 | }; | |
96 | } |
|
95 | } | |
97 |
|
96 | |||
@@ -132,11 +131,10 public: | |||||
132 | } |
|
131 | } | |
133 |
|
132 | |||
134 | template <class U> |
|
133 | template <class U> | |
135 | impl_ptr(U *u, |
|
134 | impl_ptr(U *u, typename std::enable_if<std::is_convertible<U *, pointer>::value | |
136 | typename std::enable_if<std::is_convertible<U *, pointer>::value |
|
135 | && is_default_manageable::value, | |
137 |
|
|
136 | dummy_t_>::type | |
138 | dummy_t_>::type |
|
137 | = dummy_t_()) SPIMPL_NOEXCEPT | |
139 | = dummy_t_()) SPIMPL_NOEXCEPT |
|
|||
140 | : impl_ptr(u, &details::default_delete<T>, &details::default_copy<T>) |
|
138 | : impl_ptr(u, &details::default_delete<T>, &details::default_copy<T>) | |
141 | { |
|
139 | { | |
142 | } |
|
140 | } | |
@@ -153,12 +151,12 public: | |||||
153 |
|
151 | |||
154 | #ifdef SPIMPL_HAS_AUTO_PTR |
|
152 | #ifdef SPIMPL_HAS_AUTO_PTR | |
155 | template <class U> |
|
153 | template <class U> | |
156 | impl_ptr(std::auto_ptr<U> &&u, |
|
154 | impl_ptr(std::auto_ptr<U> &&u, typename std::enable_if<std::is_convertible<U *, pointer>::value | |
157 | typename std::enable_if<std::is_convertible<U *, pointer>::value |
|
155 | && is_default_manageable::value, | |
158 |
|
|
156 | dummy_t_>::type | |
159 |
|
|
157 | = dummy_t_()) SPIMPL_NOEXCEPT | |
160 |
|
|
158 | : ptr_(u.release(), &details::default_delete<T>), | |
161 |
|
|
159 | copier_(&details::default_copy<T>) | |
162 | { |
|
160 | { | |
163 | } |
|
161 | } | |
164 | #endif |
|
162 | #endif |
@@ -21,14 +21,14 public: | |||||
21 | DataSourceController::DataSourceController(QObject *parent) |
|
21 | DataSourceController::DataSourceController(QObject *parent) | |
22 | : impl{spimpl::make_unique_impl<DataSourceControllerPrivate>()} |
|
22 | : impl{spimpl::make_unique_impl<DataSourceControllerPrivate>()} | |
23 | { |
|
23 | { | |
24 | qCDebug(LOG_DataSourceController()) |
|
24 | qCDebug(LOG_DataSourceController()) << tr("DataSourceController construction") | |
25 | << tr("DataSourceController construction") << QThread::currentThread(); |
|
25 | << QThread::currentThread(); | |
26 | } |
|
26 | } | |
27 |
|
27 | |||
28 | DataSourceController::~DataSourceController() |
|
28 | DataSourceController::~DataSourceController() | |
29 | { |
|
29 | { | |
30 | qCDebug(LOG_DataSourceController()) |
|
30 | qCDebug(LOG_DataSourceController()) << tr("DataSourceController destruction") | |
31 | << tr("DataSourceController destruction") << QThread::currentThread(); |
|
31 | << QThread::currentThread(); | |
32 | this->waitForFinish(); |
|
32 | this->waitForFinish(); | |
33 | } |
|
33 | } | |
34 |
|
34 | |||
@@ -61,8 +61,8 void DataSourceController::setDataSourceItem( | |||||
61 |
|
61 | |||
62 | void DataSourceController::initialize() |
|
62 | void DataSourceController::initialize() | |
63 | { |
|
63 | { | |
64 | qCDebug(LOG_DataSourceController()) |
|
64 | qCDebug(LOG_DataSourceController()) << tr("DataSourceController init") | |
65 | << tr("DataSourceController init") << QThread::currentThread(); |
|
65 | << QThread::currentThread(); | |
66 | impl->m_WorkingMutex.lock(); |
|
66 | impl->m_WorkingMutex.lock(); | |
67 | qCDebug(LOG_DataSourceController()) << tr("DataSourceController init END"); |
|
67 | qCDebug(LOG_DataSourceController()) << tr("DataSourceController init END"); | |
68 | } |
|
68 | } |
@@ -16,21 +16,21 public: | |||||
16 | VisualizationController::VisualizationController(QObject *parent) |
|
16 | VisualizationController::VisualizationController(QObject *parent) | |
17 | : impl{spimpl::make_unique_impl<VisualizationControllerPrivate>()} |
|
17 | : impl{spimpl::make_unique_impl<VisualizationControllerPrivate>()} | |
18 | { |
|
18 | { | |
19 | qCDebug(LOG_VisualizationController()) |
|
19 | qCDebug(LOG_VisualizationController()) << tr("VisualizationController construction") | |
20 | << tr("VisualizationController construction") << QThread::currentThread(); |
|
20 | << QThread::currentThread(); | |
21 | } |
|
21 | } | |
22 |
|
22 | |||
23 | VisualizationController::~VisualizationController() |
|
23 | VisualizationController::~VisualizationController() | |
24 | { |
|
24 | { | |
25 | qCDebug(LOG_VisualizationController()) |
|
25 | qCDebug(LOG_VisualizationController()) << tr("VisualizationController destruction") | |
26 | << tr("VisualizationController destruction") << QThread::currentThread(); |
|
26 | << QThread::currentThread(); | |
27 | this->waitForFinish(); |
|
27 | this->waitForFinish(); | |
28 | } |
|
28 | } | |
29 |
|
29 | |||
30 | void VisualizationController::initialize() |
|
30 | void VisualizationController::initialize() | |
31 | { |
|
31 | { | |
32 | qCDebug(LOG_VisualizationController()) |
|
32 | qCDebug(LOG_VisualizationController()) << tr("VisualizationController init") | |
33 | << tr("VisualizationController init") << QThread::currentThread(); |
|
33 | << QThread::currentThread(); | |
34 | impl->m_WorkingMutex.lock(); |
|
34 | impl->m_WorkingMutex.lock(); | |
35 | qCDebug(LOG_VisualizationController()) << tr("VisualizationController init END"); |
|
35 | qCDebug(LOG_VisualizationController()) << tr("VisualizationController init END"); | |
36 | } |
|
36 | } |
@@ -1,4 +1,4 | |||||
1 |
#include "visualization |
|
1 | #include "visualization/VisualizationGraphWidget.h" | |
2 | #include "ui_VisualizationGraphWidget.h" |
|
2 | #include "ui_VisualizationGraphWidget.h" | |
3 |
|
3 | |||
4 | VisualizationGraphWidget::VisualizationGraphWidget(QWidget *parent) |
|
4 | VisualizationGraphWidget::VisualizationGraphWidget(QWidget *parent) |
@@ -1,4 +1,4 | |||||
1 |
#include "visualization |
|
1 | #include "visualization/VisualizationTabWidget.h" | |
2 | #include "ui_VisualizationTabWidget.h" |
|
2 | #include "ui_VisualizationTabWidget.h" | |
3 |
|
3 | |||
4 | VisualizationTabWidget::VisualizationTabWidget(QWidget *parent) |
|
4 | VisualizationTabWidget::VisualizationTabWidget(QWidget *parent) |
@@ -1,4 +1,4 | |||||
1 |
#include "visualization |
|
1 | #include "visualization/VisualizationWidget.h" | |
2 | #include "ui_VisualizationWidget.h" |
|
2 | #include "ui_VisualizationWidget.h" | |
3 |
|
3 | |||
4 | VisualizationWidget::VisualizationWidget(QWidget *parent) |
|
4 | VisualizationWidget::VisualizationWidget(QWidget *parent) |
@@ -1,4 +1,4 | |||||
1 |
#include "visualization |
|
1 | #include "visualization/VisualizationZoneWidget.h" | |
2 | #include "ui_VisualizationZoneWidget.h" |
|
2 | #include "ui_VisualizationZoneWidget.h" | |
3 |
|
3 | |||
4 | VisualizationZoneWidget::VisualizationZoneWidget(QWidget *parent) |
|
4 | VisualizationZoneWidget::VisualizationZoneWidget(QWidget *parent) |
@@ -1574,7 +1574,10 void QCPLayerable::applyAntialiasingHint(QCPPainter *painter, bool localAntialia | |||||
1574 |
|
1574 | |||
1575 | \see initializeParentPlot |
|
1575 | \see initializeParentPlot | |
1576 | */ |
|
1576 | */ | |
1577 |
void QCPLayerable::parentPlotInitialized(QCustomPlot *parentPlot) |
|
1577 | void QCPLayerable::parentPlotInitialized(QCustomPlot *parentPlot) | |
|
1578 | { | |||
|
1579 | Q_UNUSED(parentPlot) | |||
|
1580 | } | |||
1578 |
|
1581 | |||
1579 | /*! \internal |
|
1582 | /*! \internal | |
1580 |
|
1583 | |||
@@ -9254,16 +9257,14 void QCPAxisPainterPrivate::draw(QCPPainter *painter) | |||||
9254 | painter->setBrush(QBrush(basePen.color())); |
|
9257 | painter->setBrush(QBrush(basePen.color())); | |
9255 | QCPVector2D baseLineVector(baseLine.dx(), baseLine.dy()); |
|
9258 | QCPVector2D baseLineVector(baseLine.dx(), baseLine.dy()); | |
9256 | if (lowerEnding.style() != QCPLineEnding::esNone) |
|
9259 | if (lowerEnding.style() != QCPLineEnding::esNone) | |
9257 | lowerEnding.draw(painter, |
|
9260 | lowerEnding.draw(painter, QCPVector2D(baseLine.p1()) | |
9258 | QCPVector2D(baseLine.p1()) |
|
9261 | - baseLineVector.normalized() * lowerEnding.realLength() | |
9259 | - baseLineVector.normalized() * lowerEnding.realLength() |
|
9262 | * (lowerEnding.inverted() ? -1 : 1), | |
9260 | * (lowerEnding.inverted() ? -1 : 1), |
|
|||
9261 | -baseLineVector); |
|
9263 | -baseLineVector); | |
9262 | if (upperEnding.style() != QCPLineEnding::esNone) |
|
9264 | if (upperEnding.style() != QCPLineEnding::esNone) | |
9263 | upperEnding.draw(painter, |
|
9265 | upperEnding.draw(painter, QCPVector2D(baseLine.p2()) | |
9264 | QCPVector2D(baseLine.p2()) |
|
9266 | + baseLineVector.normalized() * upperEnding.realLength() | |
9265 | + baseLineVector.normalized() * upperEnding.realLength() |
|
9267 | * (upperEnding.inverted() ? -1 : 1), | |
9266 | * (upperEnding.inverted() ? -1 : 1), |
|
|||
9267 | baseLineVector); |
|
9268 | baseLineVector); | |
9268 | painter->setAntialiasing(antialiasingBackup); |
|
9269 | painter->setAntialiasing(antialiasingBackup); | |
9269 |
|
9270 | |||
@@ -16468,9 +16469,8 void QCPColorGradient::updateColorBuffer() | |||||
16468 | hue -= 1.0; |
|
16469 | hue -= 1.0; | |
16469 | if (useAlpha) { |
|
16470 | if (useAlpha) { | |
16470 | const QRgb rgb |
|
16471 | const QRgb rgb | |
16471 | = QColor::fromHsvF(hue, |
|
16472 | = QColor::fromHsvF(hue, (1 - t) * lowHsv.saturationF() | |
16472 |
|
|
16473 | + t * highHsv.saturationF(), | |
16473 | + t * highHsv.saturationF(), |
|
|||
16474 | (1 - t) * lowHsv.valueF() + t * highHsv.valueF()) |
|
16474 | (1 - t) * lowHsv.valueF() + t * highHsv.valueF()) | |
16475 | .rgb(); |
|
16475 | .rgb(); | |
16476 | const float alpha = (1 - t) * lowHsv.alphaF() + t * highHsv.alphaF(); |
|
16476 | const float alpha = (1 - t) * lowHsv.alphaF() + t * highHsv.alphaF(); | |
@@ -16479,9 +16479,8 void QCPColorGradient::updateColorBuffer() | |||||
16479 | } |
|
16479 | } | |
16480 | else { |
|
16480 | else { | |
16481 | mColorBuffer[i] |
|
16481 | mColorBuffer[i] | |
16482 | = QColor::fromHsvF(hue, |
|
16482 | = QColor::fromHsvF(hue, (1 - t) * lowHsv.saturationF() | |
16483 |
|
|
16483 | + t * highHsv.saturationF(), | |
16484 | + t * highHsv.saturationF(), |
|
|||
16485 | (1 - t) * lowHsv.valueF() + t * highHsv.valueF()) |
|
16484 | (1 - t) * lowHsv.valueF() + t * highHsv.valueF()) | |
16486 | .rgb(); |
|
16485 | .rgb(); | |
16487 | } |
|
16486 | } | |
@@ -19839,14 +19838,12 void QCPColorScale::update(UpdatePhase phase) | |||||
19839 | switch (phase) { |
|
19838 | switch (phase) { | |
19840 | case upMargins: { |
|
19839 | case upMargins: { | |
19841 | if (mType == QCPAxis::atBottom || mType == QCPAxis::atTop) { |
|
19840 | if (mType == QCPAxis::atBottom || mType == QCPAxis::atTop) { | |
19842 | setMaximumSize(QWIDGETSIZE_MAX, |
|
19841 | setMaximumSize(QWIDGETSIZE_MAX, mBarWidth + mAxisRect.data()->margins().top() | |
19843 |
|
|
19842 | + mAxisRect.data()->margins().bottom() | |
19844 |
+ |
|
19843 | + margins().top() + margins().bottom()); | |
19845 | + margins().bottom()); |
|
19844 | setMinimumSize(0, mBarWidth + mAxisRect.data()->margins().top() | |
19846 | setMinimumSize(0, |
|
19845 | + mAxisRect.data()->margins().bottom() + margins().top() | |
19847 |
|
|
19846 | + margins().bottom()); | |
19848 | + mAxisRect.data()->margins().bottom() + margins().top() |
|
|||
19849 | + margins().bottom()); |
|
|||
19850 | } |
|
19847 | } | |
19851 | else { |
|
19848 | else { | |
19852 | setMaximumSize(mBarWidth + mAxisRect.data()->margins().left() |
|
19849 | setMaximumSize(mBarWidth + mAxisRect.data()->margins().left() |
General Comments 0
You need to be logged in to leave comments.
Login now