Main Page   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members   File Members  

visualization/SView.h

Go to the documentation of this file.
00001 /* #start# ***********************************************************
00002 
00003            Scheduling Simulator
00004         Lehrstuhl f"ur Effiziente Algorithmen
00005            Technische Universit"at M"unchen
00006 
00007  File    : $Id: SView.h,v 1.5 2003/01/08 18:57:15 meierb Exp $
00008 
00009  Purpose : a view is a part of the graphical representation which is
00010            contained in an independent QFrame. There are two ways in which this
00011      class can be used: 
00012      1. pure Qt-Views (contains only Qt-Widgets) useful if complicated
00013         graphics are not needed
00014      2. pure SViewEl-Containers ... mouse and paint-events are delegated
00015         to the dependent ViewEl(s). The view is responsible for
00016         setting up the graphical context, placing the view elements
00017         in a reasonable way and for interacting with the window
00018         system (event handling). CAUTION: Views must register themselves
00019         at the dependent ViewEl(s).
00020 
00021  RCS-Log:
00022  $Log: SView.h,v $
00023  Revision 1.5  2003/01/08 18:57:15  meierb
00024  added randomized release times
00025 
00026  Revision 1.1.1.1  2002/12/02 22:26:19  meierb
00027  my_schedule
00028 
00029  Revision 1.3  2002/11/11 16:19:36  taeubig
00030  changes in header inclusion
00031 
00032  Revision 1.2  2002/09/26 08:47:32  taeubig
00033  _pCanvas is now protected instead of private
00034 
00035  Revision 1.1  2002/08/29 12:59:59  taeubig
00036  Added the sources
00037 
00038  Revision 1.11  2000/08/21 23:04:28  hall
00039  more "intelligent" repaint (moved to SViewEl.cpp),
00040  fixes/workarounds for crazy bugs
00041 
00042  Revision 1.10  2000/01/16 18:43:05  kern
00043  java docs
00044 
00045  Revision 1.9  2000/01/12 09:27:46  kern
00046  added javadocs
00047 
00048  Revision 1.8  1999/12/01 09:48:33  kern
00049  design structure complete
00050 
00051  Revision 1.7  1999/11/29 12:59:12  schickin
00052  small bug removed, but ScheduleWin cannot be compiled yet
00053 
00054  Revision 1.6  1999/11/29 11:46:08  kern
00055  added design structure
00056 
00057 
00058  Revision 1.5  1999/11/19 16:11:14  hall
00059  changed SObserver::update( SEvent & ) to ...( const SEvent & )
00060 
00061  Revision 1.4  1999/11/16 10:06:20  kern
00062  added visualization
00063 
00064  Revision 1.3  1999/08/05 08:48:18  schickin
00065  purpose of important classes noted in the header-files
00066 
00067  Revision 1.2  1999/01/29 10:04:15  schickin
00068  Project-Headers added.
00069 
00070 
00071  * #end# ************************************************************* */
00072 
00073 #ifndef SVIEW_H
00074 #define SVIEW_H
00075 
00076 // system header files
00077 
00078 // project header files
00079 
00080 // QT header files
00081 #include <qframe.h>
00082 #include <qpixmap.h>
00083 
00084 class STaskSystem;
00085 class SViewEl;
00100 class SView : public QFrame {
00101   Q_OBJECT
00102 
00103 public:
00106   SView( QWidget* parent = 0, QString name = 0, WFlags f=0 ) 
00107     : QFrame( parent, name, f ), _pTaskSystem( NULL ), _pViewEl( NULL) {
00108     _pCanvas = new QPixmap( width(), height() );    
00109   };
00110   ~SView() { delete _pCanvas; };
00111 
00112   void setPViewEl(SViewEl *pViewEl) { _pViewEl = pViewEl; }
00121   virtual void repaint( QRect rect );
00126   void setTaskSystem( STaskSystem *ts );
00129   STaskSystem &getTaskSystem();
00130 
00131 protected:
00134   virtual void paintEvent( QPaintEvent* ev );
00135   QPixmap *_pCanvas;
00136 
00137 private:
00138   STaskSystem *_pTaskSystem;
00139   SViewEl *_pViewEl;
00144   int dummy1, dummy2, dummy3, dummy[20];
00145 };
00146 
00147 #endif //SVIEW_H

Generated on Thu May 22 16:48:09 2003 for Sketch-it! by doxygen1.2.18