##// END OF EJS Templates
Close launcher console on windows...
Close launcher console on windows Signed-off-by: Alexis Jeandet <alexis.jeandet@member.fsf.org>

File last commit:

r1420:3c3e24550401
r1457:818df2712e31
Show More
RemoveVariableOperation.cpp
74 lines | 2.1 KiB | text/x-c | CppLexer
/ gui / src / Visualization / operations / RemoveVariableOperation.cpp
Alexandre Leroux
Variable deletion (4)...
r333 #include "Visualization/operations/RemoveVariableOperation.h"
#include "Visualization/VisualizationGraphWidget.h"
Switched to new TS impl but quite broken!...
r1420 #include <Variable/Variable2.h>
Alexandre Leroux
Variable deletion (4)...
r333
Q_LOGGING_CATEGORY(LOG_RemoveVariableOperation, "RemoveVariableOperation")
Switched to new TS impl but quite broken!...
r1420 struct RemoveVariableOperation::RemoveVariableOperationPrivate
{
explicit RemoveVariableOperationPrivate(std::shared_ptr<Variable2> variable)
Alexandre Leroux
Variable deletion (4)...
r333 : m_Variable(variable)
{
}
Switched to new TS impl but quite broken!...
r1420 std::shared_ptr<Variable2> m_Variable;
Alexandre Leroux
Variable deletion (4)...
r333 };
Switched to new TS impl but quite broken!...
r1420 RemoveVariableOperation::RemoveVariableOperation(std::shared_ptr<Variable2> variable)
: impl { spimpl::make_unique_impl<RemoveVariableOperationPrivate>(variable) }
Alexandre Leroux
Variable deletion (4)...
r333 {
}
Switched to new TS impl but quite broken!...
r1420 void RemoveVariableOperation::visitEnter(VisualizationWidget* widget)
Alexandre Leroux
Variable deletion (4)...
r333 {
// VisualizationWidget is not intended to contain a variable
Q_UNUSED(widget)
}
Switched to new TS impl but quite broken!...
r1420 void RemoveVariableOperation::visitLeave(VisualizationWidget* widget)
Alexandre Leroux
Variable deletion (4)...
r333 {
// VisualizationWidget is not intended to contain a variable
Q_UNUSED(widget)
}
Switched to new TS impl but quite broken!...
r1420 void RemoveVariableOperation::visitEnter(VisualizationTabWidget* tabWidget)
Alexandre Leroux
Variable deletion (4)...
r333 {
// VisualizationTabWidget is not intended to contain a variable
Q_UNUSED(tabWidget)
}
Switched to new TS impl but quite broken!...
r1420 void RemoveVariableOperation::visitLeave(VisualizationTabWidget* tabWidget)
Alexandre Leroux
Variable deletion (4)...
r333 {
// VisualizationTabWidget is not intended to contain a variable
Q_UNUSED(tabWidget)
}
Switched to new TS impl but quite broken!...
r1420 void RemoveVariableOperation::visitEnter(VisualizationZoneWidget* zoneWidget)
Alexandre Leroux
Variable deletion (4)...
r333 {
// VisualizationZoneWidget is not intended to contain a variable
Q_UNUSED(zoneWidget)
}
Switched to new TS impl but quite broken!...
r1420 void RemoveVariableOperation::visitLeave(VisualizationZoneWidget* zoneWidget)
Alexandre Leroux
Variable deletion (4)...
r333 {
// VisualizationZoneWidget is not intended to contain a variable
Q_UNUSED(zoneWidget)
}
Switched to new TS impl but quite broken!...
r1420 void RemoveVariableOperation::visit(VisualizationGraphWidget* graphWidget)
Alexandre Leroux
Variable deletion (4)...
r333 {
Switched to new TS impl but quite broken!...
r1420 if (graphWidget)
{
Alexandre Leroux
Variable deletion (4)...
r333 // If the widget contains the variable, removes it
Switched to new TS impl but quite broken!...
r1420 if (impl->m_Variable && graphWidget->contains(*impl->m_Variable))
{
Alexandre Leroux
Variable deletion (4)...
r333 graphWidget->removeVariable(impl->m_Variable);
}
}
Switched to new TS impl but quite broken!...
r1420 else
{
Alexandre Leroux
Variable deletion (4)...
r333 qCCritical(LOG_RemoveVariableOperation(),
Switched to new TS impl but quite broken!...
r1420 "Can't visit VisualizationGraphWidget : the widget is null");
Alexandre Leroux
Variable deletion (4)...
r333 }
}