Version: 8.3.0
gui.GraphViewer.ImageItem Class Reference
Inheritance diagram for gui.GraphViewer.ImageItem:
Collaboration diagram for gui.GraphViewer.ImageItem:

Public Member Functions

def __init__
 
def rtti
 
def hit
 
def drawShape
 

Public Attributes

 imageRTTI
 
 image
 
 pixmap
 
 pixel
 

Detailed Description

Definition at line 200 of file GraphViewer.py.

Constructor & Destructor Documentation

def gui.GraphViewer.ImageItem.__init__ (   self,
  img,
  canvas 
)

Definition at line 201 of file GraphViewer.py.

202  def __init__(self,img,canvas):
203  QCanvasRectangle.__init__(self,canvas)
205  self.imageRTTI=984376
206  self.image=img
207  self.pixmap=QPixmap()
208  self.setSize(self.image.width(), self.image.height())
209  self.pixmap.convertFromImage(self.image, Qt.OrderedAlphaDither);

Member Function Documentation

def gui.GraphViewer.ImageItem.drawShape (   self,
  p 
)

Definition at line 221 of file GraphViewer.py.

References gui.GraphViewer.ImageItem.pixmap, YACS::HMI::linkPoint.x, YACS::HMI::presentationtype_parser.x(), YACS::HMI::linkPoint.y, and YACS::HMI::presentationtype_parser.y().

222  def drawShape(self,p):
223  p.drawPixmap( self.x(), self.y(), self.pixmap )
def gui.GraphViewer.ImageItem.hit (   self,
  p 
)

Definition at line 213 of file GraphViewer.py.

References YACS::HMI::linkPoint.x, YACS::HMI::presentationtype_parser.x(), YACS::HMI::linkPoint.y, and YACS::HMI::presentationtype_parser.y().

214  def hit(self,p):
215  ix = p.x()-self.x()
216  iy = p.y()-self.y()
217  if not self.image.valid( ix , iy ):
218  return False
219  self.pixel = self.image.pixel( ix, iy )
220  return (qAlpha( self.pixel ) != 0)
def gui.GraphViewer.ImageItem.rtti (   self)

Definition at line 210 of file GraphViewer.py.

References gui.GraphViewer.ImageItem.imageRTTI.

211  def rtti(self):
212  return self.imageRTTI

Member Data Documentation

gui.GraphViewer.ImageItem.image

Definition at line 205 of file GraphViewer.py.

gui.GraphViewer.ImageItem.imageRTTI

Definition at line 204 of file GraphViewer.py.

Referenced by gui.GraphViewer.ImageItem.rtti().

gui.GraphViewer.ImageItem.pixel

Definition at line 218 of file GraphViewer.py.

gui.GraphViewer.ImageItem.pixmap

Definition at line 206 of file GraphViewer.py.

Referenced by gui.GraphViewer.ImageItem.drawShape().


The documentation for this class was generated from the following file: