TwiceAsNice
2019-02-18
|
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>
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) |
TreeWidgetItem * | getItem (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) |
![]() | |
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::Joint * | getNode () const |
Get the connected Joint node. More... | |
Nice::Property * | getProperty () 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::Joint * | getNode () const |
Get the connected Joint node. More... | |
Nice::Property * | getProperty () 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::Joint * | getNode () const |
Get the connected Joint node. More... | |
Nice::Property * | getProperty () 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 | |
![]() | |
QGroupBox * | m_container |
bool | m_locked |
![]() | |
static std::map< CompletionState, QString > * | s_palette = 0 |
![]() | |
typedef QTreeWidget | WidgetType |
![]() | |
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... | |
![]() | |
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... | |
![]() | |
AbstractWidgetItem * | m_activeItem |
![]() | |
bool | m_inited |
CompletionState | m_state |
bool | m_autoSynch |
bool | m_isUserConfirmationNeeded |
Nice::Joint * | m_root |
Nice::Property * | m_prop |
WaveBreakerPtr | m_breaker |
bool | m_showLabels |
Nice::I64 | m_id |
QString | m_nodeName |
std::vector< Nice::PropertyPtr > | m_connectedProps |
An instance of this class provides a TreeWidget to display and edit data of an entire subtree of a connected Joint.
|
private |
TreeWidget::TreeWidget | ( | QWidget * | parent = 0 | ) |
Constructor.
parent | Parent widget |
|
virtual |
Destructor.
void TreeWidget::addConnection | ( | Nice::BridgeIceServicePrx | _proxy, |
const std::string & | _key, | ||
TreeWidgetItem * | _item = 0 |
||
) |
void TreeWidget::cleanUp | ( | ) |
Clean the table.
Items which are not connected to Properties any more will be removed.
void TreeWidget::connect | ( | const Nice::JointPtr | _a | ) |
Connects the TreeWidget to a Joint.
The subtree will be displayed in the tree.
_a | Joint to connect to. |
void TreeWidget::contextMenuEvent | ( | QContextMenuEvent * | event | ) |
void TreeWidget::cutItems | ( | ) |
void TreeWidget::dragEnterEvent | ( | QDragEnterEvent * | event | ) |
void TreeWidget::dragMoveEvent | ( | QDragMoveEvent * | event | ) |
void TreeWidget::dropEvent | ( | QDropEvent * | event | ) |
|
slot |
TreeWidgetItem * TreeWidget::getItem | ( | const QString & | _path | ) |
|
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.
_data | Reference to a Joint node. Below this node session data will be added by the internal widget. editor widget. |
Reimplemented from Nice::BridgeItem.
|
slot |
int TreeWidget::levels | ( | ) |
|
signal |
|
slot |
void TreeWidget::serviceChanged | ( | TreeWidgetItem * | _item, |
bool | _reachable | ||
) |
|
signal |
|
virtual |
Set the session data included in the subtree of the passed Joint.
The internal editor widget decides itselfe which data is relevant.
data | Reference to a Joint node. Below this node session data will be read by the internal widget. |
Reimplemented from Nice::BridgeItem.
|
slot |
void TreeWidget::showLevels | ( | int | _max | ) |
|
slot |
|
slot |
|
slot |
|
slot |
|
slot |
|
private |
|
private |
Mutex
|
readwrite |