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

Method nameChanged

src/frontend/dockwidgets/BaseDock.cpp:200–217  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

198}
199
200void BaseDock::nameChanged() {
201 if (m_initializing || !m_aspect || m_aspects.size() > 1)
202 return;
203
204 if (!m_leName) {
205 DEBUG("BaseDock: m_leName not initialized");
206 Q_ASSERT(false);
207 return;
208 }
209
210 if (!m_aspect->setName(m_leName->text(), AbstractAspect::NameHandling::UniqueRequired)) {
211 SET_WARNING_STYLE(m_leName)
212 m_leName->setToolTip(i18n("Please choose another name, because this is already in use."));
213 } else {
214 m_leName->setStyleSheet(QString());
215 m_leName->setToolTip(QString());
216 }
217}
218
219void BaseDock::commentChanged() {
220 if (m_initializing || !m_aspect || m_aspects.size() > 1)

Callers

nothing calls this directly

Calls 5

setToolTipMethod · 0.80
QStringClass · 0.50
sizeMethod · 0.45
setNameMethod · 0.45
textMethod · 0.45

Tested by

no test coverage detected