VR-Forces 4.3.1 Class Documentation
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
List of all members | Public Member Functions | Static Public Member Functions | Protected Types | Protected Member Functions | Protected Attributes
makVrv::DtDisplayConfigEditorLogic Class Reference

The DtDisplayConfigEditorLogic is the brains behind the display configuration editor. More...

Inheritance diagram for makVrv::DtDisplayConfigEditorLogic:
Inheritance graph
[legend]

Public Member Functions

 ~DtDisplayConfigEditorLogic ()
 Destructor.
virtual QStandardItemModel * displayTreeModel ()
 Get the item model.
void realizeNewDisplayEngineConfiguration (const std::string &clientName, const DtDisplayConfiguration &dec)
void destroyDisplayEngine (const std::string &displayName, bool realized)
 Destroys a display.
void modifyDisplayEngine (const std::string &displayName, bool isRealised, const DtDisplayConfiguration &config)
 /brief Change the values of the realized display configuration to the values in config.
void addWindow (const std::string &displayName, const DtWindowConfiguration &config, bool realized)
 Add a window to a display.
void destroyWindow (const std::string &displayName, const std::string &windowName, bool realized, DtWindowItem *windowItem)
 Destroys window in a display.
void modifyWindow (const std::string &displayName, const std::string &windowName, const DtWindowConfiguration &config, bool isRealized)
 /brief Change the values of the realized window configuration to the values in config.
void addChannel (const std::string &displayName, const std::string &windowName, const DtChannelConfiguration &config, bool isRealized)
 Add a channel to a window.
void destroyChannel (const std::string &displayName, const std::string &windowName, const std::string &channelName, bool realized)
 Destroys a channel in a window.
void modifyChannel (const std::string &displayName, const std::string &windowName, const std::string &channelName, const DtChannelConfiguration &config, bool realized)
 Modify a channel.
virtual void slot_activate (DtDe *de)
 Observer slots.
virtual void slot_deactivate (DtDe *de)
virtual void slot_activate (DtDeCommunicator *igComm)
virtual void slot_deactivate (DtDeCommunicator *igComm)
void onDisplayTreeSelectionChanged (const QModelIndex &index)
 Called by widget when selection changes.
void onDisplayTreeContextMenu (const QModelIndex &index, const QPoint &pos)
 Called by widget when right click occurs.
void onObserverCreationRequested (const std::string &observerName)
 Called by request to request new observer creation.
void getChannelList (QStringList &channelListOut)
 Get the list of available realized channels currently available.
void getObserverList (QStringList &observerListOut)
 Get the list of observers currently available.
void getSensorList (QStringList &sensorListOut)
 Get the list of sensors currently available.
virtual void slot_igAdded (const DtDeRecord &igName)
 Realized slots.
virtual void slot_igRemoved (const std::string &igName)
 Realized slots.
virtual void slot_displayConfigurationRealized (const std::string &igName, const std::string &displayConfig)
 Realized slots.
virtual void slot_displayToBeDestroyed (const std::string &displayName)
 Realized slots.
virtual void slot_windowAdded (const std::string &displayName, const DtWindowConfiguration &wc)
 Realized slots.
virtual void slot_windowToBeDestroyed (const std::string &displayName, const std::string &windowName)
 Realized slots.
virtual void slot_windowModified (const std::string &displayName, const std::string &windowName, const DtWindowConfiguration &wc)
 Realized slots.
virtual void slot_channelAdded (const std::string &displayName, const std::string &windowName, const DtChannelConfiguration &wc)
 Realized slots.
virtual void slot_channelToBeDestroyed (const std::string &displayName, const std::string &windowName, const std::string &channelName)
 Realized slots.
virtual void slot_channelModified (const std::string &displayName, const std::string &windowName, const std::string &channelName, const DtChannelConfiguration &cc)
 Realized slots.
void onDelete (const QModelIndex &index)
 Popup slots.
