TwiceAsNice  2019-02-18
Classes | Public Slots | Signals | Public Member Functions | Properties | Private Types | Private Attributes | List of all members
TreeWidget Class Reference

An instance of this class provides a TreeWidget to display and edit data of an entire subtree of a connected Joint. More...

#include <TreeWidget.h>

Inheritance diagram for TreeWidget:
Inheritance graph
Collaboration diagram for TreeWidget:
Collaboration graph

Classes

struct  DisconnectMsg
 

Public Slots

void slot_rangerConnected (std::string _msg)
 
void slot_serviceLost (TreeWidgetItem *, bool)
 
void itemEdit ()
 
void showSingleLayerUI ()
 
void showAllLayerUI ()
 
void selectItems ()
 
void dumpNode ()
 
void slot_doubleClicked ()
 
void slot_showConnectMsg (const QString &_msg)
 

Signals

void serviceLost (TreeWidgetItem *_item, bool _reachable)
 
void rangerConnected (const QString &)
 

Public Member Functions

 TreeWidget (QWidget *parent=0)
 Constructor. More...
 
virtual ~TreeWidget ()
 Destructor. More...
 
void connect (const Nice::JointPtr _a)
 Connects the TreeWidget to a Joint. More...
 
void cutItems ()
 
void cleanUp ()
 Clean the table. More...
 
void dragEnterEvent (QDragEnterEvent *event)
 
void dragMoveEvent (QDragMoveEvent *event)
 
void dropEvent (QDropEvent *event)
 
void contextMenuEvent (QContextMenuEvent *event)
 
TreeWidgetItemgetItem (const QString &_path)
 
void addConnection (Nice::BridgeIceServicePrx _proxy, const std::string &_key, TreeWidgetItem *_item=0)
 
void getSessionData (Nice::JointPtr &_data)
 Get the session data af the internal data widget. More...
 
void setSessionData (Nice::JointPtr _data)
 Set the session data included in the subtree of the passed Joint. More...
 
void showLevels (int _max)
 
int levels ()
 
void serviceChanged (TreeWidgetItem *, bool _reachable)
 
- Public Member Functions inherited from Nice::BridgeItem
void detach (QWidget *_widget)
 
bool getSynchStatus () const
 Get the sync status. More...
 
const QString & getNodeName ()
 
virtual void setState (CompletionState _state)
 Set the state of the widget (either Nice::OK or Nice::Unsynched ). More...
 
virtual void updateGUI (const ::Nice::Any &)
 Update the widgets data field from the connected Property. More...
 
virtual void setLabels (std::vector< std::string > _vec)
 Set the Labels This function has to be implemented in the derived widget class. More...
 
void setLabel (const QString &_text="")
 Set the text label of this widget. More...
 
QString getLabel ()
 
template<typename E >
std::vector< E * > getBridgeItems ()
 Get all widgets which are connected to the same Property like this one. More...
 
virtual void setShowLabels (bool _show)
 Enables to Labels. More...
 
Nice::JointgetNode () const
 Get the connected Joint node. More...
 
Nice::PropertygetProperty () const
 Get the connected Property. More...
 
virtual void connect (const ::Nice::PropertyPtr _p)
 Connects the widget to a Joint or Property. More...
 
void applyReadOnlyActor ()
 
virtual void connect (const ::Nice::JointPtr _j)
 Connects the widget to a Joint or Property. More...
 
void applyBridge ()
 
QString getPropertyNode () const
 Get the path to the connected Joint. More...
 
virtual bool isReadOnly ()
 Checks if an attribute RO (read only) is set to true. More...
 
virtual void setPropertyNode (QString _nodeName)
 Set the relative path to the displayed Property from the connected Joint. More...
 
void setSynchStatus (bool _on)
 Set the current sync state. More...
 
void setUserConfirmationStatus (bool _on)
 
virtual void setLock (const bool &_locked)
 
void disconnect ()
 Disconnects the widget from the connected Joint or Property. More...
 
void detach (QWidget *_widget)
 
bool getSynchStatus () const
 Get the sync status. More...
 
