Salome HOME
Update according PyConsole redesign in GUI module
[modules/hexablock.git] / src / HEXABLOCKGUI / HEXABLOCKGUI_DocumentPanel.cxx
index 169c6f56329f4054a733acd594efe64c9d5a5ae6..9ec2dd28af4497a1cec52f4082da5eb4e0439105 100755 (executable)
@@ -1,4 +1,4 @@
-// Copyright (C) 2009-2014  CEA/DEN, EDF R&D
+// Copyright (C) 2009-2015  CEA/DEN, EDF R&D
 //
 // This library is free software; you can redistribute it and/or
 // modify it under the terms of the GNU Lesser General Public
 
 #include "Hex.hxx"
 #include <iostream>
-#include <QtGui>
 #include <QFlags>
+#include <QKeyEvent>
+#include <QStyledItemDelegate>
 
 #include <SalomeApp_Application.h>
 #include <SalomeApp_Study.h>
+#ifndef DISABLE_PYCONSOLE
 #include <PyConsole_Console.h>
+#endif
 #include <SalomeApp_Tools.h>
 
 #include <Standard_GUID.hxx>
@@ -5876,6 +5879,7 @@ bool ComputeMeshDialog::apply(QModelIndex& result)
     _currentObj = NULL;
 
     if (getDocumentModel() == NULL) return false;
+#ifndef DISABLE_PYCONSOLE
     QString command = QString("import hexablock ; %1 = hexablock.mesh(\"%2\", \"%1\", %3, \"%4\")")
                                                                                                          .arg( _name->text() )
                                                                                                          .arg( getDocumentModel()->getName() )
@@ -5889,6 +5893,9 @@ bool ComputeMeshDialog::apply(QModelIndex& result)
         pyConsole->exec( command );
     else
         return false;
+#else
+    return false;
+#endif
 
     return true;
 }