SUIT_ResourceMgr* theResourceMgr,
VISU_PickingSettings* thePickingSettings)
{
- VVTK_MainWindow2* aMainWindow2 = new VVTK_MainWindow2(theParent,
- theName,
- theResourceMgr,
- thePickingSettings,
- myStyleSwitchAction);
- return aMainWindow2;
+ myMainWindow2 = new VVTK_MainWindow2(theParent,
+ theName,
+ theResourceMgr,
+ thePickingSettings,
+ myStyleSwitchAction);
+ //myMainWindow2->hide();
+ return myMainWindow2;
}
return myPickingDlg->GetPickingSettings();
}
-
-//----------------------------------------------------------------------------
-QSize
-VVTK_MainWindow1
-::sizeHint() const
-{
- QWidget* aParent = parentWidget();
- static float aCoeff = 1.0/2.0;
- int aWidth = int(aCoeff*aParent->width());
- int aHeight = int(aCoeff*aParent->height());
-
- return QSize(aWidth,aHeight);
-}
-
//----------------------------------------------------------------------------
void
VVTK_MainWindow1
::OnPlaneSegmentationSwitch(bool theIsPlaneSegmentationOn)
{
myRenderer->GetImplicitFunctionWidget()->SetEnabled(theIsPlaneSegmentationOn);
- mySplitter->setCollapsible(this,!theIsPlaneSegmentationOn);
+ //mySplitter->setCollapsible(this,!theIsPlaneSegmentationOn);
if( theIsPlaneSegmentationOn )
{
+ myMainWindow2->show();
mySegmentationCursorDlg->UpdateSegmentation();
mySegmentationCursorDlg->UpdateOutsideCursor();
mySegmentationCursorDlg->show();
}
else
+ {
+ myMainWindow2->hide();
mySegmentationCursorDlg->hide();
+ }
}
::~VVTK_MainWindow2()
{}
-//----------------------------------------------------------------------------
-QSize
-VVTK_MainWindow2
-::sizeHint() const
-{
- QWidget* aParent = parentWidget();
- static float aCoeff = 1.0/2.0;
- int aWidth = int(aCoeff*aParent->width());
- int aHeight = int(aCoeff*aParent->height());
-
- return QSize(aWidth,aHeight);
-}
VISU_FPSActor
::RenderOpaqueGeometry(vtkViewport *theViewport)
{
+ // It's impossible to render opaque geometry of text actor
+ // if the size of the viewport is less than 1.0
+ int *size = theViewport->GetSize();
+ if( size[0] <= 1.0 || size[1] <= 1.0 )
+ return 1;
if(vtkRenderer *aRenderer = dynamic_cast<vtkRenderer*>(theViewport)){
static float aTol = 1.e-6;
DepthGroupLayout->setMargin(11);
QLabel* DepthLabel = new QLabel( tr( "DEPTH" ), DepthGroup );
- myDepthSpinBox = new QtxDblSpinBox( 0.0, 100.0, 0.1, DepthGroup );
+ myDepthSpinBox = new QtxDblSpinBox( 0.0, VTK_LARGE_FLOAT, 0.1, DepthGroup );
myDepthSpinBox->setSizePolicy( QSizePolicy( QSizePolicy::Expanding, QSizePolicy::Fixed ) );
myDepthSpinBox->setMinimumWidth( 100 );
myDepthSpinBox->setValue( 10.0 );
QBoxLayout* aLayout = new QVBoxLayout(aWidget);
aLayout->setAutoAdd(true);
QSplitter* aSplitter = new QSplitter(Qt::Vertical,aWidget);
- aSplitter->setChildrenCollapsible(true);
+ //aSplitter->setChildrenCollapsible(true);
VISU_ImplicitFunctionWidget* anImplicitFunctionWidget = NULL;
VISU_OutsideCursorSettings* anOutsideCursorSettings = NULL;
}
aSelector->Delete();
+ int h = height() / 2;
+ QValueList<int> aSizes;
+ aSizes.append( h );
+ aSizes.append( h );
+ aSplitter->setSizes( aSizes );
+ myMainWindow2->hide();
+
myMainWindow = myMainWindow1;
myView = myView1;
}