1 // VISU VISUGUI : GUI of VISU component
3 // Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
4 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
6 // This library is free software; you can redistribute it and/or
7 // modify it under the terms of the GNU Lesser General Public
8 // License as published by the Free Software Foundation; either
9 // version 2.1 of the License.
11 // This library is distributed in the hope that it will be useful,
12 // but WITHOUT ANY WARRANTY; without even the implied warranty of
13 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 // Lesser General Public License for more details.
16 // You should have received a copy of the GNU Lesser General Public
17 // License along with this library; if not, write to the Free Software
18 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
20 // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
24 // File : VisuGUI_Selection.cxx
25 // Author : Laurent CORNABE & Hubert ROLLAND
29 #include "VisuGUI_Selection.h"
32 #include "VisuGUI_Tools.h"
33 #include "VisuGUI_ViewTools.h"
35 #include "VISU_Actor.h"
36 #include "VISU_PrsObject_i.hh"
37 #include "VISU_Prs3d_i.hh"
38 #include "VISU_PipeLine.hxx"
40 #include "SalomeApp_Study.h"
41 #include "SalomeApp_Application.h"
42 #include "LightApp_Application.h"
43 #include "LightApp_SelectionMgr.h"
44 #include "LightApp_VTKSelector.h"
46 #include "SUIT_MessageBox.h"
47 #include "SUIT_ViewWindow.h"
48 #include "SUIT_Session.h"
49 #include "SUIT_ResourceMgr.h"
51 #include "SALOME_ListIO.hxx"
52 #include "SALOME_ListIteratorOfListIO.hxx"
54 #include "SVTK_ViewWindow.h"
55 #include "SVTK_Selector.h"
57 #include "utilities.h"
60 #include <TColStd_IndexedMapOfInteger.hxx>
61 #include <TColStd_MapOfInteger.hxx>
69 #include <qhbuttongroup.h>
70 #include <qradiobutton.h>
71 #include <qvalidator.h>
72 #include <qpushbutton.h>
73 #include <qwidgetstack.h>
75 #include <qgroupbox.h>
76 #include <qlineedit.h>
77 #include <qvalidator.h>
81 #include <vtkDataSetMapper.h>
82 #include <vtkDataSet.h>
83 #include <vtkPointData.h>
84 #include <vtkCellData.h>
92 VisuGUI_SelectionDlg::VisuGUI_SelectionDlg (const SalomeApp_Module* theModule):
93 QDialog(VISU::GetDesktop(theModule),
96 WStyle_Customize | WStyle_NormalBorder | WStyle_Title | WStyle_SysMenu | WDestructiveClose),
100 setCaption( "Data on elements" );
101 setSizeGripEnabled(TRUE);
103 QGridLayout* TopLayout = new QGridLayout (this);
104 TopLayout->setSpacing(6);
105 TopLayout->setMargin(11);
106 TopLayout->setRowStretch(0, 0);
107 TopLayout->setRowStretch(1, 0);
108 TopLayout->setRowStretch(2, 1);
109 TopLayout->setRowStretch(3, 0);
111 QHButtonGroup* aTypeBox = new QHButtonGroup ("Selection", this);
113 QRadioButton* aPointBtn =
114 new QRadioButton ("Point", aTypeBox);
115 new QRadioButton ("Cell" , aTypeBox);
116 new QRadioButton ("Actor", aTypeBox);
117 aPointBtn->setChecked(true);
119 connect(aTypeBox, SIGNAL(clicked(int)), this, SLOT(onSelectionChange(int)));
121 TopLayout->addWidget(aTypeBox, 0, 0);
123 QWidget* aNamePane = new QWidget (this);
124 QGridLayout* aNameLay = new QGridLayout (aNamePane);
126 QLabel* aMeshLbl = new QLabel ("Mesh name: ", aNamePane);
127 myMeshName = new QLabel (aNamePane);
129 QLabel* aFieldLbl = new QLabel ("Field name: ", aNamePane);
130 myFieldName = new QLabel (aNamePane);
132 aNameLay->addWidget(aMeshLbl, 0, 0);
133 aNameLay->addWidget(myMeshName, 0, 1);
134 aNameLay->addWidget(aFieldLbl, 1, 0);
135 aNameLay->addWidget(myFieldName, 1, 1);
137 TopLayout->addWidget(aNamePane, 1, 0);
139 myWidgetStack = new QWidgetStack (this);
141 // Create Points pane
142 myPointsPane = new QVBox (myWidgetStack);
143 myPointsPane->layout()->setSpacing(6);
145 QGroupBox* aDataGrp = new QGroupBox (2, Qt::Horizontal, "Data of Point", myPointsPane);
146 aDataGrp->layout()->setSpacing(6);
148 new QLabel ("ID:", aDataGrp);
149 myIDValLbl = new QLineEdit ("", aDataGrp);
150 QIntValidator* aIntValidator = new QIntValidator (myIDValLbl);
151 aIntValidator->setBottom(0);
152 myIDValLbl->setValidator(aIntValidator);
153 connect(myIDValLbl, SIGNAL(textChanged(const QString&)), this, SLOT(onPointIdEdit(const QString&)));
155 new QLabel ("Scalar Value:", aDataGrp);
156 myScalarValLbl = new QLabel ("", aDataGrp);
157 new QLabel ("Vector Value:", aDataGrp);
158 myVectorValLbl = new QLabel ("", aDataGrp);
159 myVectorValLbl->setMinimumWidth(150);
161 QGroupBox* aCoordGrp = new QGroupBox (4, Qt::Horizontal, "Coordinates", myPointsPane);
162 aCoordGrp->layout()->setSpacing(6);
163 new QLabel ("X:", aCoordGrp);
164 myXValLbl = new QLabel ("", aCoordGrp);
165 //ENK: 23.11.2006 - PAL13176 - EDF228 VISU : Enhancement of structured datas processing
166 new QLabel ("I:", aCoordGrp);
167 myIValLbl = new QLabel ("-", aCoordGrp);
169 new QLabel ("Y:", aCoordGrp);
170 myYValLbl = new QLabel ("", aCoordGrp);
171 //ENK: 23.11.2006 - PAL13176 - EDF228 VISU : Enhancement of structured datas processing
172 new QLabel ("J:", aCoordGrp);
173 myJValLbl = new QLabel ("-", aCoordGrp);
175 new QLabel ("Z:",aCoordGrp );
176 myZValLbl = new QLabel ("", aCoordGrp);
177 //ENK: 23.11.2006 - PAL13176 - EDF228 VISU : Enhancement of structured datas processing
178 new QLabel ("K:", aCoordGrp);
179 myKValLbl = new QLabel ("-", aCoordGrp);
183 myWidgetStack->addWidget(myPointsPane, 0);
186 myCellsPane = new QWidget (myWidgetStack);
187 QGridLayout* aCellLayout = new QGridLayout (myCellsPane);
188 aCellLayout->setSpacing(6);
189 aCellLayout->setRowStretch(0, 0);
190 aCellLayout->setRowStretch(1, 1);
192 QGroupBox* aCellGrp = new QGroupBox(2, Qt::Horizontal, "Data of Cell", myCellsPane);
194 new QLabel ("ID:", aCellGrp);
195 myCellIDValLbl = new QLineEdit ("", aCellGrp);
196 myCellIDValLbl->setValidator(aIntValidator);
197 connect(myCellIDValLbl, SIGNAL(textChanged(const QString&)), this, SLOT(onCellIdEdit(const QString&)));
199 new QLabel ("Scalar Value:", aCellGrp);
200 myCellScalarValLbl = new QLabel ("", aCellGrp);
201 new QLabel ("Vector Value:", aCellGrp);
202 myCellVectorValLbl = new QLabel ("", aCellGrp);
204 aCellLayout->addWidget(aCellGrp, 0, 0);
206 myListPoints = new QTable (myCellsPane);
207 myListPoints->setReadOnly(true);
208 myListPoints->setNumCols(9);
209 myListPoints->setNumRows(0);
210 myListPoints->setColumnWidth(0, 40);
211 myListPoints->setColumnWidth(1, 40);
212 myListPoints->setColumnWidth(2, 40);
213 myListPoints->setColumnWidth(3, 40);
214 myListPoints->setColumnWidth(4, 40);//ENK: 23.11.2006 - PAL13176 - EDF228 VISU : Enhancement of structured datas processing
215 myListPoints->setColumnWidth(5, 40);//ENK: 23.11.2006 - PAL13176 - EDF228 VISU : Enhancement of structured datas processing
216 myListPoints->setColumnWidth(6, 40);//ENK: 23.11.2006 - PAL13176 - EDF228 VISU : Enhancement of structured datas processing
217 myListPoints->setSelectionMode(QTable::NoSelection);
218 QHeader* aHeader = myListPoints->horizontalHeader();
219 aHeader->setLabel( 0, "ID" );
220 aHeader->setLabel( 1, "X" );
221 aHeader->setLabel( 2, "Y" );
222 aHeader->setLabel( 3, "Z" );
223 aHeader->setLabel( 4, "I" );//ENK: 23.11.2006 - PAL13176 - EDF228 VISU : Enhancement of structured datas processing
224 aHeader->setLabel( 5, "J" );//ENK: 23.11.2006 - PAL13176 - EDF228 VISU : Enhancement of structured datas processing
225 aHeader->setLabel( 6, "K" );//ENK: 23.11.2006 - PAL13176 - EDF228 VISU : Enhancement of structured datas processing
226 aHeader->setLabel( 7, "Scalar" );
227 aHeader->setLabel( 8, "Vector" );
229 aCellLayout->addWidget(myListPoints, 1, 0);
231 myWidgetStack->addWidget(myCellsPane, 1);
234 myActorsPane = new QVBox (myWidgetStack);
235 myActorsPane->layout()->setSpacing(6);
237 QGroupBox* aPosGrp = new QGroupBox (2, Qt::Horizontal, "Position", myActorsPane);
238 aPosGrp->layout()->setSpacing(6);
239 new QLabel ("X:", aPosGrp);
240 myXPosLbl = new QLabel ("0", aPosGrp);
241 new QLabel ("Y:", aPosGrp);
242 myYPosLbl = new QLabel ("0", aPosGrp);
243 new QLabel ("Z:", aPosGrp);
244 myZPosLbl = new QLabel ("0", aPosGrp);
246 QGroupBox* aSizeGrp = new QGroupBox (2, Qt::Horizontal, "Size", myActorsPane);
247 aSizeGrp->layout()->setSpacing(6);
248 new QLabel ("dX:", aSizeGrp);
249 myDXLbl = new QLabel ("0", aSizeGrp);
250 new QLabel ("dY:", aSizeGrp);
251 myDYLbl = new QLabel ("0", aSizeGrp);
252 new QLabel ("dZ:",aSizeGrp );
253 myDZLbl = new QLabel ("0", aSizeGrp);
255 myWidgetStack->addWidget(myActorsPane, 2);
258 TopLayout->addWidget(myWidgetStack, 2, 0);
260 // Create buttons group
261 QHBox* aBtnBox = new QHBox (this);
262 QHBoxLayout* aBtnLayout = (QHBoxLayout*)aBtnBox->layout();
263 aBtnLayout->addStretch();
265 QPushButton* aCloseBtn = new QPushButton (tr("BUT_CLOSE"), aBtnBox);
266 connect(aCloseBtn, SIGNAL(clicked()), this, SLOT(close()));
268 QPushButton* aHelpBtn = new QPushButton (tr("BUT_HELP"), aBtnBox);
269 connect(aHelpBtn, SIGNAL(clicked()), this, SLOT(onHelp()));
271 TopLayout->addWidget(aBtnBox, 3, 0);
273 SalomeApp_Application* anApp = dynamic_cast<SalomeApp_Application*>
274 (SUIT_Session::session()->activeApplication());
275 mySelectionMgr = anApp->selectionMgr();
276 connect(mySelectionMgr, SIGNAL(currentSelectionChanged()), this, SLOT(onSelectionEvent()));
278 //connect(visuGUI, SIGNAL(SignalCloseAllDialogs()), this, SLOT(close()));
282 // Activate Points pane
283 myWidgetStack->raiseWidget(myPointsPane);
284 if (SVTK_ViewWindow* aViewWindow = VISU::GetActiveViewWindow<SVTK_ViewWindow>(myModule))
285 aViewWindow->SetSelectionMode(NodeSelection);
289 VisuGUI_SelectionDlg::~VisuGUI_SelectionDlg()
291 SVTK_ViewWindow* aViewWindow = VISU::GetActiveViewWindow<SVTK_ViewWindow>(myModule);
295 switch ( aViewWindow->SelectionMode() ) {
298 aViewWindow->SetSelectionMode(ActorSelection);
303 void VisuGUI_SelectionDlg::onSelectionChange (int theId)
305 SVTK_ViewWindow* aViewWindow = VISU::GetActiveViewWindow<SVTK_ViewWindow>(myModule);
306 if (!aViewWindow) return;
310 myWidgetStack->raiseWidget(myPointsPane);
311 aViewWindow->SetSelectionMode(NodeSelection);
312 onPointIdEdit(myIDValLbl->text());
315 myWidgetStack->raiseWidget(myCellsPane);
316 aViewWindow->SetSelectionMode(CellSelection);
317 onCellIdEdit(myCellIDValLbl->text());
320 myWidgetStack->raiseWidget(myActorsPane);
321 aViewWindow->SetSelectionMode(ActorSelection);
327 void VisuGUI_SelectionDlg::closeEvent (QCloseEvent* theEvent)
329 QDialog::closeEvent(theEvent);
332 template<class TData> QString getValue(TData* theData, int theId){
333 if (vtkDataArray *aScalar = theData->GetScalars()){
334 vtkFloatingPointType aVal = aScalar->GetTuple1(theId);
335 return QString::number(aVal);
337 return QString("No data");
341 template<class TData> QString getVector(TData* theData, int theId){
342 if (vtkDataArray *aVector = theData->GetVectors()) {
343 vtkFloatingPointType *aVal = aVector->GetTuple3(theId);
344 return QString("%1; %2; %3").arg(aVal[0]).arg(aVal[1]).arg(aVal[2]);
346 return QString("No data");
350 #define ABS(a) (a>=0)?a:-a
352 void VisuGUI_SelectionDlg::onSelectionEvent() {
353 SVTK_ViewWindow* aViewWindow = VISU::GetActiveViewWindow<SVTK_ViewWindow>(myModule);
357 switch (aViewWindow->SelectionMode()) {
371 int aType = myWidgetStack->id(myWidgetStack->visibleWidget());
373 SVTK_Selector* aSelector = aViewWindow->GetSelector();
375 _PTR(SObject) aSObject;
376 VISU::Prs3d_i* aPrs3d = NULL;
377 Handle(SALOME_InteractiveObject) anIO;
379 VISU::TSelectionInfo aSelectionInfo = VISU::GetSelectedObjects(myModule);
380 if(aSelectionInfo.size() == 1){
381 // Get selected SObject
382 VISU::TSelectionItem aSelectionItem = aSelectionInfo.front();
383 VISU::TObjectInfo anObjectInfo = aSelectionItem.myObjectInfo;
384 aPrs3d = GetPrs3dFromBase(anObjectInfo.myBase);
386 anIO = aSelectionItem.myIO;
387 aSObject = anObjectInfo.mySObject;
393 QString aMeshName("NULL"), aFieldName("NULL");
395 VISU::Storable::TRestoringMap aMap = VISU::Storable::GetStorableMap(aSObject);
397 aMeshName = VISU::Storable::FindValue(aMap, "myMeshName");
398 aFieldName = VISU::Storable::FindValue(aMap, "myFieldName");
402 myMeshName ->setText((aMeshName == "NULL") ? QString("No name") : aMeshName);
403 myFieldName->setText((aFieldName == "NULL") ? QString("No name") : aFieldName);
405 VISU_Actor* anVISUActor =
406 VISU::FindActor(VISU::GetAppStudy(myModule), aViewWindow, aSObject->GetID().c_str());
408 vtkFloatingPointType aCoord[6];
409 anVISUActor->GetBounds(aCoord);
410 myXPosLbl->setText(QString::number( aCoord[0] ));
411 myYPosLbl->setText(QString::number( aCoord[2] ));
412 myZPosLbl->setText(QString::number( aCoord[4] ));
414 myDXLbl->setText(QString::number( ABS(aCoord[1]-aCoord[0]) ));
415 myDYLbl->setText(QString::number( ABS(aCoord[3]-aCoord[2]) ));
416 myDZLbl->setText(QString::number( ABS(aCoord[5]-aCoord[4]) ));
418 TColStd_IndexedMapOfInteger aMapIndex;
419 typedef std::vector<vtkFloatingPointType> TCoordArray;
420 typedef map<int, TCoordArray> TPointCoordsMap;
421 TPointCoordsMap aPointCoordsMap;
423 aSelector->GetIndex(anIO, aMapIndex);
425 vtkDataSet* aDataSet = anVISUActor->GetMapper()->GetInput();
426 vtkPointData* aPntData = aDataSet->GetPointData();
428 for (int ind = 1; ind <= aMapIndex.Extent(); ind++) {
429 int anID = aMapIndex(ind);
434 vtkFloatingPointType* aCoord = anVISUActor->GetNodeCoord(anID);
435 int aVTKID = anVISUActor->GetNodeVTKID(anID);
436 myXValLbl->setText( QString::number( aCoord[0] ) );
437 myYValLbl->setText( QString::number( aCoord[1] ) );
438 myZValLbl->setText( QString::number( aCoord[2] ) );
439 myIDValLbl->setText( QString::number(anID) );
440 myScalarValLbl->setText(getValue(aPntData, aVTKID));
441 myVectorValLbl->setText(getVector(aPntData, aVTKID));
442 //ENK: 23.11.2006 - PAL13176 - EDF228 VISU : Enhancement of structured datas processing
443 const VISU::PIDMapper& aMapper = aPrs3d->GetPipeLine()->GetIDMapper();
444 VISU::TIdTypeVector aVec = aMapper->GetIndexesOfNode(anID);
447 myKValLbl->setText(QString::number(aVec[2]));
449 myJValLbl->setText(QString::number(aVec[1]));
451 myIValLbl->setText(QString::number(aVec[0]));
454 myIValLbl->setText("-");
455 myJValLbl->setText("-");
456 myKValLbl->setText("-");
463 vtkCellData* aCellData = aDataSet->GetCellData();
464 vtkCell* aCell = anVISUActor->GetElemCell(anID);
465 int aVTKID = anVISUActor->GetElemVTKID(anID);
467 int aNbOfPoints = aCell->GetNumberOfPoints();
468 if ( aNbOfPoints > 0 ) {
469 myCellIDValLbl->setText( QString::number(anID) );
470 myCellScalarValLbl->setText(getValue(aCellData, aVTKID));
471 myCellVectorValLbl->setText(getVector(aCellData, aVTKID));
473 vtkIdList *aPointList = aCell->GetPointIds();
474 for (int i = 0; i < aNbOfPoints; i++) {
475 int aNodeVTKId = aPointList->GetId(i);
476 vtkFloatingPointType* aCoord = aDataSet->GetPoint(aNodeVTKId);
477 vtkIdType aNodeObjId = anVISUActor->GetNodeObjId(aNodeVTKId);
478 TCoordArray aCoordArray(aCoord, aCoord + 3);
479 aPointCoordsMap[aNodeObjId] = aCoordArray;
488 myListPoints->setNumRows(aPointCoordsMap.size());
489 TPointCoordsMap::const_iterator anIter = aPointCoordsMap.begin();
491 const VISU::PIDMapper& aMapper = aPrs3d->GetPipeLine()->GetIDMapper();
492 for (int i = 0; anIter != aPointCoordsMap.end() && i < myListPoints->numRows(); anIter++, i++) {
493 myListPoints->verticalHeader()->setLabel(i, QString::number( i ));
494 vtkIdType aNodeObjId = anIter->first;
495 //ENK: 23.11.2006 - PAL13176 - EDF228 VISU : Enhancement of structured datas processing
496 VISU::TIdTypeVector aVec = aMapper->GetIndexesOfNode(aNodeObjId);
503 aK = QString::number(aVec[2]);
505 aJ = QString::number(aVec[1]);
507 aI = QString::number(aVec[0]);
512 myListPoints->setText(i, 0, QString::number( aNodeObjId ));
513 const TCoordArray& aCoordArray = anIter->second;
514 myListPoints->setText(i, 1, QString::number( aCoordArray[0] ));
515 myListPoints->setText(i, 2, QString::number( aCoordArray[1] ));
516 myListPoints->setText(i, 3, QString::number( aCoordArray[2] ));
517 myListPoints->setText(i, 4, aI);//ENK: 23.11.2006 - PAL13176
518 myListPoints->setText(i, 5, aJ);//ENK: 23.11.2006 - PAL13176
519 myListPoints->setText(i, 6, aK);//ENK: 23.11.2006 - PAL13176
521 vtkIdType aNodeVTKId = anVISUActor->GetNodeVTKID(aNodeObjId);
522 myListPoints->setText(i, 7, getValue(aPntData, aNodeVTKId));
523 myListPoints->setText(i, 8, getVector(aPntData, aNodeVTKId));
525 for(int aColumnId = 0; aColumnId < 9; aColumnId++)
526 myListPoints->adjustColumn(aColumnId);
536 void VisuGUI_SelectionDlg::clearFields() {
537 int aType = myWidgetStack->id(myWidgetStack->visibleWidget());
540 myXValLbl->setText( "" );
541 myYValLbl->setText( "" );
542 myZValLbl->setText( "" );
543 myIValLbl->setText( "-" );//ENK: 23.11.2006 - PAL13176
544 myJValLbl->setText( "-" );//ENK: 23.11.2006 - PAL13176
545 myKValLbl->setText( "-" );//ENK: 23.11.2006 - PAL13176
546 myScalarValLbl->setText("");
547 myVectorValLbl->setText("");
550 myCellScalarValLbl->setText("");
551 myCellVectorValLbl->setText("");
552 myListPoints->setNumRows(0);
555 myXPosLbl->setText("");
556 myYPosLbl->setText("");
557 myZPosLbl->setText("");
558 myDXLbl->setText("");
559 myDYLbl->setText("");
560 myDZLbl->setText("");
564 typedef vtkIdType (VISU_PipeLine::* TGetVTKIdMethod)(vtkIdType theID);
566 bool onIdEdit (const QString& theText,
567 TGetVTKIdMethod theMethod,
569 const SalomeApp_Module* theModule,
572 QLabel* theFieldName)
574 SVTK_ViewWindow* aViewWindow = VISU::GetActiveViewWindow<SVTK_ViewWindow>(theModule);
577 SVTK_Selector* aSelector = aViewWindow->GetSelector();
579 _PTR(SObject) aSObject;
580 VISU::Prs3d_i* aPrs3d = NULL;
581 Handle(SALOME_InteractiveObject) anIO;
583 VISU::TSelectionInfo aSelectionInfo = VISU::GetSelectedObjects(theModule);
584 if(aSelectionInfo.size() == 1){
585 // Get selected SObject
586 VISU::TSelectionItem aSelectionItem = aSelectionInfo.front();
587 VISU::TObjectInfo anObjectInfo = aSelectionItem.myObjectInfo;
588 aPrs3d = GetPrs3dFromBase(anObjectInfo.myBase);
590 anIO = aSelectionItem.myIO;
591 aSObject = anObjectInfo.mySObject;
595 int anObjId = theText.toInt();
596 VISU_PipeLine* aPipeLine = aPrs3d->GetPipeLine();
597 int aVTKId = (aPipeLine->*theMethod)(anObjId);
601 TColStd_MapOfInteger newIndices;
602 newIndices.Add(anObjId);
603 aSelector->AddOrRemoveIndex(anIO, newIndices, false);
604 aViewWindow->highlight(anIO, true, true);
609 theMeshName->setText(theValue);
610 theFieldName->setText("");
615 void VisuGUI_SelectionDlg::onPointIdEdit (const QString& theText)
618 TGetVTKIdMethod aMethod = &VISU_PipeLine::GetNodeVTKID;
619 bool anIsSelected = onIdEdit(theText,
624 tr("WRN_NO_AVAILABLE_DATA"),
627 // as selection manager doesn't send signal currentSelectionChanged()
633 void VisuGUI_SelectionDlg::onCellIdEdit (const QString& theText)
636 TGetVTKIdMethod aMethod = &VISU_PipeLine::GetElemVTKID;
637 bool anIsSelected = onIdEdit(theText,
642 tr("WRN_NO_AVAILABLE_DATA"),
645 // as selection manager doesn't send signal currentSelectionChanged()
651 void VisuGUI_SelectionDlg::onHelp()
653 QString aHelpFileName = "selection_info_page.html";
654 LightApp_Application* app = (LightApp_Application*)(SUIT_Session::session()->activeApplication());
656 app->onHelpContextModule(myModule ? app->moduleName(myModule->moduleName()) : QString(""), aHelpFileName);
660 platform = "winapplication";
662 platform = "application";
664 SUIT_MessageBox::warn1(0, QObject::tr("WRN_WARNING"),
665 QObject::tr("EXTERNAL_BROWSER_CANNOT_SHOW_PAGE").
666 arg(app->resourceMgr()->stringValue("ExternalBrowser", platform)).arg(aHelpFileName),
667 QObject::tr("BUT_OK"));
671 void VisuGUI_SelectionDlg::keyPressEvent( QKeyEvent* e )
673 QDialog::keyPressEvent( e );
674 if ( e->isAccepted() )
677 if ( e->key() == Key_F1 )