Privacy
An open-source, flexible 3D physical simulation framework
mars::data_broker_gui::DataWidget Class Reference

#include <DataWidget.h>

Public Member Functions

 DataWidget (MainDataGui *mainLib, lib_manager::LibManager *libManager, mars::data_broker::DataBrokerInterface *_dataBroker, mars::cfg_manager::CFGManagerInterface *cfg, QWidget *parent=0)
 
 ~DataWidget ()
 
void addParam (const mars::data_broker::DataInfo _info)
 
virtual void valueChanged (QtProperty *property, const QVariant &value)
 Called every time a property has changed its value. More...
 
void receiveData (const mars::data_broker::DataInfo &info, const mars::data_broker::DataPackage &data_package, int callbackParam)
 The DataBroker will call this method to notify the receiver of whenever the condition for which the receiver registered occur. More...
 
- Public Member Functions inherited from mars::main_gui::BaseWidget
 BaseWidget (QWidget *parent, cfg_manager::CFGManagerInterface *_cfg, std::string _widgetName)
 
 ~BaseWidget ()
 
virtual void cfgUpdateProperty (cfg_manager::cfgPropertyStruct _property)
 
void setHiddenCloseState (bool v)
 
bool getHiddenCloseState ()
 
void show ()
 
void hide ()
 
bool isHidden ()
 
void saveState ()
 
const std::string & getName ()
 
- Public Member Functions inherited from mars::cfg_manager::CFGClient
 CFGClient ()
 
virtual ~CFGClient ()
 
virtual void cfgParamCreated (cfgParamId _id)
 
virtual void cfgParamRemoved (cfgParamId _id)
 
- Public Member Functions inherited from mars::data_broker::ReceiverInterface
 ReceiverInterface ()
 
virtual ~ReceiverInterface ()
 
- Public Member Functions inherited from mars::main_gui::PropertyCallback
virtual ~PropertyCallback ()
 Destructor. More...
 
virtual void topLevelItemChanged (QtProperty *current)
 Called every time another branch of a QtTreePropertyBrowser has been selected. More...
 
virtual void accept ()
 Associated with the OK button of the Property Dialog. More...
 
virtual void reject ()
 Associated with the Cancel button of the Property Dialog. More...
 

Public Attributes

main_gui::PropertyDialogpDialog
 

Protected Slots

void timerEvent (QTimerEvent *event)
 

Protected Member Functions

void closeEvent (QCloseEvent *event)
 
- Protected Member Functions inherited from mars::main_gui::BaseWidget
void changeEvent (QEvent *ev)
 
void cfgWindow (void)
 
void applyGeometry ()
 
void hideEvent (QHideEvent *event)
 
void closeEvent (QCloseEvent *event)
 

Private Attributes

MainDataGuimainLib
 
lib_manager::LibManagerlibManager
 
mars::data_broker::DataBrokerInterfacedataBroker
 
QtProperty * showAllProperty
 
bool showAll
 
QMutex addMutex
 
QMutex listMutex
 
QMutex changeMutex
 
set< unsigned long > changeList
 
map< unsigned long, paramWrapperaddList
 
map< unsigned long, paramWrapperparamList
 
map< QtVariantProperty *, paramWrapper * > guiToWrapper
 
bool ignore_change
 

Additional Inherited Members

- Signals inherited from mars::main_gui::BaseWidget
void hideSignal (void)
 
void closeSignal (void)
 
- Protected Attributes inherited from mars::main_gui::BaseWidget
cfg_manager::CFGManagerInterfacecfg
 
bool setWindowProp
 
bool hiddenState
 

Detailed Description

Definition at line 65 of file DataWidget.h.

Constructor & Destructor Documentation

◆ DataWidget()

mars::data_broker_gui::DataWidget::DataWidget ( MainDataGui mainLib,
lib_manager::LibManager libManager,
mars::data_broker::DataBrokerInterface _dataBroker,
mars::cfg_manager::CFGManagerInterface cfg,
QWidget *  parent = 0 
)

