// License along with this library; if not, write to the Free Software
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
//
-// See http://www.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org
+// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
//
//
#include "SMDS_Mesh.hxx"
#include "SMDS_MeshNode.hxx"
-#include "SalomeApp_SelectionMgr.h"
+#include "LightApp_SelectionMgr.h"
+#include "LightApp_Application.h"
#include "SUIT_ResourceMgr.h"
#include "SUIT_Desktop.h"
+#include "SUIT_Session.h"
+#include "SUIT_MessageBox.h"
#include "SVTK_Selector.h"
#include "SVTK_ViewModel.h"
#include "SALOME_ListIO.hxx"
#include "SVTK_ViewWindow.h"
+#include "VTKViewer_CellLocationsArray.h"
#include "utilities.h"
// VTK includes
#include <vtkCell.h>
#include <vtkIdList.h>
-#include <vtkIntArray.h>
#include <vtkCellArray.h>
#include <vtkUnsignedCharArray.h>
#include <vtkUnstructuredGrid.h>
#include <vtkDataSetMapper.h>
+#include <vtkProperty.h>
// QT includes
#include <qgroupbox.h>
mySelector = (SMESH::GetViewWindow( mySMESHGUI ))->GetSelector();
+ myHelpFileName = "/files/displacing_nodes.htm";
+
Init();
}
myOkBtn = new QPushButton(tr("SMESH_BUT_OK" ), aFrame);
myApplyBtn = new QPushButton(tr("SMESH_BUT_APPLY"), aFrame);
myCloseBtn = new QPushButton(tr("SMESH_BUT_CLOSE"), aFrame);
+ myHelpBtn = new QPushButton(tr("SMESH_BUT_HELP"), aFrame);
QSpacerItem* aSpacer = new QSpacerItem(0, 0, QSizePolicy::Expanding, QSizePolicy::Minimum);
aLay->addWidget(myApplyBtn);
aLay->addItem(aSpacer);
aLay->addWidget(myCloseBtn);
+ aLay->addWidget(myHelpBtn);
connect(myOkBtn, SIGNAL(clicked()), SLOT(onOk()));
connect(myCloseBtn, SIGNAL(clicked()), SLOT(onClose()));
connect(myApplyBtn, SIGNAL(clicked()), SLOT(onApply()));
+ connect(myHelpBtn, SIGNAL(clicked()), SLOT(onHelp()));
return aFrame;
}
new QLabel(tr("SMESH_Z"), aCoordGrp);
myZ = new SMESHGUI_SpinBox(aCoordGrp);
- myX->RangeStepAndValidator(-999999.999, +999999.999, 25.0, 3);
- myY->RangeStepAndValidator(-999999.999, +999999.999, 25.0, 3);
- myZ->RangeStepAndValidator(-999999.999, +999999.999, 25.0, 3);
+ myX->RangeStepAndValidator(COORD_MIN, COORD_MAX, 25.0, 3);
+ myY->RangeStepAndValidator(COORD_MIN, COORD_MAX, 25.0, 3);
+ myZ->RangeStepAndValidator(COORD_MIN, COORD_MAX, 25.0, 3);
QVBoxLayout* aLay = new QVBoxLayout(aFrame);
aLay->addWidget(aPixGrp);
reset();
setEnabled(true);
- int x, y;
- mySMESHGUI->DefineDlgPosition(this, x, y);
- this->move(x, y);
this->show();
// set selection mode
//=======================================================================
void SMESHGUI_MoveNodesDlg::onClose()
{
- mySelectionMgr->clearSelected();
+ //mySelectionMgr->clearSelected();
SMESH::SetPointRepresentation(false);
if ( SVTK_ViewWindow* aViewWindow = SMESH::GetViewWindow( mySMESHGUI ))
aViewWindow->SetSelectionMode(ActorSelection);
reject();
}
+//=================================================================================
+// function : onHelp()
+// purpose :
+//=================================================================================
+void SMESHGUI_MoveNodesDlg::onHelp()
+{
+ LightApp_Application* app = (LightApp_Application*)(SUIT_Session::session()->activeApplication());
+ if (app)
+ app->onHelpContextModule(mySMESHGUI ? app->moduleName(mySMESHGUI->moduleName()) : QString(""), myHelpFileName);
+ else {
+ SUIT_MessageBox::warn1(0, QObject::tr("WRN_WARNING"),
+ QObject::tr("EXTERNAL_BROWSER_CANNOT_SHOW_PAGE").
+ arg(app->resourceMgr()->stringValue("ExternalBrowser", "application")).arg(myHelpFileName),
+ QObject::tr("BUT_OK"));
+ }
+}
+
//=======================================================================
// name : SMESHGUI_MoveNodesDlg::onTextChange
// Purpose :
aCellTypesArray->InsertNextValue(VTK_VERTEX);
anIdList->Delete();
- vtkIntArray* aCellLocationsArray = vtkIntArray::New();
+ VTKViewer_CellLocationsArray* aCellLocationsArray = VTKViewer_CellLocationsArray::New();
aCellLocationsArray->SetNumberOfComponents(1);
aCellLocationsArray->SetNumberOfTuples(1);
aViewWindow->Repaint();
}
}
+
+//=================================================================================
+// function : keyPressEvent()
+// purpose :
+//=================================================================================
+void SMESHGUI_MoveNodesDlg::keyPressEvent( QKeyEvent* e )
+{
+ QDialog::keyPressEvent( e );
+ if ( e->isAccepted() )
+ return;
+
+ if ( e->key() == Key_F1 )
+ {
+ e->accept();
+ onHelp();
+ }
+}