X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FGLViewer%2FGLViewer_ViewFrame.h;h=eac551d9ee690584eae126a0b0b3ac009c116bf9;hb=5d44d2f6ea60a50bbbc593f2b45a6075fe9e5154;hp=d90dfd3f5ddcb6b4b25512bb245df9fb4cc9795c;hpb=28124bc2dd22481a5a915b2b96b835ef5323a6f6;p=modules%2Fgui.git diff --git a/src/GLViewer/GLViewer_ViewFrame.h b/src/GLViewer/GLViewer_ViewFrame.h index d90dfd3f5..eac551d9e 100644 --- a/src/GLViewer/GLViewer_ViewFrame.h +++ b/src/GLViewer/GLViewer_ViewFrame.h @@ -1,33 +1,29 @@ -// Copyright (C) 2005 OPEN CASCADE +// Copyright (C) 2007-2023 CEA, EDF, OPEN CASCADE // -// 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. +// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS // -// 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. +// 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, or (at your option) any later version. // -// 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 +// 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. // -// See http://www.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org +// 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 // -// Author : OPEN CASCADE +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // +// Author : OPEN CASCADE // File: GLViewer_ViewFrame.h // Created: November, 2004 - -/*************************************************************************** -** Class: GLViewer_ViewFrame -** Descr: Frame window for viewport in QAD-based application -** Module: QAD -** Created: UI team, 05.09.00 -****************************************************************************/ +// #ifndef GLVIEWER_VIEWFRAME_H #define GLVIEWER_VIEWFRAME_H @@ -41,89 +37,89 @@ class SUIT_Desktop; class GLViewer_Viewer; class GLViewer_ViewPort; -#include +#include -#ifdef WNT +#ifdef WIN32 #pragma warning( disable:4251 ) #endif -/*! Class GLViewer_ViewFrame -* Frame window for viewport in GLViewer +/*! + \class GLViewer_ViewFrame + Frame window for viewport in QAD-based application */ class GLVIEWER_API GLViewer_ViewFrame: public SUIT_ViewWindow { Q_OBJECT - + +public: + //! Actions ID + enum { DumpId, FitAllId, FitRectId, FitSelectId, ZoomId, PanId, GlobalPanId, ResetId }; + public: GLViewer_ViewFrame( SUIT_Desktop* , GLViewer_Viewer* ); ~GLViewer_ViewFrame(); - -public: + +public: void setViewer( GLViewer_Viewer* ); GLViewer_Viewer* getViewer() const; - + void setViewPort( GLViewer_ViewPort* ); GLViewer_ViewPort* getViewPort() const; - + void setBackgroundColor( const QColor& ); QColor backgroundColor() const; - + QSize sizeHint() const; - + virtual void onUpdate( int ); - + + virtual QString getVisualParameters(); + virtual void setVisualParameters( const QString& parameters ); + + virtual QImage dumpView(); + signals: void vfDrawExternal( QPainter* ); void vfViewClosing( QCloseEvent* ); - + protected: GLViewer_Viewer* myViewer; GLViewer_ViewPort* myVP; - + public: - //ViewType getTypeView() const { return VIEW_GL; }; + //ViewType getTypeView() const { return VIEW_GL; }; QWidget* getViewWidget() { return ( QWidget* )getViewPort(); }; - + protected slots: - void onViewDump(); void onViewPan(); void onViewZoom(); void onViewFitAll(); void onViewFitArea(); void onViewFitSelect(); - void onViewGlobalPan(); + void onViewGlobalPan(); void onViewRotate(); void onViewReset(); - void onViewFront() {}; - void onViewBack() {}; - void onViewRight() {}; - void onViewLeft() {}; + void onViewFront() {}; + void onViewBack() {}; + void onViewRight() {}; + void onViewLeft() {}; void onViewBottom() {}; void onViewTop() {}; - void onViewTrihedron() {}; - + void onViewTrihedron() {}; + private slots: void keyEvent( QKeyEvent* ); void mouseEvent( QMouseEvent* ); void wheelEvent( QWheelEvent* ); - + private: void createActions(); void createToolBar(); - -private: - //! Actions ID - enum { DumpId, FitAllId, FitRectId, FitSelectId, ZoomId, PanId, GlobalPanId, ResetId }; - typedef QMap ActionsMap; - -private: - ActionsMap myActionsMap; - QToolBar* myToolBar; }; -#ifdef WNT +#ifdef WIN32 #pragma warning ( default:4251 ) #endif