1 /*---------------------------------------------------------------------\
3 | __ __ ____ _____ ____ |
4 | \ \ / /_ _/ ___|_ _|___ \ |
5 | \ V / _` \___ \ | | __) | |
6 | | | (_| |___) || | / __/ |
7 | |_|\__,_|____/ |_| |_____| |
11 \----------------------------------------------------------------------/
15 Author: Stefan Hundhammer <sh@suse.de>
30 class YQImage : public QLabel, public YImage
38 * 'animated' indicates if 'imageFileName' is an animated image format
41 YQImage( YWidget * parent,
42 const string & imageFileName,
43 bool animated = false );
51 * Set and display a new image.
53 * Reimplemented from YImage.
55 virtual void setImage( const string & imageFileName, bool animated = false );
58 * Make the image fit into the available space.
60 * Reimplemented from YImage.
62 virtual void setAutoScale( bool autoScale = true );
65 * if false, the image will be displayed in gray
67 virtual void setEnabled( bool enabled );
70 * Preferred width of the widget.
72 * Reimplemented from YWidget.
74 virtual int preferredWidth();
77 * Preferred height of the widget.
79 * Reimplemented from YWidget.
81 virtual int preferredHeight();
84 * Set the new size of the widget.
86 * Reimplemented from YWidget.
88 virtual void setSize( int newWidth, int newHeight );