src/hbcore/gui/hbdevicefadecontrolsym.cpp
changeset 34 ed14f46c0e55
parent 5 627c4a0fd0e7
equal deleted inserted replaced
31:7516d6d86cf5 34:ed14f46c0e55
    33 #include <QEvent>
    33 #include <QEvent>
    34 
    34 
    35 // There is only one fade control setter, all other applications are getters.
    35 // There is only one fade control setter, all other applications are getters.
    36 // Device dialog is the setter.
    36 // Device dialog is the setter.
    37 const TUid PropertyCategoryUid = {0x20022FC5};
    37 const TUid PropertyCategoryUid = {0x20022FC5};
    38 const TUint FadeKey = 'fade';
    38 const TUint FadeKey = 0x66616465; // 'fade';
    39 
    39 
    40 class HbDeviceFadeControlPrivate  : public CActive
    40 NONSHARABLE_CLASS(HbDeviceFadeControlPrivate)  : public CActive
    41 {
    41 {
    42 public:
    42 public:
    43     struct FadeControl {
    43     struct FadeControl {
    44         int fadeOff: 1; // command for application to unfade
    44         int fadeOff: 1; // command for application to unfade
    45         int spare: 31;
    45         int spare: 31;
   188     HbDeviceFadeControlPrivate::FadeControl control = {0, 0};
   188     HbDeviceFadeControlPrivate::FadeControl control = {0, 0};
   189     control.fadeOff = fadeOff;
   189     control.fadeOff = fadeOff;
   190     d->set(control);
   190     d->set(control);
   191 }
   191 }
   192 
   192 
   193 // Return if this fade controll is a setter. There is only one setter
   193 // Return if this fade control is a setter. There is only one setter
   194 // (device dialog server)in a device. All other instances are getters.
   194 // (device dialog server)in a device. All other instances are getters.
   195 bool HbDeviceFadeControl::isSetter()
   195 bool HbDeviceFadeControl::isSetter()
   196 {
   196 {
   197     HbDeviceFadeControlPrivate::create(this); // create private if not created
   197     HbDeviceFadeControlPrivate::create(this); // create private if not created
   198     return d->mIsSetter;
   198     return d->mIsSetter;