ifaceItem->visible = b;
}
}
- resetInterfacesPosition();
+ resetInterfaceItemsPosition();
updateGeometry(InterfaceMove);
update();
getScene()->updateConnectionItemsShape();
ifaceItem->visible = b;
}
}
- resetInterfacesPosition();
+ resetInterfaceItemsPosition();
updateGeometry(InterfaceMove);
update();
getScene()->updateConnectionItemsShape();
nameHeight = fmId.height();
}
-void AbstractBoxItem::initInterfaces() {
+void AbstractBoxItem::initInterfaceItems() {
/* TO DO : creating all needed InterfaceItem, with by default, input at west and output at east */
int orientation = Parameters::West;
}
}
-InterfaceItem* AbstractBoxItem::searchInterfaceByName(QString name) {
+InterfaceItem* AbstractBoxItem::searchInterfaceItemByName(QString name) {
foreach(InterfaceItem *inter, interfaces){
if(inter->getName() == name)
return inter;
return NULL;
}
-InterfaceItem* AbstractBoxItem::searchInterfaceByRef(ConnectedInterface *ref) {
+InterfaceItem* AbstractBoxItem::searchInterfaceItemByRef(ConnectedInterface *ref) {
foreach(InterfaceItem *inter, interfaces){
if(inter->refInter == ref) {
return inter;
return NULL;
}
-void AbstractBoxItem::addInterface(InterfaceItem *i, bool resetPosition) {
+void AbstractBoxItem::addInterfaceItem(InterfaceItem *i, bool resetPosition) {
interfaces.append(i);
- if (resetPosition) resetInterfacesPosition();
+ if (resetPosition) resetInterfaceItemsPosition();
updateGeometry(InterfaceMove);
update();
}
-void AbstractBoxItem::removeInterface(InterfaceItem *i) {
+void AbstractBoxItem::removeInterfaceItem(InterfaceItem *i) {
// NB : removing from model is done in dispatcher
- interfaces.removeOne(i);
+ interfaces.removeAll(i);
delete i;
//resetInterfacesPosition();
}
-void AbstractBoxItem::resetInterfacesPosition() {
+void AbstractBoxItem::resetInterfaceItemsPosition() {
int nbNorth=0, nbSouth=0, nbEast=0, nbWest=0;
double cntNorth=1.0,cntSouth=1.0,cntEast=1.0,cntWest=1.0;
}
}
-void AbstractBoxItem::moveInterfaceTo(QPointF pos) {
+void AbstractBoxItem::moveInterfaceItemTo(QPointF pos) {
double positionRatio;
if(currentInterface->getOrientation() == Parameters::North || currentInterface->getOrientation() == Parameters::South){
if(pos.x() < 0){
return nb;
}
-void AbstractBoxItem::updateInterfacesAndConnections() {
+void AbstractBoxItem::updateInterfaceAndConnectionItems() {
// update all interfaces positions
foreach(InterfaceItem *item, interfaces){
boxHeight = y;
}
-InterfaceItem* AbstractBoxItem::getInterfaceFromCursor(qreal x, qreal y) {
+InterfaceItem* AbstractBoxItem::getInterfaceItemFromCursor(qreal x, qreal y) {
foreach(InterfaceItem* inter, interfaces) {
if(x > inter->boundingRect().x() && x < (inter->boundingRect().x() + inter->boundingRect().width())){