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

#include <DataConnWidget.h>

Public Member Functions

 DataConnWidget (MainDataGui *mainLib, lib_manager::LibManager *libManager, mars::data_broker::DataBrokerInterface *_dataBroker, mars::cfg_manager::CFGManagerInterface *_cfg, QWidget *parent=0)
 
 ~DataConnWidget ()
 
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 ()
 

Protected Slots

void slotConnectDataItems ()
 
void slotUnconnectDataItems ()
 
void slotSaveConfiguration (void)
 
void addDataPackage (const mars::data_broker::DataInfo &info, const mars::data_broker::DataPackage &dbPackage)
 
bool getCfgStringList (std::string configFile, std::string group, std::string param, std::vector< std::string > *list, int desSize)
 
void makeConnection (TreeItem *fromItem, TreeItem *toItem)
 
void removeConnection (TreeItem *toItem)
 
TreeItemgetEndTreeItem (const DataItemWrapper &wrapper)
 
void checkFromPendingItem (TreeItem *treeItem)
 
void checkToPendingItem (TreeItem *treeItem)
 
bool wrapperEqual (const DataItemWrapper *w1, const DataItemWrapper *w2)
 
std::string makeName (DataItemWrapper w)
 

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
 
mars::cfg_manager::CFGManagerInterfacecfg
 
QtProperty * showAllProperty
 
bool showAll
 
QMutex addMutex
 
QMutex listMutex
 
QMutex changeMutex
 
QListWidget * fromListWidget
 
QListWidget * toListWidget
 
QPushButton * connectButton
 
QPushButton * unconnectButton
 
QColor connectColor
 
std::map< std::string, TreeItemfromItems
 
std::map< std::string, TreeItemtoItems
 
std::vector< TreeItem * > endItems
 
std::vector< PendingConnectionpendingConnections
 
QTreeWidget * fromTreeWidget
 
QTreeWidget * toTreeWidget
 

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 87 of file DataConnWidget.h.

Constructor & Destructor Documentation

◆ DataConnWidget()

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

Definition at line 41 of file DataConnWidget.cpp.

◆ ~DataConnWidget()

mars::data_broker_gui::DataConnWidget::~DataConnWidget ( void  )

Definition at line 169 of file DataConnWidget.cpp.

Member Function Documentation

◆ addDataPackage

void mars::data_broker_gui::DataConnWidget::addDataPackage ( const mars::data_broker::DataInfo info,
const mars::data_broker::DataPackage dbPackage 
)
protectedslot

Definition at line 261 of file DataConnWidget.cpp.

◆ checkFromPendingItem

void mars::data_broker_gui::DataConnWidget::checkFromPendingItem ( TreeItem treeItem)
protectedslot

Definition at line 447 of file DataConnWidget.cpp.

◆ checkToPendingItem

void mars::data_broker_gui::DataConnWidget::checkToPendingItem ( TreeItem treeItem)
protectedslot

Definition at line 467 of file DataConnWidget.cpp.

◆ closeEvent()

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

Definition at line 488 of file DataConnWidget.cpp.

◆ getCfgStringList

bool mars::data_broker_gui::DataConnWidget::getCfgStringList ( std::string  configFile,
std::string  group,
std::string  param,
std::vector< std::string > *  list,
int  desSize 
)
protectedslot

Definition at line 376 of file DataConnWidget.cpp.

◆ getEndTreeItem

TreeItem * mars::data_broker_gui::DataConnWidget::getEndTreeItem ( const DataItemWrapper wrapper)
protectedslot

Definition at line 436 of file DataConnWidget.cpp.

◆ makeConnection

void mars::data_broker_gui::DataConnWidget::makeConnection ( TreeItem fromItem,
TreeItem toItem 
)
protectedslot

Definition at line 397 of file DataConnWidget.cpp.

◆ makeName

std::string mars::data_broker_gui::DataConnWidget::makeName ( DataItemWrapper  w)
inlineprotectedslot

Definition at line 153 of file DataConnWidget.h.

◆ receiveData()

void mars::data_broker_gui::DataConnWidget::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 245 of file DataConnWidget.cpp.

