MCPcopy Create free account
hub / github.com/KDE/labplot / setExpressionType

Method setExpressionType

src/frontend/widgets/ExpressionTextEdit.cpp:73–86  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

71}
72
73void ExpressionTextEdit::setExpressionType(XYEquationCurve::EquationType type) {
74 m_expressionType = type;
75 m_variables.clear();
76 if (type == XYEquationCurve::EquationType::Cartesian)
77 m_variables << QStringLiteral("x");
78 else if (type == XYEquationCurve::EquationType::Polar)
79 m_variables << QStringLiteral("phi");
80 else if (type == XYEquationCurve::EquationType::Parametric)
81 m_variables << QStringLiteral("t");
82 else if (type == XYEquationCurve::EquationType::Implicit)
83 m_variables << QStringLiteral("x") << QStringLiteral("y");
84
85 m_highlighter->setVariables(m_variables);
86}
87
88void ExpressionTextEdit::setVariables(const QStringList& vars) {
89 m_variables = vars;

Callers 2

setupGeneralMethod · 0.80
typeChangedMethod · 0.80

Calls 2

clearMethod · 0.45
setVariablesMethod · 0.45

Tested by

no test coverage detected