| 159 | } |
| 160 | |
| 161 | void 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 | |
| 176 | QString ExportWorksheetDialog::path() const { |
| 177 | if (ui->cbExportTo->currentIndex() == 0) |
no test coverage detected