##// END OF EJS Templates
More GUI tests refactoring, this will allow more complex tests and ease sync graph tests...
More GUI tests refactoring, this will allow more complex tests and ease sync graph tests Signed-off-by: Alexis Jeandet <alexis.jeandet@member.fsf.org>

File last commit:

r1346:d8cb4bff8c14
r1370:c3077e0c31af
Show More
RescaleAxeOperation.cpp
73 lines | 2.3 KiB | text/x-c | CppLexer
Add rescale operation to permit to rescale axe widget
r435 #include "Visualization/operations/RescaleAxeOperation.h"
#include "Visualization/VisualizationGraphWidget.h"
Q_LOGGING_CATEGORY(LOG_RescaleAxeOperation, "RescaleAxeOperation")
struct RescaleAxeOperation::RescaleAxeOperationPrivate {
Renamed SqpRange to DateTimeRange, introduced VariableController2 to...
r1346 explicit RescaleAxeOperationPrivate(std::shared_ptr<Variable> variable, const DateTimeRange &range)
Correction for MR
r447 : m_Variable{variable}, m_Range{range}
Add rescale operation to permit to rescale axe widget
r435 {
}
std::shared_ptr<Variable> m_Variable;
Renamed SqpRange to DateTimeRange, introduced VariableController2 to...
r1346 DateTimeRange m_Range;
Add rescale operation to permit to rescale axe widget
r435 };
Renamed SqpRange to DateTimeRange, introduced VariableController2 to...
r1346 RescaleAxeOperation::RescaleAxeOperation(std::shared_ptr<Variable> variable, const DateTimeRange &range)
Add rescale operation to permit to rescale axe widget
r435 : impl{spimpl::make_unique_impl<RescaleAxeOperationPrivate>(variable, range)}
{
}
void RescaleAxeOperation::visitEnter(VisualizationWidget *widget)
{
// VisualizationWidget is not intended to contain a variable
Q_UNUSED(widget)
}
void RescaleAxeOperation::visitLeave(VisualizationWidget *widget)
{
// VisualizationWidget is not intended to contain a variable
Q_UNUSED(widget)
}
void RescaleAxeOperation::visitEnter(VisualizationTabWidget *tabWidget)
{
// VisualizationTabWidget is not intended to contain a variable
Q_UNUSED(tabWidget)
}
void RescaleAxeOperation::visitLeave(VisualizationTabWidget *tabWidget)
{
// VisualizationTabWidget is not intended to contain a variable
Q_UNUSED(tabWidget)
}
void RescaleAxeOperation::visitEnter(VisualizationZoneWidget *zoneWidget)
{
// VisualizationZoneWidget is not intended to contain a variable
Q_UNUSED(zoneWidget)
}
void RescaleAxeOperation::visitLeave(VisualizationZoneWidget *zoneWidget)
{
// VisualizationZoneWidget is not intended to contain a variable
Q_UNUSED(zoneWidget)
}
void RescaleAxeOperation::visit(VisualizationGraphWidget *graphWidget)
{
if (graphWidget) {
Correction for MR
r447 // If the widget contains the variable, rescale it
Add rescale operation to permit to rescale axe widget
r435 if (impl->m_Variable && graphWidget->contains(*impl->m_Variable)) {
Alexandre Leroux
Corrects the problem of refreshing synchronized graphs from TimeWidget (2)...
r1272 // During rescale, acquisition for the graph is disabled but synchronization is still
// enabled
graphWidget->setFlags(GraphFlag::EnableSynchronization);
Implémentation timewidget
r811 graphWidget->setGraphRange(impl->m_Range);
Alexandre Leroux
Corrects the problem of refreshing synchronized graphs from TimeWidget (1)...
r1271 graphWidget->setFlags(GraphFlag::EnableAll);
Add rescale operation to permit to rescale axe widget
r435 }
}
else {
qCCritical(LOG_RescaleAxeOperation(),
"Can't visit VisualizationGraphWidget : the widget is null");
}
}