Back to index

kdeartwork  4.3.2
demowin.h
Go to the documentation of this file.
00001 //-----------------------------------------------------------------------------
00002 //
00003 // Screen savers for KDE
00004 //
00005 // Copyright (c)  Martin R. Jones 1999
00006 //
00007 
00008 #ifndef __DEMOWIN_H__
00009 #define __DEMOWIN_H__
00010 
00011 #include <stdio.h>
00012 #include <stdlib.h>
00013 #include <klocale.h>
00014 #include <kconfig.h>
00015 #include <kstandarddirs.h>
00016 #include <kapplication.h>
00017 #include <QKeyEvent>
00018 #include <QWidget>
00019 
00020 //----------------------------------------------------------------------------
00021 
00022 class DemoWindow : public QWidget
00023 {
00024     Q_OBJECT
00025 public:
00026     DemoWindow() : QWidget()
00027     {
00028         setFixedSize(600, 420);
00029     }
00030 
00031 protected:
00032     virtual void keyPressEvent(QKeyEvent *e)
00033     {
00034         if (e->text() == "q")
00035         {
00036             kapp->quit();
00037         }
00038     }
00039 };
00040 
00041 #endif
00042