const QString & getNodeName ()
 
virtual void setState (CompletionState _state)
 Set the state of the widget (either Nice::OK or Nice::Unsynched ). More...
 
virtual void updateGUI (const ::Nice::Any &)
 Update the widgets data field from the connected Property. More...
 
virtual void setLabels (std::vector< std::string > _vec)
 Set the Labels This function has to be implemented in the derived widget class. More...
 
void setLabel (const QString &_text="")
 Set the text label of this widget. More...
 
QString getLabel ()
 
template<typename E >
std::vector< E * > getBridgeItems ()
 Get all widgets which are connected to the same Property like this one. More...
 
virtual void setShowLabels (bool _show)
 Enables to Labels. More...
 
Nice::JointgetNode () const
 Get the connected Joint node. More...
 
Nice::PropertygetProperty () const
 Get the connected Property. More...
 
virtual void connect (const ::Nice::PropertyPtr _p)
 Connects the widget to a Joint or Property. More...
 
void applyReadOnlyActor ()
 
virtual void connect (const ::Nice::JointPtr _j)
 Connects the widget to a Joint or Property. More...
 
void applyBridge ()
 
QString getPropertyNode () const
 Get the path to the connected Joint. More...
 
virtual bool isReadOnly ()
 Checks if an attribute RO (read only) is set to true. More...
 
virtual void setPropertyNode (QString _nodeName)
 Set the relative path to the displayed Property from the connected Joint. More...
 
void setSynchStatus (bool _on)
 Set the current sync state. More...
 
void setUserConfirmationStatus (bool _on)
 
virtual void setLock (const bool &_locked)
 
void disconnect ()
 Disconnects the widget from the connected Joint or Property. More...
 
void detach (QWidget *_widget)
 
bool getSynchStatus () const
 Get the sync status. More...
 
const QString & getNodeName ()
 
virtual void setState (CompletionState _state)
 Set the state of the widget (either Nice::OK or Nice::Unsynched ). More...
 
virtual void updateGUI (const ::Nice::Any &)
 Update the widgets data field from the connected Property. More...
 
virtual void setLabels (std::vector< std::string > _vec)
 Set the Labels This function has to be implemented in the derived widget class. More...
 
void setLabel (const QString &_text="")
 Set the text label of this widget. More...
 
QString getLabel ()
 
template<typename E >
std::vector< E * > getBridgeItems ()
 Get all widgets which are connected to the same Property like this one. More...
 
virtual void setShowLabels (bool _show)
 Enables to Labels. More...
 
Nice::JointgetNode () const
 Get the connected Joint node. More...
 
Nice::PropertygetProperty () const
 Get the connected Property. More...
 
virtual void connect (const ::Nice::PropertyPtr _p)
 Connects the widget to a Joint or Property. More...
 
void applyReadOnlyActor ()
 
virtual void connect (const ::Nice::JointPtr _j)
 Connects the widget to a Joint or Property. More...
 
void applyBridge ()
 
QString getPropertyNode () const
 Get the path to the connected Joint. More...
 
virtual bool isReadOnly ()
 Checks if an attribute RO (read only) is set to true. More...
 
virtual void setPropertyNode (QString _nodeName)
 Set the relative path to the displayed Property from the connected Joint. More...
 
void setSynchStatus (bool _on)
 Set the current sync state. More...
 
void setUserConfirmationStatus (bool _on)
 
virtual void setLock (const bool &_locked)
 
void disconnect ()
 Disconnects the widget from the connected Joint or Property. More...
 

Properties

QString PropertyNode
 

Private Types

typedef AbstractWidget< QTreeWidget > BASEWIDGET
 

Private Attributes

Nice::Mutex m_mutex
 
QTreeWidgetItem * m_markedItem
 

Additional Inherited Members

- Public Attributes inherited from Nice::BridgeItem
QGroupBox * m_container
 
bool m_locked
 
- Static Public Attributes inherited from Nice::BridgeItem
static std::map< CompletionState, QString > * s_palette = 0
 
