TwiceAsNice  2019-02-18
Public Member Functions | Private Member Functions | Private Attributes | List of all members
UILoaderWidget Class Reference

#include <UILoaderWidget.h>

Inheritance diagram for UILoaderWidget:
Inheritance graph
Collaboration diagram for UILoaderWidget:
Collaboration graph

Public Member Functions

void openUiWidgets (Nice::JointPtr source, Nice::JointPtr target, bool _recursive)
 Opens all UI/Class of a node. More...
 
 UILoaderWidget (Nice::JointPtr source, Nice::JointPtr connectTo, bool _recursive=false, QWidget *parent=0)
 
 UILoaderWidget (QString _path, QWidget *parent=0)
 
virtual ~UILoaderWidget ()
 
virtual void dragEnterEvent (QDragEnterEvent *event)
 
virtual void dropEvent (QDropEvent *event)
 
void setSessionData (Nice::JointPtr _j)
 
void getSessionData (Nice::JointPtr &_j)
 
void connect (Nice::JointPtr _j)
 
void openUiWidgets (Nice::JointPtr source, Nice::JointPtr target, bool _recursive)
 Opens all UI/Class of a node. More...
 
 UILoaderWidget (Nice::JointPtr source, Nice::JointPtr connectTo, bool _recursive=false, QWidget *parent=0)
 
 UILoaderWidget (QString _path, QWidget *parent=0)
 
virtual ~UILoaderWidget ()
 
virtual void dragEnterEvent (QDragEnterEvent *event)
 
virtual void dropEvent (QDropEvent *event)
 
void setSessionData (Nice::JointPtr _j)
 
void getSessionData (Nice::JointPtr &_j)
 
void connect (Nice::JointPtr _j)
 
void openUiWidgets (Nice::JointPtr source, Nice::JointPtr target, bool _recursive)
 Opens all UI/Class of a node. More...
 
 UILoaderWidget (Nice::JointPtr source, Nice::JointPtr connectTo, bool _recursive=false, QWidget *parent=0)
 
 UILoaderWidget (QString _path, QWidget *parent=0)
 
virtual ~UILoaderWidget ()
 
virtual void dragEnterEvent (QDragEnterEvent *event)
 
virtual void dropEvent (QDropEvent *event)
 
void setSessionData (Nice::JointPtr _j)
 
void getSessionData (Nice::JointPtr &_j)
 
void connect (Nice::JointPtr _j)
 

Private Member Functions

std::vector< Nice::BridgeItem * > getAllBridgeItemsRec (QObject *_obj)
 
void loadAllWidgetsRec (Nice::JointPtr _node, Ui::WidgetCollector *widgetCollector, bool _all=false)
 
void getAbsPath (QString &_path)
 
QWidget * loadUIWidget (QString _path)
 Loades a UI-File. More...
 
QWidget * loadUIWidget (Nice::PropertyPtr _p)
 
QWidget * addClassWidget (const QString &_name)
 Instatiate a class and returns the top widget of this class. More...
 
void addAllUIWidgets (Nice::JointPtr _node, bool _all=false)
 Process all subnodes and opens/instatiates all guis. More...
 
void connect (Nice::JointPtr _j, QWidget *_w)
 Connect a widgets sub objects (Elements of type BridgeItem) to the node. More...
 
std::vector< Nice::BridgeItem * > getAllBridgeItemsRec (QObject *_obj)
 
void loadAllWidgetsRec (Nice::JointPtr _node, Ui::WidgetCollector *widgetCollector, bool _all=false)
 
void getAbsPath (QString &_path)
 
QWidget * loadUIWidget (QString _path)
 Loades a UI-File. More...
 
QWidget * loadUIWidget (Nice::PropertyPtr _p)
 
QWidget * addClassWidget (const QString &_name)
 Instatiate a class and returns the top widget of this class. More...
 
void addAllUIWidgets (Nice::JointPtr _node, bool _all=false)
 Process all subnodes and opens/instatiates all guis. More...
 
void connect (Nice::JointPtr _j, QWidget *_w)
 Connect a widgets sub objects (Elements of type BridgeItem) to the node. More...
 
std::vector< Nice::BridgeItem * > getAllBridgeItemsRec (QObject *_obj)
 
void loadAllWidgetsRec (Nice::JointPtr _node, Ui::WidgetCollector *widgetCollector, bool _all=false)
 
void getAbsPath (QString &_path)
 
