Home · All Namespaces · All Classes · Grouped Classes · Modules · Functions |
The Setting class provides applications with a mechanism to add their own settings to a profile. More...
The Setting class provides applications with a mechanism to add their own settings to a profile.
Applications may integrate with the Qt Extended profiles by adding their own settings. Optionally, when the profile changes the application will be notified and instructed to apply the new settings.
Most profile editing applications (such as Ring Profiles in Qt Extended Phone) will use the Settings service to interactively acquire settings from applications to add in this way, but it is not necessary to do so.
Application settings are added to a profile through the QPhoneProfile::setApplicationSettings() or QPhoneProfile::setApplicationSetting() methods and read via the QPhoneProfile::applicationSetting() call.
See also QPhoneProfile.
Constructs a null application setting object.
Constructs an empty application setting object for application.
Constructs a copy of other.
Returns the application to which this setting object applies, or an empty string if this is a null settings object.
See also setApplicationName().
Returns the data portion of this setting.
See also setData().
Returns an optional visual description for this setting. Generally this is the visual name of the application.
See also setDescription().
Returns true if this setting is null; otherwise returns false. A null object is one that has an empty applicationName().
Returns true if the application will be notified when the profile changes; otherwise returns false.
Applications will be notified with a Settings::activateSettings(QString) message via QPE/Application/appname when they are to apply settings. appname is applicationName() and the parameter is data() portion of the setting.
If the profile changes to one where the application has not added a custom setting from one where the application has added a custom setting, a Settings::activateDefault() message will be sent.
Therefore applications should be listening to the Qt Extended application channels to handle these requests. For example, in the application:
SomeApplication::SomeApplication() { connect( qApp, SIGNAL(appMessage(QString,QByteArray)), this, SLOT(receive(QString,QByteArray)) ); ... } void SomeApplication::receive( const QString& message, const QByteArray& data ) { QDataStream stream( data ); if ( message == "Settings::activateSettings(QString)" ) { ... // parse and apply application settings data } else if ( message == "Settings::activateDefault()" ) { applyDefault(); // apply application default settings } }
See also setNotifyOnChange(), SettingsService, and QtopiaApplication::appMessage().
Sets the application name for this setting.
See also applicationName().
Set the setting data for this setting.
See also data().
Sets the setting description for this setting.
See also description().
Sets whether the application is notified on changes to the profile or not. If notifyOnChange is true applications are notified, otherwise they are not.
See also notifyOnChange().
Returns true if setting other is not equal to this setting; otherwise returns false.
Assigns other to this setting and returns a reference to this setting.
Returns true if setting other is equal to this setting; otherwise returns false.
Copyright © 2009 Trolltech | Trademarks | Qt Extended 4.4.3 |