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

Method updateErrorMessage

src/frontend/PlotTemplateDialog.cpp:234–250  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

232}
233
234void PlotTemplateDialog::updateErrorMessage(const QString& message) {
235 if (message.isEmpty()) {
236 ui->teMessage->hide();
237 m_worksheetView->show();
238 auto* button = ui->buttonBox->button(QDialogButtonBox::StandardButton::Ok);
239 assert(button);
240 button->setEnabled(true);
241 return;
242 }
243
244 m_worksheetView->hide();
245 ui->teMessage->setText(message);
246 ui->teMessage->show();
247 auto* button = ui->buttonBox->button(QDialogButtonBox::StandardButton::Ok);
248 assert(button);
249 button->setEnabled(false);
250}
251
252QString PlotTemplateDialog::templatePath() const {
253 return ui->lvInstalledTemplates->model()->data(ui->lvInstalledTemplates->currentIndex(), TemplateListModel::Roles::FilePathRole).toString();

Callers

nothing calls this directly

Calls 5

showMethod · 0.80
buttonMethod · 0.80
isEmptyMethod · 0.45
setEnabledMethod · 0.45
setTextMethod · 0.45

Tested by

no test coverage detected