Ticket #8357: screensaver.h

File screensaver.h, 818 bytes (added by Johnny Walker <johnnyjboss@…>, 10 years ago)

corrected tab stops and other misc. items

Line 
1#ifndef MYTH_SCREENSAVER_H
2#define MYTH_SCREENSAVER_H
3
4#include <QEvent>
5
6class ScreenSaverEvent : public QEvent
7{
8public:
9    enum ScreenSaverEventKind {ssetDisable, ssetRestore, ssetReset};
10
11    ScreenSaverEvent(ScreenSaverEventKind type) :
12        QEvent(kEventType), sset(type)
13    {
14    }
15
16    ScreenSaverEventKind getSSEventType()
17    {
18        return sset;
19    }
20
21    static Type kEventType;
22
23protected:
24    ScreenSaverEventKind sset;
25};
26
27class ScreenSaverControl
28{
29  public:
30    // creates one of the concrete subsclasses
31    static ScreenSaverControl* get(void);
32
33    ScreenSaverControl() { };
34    virtual ~ScreenSaverControl() { };
35
36    virtual void Disable(void) = 0;
37    virtual void Restore(void) = 0;
38    virtual void Reset(void) = 0;
39
40    virtual bool Asleep(void) = 0;
41};
42
43#endif // MYTH_SCREENSAVER_H