#include "VisuGUI.h"
#include "VisuGUI_Tools.h"
+#include "VisuGUI_ViewTools.h"
#include "VISU_Gen_i.hh"
#include "VISU_CutLines_i.hh"
QHBox* aPosBox = new QHBox (aPlanePane);
aPosBox->setSpacing(5);
- QLabel* aPosLbl = new QLabel (tr("LBL_POS"), aPosBox);
+ new QLabel (tr("LBL_POS"), aPosBox);
myPosSpn = new QtxDblSpinBox (0, 1, 0.1, aPosBox);
myPosSpn->setValue(0.5);
aPlaneLayout->addWidget(aPosBox);
QHBox* aNbBox = new QHBox(aLinesPane);
aNbBox->setSpacing(5);
- QLabel* aNbLbl = new QLabel( tr( "LBL_NB_PLANS" ), aNbBox );
+ new QLabel( tr( "LBL_NB_PLANS" ), aNbBox );
myNbSpn = new QtxDblSpinBox( 1, 100, 1, aNbBox );
myNbSpn->setValue( 10 );
QHBox* aPosBox2 = new QHBox(aLinesPane);
aPosBox2->setSpacing(5);
- QLabel* aPosLbl2 = new QLabel( tr( "LBL_POS" ), aPosBox2 );
+ new QLabel( tr( "LBL_POS" ), aPosBox2 );
myPosSpn2 = new QtxDblSpinBox( 0, 1, 0.1, aPosBox2 );
myPosSpn2->setValue( 0.5 );
aLinesLayout->addWidget( aPosBox2 );
deletePlanes();
if (myCutLines) //delete myCutLines;
myCutLines->Destroy();
- if (SVTK_ViewWindow* vf = VISU::GetViewWindow())
+ if (SVTK_ViewWindow* vf = VISU::GetActiveViewWindow<SVTK_ViewWindow>())
vf->Repaint();
}
//------------------------------------------------------------------------------
void VisuGUI_CutLinesDlg::createPlanes()
{
- SVTK_ViewWindow* aView = VISU::GetViewWindow();
+ SVTK_ViewWindow* aView = VISU::GetActiveViewWindow<SVTK_ViewWindow>();
if (aView == NULL) return;
if (myCutLines == NULL) return;
if (myPreviewActor != 0) return;
void VisuGUI_CutLinesDlg::deletePlanes()
{
if (myPreviewActor == 0) return;
- if (SVTK_ViewWindow* aView = VISU::GetViewWindow()){
+ if (SVTK_ViewWindow* aView = VISU::GetActiveViewWindow<SVTK_ViewWindow>()){
aView->RemoveActor(myPreviewActor);
aView->RemoveActor(myPreviewActorGlyphs);
}
myRotXLbl2->setText( tr("LBL_ROT_Z"));
myRotYLbl2->setText( tr("LBL_ROT_X"));
}
- SVTK_ViewWindow* aView = VISU::GetViewWindow();
+ SVTK_ViewWindow* aView = VISU::GetActiveViewWindow<SVTK_ViewWindow>();
if (aView) {
if (theUpdate && myPreviewCheck->isChecked() && (myCutLines != NULL)) {
/*myCutLines->SetOrientation2(getOrientaion(false),
/* float aPos = myCutLines->GetBasePlanePosition();
myBasePlanePos->setText( QString::number(aPos) );
myBasePlanePos->setEnabled(false);*/
- SVTK_ViewWindow* aView = VISU::GetViewWindow();
+ SVTK_ViewWindow* aView = VISU::GetActiveViewWindow<SVTK_ViewWindow>();
if (aView) {
if (theUpdate && myPreviewCheck->isChecked() && (myCutLines != NULL)) {
//myCutLines->SetBasePlanePosition(aPos);
vh->setLabel( i, str.arg(i+1) );
}
// Update preview
- SVTK_ViewWindow* aView = VISU::GetViewWindow();
+ SVTK_ViewWindow* aView = VISU::GetActiveViewWindow<SVTK_ViewWindow>();
if (aView) {
if (myPreviewCheck->isChecked()) {
// myCutLines->GetPL()->Update();
source->Delete();
aPlaneMapper->Delete();
- if (SVTK_ViewWindow* vf = VISU::GetViewWindow())
+ if (SVTK_ViewWindow* vf = VISU::GetActiveViewWindow<SVTK_ViewWindow>())
if (update)
vf->Repaint();
}
QString aTxt = myPosTable->text(theRow, 0);
bool isChanged = !aTxt.isEmpty();
((QCheckTableItem*)myPosTable->item(theRow, 1))->setChecked(!isChanged);
- SVTK_ViewWindow* aView = VISU::GetViewWindow();
+ SVTK_ViewWindow* aView = VISU::GetActiveViewWindow<SVTK_ViewWindow>();
if (aView) {
if (myPreviewCheck->isChecked()) {
//Update Preview
if (isDefault) {
//myCutLines->SetDefaultPosition(theRow);
// myPosTable->setText(theRow, 0, QString::number(myCutLines->GetLinePosition(theRow)));
- SVTK_ViewWindow* aView = VISU::GetViewWindow();
+ SVTK_ViewWindow* aView = VISU::GetActiveViewWindow<SVTK_ViewWindow>();
if (aView) {
if (myPreviewCheck->isChecked()) {
//Update Preview
void VisuGUI_CutLinesDlg::onPreviewCheck (bool thePreview)
{
- if (SVTK_ViewWindow* vf = VISU::GetViewWindow()) {
+ if (SVTK_ViewWindow* vf = VISU::GetActiveViewWindow<SVTK_ViewWindow>()) {
if (thePreview) {
//storeToPrsObject(myCutLines);
// myCutLines->GetPL()->Update();
void VisuGUI_CutLinesDlg::onRotation (double theValue)
{
if (myCutLines == NULL) return;
- SVTK_ViewWindow* aView = VISU::GetViewWindow();
+ SVTK_ViewWindow* aView = VISU::GetActiveViewWindow<SVTK_ViewWindow>();
if (aView) {
if (myPreviewCheck->isChecked()) {
void VisuGUI_CutLinesDlg::onPlanePos (const QString& theValue)
{
if (myCutLines == NULL) return;
- SVTK_ViewWindow* aView = VISU::GetViewWindow();
+ SVTK_ViewWindow* aView = VISU::GetActiveViewWindow<SVTK_ViewWindow>();
if (aView) {
if (myPreviewCheck->isChecked()) {
//myCutLines->SetBasePlanePosition(theValue.toDouble());