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

Method setFileName

src/frontend/worksheet/ExportWorksheetDialog.cpp:161–174  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

159}
160
161void ExportWorksheetDialog::setFileName(const QString& name) {
162 if (m_projectPath.isEmpty()) {
163 // no project folder is available (yet), use the last used directory in this dialog
164 KConfigGroup conf = Settings::group(QStringLiteral("ExportWorksheetDialog"));
165 QString dir = conf.readEntry("LastDir", "");
166 if (dir.isEmpty())
167 dir = QDir::homePath();
168 ui->leFileName->setText(dir + QLatin1String("/") + name);
169 } else
170 ui->leFileName->setText(m_projectPath + QLatin1String("/") + name);
171
172 formatChanged(ui->cbFormat->currentIndex());
173 exportToChanged(ui->cbExportTo->currentIndex());
174}
175
176QString ExportWorksheetDialog::path() const {
177 if (ui->cbExportTo->currentIndex() == 0)

Callers 7

openProjectMethod · 0.45
saveMethod · 0.45
fileNameChangedMethod · 0.45
saveSettingsMethod · 0.45
fileNameChangedMethod · 0.45
exportToFileMethod · 0.45
exportToFileMethod · 0.45

Calls 4

groupFunction · 0.85
isEmptyMethod · 0.45
setTextMethod · 0.45
currentIndexMethod · 0.45

Tested by

no test coverage detected