Workspace 6.21.5
Public Member Functions | List of all members
StringSelectionUpdatedEvent Class Reference

Event raised when the selected item in a string list changes. More...

#include <Workspace/DataExecution/DataObjects/stringselectionevents.h>

Inheritance diagram for StringSelectionUpdatedEvent:
[legend]

Public Member Functions

int getSelectedIndex () const
 
const QString & getSelectedString () const
 
- Public Member Functions inherited from ObservableEventType< StringSelectionUpdatedEvent >
CSIRO_WORKSPACE_API const EventIDSingleton< CSIRO::DataExecution::AllObservableEvents > & eventID ()
 
CSIRO_WORKSPACE_API const EventIDSingleton< CSIRO::DataExecution::ProgressEvent > & eventID ()
 
const EventIDSingleton< StringSelectionUpdatedEvent > & getEventID () const override
 
- Public Member Functions inherited from ObservableEvent
virtual ~ObservableEvent ()=default
 
virtual const EventIDgetEventID () const =0
 

Additional Inherited Members

- Static Public Member Functions inherited from ObservableEventType< StringSelectionUpdatedEvent >
static const EventIDSingleton< StringSelectionUpdatedEvent > & eventID ()
 
- Protected Member Functions inherited from ObservableEventType< StringSelectionUpdatedEvent >
 ObservableEventType ()=default
 

Detailed Description

Notifications of this event is tightly controlled by the StringSelection class. This is necessary to ensure the requirements on the selected string and index are not violated.

Member Function Documentation

◆ getSelectedIndex()

int getSelectedIndex ( ) const
inline
Returns
The index of the string being selected. If this is negative, the list of strings is empty.

◆ getSelectedString()

const QString & getSelectedString ( ) const
inline
Returns
The string being selected. An empty string can indicate a valid entry or that there are no strings in the string list. Only getSelectedIndex() allows observers of this event to tell the difference.