LEDwidget.py

Go to the documentation of this file.
00001 #!/usr/bin/env python
00002 #
00003 #                               Copyright 2006
00004 #                                     by
00005 #                        The Board of Trustees of the
00006 #                     Leland Stanford Junior University.
00007 #                            All rights reserved.
00008 #
00009 #
00010 
00011 __facility__ = "Online"
00012 __abstract__ = "Classes for determining alarm states"
00013 __author__   = "J. Panetta <panetta@SLAC.Stanford.edu> SLAC - GLAST LAT I&T/Online"
00014 __date__     = "12/29/2005" # Created
00015 __updated__  = ("$Date: 2006/04/27 21:40:22 $").split(' ')[1]
00016 __version__  = "$Revision: 1.2 $"
00017 __release__  = "$Name: HEAD $"
00018 __credits__  = "SLAC"
00019 
00020 import LICOS.copyright_SLAC
00021 
00022 from qt import QPixmap
00023 
00024 green   = 0x00C000
00025 red     = 0xFF0000
00026 yellow  = 0xFFFF00
00027 white   = 0xFFFFFF
00028 black   = 0x000000
00029 blue    = 0x0000FF
00030 
00031 class LEDpixmap(QPixmap):
00032   def __init__(self, color):
00033     self.__xpm = [  
00034       "16 16 2 1",
00035       "r c #%06x" % color,
00036       ". c None",
00037       "..rrrrrrrrrrrr..",
00038       ".rrrrrrrrrrrrrr.",
00039       "rrrrrrrrrrrrrrrr",
00040       "rrrrrrrrrrrrrrrr",
00041       "rrrrrrrrrrrrrrrr",
00042       "rrrrrrrrrrrrrrrr",
00043       "rrrrrrrrrrrrrrrr",
00044       "rrrrrrrrrrrrrrrr",
00045       "rrrrrrrrrrrrrrrr",
00046       "rrrrrrrrrrrrrrrr",
00047       "rrrrrrrrrrrrrrrr",
00048       "rrrrrrrrrrrrrrrr",
00049       "rrrrrrrrrrrrrrrr",
00050       "rrrrrrrrrrrrrrrr",
00051       ".rrrrrrrrrrrrrr.",
00052       "..rrrrrrrrrrrr.."
00053       ]
00054     self.__color = color
00055     #print self.__xpm
00056     QPixmap.__init__(self, self.__xpm)
00057 
00058   def color(self):
00059     return self.__color
00060 

Generated on Thu Apr 27 20:52:42 2006 for LICOS L02-01-00 by doxygen 1.4.6-NO