void onNewDisplayEngine (const QModelIndex &index)
 Popup slots.
void onNewWindow (const QModelIndex &index)
 Popup slots.
void onNewChannel (const QModelIndex &index)
 Popup slots.
void onDisconnectSlaveIg (const QModelIndex &index)
 Popup slots.
void onSaveDisplayConfig (const QModelIndex &index, std::string filename)
 Popup slots.
void onLoadDisplayConfig (const QModelIndex &index, std::string filename, QWidget *parent)
 Popup slots.
void onModifyConfiguration (const QModelIndex &index, const DtWindowConfiguration &config)
 Modify the configuration of the selected item with the data changed via the property editor.
void onModifyConfiguration (const QModelIndex &index, const DtDisplayConfiguration &config)
 Modify the configuration of the selected item with the data changed via the property editor.
void onModifyConfiguration (const QModelIndex &index, const DtChannelConfiguration &config)
 Modify the configuration of the selected item with the data changed via the property editor.

Static Public Member Functions

static DtDisplayConfigEditorLogiccreate (DtDe &de, DtDisplayConfigEditorInterface *iFace)
 Create and initialize the logic.

Protected Types

typedef std::map< QString,
QStandardItem * > 
ItemMap

Protected Member Functions

 DtDisplayConfigEditorLogic (DtDe &de, DtDisplayConfigEditorInterface *iFace)
 Constructor is protected because the static creator needs to call bind().
void populateDisplayConfigEditor ()
 Populate the display config editor with configs.
DtIgItemfindIgItem (const QModelIndex &index)
 Attempt to find the DtIgItem for an index.
DtDisplayEngineItemfindDisplayEngineItem (const QModelIndex &index)
 Attempt to get the DtDisplayItem from the item at a given index.
DtWindowItemfindWindowItem (const QModelIndex &index)
 Attempt to get the window item from the given index.
void addKeyItemPair (QString newKey, QStandardItem *item)
const DtDisplayConfigurationfindDisplayConfiguration (DtDisplayEngineItem *displayEngineItem)
const DtDisplayConfigurationfindDisplayConfiguration (const std::string &displayName)
QString makeIgKey (const std::string &igName)
QString makeDisplayEngineKey (const std::string &displayName)
QString makeWindowKey (const std::string &displayName, const std::string &windowName)
QString makeChannelKey (const std::string &displayName, const std::string &windowName, const std::string &channelName)
QString appendToKey (QString displayKey, const std::string &windowName)
DtDisplayConfiguration createNewDisplayEngineConfiguration ()
DtWindowConfiguration createNewWindowConfigurtion (const DtDisplayConfiguration &)
DtChannelConfiguration createNewChannel (const DtWindowConfiguration &)
QStandardItem * addIgItem (const std::string &igName, const std::string &displayName)
 Create a new de item.
QStandardItem * addDisplayEngineItem (QStandardItem *parent, const QString &parentKey, const DtDisplayConfiguration &dec)
 This does not actually create an item, but creates the items for its windows.
QStandardItem * addWindowItem (QStandardItem *parent, const QString &parentKey, const std::string &displayName, const DtWindowConfiguration &wc)
 Creates a new item, makes item a child of parent and makes all channels in the window configuration children of item.
QStandardItem * addChannelItem (QStandardItem *parent, const QString &parentKey, const std::string &displayName, const DtChannelConfiguration &cc)
 Creates a new item, makes item a child of parent.
void removeItemByKey (const QString &key)
 Removes QStandardItem associated with name from model.
void remapChildItems (QStandardItem *item, const QString &oldParentKey, const QString &newParentKey)
 Changes the keys of all child items so that they match their parent's key.
bool getDisplayEngineConfiguration (const std::string &displayName, bool isRealized, DtDisplayConfiguration &dcOut)
 Fills dcOut with a copy of the realized display configuration named displayName.
