Mantid
|
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>
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 > |
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.
|
private |
private constructor, since SelectionNotificationService is a singleton
Empty private constructor.
Definition at line 14 of file SelectionNotificationService.cpp.
|
overrideprivate |
private constructor, since SelectionNotificationService is a singleton
|
signal |
Referenced by 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.
lab_coords | Set true if qx, qy, and qz are in lab coordinates, instead of sample coordinates. |
qx | The x-component of the Mantid Q-vector. |
qy | The y-component of the Mantid Q-vector. |
qz | The z-component of the Mantid Q-vector. |
Definition at line 33 of file SelectionNotificationService.cpp.
References QPointSelection_signal().
|
friend |
Definition at line 43 of file SelectionNotificationService.h.