void DatabaseImportForm::captureThreadError(Exception e)
{
	QPixmap ico;
	QTreeWidgetItem *item=nullptr;

	if(!create_model)
		model_wgt->rearrangeSchemas(QPointF(origin_sb->value(), origin_sb->value()),
									tabs_per_row_sb->value(), sch_per_row_sb->value(), obj_spacing_sb->value());

	destroyModelWidget();
	finishImport(trUtf8("Importing process aborted!"));

	ico=QPixmap(PgModelerUiNS::getIconPath("msgbox_erro"));
	ico_lbl->setPixmap(ico);

	item=PgModelerUiNS::createOutputTreeItem(output_trw, PgModelerUiNS::formatMessage(e.getErrorMessage()), ico, nullptr, false, true);
	PgModelerUiNS::createExceptionsTree(output_trw, e, item);

	//Destroy the current import thread and helper to avoid reuse
	destroyThread();

	//Recreates a new import thread and helper to force user to reconfigure the import
	createThread();

	database_cmb->setCurrentIndex(0);
	throw Exception(e.getErrorMessage(), e.getErrorType(),__PRETTY_FUNCTION__,__FILE__,__LINE__, &e);
}
예제 #2
0
void DatabaseImportForm::captureThreadError(Exception e)
{
	destroyModelWidget();
	finishImport(trUtf8("Importing process aborted!"));
	ico_lbl->setPixmap(QPixmap(QString(":/icones/icones/msgbox_erro.png")));
	throw Exception(e.getErrorMessage(), e.getErrorType(),__PRETTY_FUNCTION__,__FILE__,__LINE__, &e);
}
void DatabaseImportForm::handleImportCanceled(void)
{
	QPixmap ico=QPixmap(PgModelerUiNS::getIconPath("msgbox_alerta"));
	QString msg=trUtf8("Importing process canceled by user!");

	if(!create_model)
		model_wgt->rearrangeSchemas(QPointF(origin_sb->value(), origin_sb->value()),
									tabs_per_row_sb->value(), sch_per_row_sb->value(), obj_spacing_sb->value());

	destroyModelWidget();
	finishImport(msg);
	ico_lbl->setPixmap(ico);

	PgModelerUiNS::createOutputTreeItem(output_trw, msg, ico);
}
예제 #4
0
void DatabaseImportForm::handleImportCanceled(void)
{
	destroyModelWidget();
	finishImport(trUtf8("Importing process canceled by user!"));
	ico_lbl->setPixmap(QPixmap(QString(":/icones/icones/msgbox_alerta.png")));
}