QWidget * loadUIWidget (QString _path)
 Loades a UI-File. More...
 
QWidget * loadUIWidget (Nice::PropertyPtr _p)
 
QWidget * addClassWidget (const QString &_name)
 Instatiate a class and returns the top widget of this class. More...
 
void addAllUIWidgets (Nice::JointPtr _node, bool _all=false)
 Process all subnodes and opens/instatiates all guis. More...
 
void connect (Nice::JointPtr _j, QWidget *_w)
 Connect a widgets sub objects (Elements of type BridgeItem) to the node. More...
 

Private Attributes

Nice::JointPtr m_source
 
Nice::JointPtr m_connectTo
 
bool m_recursive
 
QHBoxLayout * m_layout
 
QString m_path
 
Ui::WidgetCollectorm_widgetCollector
 
QFormBuilder * m_loader
 

Constructor & Destructor Documentation

◆ UILoaderWidget() [1/6]

UILoaderWidget::UILoaderWidget ( Nice::JointPtr  source,
Nice::JointPtr  connectTo,
bool  _recursive = false,
QWidget *  parent = 0 
)
Parameters

◆ UILoaderWidget() [2/6]

UILoaderWidget::UILoaderWidget ( QString  _path,
QWidget *  parent = 0 
)
Parameters

◆ ~UILoaderWidget() [1/3]

UILoaderWidget::~UILoaderWidget ( )
virtual
Parameters

◆ UILoaderWidget() [3/6]

UILoaderWidget::UILoaderWidget ( Nice::JointPtr  source,
Nice::JointPtr  connectTo,
bool  _recursive = false,
QWidget *  parent = 0 
)
Parameters

◆ UILoaderWidget() [4/6]

UILoaderWidget::UILoaderWidget ( QString  _path,
QWidget *  parent = 0 
)
Parameters

◆ ~UILoaderWidget() [2/3]

virtual UILoaderWidget::~UILoaderWidget ( )
virtual
Parameters

◆ UILoaderWidget() [5/6]

UILoaderWidget::UILoaderWidget ( Nice::JointPtr  source,
Nice::JointPtr  connectTo,
bool  _recursive = false,
QWidget *  parent = 0 
)
Parameters

◆ UILoaderWidget() [6/6]

UILoaderWidget::UILoaderWidget ( QString  _path,
QWidget *  parent = 0 
)
Parameters

◆ ~UILoaderWidget() [3/3]

virtual UILoaderWidget::~UILoaderWidget ( )
virtual
Parameters

Member Function Documentation

◆ addAllUIWidgets() [1/3]

void UILoaderWidget::addAllUIWidgets ( Nice::JointPtr  _node,
bool  _all = false 
)
private

Process all subnodes and opens/instatiates all guis.

If a gui is created it will be lautonatically connected to its node.

Parameters
_nodeNode to start open sub node guis from.
_allIf true all sub guis will be opened. Otherwise only until the fist level of sub guis.
Returns

◆ addAllUIWidgets() [2/3]

void UILoaderWidget::addAllUIWidgets ( Nice::JointPtr  _node,
bool  _all = false 
)
private

Process all subnodes and opens/instatiates all guis.

If a gui is created it will be lautonatically connected to its node.

Parameters
_nodeNode to start open sub node guis from.
_allIf true all sub guis will be opened. Otherwise only until the fist level of sub guis.
Returns

◆ addAllUIWidgets() [3/3]

void UILoaderWidget::addAllUIWidgets ( Nice::JointPtr  _node,
bool  _all = false 
)
private

Process all subnodes and opens/instatiates all guis.

If a gui is created it will be lautonatically connected to its node.

Parameters
_nodeNode to start open sub node guis from.
_allIf true all sub guis will be opened. Otherwise only until the fist level of sub guis.
Returns

◆ addClassWidget() [1/3]

QWidget* UILoaderWidget::addClassWidget ( const QString &  _name)
private

Instatiate a class and returns the top widget of this class.

Parameters
_nameName of the class to instatiate.
Returns
Top widget of the instatiated class.

◆ addClassWidget() [2/3]

QWidget* UILoaderWidget::addClassWidget ( const QString &  _name)
private

Instatiate a class and returns the top widget of this class.

Parameters
_nameName of the class to instatiate.
Returns
Top widget of the instatiated class.

◆ addClassWidget() [3/3]

QWidget * UILoaderWidget::addClassWidget ( const QString &  _name)
private

Instatiate a class and returns the top widget of this class.

