#include "HYDROGUI_PrsImage.h"
#include "HYDROGUI_Tool.h"
+#include "HYDROGUI_Module.h"
#include <HYDROData_Lambert93.h>
#include <HYDROData_Image.h>
+#include <LightApp_Application.h>
#include <SUIT_FileDlg.h>
#include <SUIT_ResourceMgr.h>
+#include <SUIT_Desktop.h>
+#include <SUIT_MessageBox.h>
#include <SUIT_Session.h>
#include <QtxDoubleSpinBox.h>
if( !aFileName.isEmpty() )
{
QImage anImage( aFileName );
- if( !anImage.isNull() )
+ if( anImage.isNull() )
+ {
+ QString aTitle = QObject::tr( "INPUT_VALID_DATA" );
+ QString aMessage = QObject::tr( "FILE_CAN_NOT_BE_IMPORTED" ).
+ arg( aFileName ).arg( QFileInfo( aFileName ).suffix() );
+ SUIT_MessageBox::warning( module()->getApp()->desktop(), aTitle, aMessage );
+ }
+ else
{
myFileName->setText( aFileName );
emit createPreview( anImage );
<source>CASE_REGIONS</source>
<translation>Regions</translation>
</message>
+ <message>
+ <source>FILE_CAN_NOT_BE_IMPORTED</source>
+ <translation>The file '%1' can not be imported: format *.%2 is not supported.</translation>
+ </message>
<message>
<source>FILE_NOT_EXISTS_OR_CANT_BE_READ</source>
<translation>The file '%1'