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

Method setFileName

src/frontend/spreadsheet/ExportSpreadsheetDialog.cpp:183–199  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

181}
182
183void ExportSpreadsheetDialog::setFileName(const QString& name) {
184 if (m_projectPath.isEmpty()) {
185 // no project folder is available (yet), use the last used directory in this dialog
186 KConfigGroup conf = Settings::group(QStringLiteral("ExportSpreadsheetDialog"));
187 QString dir = conf.readEntry("LastDir", "");
188 if (dir.isEmpty()) { // use project dir as fallback
189 KConfigGroup confMainWin = Settings::group(QStringLiteral("MainWin"));
190 dir = confMainWin.readEntry("LastOpenDir", "");
191 if (dir.isEmpty())
192 dir = QDir::homePath();
193 }
194 ui->leFileName->setText(dir + QLatin1Char('/') + name);
195 } else
196 ui->leFileName->setText(m_projectPath + QLatin1String("/") + name);
197
198 this->formatChanged(ui->cbFormat->currentIndex());
199}
200
201void ExportSpreadsheetDialog::fitsExportToChanged(int idx) {
202 if (idx == 0) {

Callers 1

exportViewMethod · 0.45

Calls 5

formatChangedMethod · 0.95
groupFunction · 0.85
isEmptyMethod · 0.45
setTextMethod · 0.45
currentIndexMethod · 0.45

Tested by

no test coverage detected