Main Page   Namespace List   Class Hierarchy   Alphabetical List   Data Structures   File List   Data Fields   Globals  

/cygdrive/d/Eigene Dateien/!DProcs/code_gen/QScreen.h

Go to the documentation of this file.
00001 // Class QScreen 
00002 // Filename QScreen.h 
00003 // FaPra 2003-2004, A5, Alexander Kramer
00004 
00005 #ifndef QScreen_h 
00006 #define QScreen_h 
00007 
00008 
00009 //! Pre-declaration of QScreen
00010 class QScreen;
00011 
00012 
00013 #include "QEvent.h"
00014 #include "QWidget.h"
00015 
00016 //! Screen which manages the windows
00017 class QScreen : public QWidget
00018 {
00019 protected:
00020 //! Widget List which will be removed before next event processing
00021 list<QWidget*> WidgetsToRemove;
00022 
00023 //! current focused widget
00024 QWidget* ScreenFocusedWidget;
00025 
00026 //! last event which was sent to windows or widgets
00027 QEvent* LastEvent;
00028 
00029 public:
00030 //! draws itself with OpenGL. Here is the OpenGL drawing code
00031 virtual void draw( QEvent*  e );
00032 
00033 //! layout the children widgets. This method is called every time the size is changed. Have to be overwritten for respond on size changes
00034 virtual void layout();
00035 
00036 //! have to return true if widget should be dragged with mouse. This method is overwritten in sub classes. If returns true, widget will be dragged
00037 virtual bool canDrag( QEvent*  e );
00038 
00039 //! processing mouse/keyboard events which are in widgets region. Mouse coordinates are relative to Owner
00040 virtual bool processEvent( QEvent*  e );
00041 
00042 //! processing mouse events which are in Owner widget region. Mouse coordinates are relative to Owner
00043 virtual bool processMouseOwner( QEvent*  e );
00044 
00045 //! called if a child is added/removed
00046 virtual void childrenChanged();
00047 
00048 //! defines whether control can have keyboard focus. Should return true if Widget wants to get keyboard focus
00049 virtual bool canFocus( QEvent*  e );
00050 
00051 //! initialization code
00052 virtual void Init();
00053 
00054 //! clean up code
00055 virtual void CleanUp();
00056 
00057 //! overwritten method which adds the widget to the list for freeing
00058 virtual void freeWidget( QWidget*  widget );
00059 
00060 //! removes a widget from the children
00061 virtual void remove( QWidget*  widget );
00062 
00063 //! sends current event
00064  void sendEvent();
00065 
00066 //! post request for redisplay
00067 virtual void redraw();
00068 
00069 //! method for handling glut resize function
00070 virtual void glutResize( int  width , int  height );
00071 
00072 //! method for handling glut keyboard down function
00073 virtual void glutKeyboard( unsigned  char  key , int  x , int  y );
00074 
00075 //! method for handling glut keyboard up function 
00076 virtual void glutKeyboardUp( unsigned  char  key , int  x , int  y );
00077 
00078 //! method for handling glut special key functions
00079 virtual void glutSpecialFunc( int  key , int  x , int  y );
00080 
00081 //! method for handling glut mouse motion function
00082 virtual void glutMotion( int  x , int  y );
00083 
00084 //! method for handling glut mouse button function
00085 virtual void glutMouse( int  button , int  state , int  x , int  y );
00086 
00087 //! method for handling glut display function
00088 virtual void glutDisplay();
00089 
00090 //! called if Sender wants to announce new focused control
00091 virtual void requestFocus( QWidget*  Sender , QWidget*  FocusedWidget );
00092 
00093 //! getter method for ScreenFocusedWidget
00094 virtual QWidget* getScreenFocusedWidget();
00095 
00096 //! setter method for ScreenFocusedWidget
00097 virtual void setScreenFocusedWidget( QWidget*  newValue );
00098 
00099 //! getter method for LastEvent
00100  QEvent* getLastEvent();
00101 
00102 //! prints itself to the cout
00103  void print();
00104 
00105 //! Constructor
00106   QScreen( QWidget*  aOwner );
00107 
00108 //! Destructor
00109 virtual  ~QScreen();
00110 
00111 
00112 };
00113 #endif
00114 

Generated on Thu Mar 18 18:33:48 2004 for miniQT by doxygen1.2.18