IF(EXISTS ${GUI_ROOT_DIR})
LIST(APPEND CMAKE_MODULE_PATH "${GUI_ROOT_DIR}/adm_local/cmake_files")
FIND_PACKAGE(SalomeGUI)
- FULL_GUI(TRUE) #check whether GUI builded in full mode and with CORBA
+ SALOME_GUI_WITH_CORBA() #check whether GUI builded with CORBA
+ SALOME_GUI_MODE(SALOME_USE_VTKVIEWER SALOME_USE_SALOMEOBJECT
+ OPTIONAL SALOME_USE_PLOT2DVIEWER SALOME_USE_PYCONSOLE)
##
## Prerequisites From GUI:
##
\ref tui_deflection_1d "Defining Number of Segments" hypothesis
operation.
+\note The plot functionality is available only if GUI module is builded with Plot 2D Viewer (set option SALOME_USE_PLOT2DVIEWER to ON when building GUI module).
<br>
\anchor start_and_end_length_anchor
nodes / elements does not exceed the "Automatic controls compute limit" set
via the "Mesh information" preferences (zero value means that there is no limit).
+\note The plot functionality is available only if GUI module is builded with Plot 2D Viewer (set option SALOME_USE_PLOT2DVIEWER to ON when building GUI module).
+
The button \b "Dump" allows printing the information displayed in the
dialog box to a .txt file.
${GUI_qtx}
${GUI_suit}
${GUI_std}
- ${GUI_Plot2d}
- ${GUI_SPlot2d}
SMESHClient
SMDS
SMESHControls
)
+IF(SALOME_USE_PLOT2DVIEWER)
+ LIST(APPEND _link_LIBRARIES
+ ${GUI_Plot2d}
+ ${GUI_SPlot2d}
+ )
+ENDIF()
+
# --- headers ---
# header files / no moc processing
#include <VTKViewer_Algorithm.h>
-#include <PyInterp_Interp.h>
-
#include <SUIT_Desktop.h>
#include <SUIT_FileDlg.h>
#include <SUIT_MessageBox.h>
// import Python module that manages SMESH plugins (need to be here because SalomePyQt API uses active module)
PyGILState_STATE gstate = PyGILState_Ensure();
- PyObjWrapper pluginsmanager = PyImport_ImportModuleNoBlock((char*)"salome_pluginsmanager");
+ PyObject* pluginsmanager = PyImport_ImportModuleNoBlock((char*)"salome_pluginsmanager");
if ( !pluginsmanager ) {
PyErr_Print();
}
else {
- PyObjWrapper result = PyObject_CallMethod( pluginsmanager, (char*)"initialize", (char*)"isss",1,"smesh",tr("MEN_MESH").toUtf8().data(),tr("SMESH_PLUGINS_OTHER").toUtf8().data());
+ PyObject* result = PyObject_CallMethod( pluginsmanager, (char*)"initialize", (char*)"isss",1,"smesh",tr("MEN_MESH").toUtf8().data(),tr("SMESH_PLUGINS_OTHER").toUtf8().data());
if ( !result )
PyErr_Print();
+ Py_XDECREF(result);
}
PyGILState_Release(gstate);
// end of SMESH plugins loading
connectView( wnd );
}
+ Py_XDECREF(pluginsmanager);
return res;
}
{
aMap.insert( SalomeApp_Application::WT_ObjectBrowser, Qt::LeftDockWidgetArea );
aMap.insert( SalomeApp_Application::WT_NoteBook, Qt::LeftDockWidgetArea );
+#ifndef DISABLE_PYCONSOLE
aMap.insert( SalomeApp_Application::WT_PyConsole, Qt::BottomDockWidgetArea );
+#endif
}
void SMESHGUI::viewManagers( QStringList& list ) const
myButtons[4]->setEnabled( true );
myButtons[5]->setEnabled( true );
}
+#ifdef DISABLE_PLOT2DVIEWER
+ myMainLayout->setRowStretch(11,0);
+ for( int i=22; i<=24; i++)
+ myMainLayout->itemAt(i)->widget()->setVisible( false );
+#endif
}
else {
myMainLayout->setRowStretch(11,0);
myButtons[7]->setEnabled( true );
myButtons[8]->setEnabled( true );
}
+#ifdef DISABLE_PLOT2DVIEWER
+ myMainLayout->setRowStretch(16,0);
+ for( int i=32; i<=34; i++)
+ myMainLayout->itemAt(i)->widget()->setVisible( false );
+#endif
}
else {
myMainLayout->setRowStretch(16,0);
void SMESHGUI_CtrlInfo::computeAspectRatio()
{
+#ifndef DISABLE_PLOT2DVIEWER
myButtons[5]->setEnabled( false );
if ( myObject->_is_nil() ) return;
myPlot->replot();
}
delete aHistogram;
+#endif
}
void SMESHGUI_CtrlInfo::computeAspectRatio3D()
{
+#ifndef DISABLE_PLOT2DVIEWER
myButtons[8]->setEnabled( false );
if ( myObject->_is_nil() ) return;
myPlot3D->replot();
}
delete aHistogram;
+#endif
}
/*!
myWidgets[2]->setText("");
}
+#ifndef DISABLE_PLOT2DVIEWER
Plot2d_Histogram* SMESHGUI_CtrlInfo::getHistogram( SMESH::NumericalFunctor_ptr aNumFun )
{
SMESH::SMESH_Mesh_var mesh = myObject->GetMesh();
}
return aHistogram;
}
+#endif
void SMESHGUI_CtrlInfo::saveInfo( QTextStream &out ) {
out << QString( 20, '-' ) << "\n";
#include "SMESH_SMESHGUI.hxx"
#include "SMESH_ControlsDef.hxx"
-#include <Plot2d_Histogram.h>
+#ifndef DISABLE_PLOT2DVIEWER
+ #include <Plot2d_Histogram.h>
+#else
+ #include <qwt_plot.h>
+#endif
#include <QFrame>
#include <QDialog>
QwtPlot* createPlot( QWidget* );
void setFontAttributes( QWidget* );
void clearInternal();
+#ifndef DISABLE_PLOT2DVIEWER
Plot2d_Histogram* getHistogram( SMESH::NumericalFunctor_ptr functor );
+#endif
void computeNb( int ft, int iBut, int iWdg );
private slots:
# header files / to be processed by moc
SET(_moc_HEADERS
StdMeshersGUI_StdHypothesisCreator.h
- StdMeshersGUI_DistrPreview.h
StdMeshersGUI_DistrTable.h
StdMeshersGUI_NbSegmentsCreator.h
StdMeshersGUI_ObjectReferenceParamWdg.h
StdMeshersGUI_PropagationHelperWdg.h
)
+IF(SALOME_USE_PLOT2DVIEWER)
+ LIST(APPEND _moc_HEADERS
+ StdMeshersGUI_DistrPreview.h
+ )
+ENDIF()
+
# header files / no moc processing
SET(_other_HEADERS
SMESH_StdMeshersGUI.hxx
SET(_other_SOURCES
StdMeshersGUI.cxx
StdMeshersGUI_StdHypothesisCreator.cxx
- StdMeshersGUI_DistrPreview.cxx
StdMeshersGUI_DistrTable.cxx
StdMeshersGUI_NbSegmentsCreator.cxx
StdMeshersGUI_ObjectReferenceParamWdg.cxx
StdMeshersGUI_PropagationHelperWdg.cxx
)
+IF(SALOME_USE_PLOT2DVIEWER)
+ LIST(APPEND _other_SOURCES
+ StdMeshersGUI_DistrPreview.cxx
+ )
+ENDIF()
+
# sources / to compile
SET(StdMeshersGUI_SOURCES ${_other_SOURCES} ${_moc_SOURCES})
// SMESH includes
//
#include "StdMeshersGUI_NbSegmentsCreator.h"
-#include "StdMeshersGUI_DistrPreview.h"
+#ifndef DISABLE_PLOT2DVIEWER
+ #include "StdMeshersGUI_DistrPreview.h"
+#endif
#include "StdMeshersGUI_DistrTable.h"
#include "StdMeshersGUI_PropagationHelperWdg.h"
#include "StdMeshersGUI_SubShapeSelectorWdg.h"
myDistr( 0 ),
myScale( 0 ),
myTable( 0 ),
+#ifndef DISABLE_PLOT2DVIEWER
myPreview( 0 ),
+#endif
myExpr( 0 ),
myConvBox( 0 ),
myConv( 0 ),
// c) table
myTable = new StdMeshersGUI_DistrTableFrame( GroupC1 );
+ myTable->setMinimumHeight(220);
myDistLayout->addWidget( myTable, 1, 0, 2, 1 );
+#ifndef DISABLE_PLOT2DVIEWER
// d) preview
myPreview = new StdMeshersGUI_DistrPreview( GroupC1, h.in() );
- myPreview->setMinimumHeight(220);
myDistLayout->addWidget( myPreview, 1, 1, 2, 1 );
+#endif
// 5) conversion (radiogroup)
myConvBox = new QGroupBox( tr( "SMESH_CONV_MODE" ), GroupC1 );
myDirectionWidget->ShowPreview( distr!=0 );
bool isFunc = distr==2 || distr==3;
+#ifndef DISABLE_PLOT2DVIEWER
myPreview->setShown( isFunc );
+#endif
myConvBox->setShown( isFunc );
myTable->setShown( distr==2 );
myLExpr->setShown( distr==3 );
myInfo->setShown( distr==3);
+#ifndef DISABLE_PLOT2DVIEWER
//change of preview
int nbSeg = myNbSeg->value();
if( distr==2 ) //preview for table-described function
if( isFunc )
myPreview->setConversion( StdMeshersGUI_DistrPreview::Conversion( myConv->checkedId() ) );
+#endif
if ( (QtxComboBox*)sender() == myDistr && dlg() ) {
QApplication::instance()->processEvents();
class QtxComboBox;
class SMESHGUI_SpinBox;
class StdMeshersGUI_DistrTableFrame;
-class StdMeshersGUI_DistrPreview;
+#ifndef DISABLE_PLOT2DVIEWER
+ class StdMeshersGUI_DistrPreview;
+#endif
class QLineEdit;
class QButtonGroup;
class QGroupBox;
QtxComboBox* myDistr;
SMESHGUI_SpinBox* myScale;
StdMeshersGUI_DistrTableFrame* myTable;
+#ifndef DISABLE_PLOT2DVIEWER
StdMeshersGUI_DistrPreview* myPreview;
+#endif
QLineEdit *myName, *myExpr;
QGroupBox* myConvBox;
QButtonGroup* myConv;