- bool isEnableStretch = true;
- QList<ModuleBase_ModelWidget*>::const_iterator anIt = theWidgets.begin(), aLast =
- theWidgets.end();
- for (; anIt != aLast; anIt++) {
- connect(*anIt, SIGNAL(keyReleased(QKeyEvent*)), this, SIGNAL(keyReleased(QKeyEvent*)));
- connect(*anIt, SIGNAL(focusOutWidget(ModuleBase_ModelWidget*)),
- this, SLOT(activateNextWidget(ModuleBase_ModelWidget*)));
- connect(*anIt, SIGNAL(focusInWidget(ModuleBase_ModelWidget*)),
- this, SLOT(activateWidget(ModuleBase_ModelWidget*)));
-
- //ModuleBase_WidgetPoint2D* aPointWidget = dynamic_cast<ModuleBase_WidgetPoint2D*>(*anIt);
- //if (aPointWidget)
- // connect(aPointWidget, SIGNAL(storedPoint2D(ObjectPtr, const std::string&)), this,
- // SIGNAL(storedPoint2D(ObjectPtr, const std::string&)))
- //}
-
- if (!isEnableStretch) continue;
- foreach(QWidget* eachWidget, (*anIt)->getControls()) {
- QSizePolicy::Policy aVPolicy = eachWidget->sizePolicy().verticalPolicy();
- if(aVPolicy == QSizePolicy::Expanding ||
- aVPolicy == QSizePolicy::MinimumExpanding) {
- isEnableStretch = false;
- }
- }
+ foreach (ModuleBase_ModelWidget* aWidget, theWidgets) {
+ connect(aWidget, SIGNAL(focusInWidget(ModuleBase_ModelWidget*)),
+ this, SLOT(activateWidget(ModuleBase_ModelWidget*)));
+ connect(aWidget, SIGNAL(focusOutWidget(ModuleBase_ModelWidget*)),
+ this, SLOT(activateNextWidget(ModuleBase_ModelWidget*)));
+ connect(aWidget, SIGNAL(keyReleased(QKeyEvent*)),
+ this, SIGNAL(keyReleased(QKeyEvent*)));