com.sibvisions.rad.ui.qt.impl
Class QtImage

java.lang.Object
  extended by com.sibvisions.rad.ui.qt.impl.QtResource<QPixmap>
      extended by com.sibvisions.rad.ui.qt.impl.QtImage
All Implemented Interfaces:
IImage, IResource

public class QtImage
extends QtResource<QPixmap>
implements IImage

The QtImage represents graphical images.

See Also:
QPixmap

Field Summary
 
Fields inherited from class com.sibvisions.rad.ui.qt.impl.QtResource
resource
 
Constructor Summary
QtImage(QIcon pIcon)
          Creates an instance of QtImage based on a QIcon.
QtImage(QPixmap pImage)
          Creates an instance of QtImage based on a QPixmap.
 
Method Summary
 int getHeight()
          Determines the height of the image.
 int getWidth()
          Determines the width of the image.
 void saveAs(String pFileName)
          Saves the current image as file.
 
Methods inherited from class com.sibvisions.rad.ui.qt.impl.QtResource
equals, getResource, hashCode, toString
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface javax.rad.ui.IResource
getResource
 

Constructor Detail

QtImage

public QtImage(QPixmap pImage)
Creates an instance of QtImage based on a QPixmap.

Parameters:
pImage - QPixmap
See Also:
QPixmap

QtImage

public QtImage(QIcon pIcon)
Creates an instance of QtImage based on a QIcon.

Parameters:
pIcon - the icon
See Also:
QIcon
Method Detail

getWidth

public int getWidth()
Determines the width of the image. If the width is not yet known, this method returns -1.

Specified by:
getWidth in interface IImage
Returns:
the width of this image, or -1 if the width is not yet known.
See Also:
Image.getHeight(java.awt.image.ImageObserver)

getHeight

public int getHeight()
Determines the height of the image. If the height is not yet known, this method returns -1.

Specified by:
getHeight in interface IImage
Returns:
the height of this image, or -1 if the height is not yet known.
See Also:
Image.getWidth(java.awt.image.ImageObserver)

saveAs

public void saveAs(String pFileName)
            throws IOException
Saves the current image as file.

Specified by:
saveAs in interface IImage
Parameters:
pFileName - the filename
Throws:
IOException - if the image can not be saved


Copyright © 2009 SIB Visions GmbH. All Rights Reserved.