-// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
// 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
class QButtonGroup;
class QLineEdit;
class QTabWidget;
+class QGroupBox;
class SUIT_SelectionFilter;
class SALOME_Actor;
class SMESH_Actor;
void updateSelection();
void deactivate();
+ void erasePreview();
private:
- void erasePreview();
void displayPreview();
void createPreview( double, double, double, double, double, double );
SALOME_Actor* myPreview;
};
+class SMESHGUI_EXPORT SMESHGUI_BasicProperties : public QWidget
+{
+ Q_OBJECT;
+
+public:
+ //! Property type
+ enum Mode { Length, Area, Volume };
+
+ SMESHGUI_BasicProperties( QWidget* = 0 );
+ ~SMESHGUI_BasicProperties();
+
+ void setMode( const Mode );
+
+ void updateSelection();
+ void deactivate();
+
+private slots:
+ void selectionChanged();
+ void modeChanged( int);
+ void compute();
+ void clear();
+
+private:
+ QButtonGroup* myMode;
+ QLineEdit* mySource;
+ QGroupBox* myResultGrp;
+ QLineEdit* myResult;
+ SMESH::SMESH_IDSource_var mySrc;
+ SUIT_SelectionFilter* myFilter;
+};
+
class SMESHGUI_EXPORT SMESHGUI_MeasureDlg : public QDialog
{
Q_OBJECT;
//! Measurement type
enum {
MinDistance, //!< minimum distance
- BoundingBox //!< bounding box
+ BoundingBox, //!< bounding box
+ Length, //!< length
+ Area, //!< area
+ Volume //!< volume
};
SMESHGUI_MeasureDlg( QWidget* = 0, int = MinDistance );
QTabWidget* myTabWidget;
SMESHGUI_MinDistance* myMinDist;
SMESHGUI_BoundingBox* myBndBox;
+ SMESHGUI_BasicProperties* myBasicProps;
};
#endif // SMESHGUI_MEASUREMENTS_H