bool getWindowConfiguration (const std::string &displayName, const std::string &windowName, bool isRealized, DtWindowConfiguration &vcOut)
 Fills vcOut with a copy of the realized window configuration named windowName.
bool getChannelConfiguration (const std::string &displayName, const std::string &windowName, const std::string &channelName, bool realized, DtChannelConfiguration &ccOut)
 Fills ccOut with a copy of the realized channel configuration named channelName.
const std::string & displayEngineOwner (const std::string &displayName)
 Get the de name which owns the display.
int flagsFromSelection (const QModelIndex &index)
 Return the DisplayItemFlags based on the selected item.

Protected Attributes

DtDemyDe
DtDisplayConfigEditorInterfacemyInterface
QStandardItemModel * myDisplayTreeModel
ItemMap myItemMap

Detailed Description

The DtDisplayConfigEditorLogic is the brains behind the display configuration editor.

Causes display configurations to be realized on slaves. Modifies realized display configurations.

The logic controls a tree window in the widget. The tree window contains all the realized displays. Changes made to the property sheet on the widget make changes to proxies.

Member Typedef Documentation

typedef std::map<QString, QStandardItem*> makVrv::DtDisplayConfigEditorLogic::ItemMap
protected

Constructor & Destructor Documentation

makVrv::DtDisplayConfigEditorLogic::~DtDisplayConfigEditorLogic ( )

Destructor.

makVrv::DtDisplayConfigEditorLogic::DtDisplayConfigEditorLogic ( DtDe de,
DtDisplayConfigEditorInterface iFace 
)
protected

Constructor is protected because the static creator needs to call bind().

Member Function Documentation

static DtDisplayConfigEditorLogic* makVrv::DtDisplayConfigEditorLogic::create ( DtDe de,
DtDisplayConfigEditorInterface iFace 
)
static

Create and initialize the logic.

It calls bind() on the created logic.

virtual QStandardItemModel* makVrv::DtDisplayConfigEditorLogic::displayTreeModel ( )
virtual

Get the item model.

void makVrv::DtDisplayConfigEditorLogic::realizeNewDisplayEngineConfiguration ( const std::string &  clientName,
const DtDisplayConfiguration dec 
)
void makVrv::DtDisplayConfigEditorLogic::destroyDisplayEngine ( const std::string &  displayName,
bool  realized 
)

Destroys a display.

void makVrv::DtDisplayConfigEditorLogic::modifyDisplayEngine ( const std::string &  displayName,
bool  isRealised,
const DtDisplayConfiguration config 
)

/brief Change the values of the realized display configuration to the values in config.

void makVrv::DtDisplayConfigEditorLogic::addWindow ( const std::string &  displayName,
const DtWindowConfiguration config,
bool  realized 
)

Add a window to a display.

void makVrv::DtDisplayConfigEditorLogic::destroyWindow ( const std::string &  displayName,
const std::string &  windowName,
bool  realized,
DtWindowItem windowItem 
)

Destroys window in a display.

void makVrv::DtDisplayConfigEditorLogic::modifyWindow ( const std::string &  displayName,
const std::string &  windowName,
const DtWindowConfiguration config,
bool  isRealized 
)

/brief Change the values of the realized window configuration to the values in config.

void makVrv::DtDisplayConfigEditorLogic::addChannel ( const std::string &  displayName,
const std::string &  windowName,
const DtChannelConfiguration config,
bool  isRealized 
)

Add a channel to a window.

void makVrv::DtDisplayConfigEditorLogic::destroyChannel ( const std::string &  displayName,
const std::string &  windowName,
const std::string &  channelName,
bool  realized 
)

Destroys a channel in a window.

void makVrv::DtDisplayConfigEditorLogic::modifyChannel ( const std::string &  displayName,
const std::string &  windowName,
const std::string &  channelName,
const DtChannelConfiguration config,
bool  realized 
)

Modify a channel.

