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

Method updateNameDescriptionWidgets

src/frontend/dockwidgets/BaseDock.cpp:302–316  ·  view source on GitHub ↗

! * shows the name and the description of the first selected aspect, * disables the fields "Name" and "Comment" if there are more than one aspects selected. */

Source from the content-addressed store, hash-verified

300 * disables the fields "Name" and "Comment" if there are more than one aspects selected.
301 */
302void BaseDock::updateNameDescriptionWidgets() {
303 if (m_aspects.size() == 1) {
304 m_leName->setEnabled(true);
305 m_teComment->setEnabled(true);
306 m_leName->setText(m_aspect->name());
307 m_teComment->setText(m_aspect->comment());
308 } else {
309 m_leName->setEnabled(false);
310 m_teComment->setEnabled(false);
311 m_leName->setText(QString());
312 m_teComment->setText(QString());
313 }
314 m_leName->setStyleSheet(QString());
315 m_leName->setToolTip(QString());
316}
317
318void BaseDock::spinBoxCalculateMinMax(QDoubleSpinBox* spinbox, Range<double> range, double newValue) {
319 double min, max;

Callers

nothing calls this directly

Calls 7

commentMethod · 0.80
setToolTipMethod · 0.80
QStringClass · 0.50
sizeMethod · 0.45
setEnabledMethod · 0.45
setTextMethod · 0.45
nameMethod · 0.45

Tested by

no test coverage detected