1 // File: ModuleBase_ModelWidget.h
2 // Created: 25 Apr 2014
3 // Author: Natalia ERMOLAEVA
5 #include "ModuleBase_ModelWidget.h"
7 #include "Config_WidgetAPI.h"
11 ModuleBase_ModelWidget::ModuleBase_ModelWidget(QObject* theParent, const Config_WidgetAPI* theData)
14 myAttributeID = theData ? theData->widgetId() : "";
17 bool ModuleBase_ModelWidget::canFocusTo(const std::string& theAttributeName) const
19 return theAttributeName == attributeID();
22 void ModuleBase_ModelWidget::focusTo()
24 QList<QWidget*> aControls = getControls();
25 QList<QWidget*>::const_iterator anIt = aControls.begin(), aLast = aControls.end();
26 for (; anIt != aLast; anIt++) {
27 QWidget* aWidget = *anIt;
28 if (aWidget && aWidget->focusPolicy() != Qt::NoFocus) {
35 std::string ModuleBase_ModelWidget::attributeID() const