Parameters
_nameName of the class to instatiate.
Returns
Top widget of the instatiated class.

◆ connect() [1/6]

void UILoaderWidget::connect ( Nice::JointPtr  _j,
QWidget *  _w 
)
private

Connect a widgets sub objects (Elements of type BridgeItem) to the node.

Parameters
_wWidget to connect.
_jNode to connect the widget to.
Returns
Connected widget.

◆ connect() [2/6]

void UILoaderWidget::connect ( Nice::JointPtr  _j,
QWidget *  _w 
)
private

Connect a widgets sub objects (Elements of type BridgeItem) to the node.

Parameters
_wWidget to connect.
_jNode to connect the widget to.
Returns
Connected widget.

◆ connect() [3/6]

void UILoaderWidget::connect ( Nice::JointPtr  _j,
QWidget *  _w 
)
private

Connect a widgets sub objects (Elements of type BridgeItem) to the node.

Parameters
_wWidget to connect.
_jNode to connect the widget to.
Returns
Connected widget.

◆ connect() [4/6]

void UILoaderWidget::connect ( Nice::JointPtr  _j)
Parameters

◆ connect() [5/6]

void UILoaderWidget::connect ( Nice::JointPtr  _j)
Parameters

◆ connect() [6/6]

void UILoaderWidget::connect ( Nice::JointPtr  _j)
Parameters

◆ dragEnterEvent() [1/3]

void UILoaderWidget::dragEnterEvent ( QDragEnterEvent *  event)
virtual
Parameters

◆ dragEnterEvent() [2/3]

virtual void UILoaderWidget::dragEnterEvent ( QDragEnterEvent *  event)
virtual
Parameters

◆ dragEnterEvent() [3/3]

virtual void UILoaderWidget::dragEnterEvent ( QDragEnterEvent *  event)
virtual
Parameters

◆ dropEvent() [1/3]

virtual void UILoaderWidget::dropEvent ( QDropEvent *  event)
virtual
Parameters

◆ dropEvent() [2/3]

void UILoaderWidget::dropEvent ( QDropEvent *  event)
virtual
Parameters

◆ dropEvent() [3/3]

virtual void UILoaderWidget::dropEvent ( QDropEvent *  event)
virtual
Parameters

◆ getAbsPath() [1/3]

void UILoaderWidget::getAbsPath ( QString &  _path)
private
Parameters

◆ getAbsPath() [2/3]

void UILoaderWidget::getAbsPath ( QString &  _path)
private
Parameters

◆ getAbsPath() [3/3]

void UILoaderWidget::getAbsPath ( QString &  _path)
private
Parameters

◆ getAllBridgeItemsRec() [1/3]

std::vector<Nice::BridgeItem*> UILoaderWidget::getAllBridgeItemsRec ( QObject *  _obj)
private
Parameters

◆ getAllBridgeItemsRec() [2/3]

std::vector< Nice::BridgeItem * > UILoaderWidget::getAllBridgeItemsRec ( QObject *  _obj)
private
Parameters

◆ getAllBridgeItemsRec() [3/3]

std::vector<Nice::BridgeItem*> UILoaderWidget::getAllBridgeItemsRec ( QObject *  _obj)
private
Parameters

◆ getSessionData() [1/3]

void UILoaderWidget::getSessionData ( Nice::JointPtr _j)
Parameters

◆ getSessionData() [2/3]

void UILoaderWidget::getSessionData ( Nice::JointPtr _j)
Parameters

◆ getSessionData() [3/3]

void UILoaderWidget::getSessionData ( Nice::JointPtr _j)
Parameters

◆ loadAllWidgetsRec() [1/3]

void UILoaderWidget::loadAllWidgetsRec ( Nice::JointPtr  _node,
Ui::WidgetCollector widgetCollector,
bool  _all = false 
)
private
Parameters

◆ loadAllWidgetsRec() [2/3]

void UILoaderWidget::loadAllWidgetsRec ( Nice::JointPtr  _node,
Ui::WidgetCollector widgetCollector,
bool  _all = false 
)
private
Parameters

◆ loadAllWidgetsRec() [3/3]

void UILoaderWidget::loadAllWidgetsRec ( Nice::JointPtr  _node,
Ui::WidgetCollector widgetCollector,
bool  _all = false 
)
private
Parameters

◆ loadUIWidget() [1/6]

QWidget * UILoaderWidget::loadUIWidget ( QString  _path)
private

