]> icculus.org git repositories - duncan/yast2-qt4.git/blob - src/YQEBunny.cc
d3e30a9ce436448266037718770aa00cf8ceb34e
[duncan/yast2-qt4.git] / src / YQEBunny.cc
1 /*---------------------------------------------------------------------\
2 |                                                                      |
3 |                      __   __    ____ _____ ____                      |
4 |                      \ \ / /_ _/ ___|_   _|___ \                     |
5 |                       \ V / _` \___ \ | |   __) |                    |
6 |                        | | (_| |___) || |  / __/                     |
7 |                        |_|\__,_|____/ |_| |_____|                    |
8 |                                                                      |
9 |                               core system                            |
10 |                                                        (C) SuSE GmbH |
11 \----------------------------------------------------------------------/
12
13   File:       YQEBunny.cc
14
15   Authors:      Stefan Hundhammer <sh@suse.de>
16                 Juergen Weigert <jw@suse.de> 
17                 
18                 Rectangles! Rounded rectangles everywhere, ...
19                 A horror vision of the new CI.
20
21 /-*/
22
23
24 #define y2log_component "qt-easter-bunny"
25 #include <ycp/y2log.h>
26 #include <time.h>
27 #include <stdlib.h>
28 #include <unistd.h>
29
30 #include <qapplication.h>
31 #include <qdesktopwidget.h>
32
33 #include "YQEBunny.h"
34
35
36 void
37 YQEasterBunny::layEgg()
38 {
39 #if 0
40     const char * display = getenv( "DISPLAY" );
41
42     if ( ! display )
43     {
44         y2warning( "$DISPLAY not set - no easter egg" );
45         return;
46     }
47
48     if ( strcmp( display, ":0"   ) != 0 &&
49          strcmp( display, ":0.0" ) != 0   )
50     {
51         y2warning( "Not on system console - no easter egg" );
52         return;
53     }
54
55     QDesktopWidget * screen = QApplication::desktop();
56     int width  = screen->width();
57     int height = screen->height();
58     YFrameBuffer fb( width, height, screen->x11AppDepth() );
59
60     draw(&fb, width, height);
61 #else
62     y2warning( "Easter egg disabled" );
63 #endif
64 }
65
66
67 void
68 YQEasterBunny::draw(YFrameBuffer *fb, int sw, int sh)
69 {
70     // NOP
71 }