22 namespace swift::core::context
112 if (!m_registeredApplications.
contains(application))
114 m_registeredApplications.
push_back(application);
119 this->cleanupRegisteredApplications();
129 int r = m_registeredApplications.
remove(application);
130 this->cleanupRegisteredApplications();
134 void CContextApplication::cleanupRegisteredApplications()
145 return m_registeredApplications;
SWIFT_CORE_EXPORT swift::core::CApplication * sApp
Single instance of application object.
CInputManager * getInputManager() const
The input manager, if available.
ContextMode
How to handle a given context.
The class providing facades (the contexts) for all DBus relevant operations.
virtual void callHotkeyActionRemotely(const QString &action, bool argument, const swift::misc::CIdentifier &origin)
Call a hotkey action on a remote process.
virtual swift::misc::CStatusMessage loadSettings()
Load core settings from disk.
virtual void unregisterApplication(const swift::misc::CIdentifier &application)
Unregister application.
virtual swift::misc::CValueCachePacket getAllSettings() const
Get all settings currently in core settings cache.
virtual swift::misc::CStatusMessage saveSettings(const QString &keyPrefix={})
Save core settings to disk.
virtual swift::misc::CIdentifier getApplicationIdentifier() const
Identifier of application, remote side if distributed.
virtual swift::misc::CStatusMessage saveSettingsByKey(const QStringList &keys)
Save core settings to disk.
virtual void registerHotkeyActions(const QStringList &actions, const swift::misc::CIdentifier &origin)
Register hotkey action implemented by another process.
virtual void synchronizeLocalSettings()
Update local settings with settings from core.
virtual void changeSettings(const swift::misc::CValueCachePacket &settings, const swift::misc::CIdentifier &origin)
Ratify some settings changed by another process.
virtual QStringList getUnsavedSettingsKeys() const
Get keys of all unsaved settings currently in core settings cache.
virtual swift::misc::CIdentifierList getRegisteredApplications() const
All registered applications.
virtual swift::misc::CIdentifier registerApplication(const swift::misc::CIdentifier &application)
Register application, can also be used for ping.
virtual swift::core::context::CSettingsDictionary getUnsavedSettingsKeysDescribed() const
Get keys and descriptions of all unsaved settings currently in core settings cache.
Application context interface.
void remoteHotkeyAction(const QString &action, bool argument, const swift::misc::CIdentifier &origin)
Call a hotkey action on a remote process.
void registrationChanged()
A component changes.
void hotkeyActionsRegistered(const QStringList &actions, const swift::misc::CIdentifier &origin)
New action was registered.
void settingsChanged(const swift::misc::CValueCachePacket &settings, const swift::misc::CIdentifier &origin)
One or more settings were changed.
bool isDebugEnabled() const
Debug enabled?
iterator insert(const Key &key, const Value &value)
Insert new item with key and value.
Base class with a member CIdentifier to be inherited by a class which has an identity in the environm...
const CIdentifier & identifier() const
Get identifier.
Value object encapsulating information identifying a component of a modular distributed swift process...
bool hasApplicationProcessId() const
Check if originating from the same process id.
bool isFromLocalMachine() const
Check if originating from the same local machine.
Value object encapsulating a list of object identifiers.
static const QString & contextSlot()
Context slots.
Class for emitting a log message.
Derived & debug()
Set the severity to debug.
bool contains(const T &object) const
Return true if there is an element equal to given object. Uses the most efficient implementation avai...
void push_back(const T &value)
Appends an element at the end of the sequence.
int remove(const T &object)
Remove all elements equal to the given object, if it is contained.
CStatusMessage loadFromStore()
Load settings from disk.
static CSettingsCache * instance()
Return the singleton instance.
CStatusMessage saveToStore(const QString &keyPrefix={})
Save settings to disk.
Streamable status message, e.g.
swift::misc::CValueCachePacket getAllValuesWithTimestamps(const QString &keyPrefix={}) const
Return map containing all values in the cache, and timestamps when they were modified.
QStringList getAllUnsavedKeys(const QString &keyPrefix={}) const
Return keys of all values which have been changed but not saved.
Value class used for signalling changed values in the cache.
Free functions in swift::misc.