14bf085c0b18698baad13e04db97f302cd5f7a38
[mafwsubrenderer] / MafwBlankingPreventer.h
1 /*
2  * This file is part of QMAFW
3  *
4  * Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). All rights
5  * reserved.
6  *
7  * Contact: Visa Smolander <visa.smolander@nokia.com>
8  *
9  * This software, including documentation, is protected by copyright controlled
10  * by Nokia Corporation. All rights are reserved. Copying, including
11  * reproducing, storing, adapting or translating, any or all of this material
12  * requires the prior written consent of Nokia Corporation. This material also
13  * contains confidential information which may not be disclosed to others
14  * without the prior written consent of Nokia.
15  *
16  */
17
18 #ifndef MAFW_BLANKING_PREVENTER_H
19 #define MAFW_BLANKING_PREVENTER_H
20
21 #include <QObject>
22 #include <QTimer>
23
24 namespace MeeGo
25 {
26     class QmDisplayState;
27 };
28
29 /**
30  * Helper class for preventing screen blanking.
31  */
32 class MafwBlankingPreventer : public QObject
33 {
34     Q_OBJECT
35
36 public:
37     MafwBlankingPreventer(QObject* parent);
38
39     /**
40       * Disable screen blanking.
41       */
42     void blankingProhibit();
43
44     /**
45       * Enable screen blanking.
46       */
47     void blankingAllow();
48
49 private Q_SLOTS:
50     void refresh();
51
52 private:
53     QTimer m_refreshTimer;
54     MeeGo::QmDisplayState *m_display;
55 };
56
57 #endif // MAFW_BLANKING_PREVENTER_H