From: apo Date: Wed, 1 Feb 2006 06:49:29 +0000 (+0000) Subject: To remove unused class X-Git-Tag: T_merge_to_HEAD_20060207~14 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=f5ac6d76cf22f45d24db5eb92b2c0c087b4a077c;p=modules%2Fgui.git To remove unused class --- diff --git a/src/SVTK/SVTK_RenderWindow.cxx b/src/SVTK/SVTK_RenderWindow.cxx deleted file mode 100644 index d24e0a15a..000000000 --- a/src/SVTK/SVTK_RenderWindow.cxx +++ /dev/null @@ -1,179 +0,0 @@ -// Copyright (C) 2005 OPEN CASCADE, CEA/DEN, EDF R&D, PRINCIPIA R&D -// -// 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/ -// -#include "SVTK_RenderWindow.h" - -#include -#include - -#include -#include - -#include -#include -#include -#ifndef WNT -#include -//#include -//#include -//#include -#else -#include -#endif - -#if QT_VERSION > 300 -#include -#endif - -//========================================================== -SVTK_RenderWindow -::SVTK_RenderWindow(QWidget* parent, const char* name) : - QWidget(parent, name, - Qt::WStyle_NoBorder | Qt::WDestructiveClose | - Qt::WResizeNoErase | Qt::WRepaintNoErase) -{ - myRW = vtkRenderWindow::New(); -#ifndef WNT - myRW->SetDisplayId((void*)x11Display()); -#endif - myRW->SetWindowId((void*)winId()); - myRW->DoubleBufferOn(); - setMouseTracking(true); -} - -//========================================================== -SVTK_RenderWindow -::~SVTK_RenderWindow() -{ - myRW->Delete(); -} - -//========================================================== -void -SVTK_RenderWindow -::paintEvent(QPaintEvent* theEvent) -{ - myRW->Render(); -} - -//========================================================== -void -SVTK_RenderWindow -::resizeEvent(QResizeEvent* theEvent) -{ - int aWidth = myRW->GetSize()[0], aHeight = myRW->GetSize()[1]; - if(vtkRenderWindowInteractor* aRWI = myRW->GetInteractor()) - aRWI->UpdateSize(width(), height()); - if(aWidth != width() || aHeight != height()){ - vtkRendererCollection * aRenderers = myRW->GetRenderers(); - aRenderers->InitTraversal(); - double aCoeff = 1.0; - if(vtkRenderer *aRenderer = aRenderers->GetNextItem()){ - vtkCamera *aCamera = aRenderer->GetActiveCamera(); - double aScale = aCamera->GetParallelScale(); - if((aWidth - width())*(aHeight - height()) > 0) - aCoeff = sqrt(double(aWidth)/double(width())*double(height())/double(aHeight)); - else - aCoeff = double(aWidth)/double(width()); - aCamera->SetParallelScale(aScale*aCoeff); - } - } -} - -//========================================================== -void -SVTK_RenderWindow -::mouseMoveEvent(QMouseEvent* event) -{ - emit MouseMove(event) ; -} - -//========================================================== -void -SVTK_RenderWindow -::mousePressEvent(QMouseEvent* event) -{ - emit MouseButtonPressed( event ); -} - -//========================================================== -void -SVTK_RenderWindow -::mouseReleaseEvent( QMouseEvent *event ) -{ - emit MouseButtonReleased( event ); -} - -//========================================================== -void -SVTK_RenderWindow::mouseDoubleClickEvent( QMouseEvent* event ) -{ - emit MouseDoubleClicked( event ); -} - -//========================================================== -void -SVTK_RenderWindow -::keyPressEvent (QKeyEvent* event) -{ - emit KeyPressed(event) ; -} - -//========================================================== -void -SVTK_RenderWindow -::keyReleaseEvent (QKeyEvent * event) -{ - emit KeyReleased(event) ; -} - -//========================================================== -void -SVTK_RenderWindow -::wheelEvent(QWheelEvent* event) -{ - emit WheelMoved(event) ; -} - -//========================================================== -void -SVTK_RenderWindow -::onChangeBackgroundColor() -{ - //float red, green, blue; - float backint[3]; - - vtkRendererCollection * theRenderers = myRW->GetRenderers(); - theRenderers->InitTraversal(); - vtkRenderer * theRenderer = theRenderers->GetNextItem(); - theRenderer->GetBackground(backint); - - QColor selColor = QColorDialog::getColor ( QColor(int(backint[0]*255), int(backint[1]*255), int(backint[2]*255)), NULL ); - if ( selColor.isValid() ) { - theRenderer->SetBackground( selColor.red()/255., selColor.green()/255., selColor.blue()/255. ); - } -} - -//========================================================== -void -SVTK_RenderWindow -::contextMenuEvent ( QContextMenuEvent * e ) -{ - if ( e->reason() != QContextMenuEvent::Mouse ) - emit contextMenuRequested( e ); -}