Mantid
Loading...
Searching...
No Matches
Signals | Public Member Functions | Private Member Functions | Friends | List of all members
MantidQt::API::SelectionNotificationServiceImpl Class Reference

Provides a simple loosely coupled mechanism for passing information about a selected point from several possible sources to several possible destinations. More...

#include <SelectionNotificationService.h>

Inheritance diagram for MantidQt::API::SelectionNotificationServiceImpl:

Signals

void QPointSelection_signal (bool, double, double, double)
 

Public Member Functions

void sendQPointSelection (bool lab_coords, double qx, double qy, double qz)
 Emit the QPointSelection_signal, callable from any thread. More...
 

Private Member Functions

 SelectionNotificationServiceImpl ()
 private constructor, since SelectionNotificationService is a singleton More...
 
 ~SelectionNotificationServiceImpl () override
 private constructor, since SelectionNotificationService is a singleton More...
 

Friends

struct Mantid::Kernel::CreateUsingNew< SelectionNotificationServiceImpl >
 

Detailed Description

Provides a simple loosely coupled mechanism for passing information about a selected point from several possible sources to several possible destinations.

Neither the sources, or the destinations need exist or have references to each other. Currently the only "message" supported is a QPointSelection message. To send the message, an object just needs to call the sendQPointSelection() method on the single Instance() of this class.

Definition at line 28 of file SelectionNotificationService.h.

Constructor & Destructor Documentation

◆ SelectionNotificationServiceImpl()

SelectionNotificationServiceImpl::SelectionNotificationServiceImpl ( )
private

private constructor, since SelectionNotificationService is a singleton

Empty private constructor.

Definition at line 14 of file SelectionNotificationService.cpp.

◆ ~SelectionNotificationServiceImpl()

MantidQt::API::SelectionNotificationServiceImpl::~SelectionNotificationServiceImpl ( )
overrideprivate

private constructor, since SelectionNotificationService is a singleton

Member Function Documentation

◆ QPointSelection_signal

void MantidQt::API::SelectionNotificationServiceImpl::QPointSelection_signal ( bool  ,
double  ,
double  ,
double   
)
signal

Referenced by sendQPointSelection().

◆ sendQPointSelection()

void SelectionNotificationServiceImpl::sendQPointSelection ( bool  lab_coords,
double  qx,
double  qy,
double  qz 
)

Emit the QPointSelection_signal, callable from any thread.

Empty private destructor.

Method to send out the QPointSelection signal to all objects that have connected a slot to this signal. A class just needs to call SelectionNotificationService::Instance().sendQPointSelection() with the required information. This method then emits the corresponding signal.

Parameters
lab_coordsSet true if qx, qy, and qz are in lab coordinates, instead of sample coordinates.
qxThe x-component of the Mantid Q-vector.
qyThe y-component of the Mantid Q-vector.
qzThe z-component of the Mantid Q-vector.

Definition at line 33 of file SelectionNotificationService.cpp.

References QPointSelection_signal().

Friends And Related Function Documentation

◆ Mantid::Kernel::CreateUsingNew< SelectionNotificationServiceImpl >

Definition at line 43 of file SelectionNotificationService.h.


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