Skip to content

Commit

Permalink
Fixes #3158
Browse files Browse the repository at this point in the history
Fixed the Component Parameters window issues.
  • Loading branch information
adeas31 committed Oct 30, 2015
1 parent 7a4ef83 commit c993482
Show file tree
Hide file tree
Showing 10 changed files with 668 additions and 661 deletions.
522 changes: 297 additions & 225 deletions OMEdit/OMEditGUI/Component/Component.cpp

Large diffs are not rendered by default.

38 changes: 21 additions & 17 deletions OMEdit/OMEditGUI/Component/Component.h
Expand Up @@ -130,26 +130,13 @@ class Component : public QObject, public QGraphicsItem
Extend, /* Inherited Component. */
Port /* Port Component. */
};
Component(QString name, LibraryTreeItem *pLibraryTreeItem, QString transformation, QPointF position, ComponentInfo *pComponentInfo,
GraphicsView *pGraphicsView);
Component(QString name, LibraryTreeItem *pLibraryTreeItem, QString transformation, QPointF position, QStringList dialogAnnotation,
ComponentInfo *pComponentInfo, GraphicsView *pGraphicsView);
Component(Component *pComponent, GraphicsView *pGraphicsView, Component *pParent);
Component(Component *pComponent, GraphicsView *pGraphicsView);
bool isInheritedComponent() {return mIsInheritedComponent;}
QString getInheritedClassName();
void createNonExistingComponent();
void createDefaultComponent();
void createClassInheritedShapes();
void createClassShapes(LibraryTreeItem *pLibraryTreeItem);
void createClassInheritedComponents();
void createClassComponents(LibraryTreeItem *pLibraryTreeItem);
bool hasShapeAnnotation(Component *pComponent);
void createActions();
void createResizerItems();
void getResizerItemsPositions(qreal *x1, qreal *y1, qreal *x2, qreal *y2);
void showResizerItems();
void hideResizerItems();
void getScale(qreal *sx, qreal *sy);
void setOriginAndExtents();
QRectF boundingRect() const;
void paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget = 0);
LibraryTreeItem* getLibraryTreeItem() {return mpLibraryTreeItem;}
Expand All @@ -159,15 +146,17 @@ class Component : public QObject, public QGraphicsItem
Component* getRootParentComponent();
ComponentType getComponentType() {return mComponentType;}
QString getTransformationString() {return mTransformationString;}
void setDialogAnnotation(QStringList dialogAnnotation) {mDialogAnnotation = dialogAnnotation;}
QStringList getDialogAnnotation() {return mDialogAnnotation;}
OriginItem* getOriginItem() {return mpOriginItem;}
QAction* getParametersAction() {return mpParametersAction;}
QAction* getAttributesAction() {return mpAttributesAction;}
QAction* getViewClassAction() {return mpViewClassAction;}
QAction* getViewDocumentationAction() {return mpViewDocumentationAction;}
QAction* getTLMAttributesAction() {return mpTLMAttributesAction;}
ComponentInfo* getComponentInfo() {return mpComponentInfo;}
QList<Component*> getInheritanceList() {return mInheritanceList;}
QList<ShapeAnnotation*> getShapesList() {return mShapesList;}
QList<Component*> getInheritedComponentsList() {return mInheritedComponentsList;}
QList<Component*> getComponentsList() {return mComponentsList;}
QList<TLMInterfacePointInfo*> getInterfacepointsList() {return mInterfacePointsList;}
void setOldScenePosition(QPointF oldScenePosition) {mOldScenePosition = oldScenePosition;}
Expand Down Expand Up @@ -208,6 +197,7 @@ class Component : public QObject, public QGraphicsItem
bool mIsInheritedComponent;
ComponentType mComponentType;
QString mTransformationString;
QStringList mDialogAnnotation;
QGraphicsRectItem *mpResizerRectangle;
LineAnnotation *mpNonExistingComponentLine;
RectangleAnnotation *mpDefaultComponentRectangle;
Expand All @@ -230,14 +220,28 @@ class Component : public QObject, public QGraphicsItem
QPointF mPivotPoint;
qreal mXFactor;
qreal mYFactor;
QList<Component*> mInheritanceList;
QList<Component*> mInheritedComponentsList;
QList<ShapeAnnotation*> mShapesList;
QList<Component*> mComponentsList;
QPointF mOldScenePosition;
QList<TLMInterfacePointInfo*> mInterfacePointsList;
QPointF mOldPosition;
void createNonExistingComponent();
void createDefaultComponent();
void createClassInheritedShapes();
void createClassShapes(LibraryTreeItem *pLibraryTreeItem);
void createClassInheritedComponents();
void createClassComponents(LibraryTreeItem *pLibraryTreeItem, bool inherited);
void removeShapes();
void removeInheritedComponents();
void removeComponents();
void createActions();
void createResizerItems();
void getResizerItemsPositions(qreal *x1, qreal *y1, qreal *x2, qreal *y2);
void showResizerItems();
void hideResizerItems();
void getScale(qreal *sx, qreal *sy);
void setOriginAndExtents();
signals:
void added();
void transformChange();
Expand Down

0 comments on commit c993482

Please sign in to comment.