- Protected Types inherited from AbstractWidget< QTreeWidget >
typedef QTreeWidget WidgetType
 
- Protected Member Functions inherited from AbstractWidget< QTreeWidget >
virtual ~AbstractWidget ()
 Destructor. More...
 
void itemEdit (bool _rec=false)
 Opens the editor widgets of all selected items of the Table/TreeWidget. More...
 
void selectChildren (QTreeWidgetItem *_item)
 Select all subitems of an item. More...
 
void selectItems ()
 Selects items in all Table/TreeWidgets which also display one or more of the Properties of the current Widget. More...
 
 AbstractWidget (QWidget *parent=0)
 Constructor. More...
 
- Protected Member Functions inherited from Nice::BridgeItem
virtual void initSlots ()
 
template<typename E >
void set (const E &_value)
 Set the value from the derived widget to the Property. More...
 
void init (QWidget *_widget)
 Initialize the widget. More...
 
 BridgeItem ()
 Constructor. More...
 
virtual ~BridgeItem ()
 Destructor. More...
 
void setWidgetName ()
 
virtual void initAttributes ()
 virtual function is called after connecting to a property. More...
 
CompletionState getState ()
 Get the current state of the widget. More...
 
void resetGUI ()
 Update the widgets data field from the connected Property. More...
 
virtual int requestUserConfirmation ()
 
virtual void trySetFocus ()
 
void setBuffered (bool _buf)
 
virtual void set ()
 Slot is called when the date of the widget is changed. More...
 
virtual void updateProperty ()
 Set the gui value to the Property. More...
 
virtual void initSlots ()
 
template<typename E >
void set (const E &_value)
 Set the value from the derived widget to the Property. More...
 
void init (QWidget *_widget)
 Initialize the widget. More...
 
 BridgeItem ()
 Constructor. More...
 
virtual ~BridgeItem ()
 Destructor. More...
 
void setWidgetName ()
 
virtual void initAttributes ()
 virtual function is called after connecting to a property. More...
 
CompletionState getState ()
 Get the current state of the widget. More...
 
void resetGUI ()
 Update the widgets data field from the connected Property. More...
 
virtual int requestUserConfirmation ()
 
virtual void trySetFocus ()
 
void setBuffered (bool _buf)
 
virtual void set ()
 Slot is called when the date of the widget is changed. More...
 
virtual void updateProperty ()
 Set the gui value to the Property. More...
 
virtual void initSlots ()
 
template<typename E >
void set (const E &_value)
 Set the value from the derived widget to the Property. More...
 
void init (QWidget *_widget)
 Initialize the widget. More...
 
 BridgeItem ()
 Constructor. More...
 
virtual ~BridgeItem ()
 Destructor. More...
 
void setWidgetName ()
 
virtual void initAttributes ()
 virtual function is called after connecting to a property. More...
 
CompletionState getState ()
 Get the current state of the widget. More...
 
void resetGUI ()
 Update the widgets data field from the connected Property. More...
 
virtual int requestUserConfirmation ()
 
virtual void trySetFocus ()
 
void setBuffered (bool _buf)
 
virtual void set ()
 Slot is called when the date of the widget is changed. More...
 
virtual void updateProperty ()
 Set the gui value to the Property. More...
 
- Protected Attributes inherited from AbstractWidget< QTreeWidget >
AbstractWidgetItemm_activeItem
 
- Protected Attributes inherited from Nice::BridgeItem
bool m_inited
 
CompletionState m_state
 
bool m_autoSynch
 
bool m_isUserConfirmationNeeded
 
Nice::Jointm_root
 
Nice::Propertym_prop
 
WaveBreakerPtr m_breaker
 
bool m_showLabels
 
Nice::I64 m_id
 
QString m_nodeName
 
std::vector< Nice::PropertyPtrm_connectedProps
 

Detailed Description

An instance of this class provides a TreeWidget to display and edit data of an entire subtree of a connected Joint.

Author
Berwein
Version
Date
2012-08-10 11:05:00 AM

Member Typedef Documentation

◆ BASEWIDGET

