+int GroupInterface::getWidth() {
+
+ bool ok;
+ int w = -1;
+
+ QString expr = width;
+
+ if (type == Boolean) {
+ return 1;
+ }
+ else if (type == Inherited) {
+ // must search from which iface it is connected.
+ ConnectedInterface* fromIface = connectedFrom;
+ while ((fromIface != NULL) && (fromIface->getType() == Inherited)) {
+ fromIface = fromIface->getConnectedFrom();
+ }
+ if (fromIface == NULL) return -1;
+ w = fromIface->getWidth();
+ }
+ return w;
+}