virtual void makVrv::DtDisplayConfigEditorLogic::slot_activate ( DtDe de)
virtual

Observer slots.

virtual void makVrv::DtDisplayConfigEditorLogic::slot_deactivate ( DtDe de)
virtual
virtual void makVrv::DtDisplayConfigEditorLogic::slot_activate ( DtDeCommunicator igComm)
virtual
virtual void makVrv::DtDisplayConfigEditorLogic::slot_deactivate ( DtDeCommunicator igComm)
virtual
virtual void makVrv::DtDisplayConfigEditorLogic::slot_igAdded ( const DtDeRecord igName)
virtual

Realized slots.

These are slots that get called whenever signals that effect realized displays, windows or channels are emitted.

virtual void makVrv::DtDisplayConfigEditorLogic::slot_igRemoved ( const std::string &  igName)
virtual

Realized slots.

These are slots that get called whenever signals that effect realized displays, windows or channels are emitted.

virtual void makVrv::DtDisplayConfigEditorLogic::slot_displayConfigurationRealized ( const std::string &  igName,
const std::string &  displayConfig 
)
virtual

Realized slots.

These are slots that get called whenever signals that effect realized displays, windows or channels are emitted.

virtual void makVrv::DtDisplayConfigEditorLogic::slot_displayToBeDestroyed ( const std::string &  displayName)
virtual

Realized slots.

These are slots that get called whenever signals that effect realized displays, windows or channels are emitted.

virtual void makVrv::DtDisplayConfigEditorLogic::slot_windowAdded ( const std::string &  displayName,
const DtWindowConfiguration wc 
)
virtual

Realized slots.

These are slots that get called whenever signals that effect realized displays, windows or channels are emitted.

virtual void makVrv::DtDisplayConfigEditorLogic::slot_windowToBeDestroyed ( const std::string &  displayName,
const std::string &  windowName 
)
virtual

Realized slots.

These are slots that get called whenever signals that effect realized displays, windows or channels are emitted.

virtual void makVrv::DtDisplayConfigEditorLogic::slot_windowModified ( const std::string &  displayName,
const std::string &  windowName,
const DtWindowConfiguration wc 
)
virtual

Realized slots.

These are slots that get called whenever signals that effect realized displays, windows or channels are emitted.

virtual void makVrv::DtDisplayConfigEditorLogic::slot_channelAdded ( const std::string &  displayName,
const std::string &  windowName,
const DtChannelConfiguration wc 
)
virtual

Realized slots.

These are slots that get called whenever signals that effect realized displays, windows or channels are emitted.

virtual void makVrv::DtDisplayConfigEditorLogic::slot_channelToBeDestroyed ( const std::string &  displayName,
const std::string &  windowName,
const std::string &  channelName 
)
virtual

Realized slots.

These are slots that get called whenever signals that effect realized displays, windows or channels are emitted.

virtual void makVrv::DtDisplayConfigEditorLogic::slot_channelModified ( const std::string &  displayName,
const std::string &  windowName,
const std::string &  channelName,
const DtChannelConfiguration cc 
)
virtual

Realized slots.

These are slots that get called whenever signals that effect realized displays, windows or channels are emitted.

void makVrv::DtDisplayConfigEditorLogic::onDisplayTreeSelectionChanged ( const QModelIndex &  index)

Called by widget when selection changes.

void makVrv::DtDisplayConfigEditorLogic::onDisplayTreeContextMenu ( const QModelIndex &  index,
const QPoint &  pos 
)

Called by widget when right click occurs.

void makVrv::DtDisplayConfigEditorLogic::onObserverCreationRequested ( const std::string &  observerName)

Called by request to request new observer creation.

void makVrv::DtDisplayConfigEditorLogic::onDelete ( const QModelIndex &  index)

Popup slots.

Called when a popup menu item is clicked.

void makVrv::DtDisplayConfigEditorLogic::onNewDisplayEngine ( const QModelIndex &  index)

