Back to index

salome-gui  6.5.0
OCCViewer_CubeAxesDlg.h
Go to the documentation of this file.
00001 // Copyright (C) 2007-2012  CEA/DEN, EDF R&D, OPEN CASCADE
00002 //
00003 // Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
00004 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
00005 //
00006 // This library is free software; you can redistribute it and/or
00007 // modify it under the terms of the GNU Lesser General Public
00008 // License as published by the Free Software Foundation; either
00009 // version 2.1 of the License.
00010 //
00011 // This library is distributed in the hope that it will be useful,
00012 // but WITHOUT ANY WARRANTY; without even the implied warranty of
00013 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00014 // Lesser General Public License for more details.
00015 //
00016 // You should have received a copy of the GNU Lesser General Public
00017 // License along with this library; if not, write to the Free Software
00018 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
00019 //
00020 // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
00021 //
00022 
00023 #ifndef OCCVIEWER_CUBEAXESDLG_H
00024 #define OCCVIEWER_CUBEAXESDLG_H
00025 
00026 #include "OCCViewer.h"
00027 
00028 #include <ViewerTools_CubeAxesDlgBase.h>
00029 
00030 #include <V3d_View.hxx>
00031 
00032 class OCCViewer_ViewWindow;
00033 
00038 class OCCVIEWER_EXPORT OCCViewer_AxisWidget : public ViewerTools_AxisWidgetBase
00039 {
00040 public:
00041   struct AxisData
00042   {
00043     bool    DrawName;
00044     QString Name;
00045     QColor  NameColor;
00046     bool    DrawValues;
00047     int     NbValues;
00048     int     Offset;
00049     QColor  Color;
00050     bool    DrawTickmarks;
00051     int     TickmarkLength;
00052   };
00053 
00054 public:
00055   OCCViewer_AxisWidget( QWidget* );
00056   ~OCCViewer_AxisWidget();
00057 
00058 public:
00059   void             SetData( const AxisData& );
00060   void             GetData( AxisData& );
00061 
00062 protected:
00063   virtual ViewerTools_FontWidgetBase* createFontWidget( QWidget* );
00064 };
00065 
00070 class OCCVIEWER_EXPORT OCCViewer_CubeAxesDlg : public ViewerTools_CubeAxesDlgBase
00071 {
00072   Q_OBJECT
00073 
00074 public:
00075                   OCCViewer_CubeAxesDlg(QtxAction* theAction,
00076                                         OCCViewer_ViewWindow* theParent,
00077                                         const char* theName);
00078   virtual         ~OCCViewer_CubeAxesDlg();
00079 
00080   virtual void    initialize();
00081 
00082   void            GetData( bool& theIsVisible, OCCViewer_AxisWidget::AxisData theAxisData[3] );
00083   void            SetData( bool theIsVisible, OCCViewer_AxisWidget::AxisData theAxisData[3] );
00084 
00085   void            ApplyData( const Handle(V3d_View)& theView );
00086 
00087   virtual void    Update();
00088 
00089 private slots:
00090   virtual bool    onApply();
00091 
00092 private:
00093   virtual ViewerTools_AxisWidgetBase* createAxisWidget( QWidget* );
00094 
00095 private:
00096   OCCViewer_ViewWindow* myMainWindow;
00097 };
00098 
00099 #endif