mirror of
https://git.salome-platform.org/gitpub/modules/geom.git
synced 2025-01-30 06:10:34 +05:00
Annotation is visualized in fixed position in the viewer.
This commit is contained in:
parent
3a7897bcc7
commit
7acc0d2541
@ -5000,6 +5000,18 @@ Please, select face, shell or solid and try again</translation>
|
|||||||
<source>STB_MANAGE_DIMENSIONS</source>
|
<source>STB_MANAGE_DIMENSIONS</source>
|
||||||
<translation>Manage measurement dimensions of an object</translation>
|
<translation>Manage measurement dimensions of an object</translation>
|
||||||
</message>
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>TOP_ANNOTATION</source>
|
||||||
|
<translation>Annotation</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>MEN_ANNOTATION</source>
|
||||||
|
<translation>Annotation</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>STB_ANNOTATION</source>
|
||||||
|
<translation>Annotation</translation>
|
||||||
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<source>MEN_POP_SHOW_DEPENDENCY_TREE</source>
|
<source>MEN_POP_SHOW_DEPENDENCY_TREE</source>
|
||||||
<translation>Show dependency tree</translation>
|
<translation>Show dependency tree</translation>
|
||||||
@ -6707,6 +6719,53 @@ Do you want to continue?</translation>
|
|||||||
Please specify suitable arguments.</translation>
|
Please specify suitable arguments.</translation>
|
||||||
</message>
|
</message>
|
||||||
</context>
|
</context>
|
||||||
|
<context>
|
||||||
|
<name>MeasureGUI_AnnotationDlg</name>
|
||||||
|
<message>
|
||||||
|
<source>CREATE_ANNOTATION_TITLE</source>
|
||||||
|
<translation>Create annotation</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>EDIT_ANNOTATION_TITLE</source>
|
||||||
|
<translation>Edit annotation</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>ANNOTATION_PREFIX</source>
|
||||||
|
<translation>Annotation</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>ANNOTATION_NAME</source>
|
||||||
|
<translation>Annotation name</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>ANNOTATION_PROPERTIES</source>
|
||||||
|
<translation>Properties</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>ANNOTATION_TEXT</source>
|
||||||
|
<translation>Text</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>ANNOTATION_SHAPE</source>
|
||||||
|
<translation>Shape</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>ANNOTATION_TYPE</source>
|
||||||
|
<translation>Type</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>ANNOTATION_SUB_SHAPE</source>
|
||||||
|
<translation>Sub-shape type</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>ANNOTATION_STYLE</source>
|
||||||
|
<translation>Style</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>ANNOTATION_FONT</source>
|
||||||
|
<translation>Font</translation>
|
||||||
|
</message>
|
||||||
|
</context>
|
||||||
<context>
|
<context>
|
||||||
<name>MeasureGUI_CheckShapeDlg</name>
|
<name>MeasureGUI_CheckShapeDlg</name>
|
||||||
<message>
|
<message>
|
||||||
|
File diff suppressed because it is too large
Load Diff
@ -28,19 +28,18 @@
|
|||||||
|
|
||||||
#include <GEOMBase_Skeleton.h>
|
#include <GEOMBase_Skeleton.h>
|
||||||
|
|
||||||
//#include <GEOM_Annotation.hxx>
|
|
||||||
#include <GEOM_Constants.h>
|
#include <GEOM_Constants.h>
|
||||||
#include <GEOMGUI_ShapeAnnotations.h>
|
#include <GEOMGUI_ShapeAnnotations.h>
|
||||||
|
|
||||||
#include <TopAbs_ShapeEnum.hxx>
|
#include <TopAbs_ShapeEnum.hxx>
|
||||||
#include <TColStd_DataMapOfIntegerInteger.hxx>
|
//#include <TColStd_DataMapOfIntegerInteger.hxx>
|
||||||
#include <TColStd_IndexedMapOfInteger.hxx>
|
//#include <TColStd_IndexedMapOfInteger.hxx>
|
||||||
#include <TopTools_IndexedMapOfShape.hxx>
|
//#include <TopTools_IndexedMapOfShape.hxx>
|
||||||
|
|
||||||
#include <QMap>
|
//#include <QMap>
|
||||||
#include <QSet>
|
//#include <QSet>
|
||||||
#include <QVector>
|
//#include <QVector>
|
||||||
#include <QTableWidget>
|
//#include <QTableWidget>
|
||||||
|
|
||||||
class QGroupBox;
|
class QGroupBox;
|
||||||
class QLineEdit;
|
class QLineEdit;
|
||||||
@ -56,12 +55,6 @@ class MeasureGUI_AnnotationDlg : public GEOMBase_Skeleton
|
|||||||
{
|
{
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
|
|
||||||
/*class StepTable;
|
|
||||||
class IntSpinItem;
|
|
||||||
class DoubleSpinItem;
|
|
||||||
class CheckItem;
|
|
||||||
class Delegate;*/
|
|
||||||
|
|
||||||
public:
|
public:
|
||||||
MeasureGUI_AnnotationDlg (GeometryGUI* theGeometryGUI,
|
MeasureGUI_AnnotationDlg (GeometryGUI* theGeometryGUI,
|
||||||
const bool theIsCreate,
|
const bool theIsCreate,
|
||||||
@ -71,66 +64,34 @@ public:
|
|||||||
|
|
||||||
protected:
|
protected:
|
||||||
// redefined from GEOMBase_Helper
|
// redefined from GEOMBase_Helper
|
||||||
//virtual GEOM::GEOM_IOperations_ptr createOperation();
|
|
||||||
virtual bool isValid (QString&);
|
virtual bool isValid (QString&);
|
||||||
virtual bool execute ();
|
virtual bool execute ();
|
||||||
//virtual QList<GEOM::GeomObjPtr> getSourceObjects();
|
|
||||||
|
SALOME_Prs* buildPrs();
|
||||||
|
void redisplayPreview();
|
||||||
|
|
||||||
private slots:
|
private slots:
|
||||||
void ClickOnOk();
|
void ClickOnOk();
|
||||||
bool ClickOnApply();
|
bool ClickOnApply();
|
||||||
//void ActivateThisDialog();
|
|
||||||
void SelectionIntoArgument();
|
void SelectionIntoArgument();
|
||||||
void SetEditCurrentArgument();
|
void SetEditCurrentArgument();
|
||||||
|
|
||||||
/*void onPrevStep();
|
|
||||||
void onNextStep();
|
|
||||||
void onAddStep();
|
|
||||||
void onRmStep();
|
|
||||||
void onStampChange();
|
|
||||||
void onDimChange();*/
|
|
||||||
void onTextChange();
|
void onTextChange();
|
||||||
void onTypeChange();
|
void onTypeChange();
|
||||||
void onSubShapeTypeChange();
|
void onSubShapeTypeChange();
|
||||||
|
|
||||||
/*void onNbCompsChange();
|
|
||||||
void showCurStep();
|
|
||||||
void highlightSubShapes();
|
|
||||||
*/
|
|
||||||
private:
|
private:
|
||||||
bool isCreateOperation() const;
|
|
||||||
|
|
||||||
void Init();
|
void Init();
|
||||||
//void enterEvent (QEvent*);
|
|
||||||
//void activateSelection();
|
|
||||||
|
|
||||||
TopAbs_ShapeEnum getShapeType() const;
|
TopAbs_ShapeEnum getShapeType() const;
|
||||||
/* int getDim() const;
|
gp_Pnt getAttachPoint(const TopoDS_Shape& theShape);
|
||||||
int getDataType() const;
|
|
||||||
int getCurStepID() const;
|
|
||||||
int getNbComps() const;
|
|
||||||
void updateShapeIDs();
|
|
||||||
void updateDims(int curDim=-1);
|
|
||||||
int getSelectedSubshapes (TColStd_IndexedMapOfInteger& map);
|
|
||||||
*/
|
|
||||||
private:
|
private:
|
||||||
QList<TopAbs_ShapeEnum> mySelectionModes;
|
QList<TopAbs_ShapeEnum> mySelectionModes;
|
||||||
GEOMGUI_ShapeAnnotations::ShapeAnnotation myAnnotationProperties;
|
GEOMGUI_ShapeAnnotations::ShapeAnnotation myAnnotationProperties;
|
||||||
/// an index of edited annotation in the list shape annotations, -1 in create operation
|
/// an index of edited annotation in the list shape annotations, -1 in create operation
|
||||||
bool myIsCreation;
|
bool myIsCreation;
|
||||||
GEOM::GeomObjPtr myShape;
|
GEOM::GeomObjPtr myShape;
|
||||||
/*QVector< int > myShapeIDs;
|
|
||||||
TopTools_IndexedMapOfShape myShapeMap;
|
|
||||||
|
|
||||||
int myCurStepID;
|
|
||||||
StepTable* myCurStepTable;
|
|
||||||
QMap< int, StepTable* > myStepTables;
|
|
||||||
QSet< int > myRemovedSteps;
|
|
||||||
|
|
||||||
int myDmMode;*/
|
|
||||||
//bool myIsHiddenMain;
|
|
||||||
|
|
||||||
// QList<int> myHiddenFieldStepIds;
|
|
||||||
|
|
||||||
QLineEdit* myTextEdit;
|
QLineEdit* myTextEdit;
|
||||||
|
|
||||||
@ -142,72 +103,6 @@ private:
|
|||||||
|
|
||||||
QPushButton* mySubShapeSelBtn;
|
QPushButton* mySubShapeSelBtn;
|
||||||
QLineEdit* mySubShapeName;
|
QLineEdit* mySubShapeName;
|
||||||
|
|
||||||
/*
|
|
||||||
QComboBox* myDimCombo;
|
|
||||||
QPushButton* myPrevStepBtn;
|
|
||||||
QPushButton* myNextStepBtn;
|
|
||||||
QPushButton* myRmStepBtn;
|
|
||||||
|
|
||||||
SalomeApp_IntSpinBox* myNbCompsSpin;
|
|
||||||
QWidget* mySwitchTableWdg;
|
|
||||||
QComboBox* myStepsCombo;
|
|
||||||
QLineEdit* myStepEdit;
|
|
||||||
SalomeApp_IntSpinBox* myStampSpin;
|
|
||||||
*/
|
|
||||||
};
|
};
|
||||||
|
|
||||||
/*
|
|
||||||
Class : MeasureGUI_AnnotationDlg::StepTable
|
|
||||||
Description : Table widget
|
|
||||||
*/
|
|
||||||
|
|
||||||
/*class MeasureGUI_AnnotationDlg::StepTable : public QTableWidget
|
|
||||||
{
|
|
||||||
Q_OBJECT
|
|
||||||
|
|
||||||
int myDataType;
|
|
||||||
int myStepID;
|
|
||||||
int myStamp;
|
|
||||||
GEOM::GEOM_FieldStep_var myStep;
|
|
||||||
bool myIsChanged;
|
|
||||||
|
|
||||||
QTableWidgetItem * newDefaultItem();
|
|
||||||
|
|
||||||
public:
|
|
||||||
StepTable( int stepID, int dataType, int nbRows, int nbColumns,
|
|
||||||
QString shapeName, QStringList headers,
|
|
||||||
GEOM::GEOM_FieldStep_ptr stepVar, QWidget* = 0 );
|
|
||||||
virtual ~StepTable();
|
|
||||||
|
|
||||||
QSize minimumSizeHint() const;
|
|
||||||
|
|
||||||
void setEditable( bool, int, int );
|
|
||||||
bool isEditable( int, int ) const;
|
|
||||||
|
|
||||||
void setReadOnly( bool );
|
|
||||||
bool isReadOnly() const;
|
|
||||||
|
|
||||||
void insertRows( int, int = 1 );
|
|
||||||
QString text( int, int );
|
|
||||||
|
|
||||||
QList<int> selectedRows();
|
|
||||||
void selectRows(const QList<int>& rows);
|
|
||||||
|
|
||||||
void setDim( int nbRows, QString shapeName, bool setDefault=true );
|
|
||||||
void setNbComps( int nbComps );
|
|
||||||
void setDataType( int dataType );
|
|
||||||
void setStamp( int stamp ) { myStamp = stamp; }
|
|
||||||
int getStamp() { return myStamp; }
|
|
||||||
int getStepID() { return myStepID; }
|
|
||||||
QStringList getHeaders();
|
|
||||||
void setHeaders(const QStringList& headers);
|
|
||||||
GEOM::GEOM_FieldStep_var getStep() { return myStep; }
|
|
||||||
void setValues(GEOM::GEOM_FieldStep_var& step);
|
|
||||||
|
|
||||||
public slots:
|
|
||||||
void setIsChanged() { myIsChanged = true; }
|
|
||||||
void headerDblClicked( int );
|
|
||||||
};*/
|
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
Loading…
Reference in New Issue
Block a user