typedef AbstractWidget< QTreeWidget> TreeWidget::BASEWIDGET
private

Constructor & Destructor Documentation

◆ TreeWidget()

TreeWidget::TreeWidget ( QWidget *  parent = 0)

Constructor.

Parameters
parentParent widget

◆ ~TreeWidget()

TreeWidget::~TreeWidget ( )
virtual

Destructor.

Member Function Documentation

◆ addConnection()

void TreeWidget::addConnection ( Nice::BridgeIceServicePrx  _proxy,
const std::string &  _key,
TreeWidgetItem _item = 0 
)
Parameters

◆ cleanUp()

void TreeWidget::cleanUp ( )

Clean the table.

Items which are not connected to Properties any more will be removed.

◆ connect()

void TreeWidget::connect ( const Nice::JointPtr  _a)

Connects the TreeWidget to a Joint.

The subtree will be displayed in the tree.

Parameters
_aJoint to connect to.

◆ contextMenuEvent()

void TreeWidget::contextMenuEvent ( QContextMenuEvent *  event)
Parameters

◆ cutItems()

void TreeWidget::cutItems ( )
Parameters

◆ dragEnterEvent()

void TreeWidget::dragEnterEvent ( QDragEnterEvent *  event)
Parameters

◆ dragMoveEvent()

void TreeWidget::dragMoveEvent ( QDragMoveEvent *  event)
Parameters

◆ dropEvent()

void TreeWidget::dropEvent ( QDropEvent *  event)
Parameters

◆ dumpNode

void TreeWidget::dumpNode ( )
slot
Parameters

◆ getItem()

TreeWidgetItem * TreeWidget::getItem ( const QString &  _path)
Parameters

◆ getSessionData()

void TreeWidget::getSessionData ( Nice::JointPtr _data)
virtual

Get the session data af the internal data widget.

The internal widget has to decide itselfe which relevant data has to be added to the session data.

Parameters
_dataReference to a Joint node. Below this node session data will be added by the internal widget. editor widget.

Reimplemented from Nice::BridgeItem.

◆ itemEdit

void TreeWidget::itemEdit ( )
slot
Parameters

◆ levels()

int TreeWidget::levels ( )
Parameters

◆ rangerConnected

void TreeWidget::rangerConnected ( const QString &  _t1)
signal

◆ selectItems

void TreeWidget::selectItems ( )
slot
Parameters

◆ serviceChanged()

void TreeWidget::serviceChanged ( TreeWidgetItem _item,
bool  _reachable 
)

◆ serviceLost

void TreeWidget::serviceLost ( TreeWidgetItem _item,
bool  _reachable 
)
signal

◆ setSessionData()

void TreeWidget::setSessionData ( Nice::JointPtr  _data)
virtual

Set the session data included in the subtree of the passed Joint.

The internal editor widget decides itselfe which data is relevant.

Parameters
dataReference to a Joint node. Below this node session data will be read by the internal widget.
Returns

Reimplemented from Nice::BridgeItem.

◆ showAllLayerUI

void TreeWidget::showAllLayerUI ( )
slot
Parameters

◆ showLevels()

void TreeWidget::showLevels ( int  _max)
Parameters

◆ showSingleLayerUI

void TreeWidget::showSingleLayerUI ( )
slot
Parameters

◆ slot_doubleClicked

void TreeWidget::slot_doubleClicked ( )
slot
Parameters

◆ slot_rangerConnected

void TreeWidget::slot_rangerConnected ( std::string  _msg)
slot

◆ slot_serviceLost

void TreeWidget::slot_serviceLost ( TreeWidgetItem _item,
bool  _reachable 
)
slot
Parameters

◆ slot_showConnectMsg

void TreeWidget::slot_showConnectMsg ( const QString &  _msg)
slot
Parameters

Member Data Documentation

◆ m_markedItem

QTreeWidgetItem* TreeWidget::m_markedItem
private

◆ m_mutex

Nice::Mutex TreeWidget::m_mutex
private

Mutex

Property Documentation

◆ PropertyNode

QString TreeWidget::PropertyNode
readwrite

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