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

visualization/SJobViewEl.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: SJobViewEl.h,v 1.4 2003/01/08 18:57:14 meierb Exp $
00008 
00009  Purpose : The SJobViewEl may be assigned to a job which is currently displayed
00010            (and can be observed).
00011      If there is no assigned job the default appearance is displayed.
00012 
00013      SJobViewEls main purpose is the painting, it shouldn't handle
00014      dragging, it might have a default popup-menu 
00015 
00016  RCS-Log:
00017  $Log: SJobViewEl.h,v $
00018  Revision 1.4  2003/01/08 18:57:14  meierb
00019  added randomized release times
00020 
00021  Revision 1.1.1.1  2002/12/02 22:26:19  meierb
00022  my_schedule
00023 
00024  Revision 1.2  2002/11/11 16:19:36  taeubig
00025  changes in header inclusion
00026 
00027  Revision 1.1  2002/08/29 12:59:59  taeubig
00028  Added the sources
00029 
00030  Revision 1.1  2000/02/22 11:58:46  hall
00031  new visulization model
00032 
00033 
00034  * #end# ************************************************************* */
00035 
00036 #ifndef SJOBVIEWEL_H
00037 #define SJOBVIEWEL_H
00038 
00039 // system header files
00040 
00041 // project header files
00042 #include "SViewEl.h"
00043 
00044 class SJobViewEl : public SViewEl {
00045 public:
00047   SJobViewEl(const SJobArray &jobArray, bool obsJob = false) : 
00048     _jobArray(jobArray), _obsJob(obsJob) {};
00049 
00051   SJobViewEl *clone();
00052 
00054   void assignJob(int idx = -1);
00055 
00058   void setFixedColor(const QColor &col) 
00059     { _isColFixed = true; _fixedCol = col; }; 
00060   void noFixedColor() { _isColFixed = false; };
00061 
00062 protected:
00063   bool isColFixed() { return _isColFixed; };
00064   const QColor &getFixedColor() { return _fixedCol; };
00065 private:
00066   const SJobArray &_jobArray;
00067   bool _obsJob;
00068 
00069   bool _jobAssigned;
00070   const SJob *_job;   // the current job
00071 
00072   bool _isColFixed;
00073   QColor _fixedCol;
00074 };
00075 
00076 
00077 #endif

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