Skip to content

Commit

Permalink
Check if interfaces are aligned or not.
Browse files Browse the repository at this point in the history
Fixed fetch interface data.
  • Loading branch information
adeas31 committed Apr 7, 2016
1 parent 8f6676e commit fcbacb9
Show file tree
Hide file tree
Showing 9 changed files with 194 additions and 182 deletions.
27 changes: 8 additions & 19 deletions OMEdit/OMEditGUI/Component/Component.cpp
Expand Up @@ -1027,26 +1027,15 @@ void Component::renameComponentInConnections(QString newName)
}
}

void Component::addInterfacePoint(TLMInterfacePointInfo *pTLMInterfacePointInfo)
{
// Add the Interfacepoint to the list.
mInterfacePointsList.append(pTLMInterfacePointInfo);
}

void Component::removeInterfacePoint(TLMInterfacePointInfo *pTLMInterfacePointInfo)
{
// remove the Interfacepoint from the list.
mInterfacePointsList.removeOne(pTLMInterfacePointInfo);
}

void Component::renameInterfacePoint(TLMInterfacePointInfo *pTLMInterfacePointInfo, QString interfacePoint)
{
// Set the new Interfacepoint.
pTLMInterfacePointInfo->setInterfaceName(interfacePoint);
}

void Component::insertInterfacePoint(ComponentInfo *pComponentInfo)
/*!
* \brief Component::insertInterfacePoint
* Inserts a new interface point.
* \param interfaceName
*/
void Component::insertInterfacePoint(QString interfaceName)
{
ComponentInfo *pComponentInfo = new ComponentInfo;
pComponentInfo->setName(interfaceName);
mComponentsList.append(new Component(pComponentInfo, this));
}

Expand Down
8 changes: 1 addition & 7 deletions OMEdit/OMEditGUI/Component/Component.h
Expand Up @@ -59,7 +59,6 @@ class RectangleAnnotation;
class EllipseAnnotation;
class TextAnnotation;
class BitmapAnnotation;
class TLMInterfacePointInfo;

class ComponentInfo : public QObject
{
Expand Down Expand Up @@ -192,7 +191,6 @@ class Component : public QObject, public QGraphicsItem
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;}
QPointF getOldScenePosition() {return mOldScenePosition;}
void setOldPosition(QPointF oldPosition) {mOldPosition = oldPosition;}
Expand All @@ -219,10 +217,7 @@ class Component : public QObject, public QGraphicsItem
void shapeUpdated();
void shapeDeleted();
void renameComponentInConnections(QString newName);
void addInterfacePoint(TLMInterfacePointInfo *pTLMInterfacePointInfo);
void removeInterfacePoint(TLMInterfacePointInfo *pTLMInterfacePointInfo);
void renameInterfacePoint(TLMInterfacePointInfo *pTLMInterfacePointInfo, QString interfacePoint);
void insertInterfacePoint(ComponentInfo *pComponentInfo);
void insertInterfacePoint(QString interfaceName);

Transformation mTransformation;
Transformation mOldTransformation;
Expand Down Expand Up @@ -262,7 +257,6 @@ class Component : public QObject, public QGraphicsItem
QList<ShapeAnnotation*> mShapesList;
QList<Component*> mComponentsList;
QPointF mOldScenePosition;
QList<TLMInterfacePointInfo*> mInterfacePointsList;
QPointF mOldPosition;
void createNonExistingComponent();
void createDefaultComponent();
Expand Down
27 changes: 0 additions & 27 deletions OMEdit/OMEditGUI/Component/ComponentProperties.cpp
Expand Up @@ -1473,33 +1473,6 @@ void MetaModelSubModelAttributes::updateSubModelParameters()
accept();
}

TLMInterfacePointInfo::TLMInterfacePointInfo(QString name, QString className, QString interfaceName)
{
mName = name;
mClassName = className;
mInterfaceName = interfaceName;
}

QString TLMInterfacePointInfo::getName()
{
return mName;
}

QString TLMInterfacePointInfo::getClassName()
{
return mClassName;
}

QString TLMInterfacePointInfo::getInterfaceName()
{
return mInterfaceName;
}

void TLMInterfacePointInfo::setInterfaceName(QString interfacePoint)
{
mInterfaceName = interfacePoint;
}

/*!
\class MetaModelConnectionAttributes
\brief A dialog for displaying MetaModel Connection Attributes
Expand Down
16 changes: 0 additions & 16 deletions OMEdit/OMEditGUI/Component/ComponentProperties.h
Expand Up @@ -250,21 +250,6 @@ private slots:
void updateSubModelParameters();
};

class Component;
class TLMInterfacePointInfo
{
public:
TLMInterfacePointInfo(QString name, QString className, QString interfaceName);
QString getName();
QString getClassName();
QString getInterfaceName();
void setInterfaceName(QString interfaceName);
private:
QString mName;
QString mClassName;
QString mInterfaceName;
};

class LineAnnotation;
class MetaModelConnectionAttributes : public QDialog
{
Expand All @@ -278,7 +263,6 @@ class MetaModelConnectionAttributes : public QDialog
bool mEdit;
Label *mpHeading;
QFrame *mpHorizontalLine;
QList<TLMInterfacePointInfo*> mInterfacepointsList;
Label *mpFromLabel;
Label *mpConnectionStartLabel;
Label *mpToLabel;
Expand Down

0 comments on commit fcbacb9

Please sign in to comment.