Ejemplo n.º 1
0
bool DatapickerImage::exportView() const {
	ExportWorksheetDialog* dlg = new ExportWorksheetDialog(m_view);
	dlg->setFileName(name());
    bool ret;
    if ( (ret = (dlg->exec()==QDialog::Accepted)) ){
		const QString path = dlg->path();
		const WorksheetView::ExportFormat format = dlg->exportFormat();
		const int resolution = dlg->exportResolution();

		DatapickerImageView* view = reinterpret_cast<DatapickerImageView*>(m_view);
		WAIT_CURSOR;
		view->exportToFile(path, format, resolution);
		RESET_CURSOR;
	}
	delete dlg;
    return ret;
}
Ejemplo n.º 2
0
bool Worksheet::exportView() const {
	ExportWorksheetDialog* dlg = new ExportWorksheetDialog(m_view);
	dlg->setFileName(name());
    bool ret;
    if ((ret = dlg->exec()==QDialog::Accepted)){
		QString path = dlg->path();
		const WorksheetView::ExportFormat format = dlg->exportFormat();
		const WorksheetView::ExportArea area = dlg->exportArea();
		const bool background = dlg->exportBackground();
		const int resolution = dlg->exportResolution();

		WorksheetView* view = reinterpret_cast<WorksheetView*>(m_view);
		WAIT_CURSOR;
		view->exportToFile(path, format, area, background, resolution);
		RESET_CURSOR;
	}
	delete dlg;
    return ret;
}