Salome HOME
Merge branch 'V7_dev'
[modules/gui.git] / src / VTKViewer / VTKViewer_MarkerWidget.h
index 6715890870707c5bbbf5d75265558ffcf17a6399..ccd52a61449c6d96071e649d959fefb9d5e9716f 100644 (file)
@@ -1,9 +1,9 @@
-// Copyright (C) 2007-2012  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2016  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
 
 #include <QWidget>
 
-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<VTK::MarkerType> myExtraMarkerList;
+  // widgets
+  QLabel*          myTypeLab;
+  QComboBox*       myType;
+  QLabel*          myScaleLab;
+  QSpinBox*        myScale;
+  // custom markers data
+  VTK::MarkerMap   myCustomMarkers;
+  // current item
+  int              myCurrentIdx;
 };
 
 #endif