|
SHAPER
9.15.0
|
A class for creation of widgets instances in for property panel using XML deskription of a feature. More...
Public Member Functions | |
| ModuleBase_WidgetFactory (const std::string &theXmlRepresentation, ModuleBase_IWorkshop *theWorkshop, const std::string theAttributePrefix="") | |
| Constructor. More... | |
| void | createWidget (ModuleBase_PageBase *thePage, bool alignToTop=true) |
| Creates content widget for property panel. More... | |
| void | createPanel (ModuleBase_PageBase *thePage, const FeaturePtr &theFeature) |
| Creates property panel content for the feature. More... | |
| void | createWidget (ModuleBase_PageBase *thePage, const std::string &theWidgetId) |
| Creates one widget for property panel for the widget with given index. More... | |
| QList< ModuleBase_ModelWidget * > | getModelWidgets () const |
| Returns list of model widgets. More... | |
| void | getAttributeTitle (const std::string &theAttributeId, std::string &theTitle) |
| Returns the value of the title key from XML definition of the attribute in the feature. More... | |
| void | getGreedAttribute (std::string &theAttributeId) |
| Returns the identifier of the first found attribute where greed field value is set and true. More... | |
| const Config_WidgetAPI * | widgetAPI () const |
| Returns widget API from XML. More... | |
Protected Member Functions | |
| bool | hasExpandingControls (QWidget *theParent) |
| check if ModuleBase_Widget has expandable widgets in getControls More... | |
| ModuleBase_PageBase * | createPageByType (const std::string &theType, QWidget *theParent) |
| Create page by its type. More... | |
| ModuleBase_ModelWidget * | createWidgetByType (const std::string &theType, QWidget *theParent=NULL) |
| Create widget by its type. More... | |
| void | moveToWidgetId (const std::string &theWidgetId, bool &theFound) |
| It updates internal config api to point in the structure to given id of widget The method is recusive and it stops when the found flag is true. More... | |
Static Protected Member Functions | |
| static QString | qs (const std::string &theStdString) |
| Convert STD string to QT string. More... | |
A class for creation of widgets instances in for property panel using XML deskription of a feature.
| ModuleBase_WidgetFactory::ModuleBase_WidgetFactory | ( | const std::string & | theXmlRepresentation, |
| ModuleBase_IWorkshop * | theWorkshop, | ||
| const std::string | theAttributePrefix = "" |
||
| ) |
Constructor.
| theXmlRepresentation | content of XML file |
| theWorkshop | reference to workshop instance |
| theAttributePrefix | prefix that must be added to the attribute name |
| void ModuleBase_WidgetFactory::createWidget | ( | ModuleBase_PageBase * | thePage, |
| bool | alignToTop = true |
||
| ) |
Creates content widget for property panel.
| thePage | a parent page |
| alignToTop | align to top flag (true by default) |
| void ModuleBase_WidgetFactory::createPanel | ( | ModuleBase_PageBase * | thePage, |
| const FeaturePtr & | theFeature | ||
| ) |
Creates property panel content for the feature.
| thePage | a parent page |
| theFeature | a feature to fill the panel |
| void ModuleBase_WidgetFactory::createWidget | ( | ModuleBase_PageBase * | thePage, |
| const std::string & | theWidgetId | ||
| ) |
Creates one widget for property panel for the widget with given index.
| thePage | a parent widget |
| theWidgetId | a widget index |
|
inline |
Returns list of model widgets.
| void ModuleBase_WidgetFactory::getAttributeTitle | ( | const std::string & | theAttributeId, |
| std::string & | theTitle | ||
| ) |
Returns the value of the title key from XML definition of the attribute in the feature.
| theAttributeId | a value of a kind of the attribute under the feature |
| theTitle | the result title |
| void ModuleBase_WidgetFactory::getGreedAttribute | ( | std::string & | theAttributeId | ) |
Returns the identifier of the first found attribute where greed field value is set and true.
| theAttributeId | an outpup parameter with attribute |
|
inline |
Returns widget API from XML.
|
protected |
check if ModuleBase_Widget has expandable widgets in getControls
|
protected |
Create page by its type.
| theType | a type |
| theParent | a parent widget |
|
protected |
Create widget by its type.
| theType | a type |
| theParent | a parent widget |
|
staticprotected |
Convert STD string to QT string.
| theStdString | is STD string |
|
protected |
It updates internal config api to point in the structure to given id of widget The method is recusive and it stops when the found flag is true.
| theWidgetId | a widget id key value |
| theFound | a flag about found windget and recursive search should be stopped |