Popup slots.

Called when a popup menu item is clicked.

void makVrv::DtDisplayConfigEditorLogic::onNewWindow ( const QModelIndex &  index)

Popup slots.

Called when a popup menu item is clicked.

void makVrv::DtDisplayConfigEditorLogic::onNewChannel ( const QModelIndex &  index)

Popup slots.

Called when a popup menu item is clicked.

void makVrv::DtDisplayConfigEditorLogic::onDisconnectSlaveIg ( const QModelIndex &  index)

Popup slots.

Called when a popup menu item is clicked.

void makVrv::DtDisplayConfigEditorLogic::onSaveDisplayConfig ( const QModelIndex &  index,
std::string  filename 
)

Popup slots.

Called when a popup menu item is clicked.

void makVrv::DtDisplayConfigEditorLogic::onLoadDisplayConfig ( const QModelIndex &  index,
std::string  filename,
QWidget parent 
)

Popup slots.

Called when a popup menu item is clicked.

void makVrv::DtDisplayConfigEditorLogic::onModifyConfiguration ( const QModelIndex &  index,
const DtWindowConfiguration config 
)

Modify the configuration of the selected item with the data changed via the property editor.

The proxy is used.

void makVrv::DtDisplayConfigEditorLogic::onModifyConfiguration ( const QModelIndex &  index,
const DtDisplayConfiguration config 
)

Modify the configuration of the selected item with the data changed via the property editor.

The proxy is used.

void makVrv::DtDisplayConfigEditorLogic::onModifyConfiguration ( const QModelIndex &  index,
const DtChannelConfiguration config 
)

Modify the configuration of the selected item with the data changed via the property editor.

The proxy is used.

void makVrv::DtDisplayConfigEditorLogic::getChannelList ( QStringList &  channelListOut)

Get the list of available realized channels currently available.

void makVrv::DtDisplayConfigEditorLogic::getObserverList ( QStringList &  observerListOut)

Get the list of observers currently available.

void makVrv::DtDisplayConfigEditorLogic::getSensorList ( QStringList &  sensorListOut)

Get the list of sensors currently available.

void makVrv::DtDisplayConfigEditorLogic::populateDisplayConfigEditor ( )
protected

Populate the display config editor with configs.

Non virtual since it's called by the CTOR.

DtIgItem* makVrv::DtDisplayConfigEditorLogic::findIgItem ( const QModelIndex &  index)
protected

Attempt to find the DtIgItem for an index.

DtDisplayEngineItem* makVrv::DtDisplayConfigEditorLogic::findDisplayEngineItem ( const QModelIndex &  index)
protected

Attempt to get the DtDisplayItem from the item at a given index.

DtWindowItem* makVrv::DtDisplayConfigEditorLogic::findWindowItem ( const QModelIndex &  index)
protected

Attempt to get the window item from the given index.

void makVrv::DtDisplayConfigEditorLogic::addKeyItemPair ( QString  newKey,
QStandardItem *  item 
)
protected
const DtDisplayConfiguration* makVrv::DtDisplayConfigEditorLogic::findDisplayConfiguration ( DtDisplayEngineItem displayEngineItem)
protected
const DtDisplayConfiguration* makVrv::DtDisplayConfigEditorLogic::findDisplayConfiguration ( const std::string &  displayName)
protected
QString makVrv::DtDisplayConfigEditorLogic::makeIgKey ( const std::string &  igName)
protected
QString makVrv::DtDisplayConfigEditorLogic::makeDisplayEngineKey ( const std::string &  displayName)
protected
QString makVrv::DtDisplayConfigEditorLogic::makeWindowKey ( const std::string &  displayName,
const std::string &  windowName 
)
protected
QString makVrv::DtDisplayConfigEditorLogic::makeChannelKey ( const std::string &  displayName,
const std::string &  windowName,
const std::string &  channelName 
)
protected
QString makVrv::DtDisplayConfigEditorLogic::appendToKey ( QString  displayKey,
const std::string &  windowName 
)
protected
DtDisplayConfiguration makVrv::DtDisplayConfigEditorLogic::createNewDisplayEngineConfiguration ( )
protected
DtWindowConfiguration makVrv::DtDisplayConfigEditorLogic::createNewWindowConfigurtion ( const DtDisplayConfiguration )
protected
DtChannelConfiguration makVrv::DtDisplayConfigEditorLogic::createNewChannel ( const DtWindowConfiguration )
protected
QStandardItem* makVrv::DtDisplayConfigEditorLogic::addIgItem ( const std::string &  igName,
const std::string &  displayName 
)
protected

