X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FVTKViewer%2FVTKViewer_MarkerWidget.h;h=bbfb278b95423600b70ba2555dda686cbd9a814f;hb=76527b0c8b1208770b6f707644829b691a87d081;hp=6715890870707c5bbbf5d75265558ffcf17a6399;hpb=3593b4d1585d69f34034e5c678dc97b6e92a85cf;p=modules%2Fgui.git diff --git a/src/VTKViewer/VTKViewer_MarkerWidget.h b/src/VTKViewer/VTKViewer_MarkerWidget.h index 671589087..bbfb278b9 100644 --- a/src/VTKViewer/VTKViewer_MarkerWidget.h +++ b/src/VTKViewer/VTKViewer_MarkerWidget.h @@ -1,9 +1,9 @@ -// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2014 CEA/DEN, EDF R&D, 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. +// version 2.1 of the License, or (at your option) any later version. // // This library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of @@ -16,6 +16,8 @@ // // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // +// File : VTKViewer_MarkerWidget.h +// Author : Vadim SANDLER, Open CASCADE S.A.S. (vadim.sandler@opencascade.com) #ifndef VTKVIEWER_MARKERWIDGET_H #define VTKVIEWER_MARKERWIDGET_H @@ -25,10 +27,9 @@ #include -class QButtonGroup; -class QStackedWidget; - -class QtxComboBox; +class QComboBox; +class QLabel; +class QSpinBox; /*! * Class : VTKViewer_MarkerWidget @@ -42,36 +43,37 @@ public: VTKViewer_MarkerWidget( QWidget* ); virtual ~VTKViewer_MarkerWidget(); - void setCustomMarkerMap( VTK::MarkerMap ); - VTK::MarkerMap getCustomMarkerMap(); + void setCustomMarkers( const VTK::MarkerMap& ); + VTK::MarkerMap customMarkers() const; + void addMarker( VTK::MarkerType, const QPixmap& ); - void setStandardMarker( VTK::MarkerType, VTK::MarkerScale ); + void setMarker( VTK::MarkerType, VTK::MarkerScale = VTK::MS_NONE ); void setCustomMarker( int ); - VTK::MarkerType getMarkerType() const; - VTK::MarkerScale getStandardMarkerScale() const; - int getCustomMarkerID() const; - void addExtraStdMarker( VTK::MarkerType, const QPixmap& ); + VTK::MarkerType markerType() const; + VTK::MarkerScale markerScale() const; + int markerId() const; + + QLabel* typeLabel(); + QLabel* scaleLabel(); private: void init(); - void addTexture( int, bool = false ); QPixmap markerFromData( const VTK::MarkerData& ); private slots: - void onStdMarkerChanged( int ); - void onBrowse(); + void onTypeChanged( int ); private: - QButtonGroup* myTypeGroup; - QStackedWidget* myWGStack; - QtxComboBox* myStdTypeCombo; - QtxComboBox* myStdScaleCombo; - QtxComboBox* myCustomTypeCombo; - - VTK::MarkerMap myCustomMarkerMap; - - QList myExtraMarkerList; + // widgets + QLabel* myTypeLab; + QComboBox* myType; + QLabel* myScaleLab; + QSpinBox* myScale; + // custom markers data + VTK::MarkerMap myCustomMarkers; + // current item + int myCurrentIdx; }; #endif