VisuGUI_Module.cxx \
VisuGUI_InputPanel.cxx \
VisuGUI_BasePanel.cxx \
+ VisuGUI_Panel.cxx \
VisuGUI_SelectionPanel.cxx \
VisuGUI_SelectionPrefDlg.cxx \
VisuGUI_GaussPointsSelectionPane.cxx \
VisuGUI_Module_moc.cxx \
VisuGUI_InputPanel_moc.cxx \
VisuGUI_BasePanel_moc.cxx \
+ VisuGUI_Panel_moc.cxx \
VisuGUI_SelectionPanel_moc.cxx \
VisuGUI_SelectionPrefDlg_moc.cxx \
VisuGUI_GaussPointsSelectionPane_moc.cxx \
<source>MEN_SELECTION</source>
<translation>Selection</translation>
</message>
- <message>
- <source>MEN_SELECTION_INFO</source>
- <translation>Selection Info...</translation>
- </message>
<message>
<source>MEN_SELECTION_PANEL</source>
<translation>Selection Panel</translation>
<name>VisuGUI_SelectionPanel</name>
<message>
<source>WINDOW_TITLE</source>
- <translation>Selection info</translation>
+ <translation>Selection</translation>
</message>
<message>
<source>MODE_TITLE</source>
#include "VisuGUI_Displayer.h"
#include "VisuGUI_BuildProgressDlg.h"
#include "VisuGUI_TransparencyDlg.h"
-#include "VisuGUI_InputPanel.h"
#include "VISU_ScalarMap_i.hh"
#include "VisuGUI_ScalarBarDlg.h"
::VisuGUI():
SalomeApp_Module( "VISU" ),
myDisplayer( 0 ),
- myInputPanel( 0 ),
mySelectionPanel( 0 ),
mySlider( NULL ),
mySweep( NULL )
}
}
-//----------------------------------------------------------------------------
-void
-VisuGUI
-::OnSelectionInfo()
-{
- if (GetActiveViewWindow<SVTK_ViewWindow>(this))
- {
- inputPanel()->showPanel( mySelectionPanel );
- }
- else
- SUIT_MessageBox::warning(GetDesktop(this),
- tr("WRN_VISU"),
- tr("ERR_ACTIVATE_VIEW3D") );
-}
-
//----------------------------------------------------------------------------
void
VisuGUI
{
if (GetActiveViewWindow<SVTK_ViewWindow>(this))
{
- VisuGUI_SelectionPanel* aSelectionPanel = selectionPanel();
- VisuGUI_InputPanel* anInputPanel = inputPanel();
- if( !anInputPanel->isShown( aSelectionPanel ) )
- anInputPanel->showPanel( aSelectionPanel );
+ if( mySelectionPanel->isVisible() )
+ mySelectionPanel->hide();
else
- anInputPanel->hidePanel( aSelectionPanel );
+ mySelectionPanel->show();
}
else
SUIT_MessageBox::warning(GetDesktop(this),
createToolBars();
createPopupMenus();
- createInputPanel();
createSelectionPanel();
// tmp
tr("MEN_CLIPPING"), "", 0, aParent, false,
this, SLOT(OnClippingPlanes()));
- createAction( VISU_SELECTION_INFO, tr("MEN_SELECTION_INFO"), QIcon(),
- tr("MEN_SELECTION_INFO"), "", 0, aParent, false,
- this, SLOT(OnSelectionInfo()));
-
aPixmap = aResourceMgr->loadPixmap("VISU",tr("ICON_TIMEANIMATION"));
createAction( VISU_PARALLELANIMATION, tr("MEN_PARALLEL_ANIMATION"), QIcon(aPixmap),
tr("MEN_PARALLEL_ANIMATION"), "", 0, aParent, false,
createAction( VISU_ERASE_ALL, tr("MEN_ERASE_ALL"), QIcon(aPixmap),
tr("MEN_ERASE_ALL"), "", 0, aParent, false,
this, SLOT(OnEraseAll()));
- /*
- aPixmap = aResourceMgr->loadPixmap("VISU",tr("ICON_GLOBAL_SELECTION"));
- createAction( VISU_GLOBAL_SELECTION, tr("MEN_GLOBAL_SELECTION"), QIcon(aPixmap),
- tr("MEN_GLOBAL_SELECTION"), "", 0, aParent, false,
- this);
-
- aPixmap = aResourceMgr->loadPixmap("VISU",tr("ICON_PARTIAL_SELECTION"));
- createAction( VISU_PARTIAL_SELECTION, tr("MEN_PARTIAL_SELECTION"), QIcon(aPixmap),
- tr("MEN_PARTIAL_SELECTION"), "", 0, aParent, false,
- this);
- */
+
aPixmap = aResourceMgr->loadPixmap("VISU",tr("ICON_SELECTION_PANEL"));
createAction( VISU_SELECTION_PANEL, tr("MEN_SELECTION_PANEL"), QIcon(aPixmap),
tr("MEN_SELECTION_PANEL"), "", 0, aParent, false,
createMenu( VISU_PLOT_3D, aMenuId, 10 ); // Plot3d
createMenu( VISU_SCALAR_MAP_ON_DEFORMED_SHAPE, aMenuId, 10 ); // scalar map on deformed shape
- //aMenuId = createMenu( tr( "MEN_SELECTION" ), -1, -1, 30 );
- //createMenu( VISU_SELECTION_INFO, aMenuId, 10 ); // selection info
-
aMenuId = createMenu( tr( "MEN_REPRESENTATION" ), -1, -1, 30 );
int parentId =
createMenu( tr( "MEN_DISPLAY_SELECTION" ), aMenuId, 10 ); // display selection
createMenu( VISU_WIREFRAME, parentId, 10 ); // wireframe
createMenu( VISU_SURFACE, parentId, 10 ); // surface
createMenu( VISU_ERASE_ALL, aMenuId, 10 ); // erase all
- //createMenu( VISU_GLOBAL_SELECTION, aMenuId, 10 ); // global selection
- //createMenu( VISU_PARTIAL_SELECTION, aMenuId, 10 ); // partial selection
}
void
createTool( VISU_WIREFRAME, aToolId );
createTool( VISU_SURFACE, aToolId );
createTool( VISU_ERASE_ALL, aToolId );
- //createTool( VISU_GLOBAL_SELECTION, aToolId );
- //createTool( VISU_PARTIAL_SELECTION, aToolId );
aToolId = createTool(tr("TOOL_SELECTION"));
createTool( VISU_SELECTION_PANEL, aToolId );
mgr->insert( action( VISU_CURVE_PROPS ), -1, -1, -1 ); // curve properties
- //mgr->insert( action( VISU_SELECTION_INFO ), -1, -1, -1 ); // Selection info
-
mgr->insert( action( VISU_MULTIPR_FULL_RES ), -1, -1, -1 );
mgr->insert( action( VISU_MULTIPR_MED_RES ), -1, -1, -1 );
mgr->insert( action( VISU_MULTIPR_LOW_RES ), -1, -1, -1 );
aRule = "client='VTKViewer' and selcount=1 and ($type in {" + aSimplePrsAll + "})";
mgr->setRule( action( VISU_SWEEP ), aRule );
- // "Selection info" popup item
- //aRule = "client='VTKViewer' and selcount=1" + anInsideType;
- //mgr->setRule( action( VISU_SELECTION_INFO ), aRule );
-
aRule = "client='ObjectBrowser' and selcount>0";
aRule += " and $type in {'VISU::TFIELD'}";
aRule += " and nbTimeStamps>1";
}
}
-void VisuGUI::createInputPanel()
-{
- myInputPanel = new VisuGUI_InputPanel();
- myInputPanel->hide();
- //myInputPanel->resize( getApp()->objectBrowser()->width(), myInputPanel->height() );
- GetDesktop(this)->addDockWidget( Qt::RightDockWidgetArea, myInputPanel );
-}
-
void VisuGUI::createSelectionPanel()
{
mySelectionPanel = new VisuGUI_SelectionPanel( this );
- mySelectionPanel->update();
+ mySelectionPanel->hide();
+
connect( mySelectionPanel, SIGNAL( selectionModeChanged( int ) ), this, SLOT( OnSwitchSelectionMode( int ) ) );
+
+ GetDesktop(this)->addDockWidget( Qt::RightDockWidgetArea, mySelectionPanel );
}
//***************************************************************************
setMenuShown( false );
setToolShown( false );
- myInputPanel->clear();
- myInputPanel->hide();
+ mySelectionPanel->hide();
// Unset actions accelerator keys
action(VISU_IMPORT_FROM_FILE)->setShortcuts(QKeySequence::UnknownKey);
class SUIT_ViewManager;
class SVTK_ViewWindow;
-class VisuGUI_InputPanel;
class VisuGUI_SelectionPanel;
class VisuGUI_Slider;
class VisuGUI_Sweep;
VISU::TViewToPrs3d&
getScalarBarsMap();
- VisuGUI_InputPanel* inputPanel() const { return myInputPanel; }
- VisuGUI_SelectionPanel* selectionPanel() const { return mySelectionPanel; }
-
signals:
void moduleDeactivated();
void moduleActivated();
void OnCopyPresentation();
- void OnSelectionInfo();
-
void OnTranslatePrs();
void OnArrangeActors();
void OnPlot3dFromCutPlane();
void createToolBars();
void createPopupMenus();
- void createInputPanel();
void createSelectionPanel();
private:
- VisuGUI_InputPanel* myInputPanel;
VisuGUI_SelectionPanel* mySelectionPanel;
VisuGUI_Slider* mySlider;
VisuGUI_Sweep* mySweep;
--- /dev/null
+// VISU VISUGUI : GUI of VISU component
+//
+// Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
+// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// 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.salome-platform.org/ or email : webmaster.salome@opencascade.com
+//
+//
+// File : VisuGUI_Panel.cxx
+// Author : Oleg Uvarov
+// Module : VISU
+
+#include "VisuGUI_Panel.h"
+#include "VisuGUI_Tools.h"
+
+#include "SUIT_ResourceMgr.h"
+
+#include <QScrollArea>
+#include <QHBoxLayout>
+#include <QVBoxLayout>
+#include <QApplication>
+#include <QPushButton>
+
+/*!
+ \class MainFrame
+ \internal
+ \brief Frame inserted in viewport with redefined sizeHint method
+ in order to avoid unreasonable increasing of viewport size
+*/
+class VisuGUI_Panel::MainFrame : public QFrame
+{
+public:
+ /*!
+ \brief Constructor.
+ \param theParent parent widget
+ */
+ MainFrame( QWidget* theParent = 0 )
+ : QFrame( theParent )
+ {
+ }
+
+ /*!
+ \brief Gets frame size hint
+ \return frame size hint
+ */
+ virtual QSize sizeHint() const
+ {
+ return minimumSizeHint();
+ }
+};
+
+/*!
+ \class VisuGUI_Panel
+ \brief Base class for VISU interactive dockable panels.
+
+ Set of classes is derived from this class and are intended for representing widgets
+ (GUI controls) for different operations. VisuGUI_Panel consists of main frame
+ inserted in scroll view and four push buttons. So all widgets of derived sub-panels
+ should be inherited from mainframe() instead of \93this\94 pointer.
+*/
+
+/*!
+ \brief Constructor creates panels look and feel
+ \param theName name of the panel
+ \param theParent parent widget
+*/
+VisuGUI_Panel::VisuGUI_Panel( const QString& theName,
+ QWidget* theParent,
+ const int theBtns )
+ : QtxDockWidget( theName, theParent ),
+ myOK( 0 ),
+ myApply( 0 ),
+ myClose( 0 ),
+ myHelp( 0 )
+{
+ QWidget* aGrp = new QWidget( this );
+ setWidget( aGrp );
+
+ // Create scroll view
+ myView = new QScrollArea( aGrp );
+
+ // Create main frame
+ myMainFrame = new MainFrame( myView );
+ myMainFrame->setFrameStyle( QFrame::Plain | QFrame::NoFrame );
+
+ myView->setWidget( myMainFrame );
+ myView->setAlignment( Qt::AlignCenter );
+ myView->setWidgetResizable( true );
+ myView->setMinimumWidth( myMainFrame->sizeHint().width() + 22 );
+
+ // Create buttons
+ QWidget* aBtnWg = new QWidget( aGrp );
+ QHBoxLayout* aBtnWgLayout = new QHBoxLayout( aBtnWg );
+ //aBtnWgLayout->setSpacing( 5 );
+
+ aBtnWgLayout->addStretch();
+
+ if( theBtns & OKBtn )
+ {
+ myOK = new QPushButton( tr( "BUT_OK" ), aBtnWg );
+ aBtnWgLayout->addWidget( myOK );
+ connect( myOK, SIGNAL( clicked() ), SLOT( onOK() ) );
+ }
+ if( theBtns & ApplyBtn )
+ {
+ myApply = new QPushButton( tr( "BUT_APPLY" ), aBtnWg );
+ aBtnWgLayout->addWidget( myApply );
+ connect( myApply, SIGNAL( clicked() ), SLOT( onApply() ) );
+ }
+ if( theBtns & CloseBtn )
+ {
+ myClose = new QPushButton( tr( "BUT_CLOSE" ), aBtnWg );
+ aBtnWgLayout->addWidget( myClose );
+ connect( myClose, SIGNAL( clicked() ), SLOT( onClose() ) );
+ }
+ if( theBtns & HelpBtn )
+ {
+ myHelp = new QPushButton( tr( "BUT_HELP" ), aBtnWg );
+ aBtnWgLayout->addWidget( myHelp );
+ connect( myHelp, SIGNAL( clicked() ), SLOT( onHelp() ) );
+ }
+
+ aBtnWgLayout->addStretch();
+
+ // fill layout
+ QVBoxLayout* aLay = new QVBoxLayout( aGrp );
+ aLay->setContentsMargins( 0, 0, 0, 0 );
+ aLay->addWidget( myView, 1 );
+ aLay->addWidget( aBtnWg );
+}
+
+/*!
+ \brief Destructor
+*/
+VisuGUI_Panel::~VisuGUI_Panel()
+{
+}
+
+/*!
+ \brief Verifies validity of input data
+
+ This virtual method should be redefined in derived classes. Usually operator
+ corresponding to the sub-panel calls this method to check validity of input
+ data when Apply/OK button is pressed.
+
+ \param theErrMsg Error message.
+
+ If data is invalid when panel can return message using this parameter given
+ clear explanation what is wrong
+
+ \return TRUE if data is valid, FALSE otherwise
+*/
+bool VisuGUI_Panel::isValid( QString& /*theErrMsg*/ )
+{
+ return true;
+}
+/*!
+ \brief Virtual methods should be redefined in derived classes and
+ clears all GUI controls
+*/
+void VisuGUI_Panel::clear()
+{
+}
+
+/*!
+ \brief Virtual slot called when \93OK\94 button pressed emits corresponding signal.
+
+ This slot moves focus in OK button before emitting signal. Mainly it provides
+ application with correct moving data from currently edited controls to internal
+ structure. For example QTable moves data from cell editor to table item when
+ focus is out.
+
+*/
+void VisuGUI_Panel::onOK()
+{
+ if ( myOK )
+ {
+ myOK->setFocus();
+ qApp->processEvents();
+ }
+}
+
+/*!
+ \brief Virtual slot called when \93Apply\94 button pressed emits corresponding signal.
+ \sa onOK
+*/
+void VisuGUI_Panel::onApply()
+{
+ if ( myApply )
+ {
+ myApply->setFocus();
+ qApp->processEvents();
+ }
+}
+
+/*!
+ \brief Virtual slot called when \93Close\94 button pressed emits corresponding signal.
+ \sa onOK
+*/
+void VisuGUI_Panel::onClose()
+{
+ if ( myClose )
+ myClose->setFocus();
+}
+
+/*!
+ \brief Virtual slot called when \93Help\94 button pressed emits corresponding signal.
+ \sa onOK
+*/
+void VisuGUI_Panel::onHelp()
+{
+ if ( myHelp )
+ myHelp->setFocus();
+}
+
+/*!
+ \brief Gets frame inserted in scroll view. All controls of derived
+ panels should use it as parent
+ \return QFrame* object
+*/
+QFrame* VisuGUI_Panel::mainFrame()
+{
+ return myMainFrame;
+}
--- /dev/null
+// VISU VISUGUI : GUI of VISU component
+//
+// Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
+// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// 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.salome-platform.org/ or email : webmaster.salome@opencascade.com
+//
+//
+// File : VisuGUI_Panel.cxx
+// Author : Oleg Uvarov
+// Module : VISU
+
+#ifndef VISUGUI_PANEL_H
+#define VISUGUI_PANEL_H
+
+#include <QtxDockWidget.h>
+
+class QFrame;
+class QScrollArea;
+class QPushButton;
+
+class VisuGUI_Panel : public QtxDockWidget
+{
+ Q_OBJECT
+
+ class MainFrame;
+
+public:
+ enum { OKBtn = 0x0001,
+ ApplyBtn = 0x0002,
+ CloseBtn = 0x0004,
+ HelpBtn = 0x0008,
+ AllBtn = OKBtn | ApplyBtn | CloseBtn | HelpBtn
+ };
+
+public:
+ VisuGUI_Panel( const QString& theName, QWidget* theParent, const int theBtns = AllBtn );
+ virtual ~VisuGUI_Panel();
+
+ virtual bool isValid( QString& theMessage );
+ virtual void clear();
+
+protected slots:
+ virtual void onOK();
+ virtual void onApply();
+ virtual void onClose();
+ virtual void onHelp();
+
+protected:
+ QFrame* mainFrame();
+
+protected:
+ QScrollArea* myView;
+ QFrame* myMainFrame;
+
+ QPushButton* myOK;
+ QPushButton* myApply;
+ QPushButton* myClose;
+ QPushButton* myHelp;
+};
+
+#endif
};
VisuGUI_SelectionPanel::VisuGUI_SelectionPanel( const SalomeApp_Module* theModule, QWidget* theParent ) :
- VisuGUI_BasePanel( tr("WINDOW_TITLE" ), theParent, /*ApplyBtn | */CloseBtn | HelpBtn ),
+ VisuGUI_Panel( tr("WINDOW_TITLE" ), theParent, CloseBtn | HelpBtn ),
myModule( theModule ),
mySelectionMgr( 0 ),
myPreferencesDlg( 0 )
{
QVBoxLayout* TopLayout = new QVBoxLayout ( mainFrame() );
- //TopLayout->setSpacing(6);
QWidget* aNamePane = new QWidget (mainFrame());
QGridLayout* aNameLay = new QGridLayout (aNamePane);
aLabels.append( "X" );
aLabels.append( "Y" );
aLabels.append( "Z" );
- aLabels.append( "I" );//ENK: 23.11.2006 - PAL13176 - EDF228 VISU : Enhancement of structured datas processing
- aLabels.append( "J" );//ENK: 23.11.2006 - PAL13176 - EDF228 VISU : Enhancement of structured datas processing
- aLabels.append( "K" );//ENK: 23.11.2006 - PAL13176 - EDF228 VISU : Enhancement of structured datas processing
+ aLabels.append( "I" );
+ aLabels.append( "J" );
+ aLabels.append( "K" );
aLabels.append( tr("DATA_SCALAR_HDR") );
aLabels.append( tr("DATA_VECTOR_HDR") );
QGroupBox* aDataGrp = new QGroupBox ( tr("POINT_DATA_TITLE"), myPointsPane);
QGridLayout* aGridLay = new QGridLayout (aDataGrp);
- //aGridLay->setSpacing(6);
aGridLay->addWidget( new QLabel (tr("DATA_ID_LBL"), aDataGrp) , 0, 0 );
myListPoints->setColumnWidth(1, 40);
myListPoints->setColumnWidth(2, 40);
myListPoints->setColumnWidth(3, 40);
- myListPoints->setColumnWidth(4, 40);//ENK: 23.11.2006 - PAL13176 - EDF228 VISU : Enhancement of structured datas processing
- myListPoints->setColumnWidth(5, 40);//ENK: 23.11.2006 - PAL13176 - EDF228 VISU : Enhancement of structured datas processing
- myListPoints->setColumnWidth(6, 40);//ENK: 23.11.2006 - PAL13176 - EDF228 VISU : Enhancement of structured datas processing
+ myListPoints->setColumnWidth(4, 40);
+ myListPoints->setColumnWidth(5, 40);
+ myListPoints->setColumnWidth(6, 40);
myListPoints->setSelectionMode(QAbstractItemView::NoSelection);
myListPoints->setHorizontalHeaderLabels( aLabels );
// Create Cells pane
myCellsPane = new QWidget (mainFrame());
QGridLayout* aCellLayout = new QGridLayout (myCellsPane);
- //aCellLayout->setSpacing(6);
aCellLayout->setRowStretch(0, 0);
aCellLayout->setRowStretch(1, 1);
myCellListPoints->setColumnWidth(1, 40);
myCellListPoints->setColumnWidth(2, 40);
myCellListPoints->setColumnWidth(3, 40);
- myCellListPoints->setColumnWidth(4, 40);//ENK: 23.11.2006 - PAL13176 - EDF228 VISU : Enhancement of structured datas processing
- myCellListPoints->setColumnWidth(5, 40);//ENK: 23.11.2006 - PAL13176 - EDF228 VISU : Enhancement of structured datas processing
- myCellListPoints->setColumnWidth(6, 40);//ENK: 23.11.2006 - PAL13176 - EDF228 VISU : Enhancement of structured datas processing
+ myCellListPoints->setColumnWidth(4, 40);
+ myCellListPoints->setColumnWidth(5, 40);
+ myCellListPoints->setColumnWidth(6, 40);
myCellListPoints->setSelectionMode(QAbstractItemView::NoSelection);
myCellListPoints->setHorizontalHeaderLabels( aLabels );
// Actor Pane
myActorsPane = new QWidget (mainFrame());
aVBoxLayout = new QVBoxLayout(myActorsPane);
- //aVBoxLayout->setSpacing(6);
QGroupBox* aPosGrp = new QGroupBox (tr("ACTOR_DATA_POSITION_TITLE"), myActorsPane);
aGridLay = new QGridLayout (aPosGrp);
- //aGridLay->setSpacing(6);
aGridLay->addWidget( new QLabel ("X:", aPosGrp), 0, 0);
myXPosLbl = new QLabel ("0", aPosGrp);
aGridLay->addWidget( myXPosLbl, 0, 1);
QGroupBox* aSizeGrp = new QGroupBox ( tr("ACTOR_DATA_SIZE_TITLE"), myActorsPane);
aGridLay = new QGridLayout (aSizeGrp);
- //aGridLay->setSpacing(6);
aGridLay->addWidget( new QLabel ("dX:", aSizeGrp ), 0, 0);
myDXLbl = new QLabel ("0", aSizeGrp);
aGridLay->addWidget( myDXLbl, 0, 1);
mySelectionMgr = anApp->selectionMgr();
connect(mySelectionMgr, SIGNAL(currentSelectionChanged()), this, SLOT(onSelectionEvent()));
- //connect(visuGUI, SIGNAL(SignalCloseAllDialogs()), this, SLOT(close()));
-
myFl = false;
// Activate Points pane
void VisuGUI_SelectionPanel::showEvent( QShowEvent* theEvent )
{
- VisuGUI_BasePanel::showEvent(theEvent);
+ VisuGUI_Panel::showEvent(theEvent);
}
void VisuGUI_SelectionPanel::closeEvent( QCloseEvent* theEvent )
{
onClose();
- VisuGUI_BasePanel::closeEvent(theEvent);
+ VisuGUI_Panel::closeEvent(theEvent);
}
template<class TData> QString getValue(TData* theData, int theId){
for (int i = 0; anIter != aPointCoordsMap.end() && i < aTable->rowCount(); anIter++, i++) {
aTable->model()->setHeaderData( i, Qt::Vertical, QVariant(QString::number( i )), Qt::DisplayRole );
vtkIdType aNodeObjId = anIter->first;
- //ENK: 23.11.2006 - PAL13176 - EDF228 VISU : Enhancement of structured datas processing
+
VISU::TIdTypeVector aVec = aMapper->GetIndexesOfNode(aNodeObjId);
QString aI,aJ,aK;
aI = "-";
aI = QString::number(aVec[0]);
break;
}
- //ENK: 23.11.2006
-
+
QAbstractItemModel* aModel = aTable->model();
aModel->setData( aModel->index(i,0), QVariant(QString::number( aNodeObjId )), Qt::DisplayRole );
const TCoordArray& aCoordArray = anIter->second;
aModel->setData( aModel->index(i,1), QVariant(QString::number( aCoordArray[0] )), Qt::DisplayRole );
aModel->setData( aModel->index(i,2), QVariant(QString::number( aCoordArray[1] )), Qt::DisplayRole );
aModel->setData( aModel->index(i,3), QVariant(QString::number( aCoordArray[2] )), Qt::DisplayRole );
- aModel->setData( aModel->index(i,4), QVariant( aI ), Qt::DisplayRole );//ENK: 23.11.2006 - PAL13176
- aModel->setData( aModel->index(i,5), QVariant( aJ ), Qt::DisplayRole );//ENK: 23.11.2006 - PAL13176
- aModel->setData( aModel->index(i,6), QVariant( aK ), Qt::DisplayRole );//ENK: 23.11.2006 - PAL13176
+ aModel->setData( aModel->index(i,4), QVariant( aI ), Qt::DisplayRole );
+ aModel->setData( aModel->index(i,5), QVariant( aJ ), Qt::DisplayRole );
+ aModel->setData( aModel->index(i,6), QVariant( aK ), Qt::DisplayRole );
vtkIdType aNodeVTKId = anVISUActor->GetNodeVTKID(aNodeObjId);
aModel->setData( aModel->index(i,7), QVariant(getValue(aPntData, aNodeVTKId)), Qt::DisplayRole );
void VisuGUI_SelectionPanel::onApply()
{
- VisuGUI_BasePanel::onApply();
+ VisuGUI_Panel::onApply();
}
void VisuGUI_SelectionPanel::onClose()
{
close();
- VisuGUI_BasePanel::onClose();
+ VisuGUI_Panel::onClose();
}
void VisuGUI_SelectionPanel::onHelp()
arg(app->resourceMgr()->stringValue("ExternalBrowser", platform)).arg(aHelpFileName) );
}
- VisuGUI_BasePanel::onHelp();
+ VisuGUI_Panel::onHelp();
}
void VisuGUI_SelectionPanel::keyPressEvent( QKeyEvent* e )
{
- VisuGUI_BasePanel::keyPressEvent( e );
+ VisuGUI_Panel::keyPressEvent( e );
if ( e->isAccepted() )
return;
#ifndef VISUGUI_SELECTIONPANEL_H
#define VISUGUI_SELECTIONPANEL_H
-#include <VisuGUI_BasePanel.h>
+#include <VisuGUI_Panel.h>
#include <vtkSmartPointer.h>
class VisuGUI_FindPane;
class VisuGUI_SelectionPrefDlg;
-class VisuGUI_SelectionPanel: public VisuGUI_BasePanel
+class VisuGUI_SelectionPanel: public VisuGUI_Panel
{
Q_OBJECT