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

An EditorWidget is a container widget in which a type specific display/editor can be included. To use this widget suimply instanciate it, call the createEditor function with the data type to display/edit and then connect a Property/Joint to it. All synchronisation and update is done internally. More...

#include <EditorWidget.h>

Inheritance diagram for EditorWidget:
Inheritance graph
Collaboration diagram for EditorWidget:
Collaboration graph

Public Member Functions

 EditorWidget (Nice::JointPtr _node, bool _locked, const std::string &_gui="Unset", QWidget *parent=0)
 Constructor. More...
 
virtual ~EditorWidget ()
 Destructor. More...
 
void createEditor (QWidget *_bi)
 Creates the internal editor widget for a specific data type E. More...
 
void connect (const Nice::JointPtr _a)
 Connect the internal editor widget to a Joint which has a Property of the same type. More...
 
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 displayChanged (const std::string &_name)
 

Private Member Functions

virtual void closeEvent (QCloseEvent *event)
 
void setSetButton ()
 

Private Attributes

QCheckBox * m_history
 
Nice::BridgeItemdataField
 
QHBoxLayout * m_layout
 
SetButtonm_set
 
Nice::JointPtr m_node
 
QWidget * m_widget
 

Friends

class Mdi
 
template<typename T >
class AbstractWidget
 
class AbstractWidgetItem
 
class TreeWidgetItem
 
class ::NiceInternal::ProfileLoadSquirrel
 

Detailed Description

An EditorWidget is a container widget in which a type specific display/editor can be included. To use this widget suimply instanciate it, call the createEditor function with the data type to display/edit and then connect a Property/Joint to it. All synchronisation and update is done internally.

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

Constructor & Destructor Documentation

◆ EditorWidget()

EditorWidget::EditorWidget ( Nice::JointPtr  _node,
bool  _locked,
const std::string &  _gui = "Unset",
QWidget *  parent = 0 
)

Constructor.

Parameters
parentParent widget

◆ ~EditorWidget()

EditorWidget::~EditorWidget ( )
virtual

Destructor.

Member Function Documentation

◆ closeEvent()

void EditorWidget::closeEvent ( QCloseEvent *  event)
privatevirtual
Parameters

◆ connect()

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

Connect the internal editor widget to a Joint which has a Property of the same type.

Parameters
_aJoint to connect.

◆ createEditor()

void EditorWidget::createEditor ( QWidget *  _bi)

Creates the internal editor widget for a specific data type E.

◆ displayChanged()

void EditorWidget::displayChanged ( const std::string &  _name)
Parameters

◆ getSessionData()

void EditorWidget::getSessionData ( Nice::JointPtr _data)

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.

◆ setSessionData()

void EditorWidget::setSessionData ( Nice::JointPtr  _data)

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

◆ setSetButton()

void EditorWidget::setSetButton ( )
private
Parameters

Friends And Related Function Documentation

◆ ::NiceInternal::ProfileLoadSquirrel

friend class ::NiceInternal::ProfileLoadSquirrel
friend

◆ AbstractWidget

template<typename T >
friend class AbstractWidget
friend

◆ AbstractWidgetItem

friend class AbstractWidgetItem
friend

◆ Mdi

friend class Mdi
friend

◆ TreeWidgetItem

friend class TreeWidgetItem
friend

Member Data Documentation

◆ dataField

Nice::BridgeItem* EditorWidget::dataField
private

◆ m_history

QCheckBox* EditorWidget::m_history
private

◆ m_layout

QHBoxLayout* EditorWidget::m_layout
private

◆ m_node

Nice::JointPtr EditorWidget::m_node
private

◆ m_set

SetButton* EditorWidget::m_set
private

Set/Revert Button. These Buttons are placed inside m_layout.

◆ m_widget

QWidget* EditorWidget::m_widget
private

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