◆ removeConnection

void mars::data_broker_gui::DataConnWidget::removeConnection ( TreeItem toItem)
protectedslot

Definition at line 420 of file DataConnWidget.cpp.

◆ slotConnectDataItems

void mars::data_broker_gui::DataConnWidget::slotConnectDataItems ( )
protectedslot

Definition at line 349 of file DataConnWidget.cpp.

◆ slotSaveConfiguration

void mars::data_broker_gui::DataConnWidget::slotSaveConfiguration ( void  )
protectedslot

Definition at line 177 of file DataConnWidget.cpp.

◆ slotUnconnectDataItems

void mars::data_broker_gui::DataConnWidget::slotUnconnectDataItems ( )
protectedslot

Definition at line 363 of file DataConnWidget.cpp.

◆ wrapperEqual

bool mars::data_broker_gui::DataConnWidget::wrapperEqual ( const DataItemWrapper w1,
const DataItemWrapper w2 
)
inlineprotectedslot

Definition at line 145 of file DataConnWidget.h.

Member Data Documentation

◆ addMutex

QMutex mars::data_broker_gui::DataConnWidget::addMutex
private

Definition at line 113 of file DataConnWidget.h.

◆ cfg

mars::cfg_manager::CFGManagerInterface* mars::data_broker_gui::DataConnWidget::cfg
private

Definition at line 109 of file DataConnWidget.h.

◆ changeMutex

QMutex mars::data_broker_gui::DataConnWidget::changeMutex
private

Definition at line 115 of file DataConnWidget.h.

◆ connectButton

QPushButton* mars::data_broker_gui::DataConnWidget::connectButton
private

Definition at line 118 of file DataConnWidget.h.

◆ connectColor

QColor mars::data_broker_gui::DataConnWidget::connectColor
private

Definition at line 120 of file DataConnWidget.h.

◆ dataBroker

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

Definition at line 108 of file DataConnWidget.h.

◆ endItems

std::vector<TreeItem*> mars::data_broker_gui::DataConnWidget::endItems
private

Definition at line 124 of file DataConnWidget.h.

◆ fromItems

std::map<std::string, TreeItem> mars::data_broker_gui::DataConnWidget::fromItems
private

Definition at line 122 of file DataConnWidget.h.

◆ fromListWidget

QListWidget* mars::data_broker_gui::DataConnWidget::fromListWidget
private

Definition at line 116 of file DataConnWidget.h.

◆ fromTreeWidget

QTreeWidget* mars::data_broker_gui::DataConnWidget::fromTreeWidget
private

Definition at line 127 of file DataConnWidget.h.

◆ libManager

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

Definition at line 107 of file DataConnWidget.h.

◆ listMutex

QMutex mars::data_broker_gui::DataConnWidget::listMutex
private

Definition at line 114 of file DataConnWidget.h.

◆ mainLib

MainDataGui* mars::data_broker_gui::DataConnWidget::mainLib
private

Definition at line 106 of file DataConnWidget.h.

◆ pendingConnections

std::vector<PendingConnection> mars::data_broker_gui::DataConnWidget::pendingConnections
private

Definition at line 125 of file DataConnWidget.h.

◆ showAll

bool mars::data_broker_gui::DataConnWidget::showAll
private

Definition at line 112 of file DataConnWidget.h.

◆ showAllProperty

QtProperty* mars::data_broker_gui::DataConnWidget::showAllProperty
private

Definition at line 111 of file DataConnWidget.h.

◆ toItems

std::map<std::string, TreeItem> mars::data_broker_gui::DataConnWidget::toItems
private

Definition at line 123 of file DataConnWidget.h.

◆ toListWidget

QListWidget* mars::data_broker_gui::DataConnWidget::toListWidget
private

Definition at line 117 of file DataConnWidget.h.

◆ toTreeWidget

QTreeWidget* mars::data_broker_gui::DataConnWidget::toTreeWidget
private

Definition at line 128 of file DataConnWidget.h.

◆ unconnectButton

QPushButton* mars::data_broker_gui::DataConnWidget::unconnectButton
private

Definition at line 119 of file DataConnWidget.h.


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