Salome HOME
1) Fix for bug PAL6276 : QtCanvas: "Error"(Can't Set Input Value) message box doesn...
[modules/superv.git] / src / SUPERVGUI / SUPERVGUI_Notification.cxx
index 0121236426c8a713f56ab969900febc761535046..94e98a3692a63cf4de5237eff565b00df0891c1b 100644 (file)
 //  Author : Francis KLOSS
 //  Module : SUPERV
 
-using namespace std;
-
 #include "SUPERVGUI_Notification.h"
 #include "SUPERVGUI_Main.h"
 #include "SUPERVGUI_CanvasNode.h"
 
 #include "NOTIFICATION.hxx"
-#include "QAD_Message.h"
-#include "QAD_FileDlg.h"
+#include "SUIT_Desktop.h"
+#include "SUIT_FileDlg.h"
+#include "SUIT_Session.h"
 
 #include <qlayout.h>
 #include <qlabel.h>
@@ -52,7 +51,7 @@ using namespace std;
   Constructor
 */
 SUPERVGUI_Notification::SUPERVGUI_Notification( SUPERVGUI_Main* m )
-     : QDialog( QAD_Application::getDesktop(), "", TRUE, WStyle_Customize | WStyle_NormalBorder | WStyle_Title | WStyle_SysMenu ),
+     : QDialog( SUIT_Session::session()->activeApplication()->desktop(), "", TRUE, WStyle_Customize | WStyle_NormalBorder | WStyle_Title | WStyle_SysMenu ),
        myMain( m )
 {
   setCaption( tr( "TLT_FILTER_NOTIFY" ) );
@@ -95,7 +94,14 @@ SUPERVGUI_Notification::SUPERVGUI_Notification( SUPERVGUI_Main* m )
   myMainNotif->setVerbose( false );
 
   /* nodes notification */
-  QObjectList* ihmList = myMain->/*getGraph()->*/queryList( "SUPERVGUI_CanvasNode" );
+  // mkr : PAL7037 -->
+  //QObjectList* ihmList = myMain->/*getGraph()->*/queryList( "SUPERVGUI_CanvasNode" );
+  QObjectList* ihmList;
+  if ( myMain->getViewType() == CANVASTABLE )
+    ihmList = myMain->getCanvasArray()->queryList( "SUPERVGUI_CanvasNode" );
+  else
+    ihmList = myMain->getCanvas()->queryList( "SUPERVGUI_CanvasNode" );
+  // mkr : PAL7037 <--
   QObjectListIt i( *ihmList );
   SUPERVGUI_CanvasNode* theNode;
   while ( ( theNode = ( ( SUPERVGUI_CanvasNode* )i.current() ) ) != 0) {
@@ -206,11 +212,11 @@ void SUPERVGUI_Notification::loggedClicked()
 */
 void SUPERVGUI_Notification::browseClicked()
 {
-  QString fn = QAD_FileDlg::getFileName( this, 
-                                        myFileEdit->text(), 
-                                        tr( "ALL_FILES" ),
-                                        tr( "CHOOSE_LOG_FILES_TLT" ),
-                                        false );
+  QString fn = SUIT_FileDlg::getFileName( this, 
+                                         myFileEdit->text(), 
+                                         tr( "ALL_FILES" ),
+                                         tr( "CHOOSE_LOG_FILES_TLT" ),
+                                         false );
   if ( !fn.isEmpty() )
     myFileEdit->setText( fn );
 }