screensaver/devicedialogplugins/snsrdevicedialogplugin/inc/snsrdevicedialog.h
changeset 86 e4f038c420f7
parent 69 87476091b3f5
equal deleted inserted replaced
81:7dd137878ff8 86:e4f038c420f7
    25 
    25 
    26 #include "screensaver.h"
    26 #include "screensaver.h"
    27 #include "snsrtest_global.h"
    27 #include "snsrtest_global.h"
    28 
    28 
    29 class Screensaver;
    29 class Screensaver;
    30 class SnsrUserActivityServiceInterface;
       
    31 class QGraphicsLinearLayout;
    30 class QGraphicsLinearLayout;
    32 class XQSettingsManager;
       
    33 class HbIndicatorInterface;
    31 class HbIndicatorInterface;
       
    32 class SnsrDeviceDialogDisplayControl;
       
    33 class QTimer;
    34 
    34 
    35 SCREENSAVER_TEST_CLASS(T_SnsrDeviceDialogPlugin)
    35 SCREENSAVER_TEST_CLASS(T_SnsrDeviceDialogPlugin)
    36 
    36 
    37 
    37 
    38 class SnsrDeviceDialog: public HbPopup, public HbDeviceDialogInterface
    38 class SnsrDeviceDialog: public HbPopup, public HbDeviceDialogInterface
    52         ViewTypeActive,
    52         ViewTypeActive,
    53         ViewTypeStandby
    53         ViewTypeStandby
    54     };
    54     };
    55     
    55     
    56     static const char *dataKeyUnlock;
    56     static const char *dataKeyUnlock;
    57     static const char *dataKeySwitchLights;
       
    58     static const char *dataKeySwitchLowPower;
       
    59 
    57 
    60 public: // methods
    58 public: // methods
    61 
    59 
    62     SnsrDeviceDialog(const QVariantMap &parameters, QGraphicsItem *parent = 0);
    60     SnsrDeviceDialog(const QVariantMap &parameters, QGraphicsItem *parent = 0);
    63     ~SnsrDeviceDialog();
    61     ~SnsrDeviceDialog();
    74 
    72 
    75 private slots:
    73 private slots:
    76 
    74 
    77     void changeView(QGraphicsWidget *widget);
    75     void changeView(QGraphicsWidget *widget);
    78     void screensaverFaulted();
    76     void screensaverFaulted();
    79     void changeLayout(Qt::Orientation);
    77     void handleOrientationChange(Qt::Orientation);
       
    78     void changeLayout();
       
    79     void updateDisplayMode();
       
    80     void updateDisplayModeDeferred();
    80     void requestUnlock();
    81     void requestUnlock();
    81     void requestScreenMode(Screensaver::ScreenPowerMode mode);
       
    82     // slots for signals emitted by HbIndicatorPluginManager
    82     // slots for signals emitted by HbIndicatorPluginManager
    83     void indicatorsActivated(const QList<HbIndicatorInterface*> &activatedIndicators);
    83     void indicatorsActivated(const QList<HbIndicatorInterface*> &activatedIndicators);
    84     void indicatorActivated(HbIndicatorInterface *activatedIndicator);
    84     void indicatorActivated(HbIndicatorInterface *activatedIndicator);
    85     void indicatorRemoved(HbIndicatorInterface *indicatorRemoved);
    85     void indicatorDeactivated(HbIndicatorInterface *deactivatedIndicator);
    86 
    86 
    87 private:
    87 private:
    88 
    88 
    89     void showEvent(QShowEvent *event);
    89     void showEvent(QShowEvent *event);
    90     void hideEvent(QHideEvent *event);
    90     void hideEvent(QHideEvent *event);
    91     void closeEvent(QCloseEvent *event);
    91     void closeEvent(QCloseEvent *event);
       
    92     bool event(QEvent *event);
    92 
    93 
    93 private:
    94 private:
    94 
    95 
    95     Screensaver *mScreensaver;
    96     Screensaver *mScreensaver;
    96     QGraphicsLinearLayout *mLayout;
    97     QGraphicsLinearLayout *mLayout;
    97     XQSettingsManager *m_setManager;
    98     SnsrDeviceDialogDisplayControl *mDisplayControl;
       
    99     QTimer *mDisplayModeTimer;
       
   100     bool mHasFocus;
    98     
   101     
    99     SCREENSAVER_TEST_FRIEND_CLASS(T_SnsrDeviceDialogPlugin)
   102     SCREENSAVER_TEST_FRIEND_CLASS(T_SnsrDeviceDialogPlugin)
   100 };
   103 };
   101 
   104 
   102 #endif // SNSRDEVICEDIALOG_H
   105 #endif // SNSRDEVICEDIALOG_H