Ejemplo n.º 1
0
void MainWindow::exportDialog()
{
    ExportDialog *exportDialog = new ExportDialog(this);
    connect(exportDialog, &ExportDialog::trainExport, this, &MainWindow::saveToFile);
    connect(exportDialog, &ExportDialog::ticketExport, this, &MainWindow::ticketsSaveToFile);
    exportDialog->exec();
}
Ejemplo n.º 2
0
void db_x509req::store(QModelIndex index)
{
	QList<exportType> types;

	pki_x509req *req = static_cast<pki_x509req*>(index.internalPointer());
	if (!req)
		return;

	types << exportType(exportType::PEM, "pem", "PEM") <<
			exportType(exportType::DER, "der", "DER");

	ExportDialog *dlg = new ExportDialog(mainwin,
		tr("Certificate request export"),
		tr("Certificate request ( *.pem *.der *.csr )"), req,
		MainWindow::csrImg, types);
	if (!dlg->exec()) {
		delete dlg;
		return;
	}
	QString fname = dlg->filename->text();
	try {
		req->writeReq(fname, dlg->type() == exportType::PEM);
	}
	catch (errorEx &err) {
		mainwin->Error(err);
	}
	delete dlg;
}
Ejemplo n.º 3
0
void ExportHandler::runExportWithDialog(GladeSearchpath * gladeSearchPath, Settings * settings, Document * doc, Control * control, int current) {
	XOJ_CHECK_TYPE(ExportHandler);

	doc->lock();
	int count = doc->getPageCount();
	ExportDialog * dlg = new ExportDialog(gladeSearchPath, settings, count, current);
	dlg->show(GTK_WINDOW(control->getWindow()->getWindow()));

	GList * selected = dlg->getRange();

	if (selected) {
		ExportJob * job = new ExportJob(control, selected, dlg->getFormatType(), dlg->getPngDpi(), dlg->getFolder(), dlg->getFilename());
		control->getScheduler()->addJob(job, JOB_PRIORITY_NONE);
		job->unref();
	}

	delete dlg;
	doc->unlock();
}