Definition at line 40 of file DataWidget.cpp.

◆ ~DataWidget()

mars::data_broker_gui::DataWidget::~DataWidget ( void  )

Definition at line 83 of file DataWidget.cpp.

Member Function Documentation

◆ addParam()

void mars::data_broker_gui::DataWidget::addParam ( const mars::data_broker::DataInfo  _info)

Definition at line 90 of file DataWidget.cpp.

◆ closeEvent()

void mars::data_broker_gui::DataWidget::closeEvent ( QCloseEvent *  event)
protected

Definition at line 376 of file DataWidget.cpp.

◆ receiveData()

void mars::data_broker_gui::DataWidget::receiveData ( const mars::data_broker::DataInfo info,
const mars::data_broker::DataPackage dataPackage,
int  callbackParam 
)
virtual

The DataBroker will call this method to notify the receiver of whenever the condition for which the receiver registered occur.

Parameters
infoInformation about the DataPackage.
dataPackageThe DataPackage containing all the data.
callbackParamThe int the receiver passed during registration. The default (the receiver didn't provide a callbackParam) is 0. This can be used to easily distinguish different registrations.

Implements mars::data_broker::ReceiverInterface.

Definition at line 100 of file DataWidget.cpp.

◆ timerEvent

void mars::data_broker_gui::DataWidget::timerEvent ( QTimerEvent *  event)
protectedslot

Definition at line 130 of file DataWidget.cpp.

◆ valueChanged()

void mars::data_broker_gui::DataWidget::valueChanged ( QtProperty *  property,
const QVariant &  value 
)
virtual

Called every time a property has changed its value.

Parameters
propertyThe property with a new value.
valueThe new value.

Reimplemented from mars::main_gui::PropertyCallback.

Definition at line 262 of file DataWidget.cpp.

Member Data Documentation

◆ addList

map<unsigned long, paramWrapper> mars::data_broker_gui::DataWidget::addList
private

Definition at line 101 of file DataWidget.h.

◆ addMutex

QMutex mars::data_broker_gui::DataWidget::addMutex
private

Definition at line 96 of file DataWidget.h.

◆ changeList

set<unsigned long> mars::data_broker_gui::DataWidget::changeList
private

Definition at line 100 of file DataWidget.h.

◆ changeMutex

QMutex mars::data_broker_gui::DataWidget::changeMutex
private

Definition at line 98 of file DataWidget.h.

◆ dataBroker

mars::data_broker::DataBrokerInterface* mars::data_broker_gui::DataWidget::dataBroker
private

Definition at line 93 of file DataWidget.h.

◆ guiToWrapper

map<QtVariantProperty*, paramWrapper*> mars::data_broker_gui::DataWidget::guiToWrapper
private

Definition at line 104 of file DataWidget.h.

◆ ignore_change

bool mars::data_broker_gui::DataWidget::ignore_change
private

Definition at line 105 of file DataWidget.h.

◆ libManager

lib_manager::LibManager* mars::data_broker_gui::DataWidget::libManager
private

Definition at line 92 of file DataWidget.h.

◆ listMutex

QMutex mars::data_broker_gui::DataWidget::listMutex
private

Definition at line 97 of file DataWidget.h.

◆ mainLib

MainDataGui* mars::data_broker_gui::DataWidget::mainLib
private

Definition at line 91 of file DataWidget.h.

◆ paramList

map<unsigned long, paramWrapper> mars::data_broker_gui::DataWidget::paramList
private

Definition at line 102 of file DataWidget.h.

◆ pDialog

main_gui::PropertyDialog* mars::data_broker_gui::DataWidget::pDialog

Definition at line 80 of file DataWidget.h.

◆ showAll

bool mars::data_broker_gui::DataWidget::showAll
private

Definition at line 95 of file DataWidget.h.

◆ showAllProperty

QtProperty* mars::data_broker_gui::DataWidget::showAllProperty
private

Definition at line 94 of file DataWidget.h.


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