Loades a UI-File.

Parameters
_pathFile to the UI-File.
Returns
Widget of the loaded UI-File.

◆ loadUIWidget() [2/6]

QWidget* UILoaderWidget::loadUIWidget ( QString  _path)
private

Loades a UI-File.

Parameters
_pathFile to the UI-File.
Returns
Widget of the loaded UI-File.

◆ loadUIWidget() [3/6]

QWidget* UILoaderWidget::loadUIWidget ( QString  _path)
private

Loades a UI-File.

Parameters
_pathFile to the UI-File.
Returns
Widget of the loaded UI-File.

◆ loadUIWidget() [4/6]

QWidget* UILoaderWidget::loadUIWidget ( Nice::PropertyPtr  _p)
private

◆ loadUIWidget() [5/6]

QWidget* UILoaderWidget::loadUIWidget ( Nice::PropertyPtr  _p)
private

◆ loadUIWidget() [6/6]

QWidget * UILoaderWidget::loadUIWidget ( Nice::PropertyPtr  _p)
private

◆ openUiWidgets() [1/3]

void UILoaderWidget::openUiWidgets ( Nice::JointPtr  source,
Nice::JointPtr  target,
bool  _recursive 
)

Opens all UI/Class of a node.

Three cases can happen. First, the source node has a "UI" attribute. In this case the UI-File which is defined in the UI attribute is loaded and connected to the target node. Second, the source node has a "CLASS" attribute. In this case the CLASS which is defined in the CLASS attribute is instatitated and connected to the target node. If no UI and no CLASS attribute is set, all sub nodes of source are analyzed and handeled like in the first or second case is described.

Parameters
sourceNode to open unterlaying guis from.
targetNode to connect unterlaying guis from.
_recursiveIf true all sub guis will be opened. If false only the first layer of guis will be opened.
Returns

◆ openUiWidgets() [2/3]

void UILoaderWidget::openUiWidgets ( Nice::JointPtr  source,
Nice::JointPtr  target,
bool  _recursive 
)

Opens all UI/Class of a node.

Three cases can happen. First, the source node has a "UI" attribute. In this case the UI-File which is defined in the UI attribute is loaded and connected to the target node. Second, the source node has a "CLASS" attribute. In this case the CLASS which is defined in the CLASS attribute is instatitated and connected to the target node. If no UI and no CLASS attribute is set, all sub nodes of source are analyzed and handeled like in the first or second case is described.

Parameters
sourceNode to open unterlaying guis from.
targetNode to connect unterlaying guis from.
_recursiveIf true all sub guis will be opened. If false only the first layer of guis will be opened.
Returns

◆ openUiWidgets() [3/3]

void UILoaderWidget::openUiWidgets ( Nice::JointPtr  source,
Nice::JointPtr  target,
bool  _recursive 
)

Opens all UI/Class of a node.

Three cases can happen. First, the source node has a "UI" attribute. In this case the UI-File which is defined in the UI attribute is loaded and connected to the target node. Second, the source node has a "CLASS" attribute. In this case the CLASS which is defined in the CLASS attribute is instatitated and connected to the target node. If no UI and no CLASS attribute is set, all sub nodes of source are analyzed and handeled like in the first or second case is described.

Parameters
sourceNode to open unterlaying guis from.
targetNode to connect unterlaying guis from.
_recursiveIf true all sub guis will be opened. If false only the first layer of guis will be opened.
Returns

◆ setSessionData() [1/3]

void UILoaderWidget::setSessionData ( Nice::JointPtr  _j)
Parameters

◆ setSessionData() [2/3]

void UILoaderWidget::setSessionData ( Nice::JointPtr  _j)
Parameters

◆ setSessionData() [3/3]

void UILoaderWidget::setSessionData ( Nice::JointPtr  _j)
Parameters

Member Data Documentation

◆ m_connectTo

Nice::JointPtr UILoaderWidget::m_connectTo
private

◆ m_layout

QHBoxLayout * UILoaderWidget::m_layout
private

◆ m_loader

QFormBuilder * UILoaderWidget::m_loader
private

◆ m_path

QString UILoaderWidget::m_path
private

◆ m_recursive

bool UILoaderWidget::m_recursive
private

◆ m_source

Nice::JointPtr UILoaderWidget::m_source
private

◆ m_widgetCollector

Ui::WidgetCollector * UILoaderWidget::m_widgetCollector
private

The documentation for this class was generated from the following files: