--- /dev/null
+dnl Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
+dnl CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
+dnl
+dnl This library is free software; you can redistribute it and/or
+dnl modify it under the terms of the GNU Lesser General Public
+dnl License as published by the Free Software Foundation; either
+dnl version 2.1 of the License.
+dnl
+dnl This library is distributed in the hope that it will be useful,
+dnl but WITHOUT ANY WARRANTY; without even the implied warranty of
+dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+dnl Lesser General Public License for more details.
+dnl
+dnl You should have received a copy of the GNU Lesser General Public
+dnl License along with this library; if not, write to the Free Software
+dnl Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+dnl
+dnl See http://www.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org
+dnl
+dnl
+dnl
+
+AC_DEFUN([CHECK_GDLIB],[
+AC_REQUIRE([AC_PROG_CC])dnl
+AC_REQUIRE([AC_PROG_CPP])dnl
+
+AC_CHECKING(for gd library)
+
+gd_ok=no
+
+dnl check gd.h header
+AC_CHECK_HEADER(gd.h, gd_ok=yes, gd_ok=no)
+
+if test "x$gd_ok" = "xyes"; then
+ dnl check gd library
+ AC_MSG_CHECKING(linking with libgd.so)
+ LIBS_old=$LIBS
+ LIBS="$LIBS -lgd"
+ AC_TRY_LINK([#include <gd.h>],
+ [gdImagePtr image = gdImageCreate(10,10);],
+ gd_ok=yes,
+ gd_ok=no)
+ LIBS=$LIBS_old
+ AC_MSG_RESULT(done)
+fi
+
+if test "x$gd_ok" = "xno"; then
+ AC_MSG_WARN(gd library is not installed!)
+fi
+
+AC_MSG_RESULT(for gd: $gd_ok)
+
+])dnl
ac_cc_warnings.m4 check_qt.m4 check_swig.m4 \
check_boost.m4
-$(top_srcdir)/aclocal.m4: $(ACLOCAL_SRC:%=@KERNEL_ROOT_DIR@/salome_adm/unix/config_files/%)
+ACLOCAL_SRC1 = \
+check_Med.m4 check_Med2.m4 check_Randomizer.m4 \
+check_Visu.m4 check_gd.m4
+
+$(top_srcdir)/aclocal.m4: $(ACLOCAL_SRC:%=@KERNEL_ROOT_DIR@/salome_adm/unix/config_files/%) $(ACLOCAL_SRC1:%=$(top_srcdir)/adm_local/unix/config_files/%)
cd $(top_srcdir) ; aclocal --acdir=adm_local/unix/config_files -I @KERNEL_ROOT_DIR@/salome_adm/unix/config_files
CHECK_HTML_GENERATORS
+echo
+echo ---------------------------------------------
+echo Testing gd library
+echo ---------------------------------------------
+echo
+
+CHECK_GDLIB
+
echo
echo ---------------------------------------------
echo Testing Kernel
echo Configure
variables="cc_ok boost_ok lex_yacc_ok python_ok swig_ok threads_ok
-OpenGL_ok qt_ok msg2qm_ok vtk_ok hdf5_ok med2_ok omniORB_ok occ_ok doxygen_ok graphviz_ok Kernel_ok Med_ok Visu_ok Randomizer_ok"
+OpenGL_ok qt_ok msg2qm_ok vtk_ok hdf5_ok med2_ok omniORB_ok occ_ok doxygen_ok graphviz_ok gd_ok Kernel_ok Med_ok Visu_ok Randomizer_ok"
for var in $variables
do
LIB_SRC = SIERPINSKY_Gen_i.cxx
LIB_SERVER_IDL = Sierpinsky.idl MED.idl
-LIB_CLIENT_IDL = SALOME_Component.idl SALOME_Exception.idl SALOMEDS.idl
+LIB_CLIENT_IDL = SALOME_Component.idl SALOME_Exception.idl SALOMEDS.idl SALOME_GenericObj.idl SALOME_Comm.idl
CPPFLAGS += -I${KERNEL_ROOT_DIR}/include/salome $(HDF5_INCLUDES) -I${MED_ROOT_DIR}/include/salome $(BOOST_CPPFLAGS)
PO_FILES = SIERPINSKY_msg_en.po SIERPINSKY_icons.po
# Libraries targets
-LIB = libSIERPINSKYGUI.la
+LIB = libSIERPINSKY.la
LIB_SRC = \
SierpinskyGUI.cxx \
#include <SUIT_MessageBox.h>
#include <SUIT_ResourceMgr.h>
+#include <SUIT_Desktop.h>
#include <SalomeApp_Application.h>
+#include <SVTK_ViewModel.h>
#include <SALOME_LifeCycleCORBA.hxx>
#include <SierpinskyGUI_RunDlg.h>
-#include <SUIT_Desktop.h>
-
/*!
* Constructor
*/
return QString( anIOR.in() );
}
+/*!
+ * Required dockable windows
+ */
+void SierpinskyGUI::windows( QMap<int, int>& wmap ) const
+{
+ wmap.insert( SalomeApp_Application::WT_ObjectBrowser, Qt::DockLeft );
+}
+
+/*!
+ * Required viewers list
+ */
+void SierpinskyGUI::viewManagers( QStringList& vmlist ) const
+{
+ vmlist.append( SVTK_Viewer::Type() );
+}
+
/*!
* Module's activation
*/
void SierpinskyGUI::OnRun()
{
QWidget* aParent = getApp()->desktop();
- SierpinskyGUI_RunDlg* aDlg = new SierpinskyGUI_RunDlg( aParent );
+ SierpinskyGUI_RunDlg* aDlg = new SierpinskyGUI_RunDlg( aParent, this );
aDlg->exec();
}
void initialize( CAM_Application* );
virtual QString engineIOR() const;
+ virtual void windows( QMap<int, int>& ) const;
+ virtual void viewManagers( QStringList& ) const;
+
static SIERPINSKY_ORB::SIERPINSKY_ptr InitSIERPINSKYGen( SalomeApp_Application* );
public slots:
- bool deactivateModule( SUIT_Study* );
- bool activateModule( SUIT_Study* );
+ virtual bool deactivateModule( SUIT_Study* );
+ virtual bool activateModule( SUIT_Study* );
protected slots:
void OnRun();
///////////////////////////////////////////////////////////
#include "SierpinskyGUI_RunDlg.h"
+#include "SierpinskyGUI.h"
#include "SALOME_LifeCycleCORBA.hxx"
#include "SalomeApp_Application.h"
//#include "VisuGUI_Tools.h"
/*!
* Constructor
*/
-SierpinskyGUI_RunDlg::SierpinskyGUI_RunDlg( QWidget* parent )
+SierpinskyGUI_RunDlg::SierpinskyGUI_RunDlg( QWidget* parent, SierpinskyGUI* module )
: QDialog( parent, "SierpinskyGUI_RunDlg", true,
WStyle_Customize | WStyle_NormalBorder | WStyle_Title | WStyle_SysMenu | WDestructiveClose ),
- myThread( 0 )
+ myThread( 0 ), myModule( module )
{
setCaption( tr( "CAPTION" ) );
setSizeGripEnabled( true );
int aJPEGSize = myJpegSize->value();
if ( !aJPEGFile.isEmpty() && aJPEGSize > 0 ) {
bool res = getSierpinskyEngine()->ExportToJPEG( aJPEGFile.latin1(), aJPEGSize );
+ if ( !res ) {
+ // error: can't create JPEG image
+ }
}
}
// export to MED
VISU::Result_var aResult = aVisuGen->ImportFile( aMEDFile.latin1() );
if ( !CORBA::is_nil( aResult ) )
aVisuGen->MeshOnEntity( aResult, "Sierpinsky", VISU::NODE );
+ myModule->getApp()->updateObjectBrowser( true );
}
}
}
class QtxDblSpinBox;
class MyThread;
class QProgressBar;
+class SierpinskyGUI;
class SierpinskyGUI_RunDlg : public QDialog
{
public:
// Constructor
- SierpinskyGUI_RunDlg( QWidget* );
+ SierpinskyGUI_RunDlg( QWidget*, SierpinskyGUI* );
// Destructor
~SierpinskyGUI_RunDlg();
void toggled(); // Toggle 'Base points' mode
private:
+ // module
+ SierpinskyGUI* myModule;
+
// widgets
QGroupBox* box1;
- QtxDblSpinBox* myStartX;
- QtxDblSpinBox* myStartY;
+ QtxDblSpinBox* myStartX;
+ QtxDblSpinBox* myStartY;
QCheckBox* myStartRandom;
QGroupBox* box2;
- QtxDblSpinBox* myX1;
- QtxDblSpinBox* myY1;
- QtxDblSpinBox* myX2;
- QtxDblSpinBox* myY2;
- QtxDblSpinBox* myX3;
- QtxDblSpinBox* myY3;
+ QtxDblSpinBox* myX1;
+ QtxDblSpinBox* myY1;
+ QtxDblSpinBox* myX2;
+ QtxDblSpinBox* myY2;
+ QtxDblSpinBox* myX3;
+ QtxDblSpinBox* myY3;
QCheckBox* myBaseRandom;
QCheckBox* myBaseDefault;
QCheckBox* myMedCheck;
QLineEdit* myMedFile;
QPushButton* myMedBtn;
- QtxDblSpinBox* myMedSize;
+ QtxDblSpinBox* myMedSize;
QCheckBox* myVisuCheck;
QPushButton* myStartBtn;