using namespace SVTK::Representation;
switch(GetRepresentation()){
case Points :
+ myNodeActor->SetAllocatedRenderTime(this->AllocatedRenderTime,ren);
myNodeActor->RenderOpaqueGeometry(ren);
break;
case Wireframe :
case Insideframe :
+ myEdgeActor->SetAllocatedRenderTime(this->AllocatedRenderTime,ren);
myEdgeActor->RenderOpaqueGeometry(ren);
break;
case Surface :
+ mySurfaceActor->SetAllocatedRenderTime(this->AllocatedRenderTime,ren);
mySurfaceActor->RenderOpaqueGeometry(ren);
break;
case Surfaceframe :
+ mySurfaceActor->SetAllocatedRenderTime(this->AllocatedRenderTime/2.0,ren);
mySurfaceActor->RenderOpaqueGeometry(ren);
+
+ myEdgeActor->SetAllocatedRenderTime(this->AllocatedRenderTime/2.0,ren);
myEdgeActor->RenderOpaqueGeometry(ren);
break;
}
using namespace SVTK::Representation;
switch(GetRepresentation()){
case Points :
+ myNodeActor->SetAllocatedRenderTime(this->AllocatedRenderTime,ren);
myNodeActor->RenderTranslucentGeometry(ren);
break;
case Wireframe :
case Insideframe :
+ myEdgeActor->SetAllocatedRenderTime(this->AllocatedRenderTime,ren);
myEdgeActor->RenderTranslucentGeometry(ren);
break;
case Surface :
+ mySurfaceActor->SetAllocatedRenderTime(this->AllocatedRenderTime,ren);
mySurfaceActor->RenderTranslucentGeometry(ren);
break;
case Surfaceframe :
+ mySurfaceActor->SetAllocatedRenderTime(this->AllocatedRenderTime,ren);
mySurfaceActor->RenderTranslucentGeometry(ren);
+
+ myEdgeActor->SetAllocatedRenderTime(this->AllocatedRenderTime/2.0,ren);
myEdgeActor->RenderTranslucentGeometry(ren);
break;
}
fmt = "JPEG";
QApplication::setOverrideCursor( Qt::waitCursor );
- bool res = img.save( fileName, fmt.latin1() );
+ img.save( fileName, fmt.latin1() );
QApplication::restoreOverrideCursor();
}
myPickingAction->addTo( myPtsToolBar );
connect(myPickingAction, SIGNAL(toggled(bool)), this, SLOT(OnSelectionModeSwitch(bool)));
- myPickingDlg = new VVTK_PickingDlg( this, "PickingDlg" );
- myPickingDlg->SetAction( myPickingAction );
+ myPickingDlg = new VVTK_PickingDlg( myPickingAction, this, "PickingDlg" );
// Plane/Sphere Segmentation
aPixmap = theResourceMgr->loadPixmap("VISU",tr("ICON_VVTK_PLANE_SEGMENTATION_SWITCH"));
#include "SUIT_ResourceMgr.h"
#include "SUIT_Session.h"
+#include "SVTK_MainWindow.h"
#include "SVTK_RenderWindowInteractor.h"
#include <vtkActorCollection.h>
using namespace std;
-VVTK_PickingDlg::VVTK_PickingDlg( QWidget* parent, const char* name )
- :QDialog( parent, name, false, WStyle_Customize | WStyle_NormalBorder | WStyle_Title | WStyle_SysMenu ),
- myEventCallbackCommand( vtkCallbackCommand::New() ),
- myPickingSettings( VISU_PickingSettings::New() )
+VVTK_PickingDlg::VVTK_PickingDlg(QtxAction* theAction,
+ SVTK_MainWindow* theParent,
+ const char* theName):
+ SVTK_DialogBase(theAction,
+ theParent,
+ theName),
+ myEventCallbackCommand( vtkCallbackCommand::New() ),
+ myPickingSettings( VISU_PickingSettings::New() )
{
myPriority = 0.0;
myEventCallbackCommand->Delete();
void VVTK_PickingDlg::onClickClose()
{
- myAction->setOn( false );
reject();
}
}
}
-void VVTK_PickingDlg::done( int r )
-{
- myAction->setOn( false );
- QDialog::done( r );
-}
-
void VVTK_PickingDlg::onColorButtonPressed()
{
QColor aColor = QColorDialog::getColor( mySelectionColorButton->paletteBackgroundColor(), this );
#ifndef VVTK_PICKINGDLG_H
#define VVTK_PICKINGDLG_H
-#include <qdialog.h>
+#include "SVTK_DialogBase.h"
#include <vtkObject.h>
#include <vtkSmartPointer.h>
class VISU_GaussPtsAct;
class VISU_PickingSettings;
+class SVTK_MainWindow;
class SVTK_RenderWindowInteractor;
//! Picking Dialog.
* Uses for set up picking preferenses and apply
* them to all actors in the current renderer.
*/
-class VVTK_PickingDlg : public QDialog
+class VVTK_PickingDlg : public SVTK_DialogBase
{
Q_OBJECT
public:
- VVTK_PickingDlg( QWidget* parent = 0, const char* name = 0 );
- ~VVTK_PickingDlg();
+ VVTK_PickingDlg(QtxAction* theAction,
+ SVTK_MainWindow* theParent,
+ const char* theName);
- //! Used to switch toggle state of the Picking action.
- void SetAction( QtxAction* theAction ) { myAction = theAction; }
+ ~VVTK_PickingDlg();
//! Make an actor to listen the event of Update Picking Settings event.
void AddActor( VISU_GaussPtsAct* );
void SetInteractor( SVTK_RenderWindowInteractor* );
protected slots:
- virtual void done( int );
-
void onClickApply();
void onClickClose();
void onClickHelp();
}
std::ostringstream aStr;
float aFPS = 1.0 / aLastRenderTimeInSeconds;
- aStr<<"FPS: "<<aFPS<<"; NumberOfCells: "<<aNumberOfCells;
+ aStr<<"FPS: "<<aFPS<<"\n NumberOfCells: "<<aNumberOfCells;
std::string anInput = aStr.str();
SetInput(anInput.c_str());
return Superclass::RenderOpaqueGeometry(theViewport);
myFPSActor->SetMapper(aTextMapper);
aTextMapper->Delete();
- GetDevice()->AddActor2D(myFPSActor.GetPointer());
+ //GetDevice()->AddActor2D(myFPSActor.GetPointer());
myGaussPointPicker->Delete();
connect( buttonApply, SIGNAL( clicked() ), this, SLOT( onClickApply() ) );
connect( buttonClose, SIGNAL( clicked() ), this, SLOT( onClickClose() ) );
connect( buttonHelp, SIGNAL( clicked() ), this, SLOT( onClickHelp() ) );
+
+ connect(parent, SIGNAL(Show( QShowEvent * )), this, SLOT(onParentShow()));
+ connect(parent, SIGNAL(Hide( QHideEvent * )), this, SLOT(onParentHide()));
}
VVTK_SegmentationCursorDlg::~VVTK_SegmentationCursorDlg()
QDialog::done( r );
}
+void VVTK_SegmentationCursorDlg::onParentShow()
+{
+ if(myPlaneAction->isOn() || mySphereAction->isOn())
+ show();
+ else
+ hide();
+}
+
+void VVTK_SegmentationCursorDlg::onParentHide()
+{
+ hide();
+}
+
bool VVTK_SegmentationCursorDlg::CheckNumberOfFaces()
{
if( !myInteractor )
protected slots:
virtual void done( int );
+ void onParentShow();
+ void onParentHide();
void onClickApply();
void onClickClose();
VVTK_ViewManager
::VVTK_ViewManager( SUIT_Study* study,
SUIT_Desktop* theDesktop )
-: SUIT_ViewManager( study, theDesktop )
+: SVTK_ViewManager( study, theDesktop )
{
myId = ++_VVTKViewMgr_Id;
setViewModel( new VVTK_Viewer() );
#ifndef VVTK_VIEWMANAGER_H
#define VVTK_VIEWMANAGER_H
-#include "SUIT_ViewManager.h"
+#include "SVTK_ViewManager.h"
#include "VVTK.h"
class SUIT_Desktop;
//! Extend SUIT_ViewManager to deal with VVTK_Viewer
-class VVTK_EXPORT VVTK_ViewManager : public SUIT_ViewManager
+class VVTK_EXPORT VVTK_ViewManager : public SVTK_ViewManager
{
Q_OBJECT;
public: