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

Method setValues

src/frontend/widgets/ValueWidget.cpp:80–130  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

78}
79
80void ValueWidget::setValues(const QList<Value*>& values) {
81 m_values = values;
82 m_value = m_values.first();
83
84 ui.sbDistance->setLocale(QLocale());
85
86 if (!m_aspectModel) {
87 m_aspectModel = new AspectTreeModel(m_value->project());
88 m_aspectModel->enablePlottableColumnsOnly(true);
89 m_aspectModel->enableShowPlotDesignation(true);
90 }
91
92 // add center value if position is available
93 if (m_value->centerPositionAvailable())
94 if (!ui.cbPosition->contains(i18n("Center")))
95 ui.cbPosition->addItem(i18n("Center"));
96
97 QList<AspectType> list{AspectType::Folder,
98 AspectType::Workbook,
99 AspectType::Datapicker,
100 AspectType::DatapickerCurve,
101 AspectType::Spreadsheet,
102 AspectType::LiveDataSource,
103 AspectType::Column,
104 AspectType::Worksheet,
105 AspectType::CartesianPlot,
106 AspectType::XYFitCurve,
107 AspectType::XYSmoothCurve,
108 AspectType::Notebook};
109
110 cbColumn->setTopLevelClasses(list);
111 m_aspectModel->setSelectableAspects({AspectType::Column});
112
113 cbColumn->setModel(m_aspectModel);
114
115 load();
116
117 connect(m_value, &Value::typeChanged, this, &ValueWidget::valueTypeChanged);
118 connect(m_value, &Value::columnChanged, this, &ValueWidget::valueColumnChanged);
119 connect(m_value, &Value::positionChanged, this, &ValueWidget::valuePositionChanged);
120 connect(m_value, &Value::distanceChanged, this, &ValueWidget::valueDistanceChanged);
121 connect(m_value, &Value::opacityChanged, this, &ValueWidget::valueOpacityChanged);
122 connect(m_value, &Value::rotationAngleChanged, this, &ValueWidget::valueRotationAngleChanged);
123 connect(m_value, &Value::numericFormatChanged, this, &ValueWidget::valueNumericFormatChanged);
124 connect(m_value, &Value::precisionChanged, this, &ValueWidget::valuePrecisionChanged);
125 connect(m_value, &Value::dateTimeFormatChanged, this, &ValueWidget::valueDateTimeFormatChanged);
126 connect(m_value, &Value::prefixChanged, this, &ValueWidget::valuePrefixChanged);
127 connect(m_value, &Value::suffixChanged, this, &ValueWidget::valueSuffixChanged);
128 connect(m_value, &Value::fontChanged, this, &ValueWidget::valueFontChanged);
129 connect(m_value, &Value::colorChanged, this, &ValueWidget::valueColorChanged);
130}
131
132//*************************************************************
133//******** SLOTs for changes triggered in ValueWidget *********

Callers 14

setBarPlotsMethod · 0.45
setPlotsMethod · 0.45
setCurvesMethod · 0.45
showParetoPlotMethod · 0.45
generateMethod · 0.45
generateMethod · 0.45
pasteIntoSelectionMethod · 0.45
reverseColumnsMethod · 0.45
runMethod · 0.45
runMethod · 0.45

Calls 8

setLocaleMethod · 0.80
setTopLevelClassesMethod · 0.80
setSelectableAspectsMethod · 0.80
projectMethod · 0.45
containsMethod · 0.45
setModelMethod · 0.45

Tested by

no test coverage detected