Create a new de item.

QStandardItem* makVrv::DtDisplayConfigEditorLogic::addDisplayEngineItem ( QStandardItem *  parent,
const QString &  parentKey,
const DtDisplayConfiguration dec 
)
protected

This does not actually create an item, but creates the items for its windows.

QStandardItem* makVrv::DtDisplayConfigEditorLogic::addWindowItem ( QStandardItem *  parent,
const QString &  parentKey,
const std::string &  displayName,
const DtWindowConfiguration wc 
)
protected

Creates a new item, makes item a child of parent and makes all channels in the window configuration children of item.

QStandardItem* makVrv::DtDisplayConfigEditorLogic::addChannelItem ( QStandardItem *  parent,
const QString &  parentKey,
const std::string &  displayName,
const DtChannelConfiguration cc 
)
protected

Creates a new item, makes item a child of parent.

void makVrv::DtDisplayConfigEditorLogic::removeItemByKey ( const QString &  key)
protected

Removes QStandardItem associated with name from model.

Assumes there is only one item with that key in myItemMap. Removes all child keys items also.

void makVrv::DtDisplayConfigEditorLogic::remapChildItems ( QStandardItem *  item,
const QString &  oldParentKey,
const QString &  newParentKey 
)
protected

Changes the keys of all child items so that they match their parent's key.

bool makVrv::DtDisplayConfigEditorLogic::getDisplayEngineConfiguration ( const std::string &  displayName,
bool  isRealized,
DtDisplayConfiguration dcOut 
)
protected

Fills dcOut with a copy of the realized display configuration named displayName.

bool makVrv::DtDisplayConfigEditorLogic::getWindowConfiguration ( const std::string &  displayName,
const std::string &  windowName,
bool  isRealized,
DtWindowConfiguration vcOut 
)
protected

Fills vcOut with a copy of the realized window configuration named windowName.

bool makVrv::DtDisplayConfigEditorLogic::getChannelConfiguration ( const std::string &  displayName,
const std::string &  windowName,
const std::string &  channelName,
bool  realized,
DtChannelConfiguration ccOut 
)
protected

Fills ccOut with a copy of the realized channel configuration named channelName.

const std::string& makVrv::DtDisplayConfigEditorLogic::displayEngineOwner ( const std::string &  displayName)
protected

Get the de name which owns the display.

int makVrv::DtDisplayConfigEditorLogic::flagsFromSelection ( const QModelIndex &  index)
protected

Return the DisplayItemFlags based on the selected item.

This determines what buttons on the widget are enabled and which items on the popup are enabled.

Member Data Documentation

DtDe& makVrv::DtDisplayConfigEditorLogic::myDe
protected
DtDisplayConfigEditorInterface* makVrv::DtDisplayConfigEditorLogic::myInterface
protected
QStandardItemModel* makVrv::DtDisplayConfigEditorLogic::myDisplayTreeModel
protected
ItemMap makVrv::DtDisplayConfigEditorLogic::myItemMap
protected

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

Document ID: Generated on Wed Jul 29 00:55:00 EDT 2015 from SVN revision 155257
Copyright © 2005-2015 VT MÄK. All Rights Reserved (www.mak.com)