#include <berryAbstractSourceProvider.h>
An implementation of ISourceProvider
that provides listener support. Subclasses need only call fireSourceChanged
whenever appropriate.
Definition at line 32 of file berryAbstractSourceProvider.h.
◆ AddSourceProviderListener()
Adds a listener to this source provider. This listener will be notified whenever the corresponding source changes.
- Parameters
-
listener | The listener to add; must not be null . |
Implements berry::ISourceProvider.
◆ berryObjectMacro()
◆ FireSourceChanged() [1/2]
void berry::AbstractSourceProvider::FireSourceChanged |
( |
int |
sourcePriority, |
|
|
const QHash< QString, Object::ConstPointer > & |
sourceValuesByName |
|
) |
| |
|
protected |
Notifies all listeners that multiple sources have changed.
- Parameters
-
sourcePriority | The source priority that has changed. |
sourceValuesByName | The map of source names (String ) to source values (Object ) that have changed; must not be null . The names must not be null , but the values may be null . |
◆ FireSourceChanged() [2/2]
void berry::AbstractSourceProvider::FireSourceChanged |
( |
int |
sourcePriority, |
|
|
const QString & |
sourceName, |
|
|
Object::ConstPointer |
sourceValue |
|
) |
| |
|
protected |
Notifies all listeners that a single source has changed.
- Parameters
-
sourcePriority | The source priority that has changed. |
sourceName | The name of the source that has changed; must not be null . |
sourceValue | The new value for the source; may be null . |
◆ Initialize()
virtual void berry::AbstractSourceProvider::Initialize |
( |
IServiceLocator * |
locator | ) |
|
|
virtual |
This method is called when the source provider is instantiated by org.blueberry.ui.services
. Clients may override this method to perform initialization.
- Parameters
-
locator | The global service locator. It can be used to retrieve services like the IContextService |
◆ LogDebuggingInfo()
void berry::AbstractSourceProvider::LogDebuggingInfo |
( |
const QString & |
message | ) |
|
|
protected |
Logs a debugging message in an appropriate manner. If the message is null
or the DEBUG
is false
, then this method does nothing.
- Parameters
-
message | The debugging message to log; if null , then nothing is logged. |
◆ RemoveSourceProviderListener()
Removes a listener from this source provider. This listener will be notified whenever the corresponding source changes.
- Parameters
-
listener | The listener to remove; must not be null . |
Implements berry::ISourceProvider.
◆ DEBUG
bool berry::AbstractSourceProvider::DEBUG |
|
static |
Whether source providers should print out debugging information to the console when events arrive.
Definition at line 88 of file berryAbstractSourceProvider.h.
The documentation for this class was generated from the following file: