1 // Copyright (C) 2007-2013 CEA/DEN, EDF R&D
3 // This library is free software; you can redistribute it and/or
4 // modify it under the terms of the GNU Lesser General Public
5 // License as published by the Free Software Foundation; either
6 // version 2.1 of the License.
8 // This library is distributed in the hope that it will be useful,
9 // but WITHOUT ANY WARRANTY; without even the implied warranty of
10 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
11 // Lesser General Public License for more details.
13 // You should have received a copy of the GNU Lesser General Public
14 // License along with this library; if not, write to the Free Software
15 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
17 // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
21 // File : HexoticPluginGUI_HypothesisCreator.cxx
22 // Author : Lioka RAZAFINDRAZAKA (CEA)
25 #include "HexoticPluginGUI_HypothesisCreator.h"
26 #include "HexoticPluginGUI_Dlg.h"
28 #include <SMESHGUI_Utils.h>
29 #include <SMESHGUI_HypothesesUtils.h>
30 #include "SMESH_NumberFilter.hxx"
32 #include "utilities.h"
34 #include CORBA_SERVER_HEADER(HexoticPlugin_Algorithm)
36 #include <SUIT_Session.h>
37 #include <SUIT_ResourceMgr.h>
38 #include <SUIT_FileDlg.h>
39 #include <SalomeApp_Tools.h>
40 #include <QtxIntSpinBox.h>
44 #include <QVBoxLayout>
45 #include <QGridLayout>
49 #include <QPushButton>
51 #include "SMESH_Gen_i.hxx"
54 #include <TColStd_MapOfInteger.hxx>
57 // Main widget tabs identification
63 // Size maps tab, table columns order
70 HexoticPluginGUI_HypothesisCreator::HexoticPluginGUI_HypothesisCreator( const QString& theHypType )
71 : SMESHGUI_GenericHypothesisCreator( theHypType ),
77 HexoticPluginGUI_HypothesisCreator::~HexoticPluginGUI_HypothesisCreator()
81 bool HexoticPluginGUI_HypothesisCreator::checkParams(QString& msg) const
84 HexoticHypothesisData data_old, data_new;
85 readParamsFromHypo( data_old );
86 readParamsFromWidgets( data_new );
88 bool res = storeParamsToHypo( data_new );
90 storeParamsToHypo( data_old );
94 res = data_new.myMinSize <= data_new.myMaxSize;
96 msg = tr(QString("Min size (%1) is higher than max size (%2)").arg(data_new.myMinSize).arg(data_new.myMaxSize).toStdString().c_str());
100 res = data_new.myHexesMinLevel == 0 || \
101 ( data_new.myHexesMinLevel != 0 && (data_new.myHexesMinLevel < data_new.myHexesMaxLevel) );
103 msg = tr(QString("Min hexes level (%1) is higher than max hexes level (%2)").arg(data_new.myHexesMinLevel).arg(data_new.myHexesMaxLevel).toStdString().c_str());
110 QFrame* HexoticPluginGUI_HypothesisCreator::buildFrame()
112 QFrame* fr = new QFrame( 0 );
113 QVBoxLayout* lay = new QVBoxLayout( fr );
115 lay->setSpacing( 6 );
117 // main TabWidget of the dialog
118 QTabWidget* aTabWidget = new QTabWidget( fr );
119 aTabWidget->setTabShape( QTabWidget::Rounded );
120 aTabWidget->setTabPosition( QTabWidget::North );
121 lay->addWidget( aTabWidget );
123 // Standard arguments tab
124 QWidget* aStdGroup = new QWidget();
125 QGridLayout* l = new QGridLayout( aStdGroup );
132 l->addWidget( new QLabel( tr( "SMESH_NAME" ), aStdGroup ), row, 0, 1, 1 );
133 myName = new QLineEdit( aStdGroup );
134 l->addWidget( myName, row++, 1, 1, 2 );
135 myName->setMinimumWidth( 150 );
138 HexoticPlugin::HexoticPlugin_Hypothesis_var h =
139 HexoticPlugin::HexoticPlugin_Hypothesis::_narrow( initParamsHypothesis() );
141 myStdWidget = new HexoticPluginGUI_StdWidget(aStdGroup);
142 l->addWidget( myStdWidget, row++, 0, 1, 3 );
143 myStdWidget->onSdModeSelected(SD_MODE_4);
146 QWidget* aSmpGroup = new QWidget();
147 lay->addWidget( aSmpGroup );
149 // Size map widget creation and initialisation
150 mySmpWidget = new HexoticPluginGUI_SizeMapsWidget(aSmpGroup);
151 mySmpWidget->doubleSpinBox->setValue(0.0);
153 // Filters of selection
154 TColStd_MapOfInteger SM_ShapeTypes;
155 SM_ShapeTypes.Add( TopAbs_VERTEX );
156 SM_ShapeTypes.Add( TopAbs_EDGE );
157 SM_ShapeTypes.Add( TopAbs_WIRE );
158 SM_ShapeTypes.Add( TopAbs_FACE );
159 SM_ShapeTypes.Add( TopAbs_SOLID );
160 SM_ShapeTypes.Add( TopAbs_COMPOUND );
161 SMESH_NumberFilter* aFilter = new SMESH_NumberFilter("GEOM", TopAbs_SHAPE, 0, SM_ShapeTypes);
163 myGeomSelWdg = new StdMeshersGUI_ObjectReferenceParamWdg( aFilter, mySmpWidget, /*multiSel=*/false,/*stretch=*/false);
164 myGeomSelWdg->SetDefaultText(tr("Hexotic_SEL_SHAPE"), "QLineEdit { color: grey }");
165 mySmpWidget->gridLayout->addWidget(myGeomSelWdg, 0, 1);
167 QHBoxLayout* aSmpLayout = new QHBoxLayout( aSmpGroup );
168 aSmpLayout->setMargin( 0 );
169 aSmpLayout->addWidget( mySmpWidget);
171 QStringList headerLabels;
172 headerLabels << tr("Hexotic_ENTRY")<< tr("Hexotic_NAME")<< tr("Hexotic_SIZE");
173 mySmpWidget->tableWidget->setHorizontalHeaderLabels(headerLabels);
174 mySmpWidget->tableWidget->resizeColumnsToContents();
175 mySmpWidget->tableWidget->hideColumn( 0 );
176 mySmpWidget->label->setText(tr("LOCAL_SIZE"));
177 mySmpWidget->pushButton_1->setText(tr("Hexotic_ADD"));
178 mySmpWidget->pushButton_2->setText(tr("Hexotic_REMOVE"));
183 aTabWidget->insertTab( STD_TAB, aStdGroup, tr( "SMESH_ARGUMENTS" ) );
184 aTabWidget->insertTab( SMP_TAB, aSmpGroup, tr( "LOCAL_SIZE" ) );
189 mySizeMapsToRemove.clear();
190 connect( mySmpWidget->pushButton_1, SIGNAL( clicked() ), this, SLOT( onAddLocalSize() ) );
191 connect( mySmpWidget->pushButton_2, SIGNAL( clicked() ), this, SLOT( onRemoveLocalSize() ) );
196 void HexoticPluginGUI_HypothesisCreator::onAddLocalSize()
198 int rowCount = mySmpWidget->tableWidget->rowCount();
199 int columnCount = mySmpWidget->tableWidget->columnCount();
201 // Get the selected object properties
202 GEOM::GEOM_Object_var sizeMapObject = myGeomSelWdg->GetObject< GEOM::GEOM_Object >(0);
203 std::string entry, shapeName;
204 entry = (std::string) sizeMapObject->GetStudyEntry();
205 shapeName = sizeMapObject->GetName();
207 // Check if the object is already in the widget
208 QList<QTableWidgetItem *> listFound = mySmpWidget->tableWidget
209 ->findItems( QString(entry.c_str()), Qt::MatchExactly );
210 if ( !listFound.isEmpty() )
213 // Get the size value
214 double size = mySmpWidget->doubleSpinBox->value();
216 // Set items for the inserted row
217 insertLocalSizeInWidget( entry, shapeName, size, rowCount );
220 void HexoticPluginGUI_HypothesisCreator::insertLocalSizeInWidget( std::string entry,
221 std::string shapeName,
225 MESSAGE("HexoticPluginGUI_HypothesisCreator:insertLocalSizeInWidget")
226 int columnCount = mySmpWidget->tableWidget->columnCount();
228 // Add a row at the end of the table
229 mySmpWidget->tableWidget->insertRow(row);
232 for (int col = 0; col<columnCount; col++)
234 QTableWidgetItem* item = new QTableWidgetItem();
238 value = QVariant( entry.c_str() );
241 value = QVariant( shapeName.c_str() );
244 value = QVariant( size );
247 item->setData(Qt::DisplayRole, value );
248 mySmpWidget->tableWidget->setItem(row,col,item);
252 void HexoticPluginGUI_HypothesisCreator::onRemoveLocalSize()
254 // Remove the selected rows in the table
255 QList<QTableWidgetSelectionRange> ranges = mySmpWidget->tableWidget->selectedRanges();
256 if ( ranges.isEmpty() ) // If none is selected remove the last one
258 int lastRow = mySmpWidget->tableWidget->rowCount() - 1;
259 std::string entry = mySmpWidget->tableWidget->item( lastRow, ENTRY_COL )->text().toStdString();
260 mySizeMapsToRemove.push_back(entry);
261 mySmpWidget->tableWidget->removeRow( lastRow );
265 QTableWidgetSelectionRange& range = ranges.first();
266 for ( int row = range.topRow(); row < range.rowCount(); row++ )
268 std::string entry = mySmpWidget->tableWidget->item( row, ENTRY_COL )->text().toStdString();
269 mySizeMapsToRemove.push_back(entry);
271 mySmpWidget->tableWidget->model()->removeRows(range.topRow(), range.rowCount());
275 //=================================================================================
276 // function : resizeEvent [REDEFINED]
278 //=================================================================================
279 void HexoticPluginGUI_HypothesisCreator::resizeEvent(QResizeEvent */*event*/) {
280 QSize scaledSize = myStdWidget->imageSdMode.size();
281 scaledSize.scale(myStdWidget->sdModeLabel->size(), Qt::KeepAspectRatioByExpanding);
282 if (!myStdWidget->sdModeLabel->pixmap() || scaledSize != myStdWidget->sdModeLabel->pixmap()->size())
283 myStdWidget->sdModeLabel->setPixmap(myStdWidget->imageSdMode.scaled(myStdWidget->sdModeLabel->size(),
285 Qt::SmoothTransformation));
288 void HexoticPluginGUI_HypothesisCreator::retrieveParams() const
290 HexoticHypothesisData data;
291 readParamsFromHypo( data );
295 myName->setText( data.myName );
297 myStdWidget->myMinSize->setCleared(data.myMinSize == 0);
298 if (data.myMinSize == 0)
299 myStdWidget->myMinSize->setText("");
301 myStdWidget->myMinSize->setValue( data.myMinSize );
303 myStdWidget->myMaxSize->setCleared(data.myMaxSize == 0);
304 if (data.myMaxSize == 0)
305 myStdWidget->myMaxSize->setText("");
307 myStdWidget->myMaxSize->setValue( data.myMaxSize );
309 myStdWidget->myHexesMinLevel->setCleared(data.myHexesMinLevel == 0);
310 if (data.myHexesMinLevel == 0)
311 myStdWidget->myHexesMinLevel->setText("");
313 myStdWidget->myHexesMinLevel->setValue( data.myHexesMinLevel );
315 myStdWidget->myHexesMaxLevel->setCleared(data.myHexesMaxLevel == 0);
316 if (data.myHexesMaxLevel == 0)
317 myStdWidget->myHexesMaxLevel->setText("");
319 myStdWidget->myHexesMaxLevel->setValue( data.myHexesMaxLevel );
321 myStdWidget->myHexoticIgnoreRidges->setChecked( data.myHexoticIgnoreRidges );
322 myStdWidget->myHexoticInvalidElements->setChecked( data.myHexoticInvalidElements );
324 myStdWidget->myHexoticSharpAngleThreshold->setCleared(data.myHexoticSharpAngleThreshold == 0);
325 if (data.myHexoticSharpAngleThreshold == 0)
326 myStdWidget->myHexoticSharpAngleThreshold->setText("");
328 myStdWidget->myHexoticSharpAngleThreshold->setValue( data.myHexoticSharpAngleThreshold );
330 myStdWidget->myHexoticNbProc->setValue( data.myHexoticNbProc );
331 myStdWidget->myHexoticWorkingDir->setText( data.myHexoticWorkingDir );
333 myStdWidget->myHexoticVerbosity->setValue( data.myHexoticVerbosity );
335 myStdWidget->myHexoticMaxMemory->setValue( data.myHexoticMaxMemory );
337 myStdWidget->myHexoticSdMode->setCurrentIndex(data.myHexoticSdMode);
339 HexoticPlugin_Hypothesis::THexoticSizeMaps::const_iterator it = data.mySizeMaps.begin();
340 for ( int row = 0; it != data.mySizeMaps.end(); it++, row++ )
342 std::string entry = it->first;
343 double size = it->second;
344 GEOM::GEOM_Object_var anObject = entryToObject( entry );
345 std::string shapeName = anObject->GetName();
347 MESSAGE(" Insert local size, entry : "<<entry<<", size : "<<size<<", at row : "<<row)
348 insertLocalSizeInWidget( entry, shapeName, size , row );
351 std::cout << "myStdWidget->myMinSize->value(): " << myStdWidget->myMinSize->value() << std::endl;
352 std::cout << "myStdWidget->myMaxSize->value(): " << myStdWidget->myMaxSize->value() << std::endl;
353 std::cout << "myStdWidget->myHexesMinLevel->value(): " << myStdWidget->myHexesMinLevel->value() << std::endl;
354 std::cout << "myStdWidget->myHexesMaxLevel->value(): " << myStdWidget->myHexesMaxLevel->value() << std::endl;
355 std::cout << "myStdWidget->myHexoticSharpAngleThreshold->value(): " << myStdWidget->myHexoticSharpAngleThreshold->value() << std::endl;
359 void HexoticPluginGUI_HypothesisCreator::printData( HexoticHypothesisData& data) const
362 valStr += tr("Hexotic_MIN_SIZE") + " = " + QString::number( data.myMinSize ) + "; ";
363 valStr += tr("Hexotic_MAX_SIZE") + " = " + QString::number( data.myMaxSize ) + "; ";
364 valStr += tr("Hexotic_HEXES_MIN_LEVEL") + " = " + QString::number( data.myHexesMinLevel ) + "; ";
365 valStr += tr("Hexotic_HEXES_MAX_LEVEL") + " = " + QString::number( data.myHexesMaxLevel ) + "; ";
366 valStr += tr("Hexotic_IGNORE_RIDGES") + " = " + QString::number( data.myHexoticIgnoreRidges ) + "; ";
367 valStr += tr("Hexotic_INVALID_ELEMENTS") + " = " + QString::number( data.myHexoticInvalidElements ) + "; ";
368 valStr += tr("Hexotic_SHARP_ANGLE_THRESHOLD") + " = " + QString::number( data.myHexoticSharpAngleThreshold ) + "; ";
369 valStr += tr("Hexotic_NB_PROC") + " = " + QString::number( data.myHexoticNbProc ) + "; ";
370 valStr += tr("Hexotic_WORKING_DIR") + " = " + data.myHexoticWorkingDir + "; ";
371 valStr += tr("Hexotic_VERBOSITY") + " = " + QString::number( data.myHexoticVerbosity ) + "; ";
372 valStr += tr("Hexotic_MAX_MEMORY") + " = " + QString::number( data.myHexoticMaxMemory ) + "; ";
373 valStr += tr("Hexotic_SD_MODE") + " = " + QString::number( data.myHexoticSdMode ) + "; ";
375 std::cout << "Data: " << valStr.toStdString() << std::endl;
378 QString HexoticPluginGUI_HypothesisCreator::storeParams() const
380 HexoticHypothesisData data;
381 readParamsFromWidgets( data );
382 storeParamsToHypo( data );
385 valStr += tr("Hexotic_MIN_SIZE") + " = " + QString::number( data.myMinSize ) + "; ";
386 valStr += tr("Hexotic_MAX_SIZE") + " = " + QString::number( data.myMaxSize ) + "; ";
387 valStr += tr("Hexotic_HEXES_MIN_LEVEL") + " = " + QString::number( data.myHexesMinLevel ) + "; ";
388 valStr += tr("Hexotic_HEXES_MAX_LEVEL") + " = " + QString::number( data.myHexesMaxLevel ) + "; ";
389 valStr += tr("Hexotic_IGNORE_RIDGES") + " = " + QString::number( data.myHexoticIgnoreRidges ) + "; ";
390 valStr += tr("Hexotic_INVALID_ELEMENTS") + " = " + QString::number( data.myHexoticInvalidElements ) + "; ";
391 valStr += tr("Hexotic_SHARP_ANGLE_THRESHOLD") + " = " + QString::number( data.myHexoticSharpAngleThreshold ) + "; ";
392 valStr += tr("Hexotic_NB_PROC") + " = " + QString::number( data.myHexoticNbProc ) + "; ";
393 valStr += tr("Hexotic_WORKING_DIR") + " = " + data.myHexoticWorkingDir + "; ";
394 valStr += tr("Hexotic_VERBOSITY") + " = " + QString::number( data.myHexoticVerbosity) + "; ";
395 valStr += tr("Hexotic_MAX_MEMORY") + " = " + QString::number( data.myHexoticMaxMemory ) + "; ";
396 valStr += tr("Hexotic_SD_MODE") + " = " + QString::number( data.myHexoticSdMode) + "; ";
398 // std::cout << "Data: " << valStr.toStdString() << std::endl;
403 bool HexoticPluginGUI_HypothesisCreator::readParamsFromHypo( HexoticHypothesisData& h_data ) const
405 HexoticPlugin::HexoticPlugin_Hypothesis_var h =
406 HexoticPlugin::HexoticPlugin_Hypothesis::_narrow( initParamsHypothesis() );
408 HypothesisData* data = SMESH::GetHypothesisData( hypType() );
409 h_data.myName = isCreation() && data ? data->Label : "";
410 h_data.myMinSize = h->GetMinSize();
411 h_data.myMaxSize = h->GetMaxSize();
412 h_data.myHexesMinLevel = h->GetHexesMinLevel();
413 h_data.myHexesMaxLevel = h->GetHexesMaxLevel();
414 h_data.myHexoticIgnoreRidges = h->GetHexoticIgnoreRidges();
415 h_data.myHexoticInvalidElements = h->GetHexoticInvalidElements();
416 h_data.myHexoticSharpAngleThreshold = h->GetHexoticSharpAngleThreshold();
417 h_data.myHexoticNbProc = h->GetHexoticNbProc();
418 h_data.myHexoticWorkingDir = h->GetHexoticWorkingDirectory();
419 h_data.myHexoticVerbosity = h->GetHexoticVerbosity();
420 h_data.myHexoticMaxMemory = h->GetHexoticMaxMemory();
421 h_data.myHexoticSdMode = h->GetHexoticSdMode()-1;
424 HexoticPlugin::HexoticPluginSizeMapsList_var sizeMaps = h->GetSizeMaps();
425 for ( int i = 0 ; i < sizeMaps->length() ; i++)
427 HexoticPlugin::HexoticPluginSizeMap aSizeMap = sizeMaps[i];
428 std::string entry = CORBA::string_dup(aSizeMap.entry.in());
429 double size = aSizeMap.size;
430 h_data.mySizeMaps[ entry ] = size;
431 MESSAGE("READING Size map : entry "<<entry<<" size : "<<size)
437 bool HexoticPluginGUI_HypothesisCreator::storeParamsToHypo( const HexoticHypothesisData& h_data ) const
439 HexoticPlugin::HexoticPlugin_Hypothesis_var h =
440 HexoticPlugin::HexoticPlugin_Hypothesis::_narrow( hypothesis() );
447 SMESH::SetName( SMESH::FindSObject( h ), h_data.myName.toLatin1().constData() );
449 h->SetMinSize( h_data.myMinSize );
450 h->SetMaxSize( h_data.myMaxSize );
451 h->SetHexesMinLevel( h_data.myHexesMinLevel );
452 h->SetHexesMaxLevel( h_data.myHexesMaxLevel );
453 h->SetHexoticIgnoreRidges( h_data.myHexoticIgnoreRidges );
454 h->SetHexoticInvalidElements( h_data.myHexoticInvalidElements );
455 h->SetHexoticSharpAngleThreshold( h_data.myHexoticSharpAngleThreshold );
456 h->SetHexoticNbProc( h_data.myHexoticNbProc );
457 h->SetHexoticWorkingDirectory( h_data.myHexoticWorkingDir.toLatin1().constData() );
458 h->SetHexoticVerbosity( h_data.myHexoticVerbosity );
459 h->SetHexoticMaxMemory( h_data.myHexoticMaxMemory );
460 h->SetHexoticSdMode( h_data.myHexoticSdMode+1 );
462 HexoticPlugin_Hypothesis::THexoticSizeMaps::const_iterator it;
464 for ( it = h_data.mySizeMaps.begin(); it != h_data.mySizeMaps.end(); it++ )
466 h->SetSizeMapEntry( it->first.c_str(), it->second );
467 MESSAGE("STORING Size map : entry "<<it->first.c_str()<<" size : "<<it->second)
469 std::vector< std::string >::const_iterator entry_it;
470 for ( entry_it = mySizeMapsToRemove.begin(); entry_it!= mySizeMapsToRemove.end(); entry_it++ )
472 h->UnsetSizeMapEntry(entry_it->c_str());
475 catch(const SALOME::SALOME_Exception& ex)
477 SalomeApp_Tools::QtCatchCorbaException(ex);
483 bool HexoticPluginGUI_HypothesisCreator::readParamsFromWidgets( HexoticHypothesisData& h_data ) const
485 h_data.myName = myName ? myName->text() : "";
487 h_data.myHexoticIgnoreRidges = myStdWidget->myHexoticIgnoreRidges->isChecked();
488 h_data.myHexoticInvalidElements = myStdWidget->myHexoticInvalidElements->isChecked();
490 h_data.myHexoticNbProc = myStdWidget->myHexoticNbProc->value();
491 h_data.myHexoticWorkingDir = myStdWidget->myHexoticWorkingDir->text();
492 h_data.myHexoticVerbosity = myStdWidget->myHexoticVerbosity->value();
493 h_data.myHexoticMaxMemory = myStdWidget->myHexoticMaxMemory->value();
494 h_data.myHexoticSdMode = myStdWidget->myHexoticSdMode->currentIndex();
496 h_data.myMinSize = myStdWidget->myMinSize->text().isEmpty() ? 0.0 : myStdWidget->myMinSize->value();
497 h_data.myMaxSize = myStdWidget->myMaxSize->text().isEmpty() ? 0.0 : myStdWidget->myMaxSize->value();
498 h_data.myHexesMinLevel = myStdWidget->myHexesMinLevel->text().isEmpty() ? 0 : myStdWidget->myHexesMinLevel->value();
499 h_data.myHexesMaxLevel = myStdWidget->myHexesMaxLevel->text().isEmpty() ? 0 : myStdWidget->myHexesMaxLevel->value();
500 h_data.myHexoticSharpAngleThreshold = myStdWidget->myHexoticSharpAngleThreshold->text().isEmpty() ? 0 : myStdWidget->myHexoticSharpAngleThreshold->value();
503 bool ok = readSizeMapsFromWidgets( h_data );
512 bool HexoticPluginGUI_HypothesisCreator::readSizeMapsFromWidgets( HexoticHypothesisData& h_data ) const
514 int rowCount = mySmpWidget->tableWidget->rowCount();
515 for ( int row = 0; row < rowCount; row++ )
517 std::string entry = mySmpWidget->tableWidget->item( row, ENTRY_COL )->text().toStdString();
518 QVariant size_variant = mySmpWidget->tableWidget->item( row, SIZE_COL )->data(Qt::DisplayRole);
520 // Convert the size to double
522 double size = size_variant.toDouble(&ok);
527 h_data.mySizeMaps[ entry ] = size;
528 MESSAGE("READING Size map from WIDGET: entry "<<entry<<" size : "<<size)
532 GEOM::GEOM_Object_var HexoticPluginGUI_HypothesisCreator::entryToObject( std::string entry) const
534 SMESH_Gen_i* smeshGen_i = SMESH_Gen_i::GetSMESHGen();
535 SALOMEDS::Study_var myStudy = smeshGen_i->GetCurrentStudy();
536 GEOM::GEOM_Object_var aGeomObj;
537 SALOMEDS::SObject_var aSObj = myStudy->FindObjectID( entry.c_str() );
538 if (!aSObj->_is_nil()) {
539 CORBA::Object_var obj = aSObj->GetObject();
540 aGeomObj = GEOM::GEOM_Object::_narrow(obj);
546 QString HexoticPluginGUI_HypothesisCreator::caption() const
548 return myIs3D ? tr( "Hexotic_3D_TITLE" ) : tr( "Hexotic_3D_TITLE" ); // ??? 3D/2D ???
551 QPixmap HexoticPluginGUI_HypothesisCreator::icon() const
553 QString hypIconName = myIs3D ? tr( "ICON_DLG_Hexotic_PARAMETERS" ) : tr( "ICON_DLG_Hexotic_PARAMETERS" );
554 return SUIT_Session::session()->resourceMgr()->loadPixmap( "HexoticPLUGIN", hypIconName );
557 QString HexoticPluginGUI_HypothesisCreator::type() const
559 return myIs3D ? tr( "Hexotic_3D_HYPOTHESIS" ) : tr( "Hexotic_3D_HYPOTHESIS" ); // ??? 3D/2D ???
562 QString HexoticPluginGUI_HypothesisCreator::helpPage() const
564 return "hexotic_hypo_page.html";