| 203 | } |
| 204 | |
| 205 | bool Worksheet::exportView() const { |
| 206 | #ifndef SDK |
| 207 | auto* dlg = new ExportWorksheetDialog(m_view); |
| 208 | dlg->setProjectFileName(const_cast<Worksheet*>(this)->project()->fileName()); |
| 209 | dlg->setFileName(name()); |
| 210 | bool ret; |
| 211 | if ((ret = (dlg->exec() == QDialog::Accepted))) { |
| 212 | QString path = dlg->path(); |
| 213 | const auto format = dlg->exportFormat(); |
| 214 | const auto area = dlg->exportArea(); |
| 215 | const bool background = dlg->exportBackground(); |
| 216 | const int resolution = dlg->exportResolution(); |
| 217 | |
| 218 | WAIT_CURSOR; |
| 219 | m_view->exportToFile(path, format, area, background, resolution); |
| 220 | RESET_CURSOR; |
| 221 | } |
| 222 | delete dlg; |
| 223 | return ret; |
| 224 | #else |
| 225 | return true; |
| 226 | #endif |
| 227 | } |
| 228 | |
| 229 | bool Worksheet::exportView(QPixmap& pixmap) const { |
| 230 | if (!m_view) |
nothing calls this directly
no test coverage detected