]> icculus.org git repositories - duncan/yast2-qt4.git/blob - src/YQImage.h
unhide some virtual overloads - fixing Huha's only complaint :)
[duncan/yast2-qt4.git] / src / YQImage.h
1 /*---------------------------------------------------------------------\
2 |                                                                      |
3 |                      __   __    ____ _____ ____                      |
4 |                      \ \ / /_ _/ ___|_   _|___ \                     |
5 |                       \ V / _` \___ \ | |   __) |                    |
6 |                        | | (_| |___) || |  / __/                     |
7 |                        |_|\__,_|____/ |_| |_____|                    |
8 |                                                                      |
9 |                               core system                            |
10 |                                                        (C) SuSE GmbH |
11 \----------------------------------------------------------------------/
12
13   File:       YQImage.h
14
15   Author:     Stefan Hundhammer <sh@suse.de>
16
17 /-*/
18
19
20 #ifndef YQImage_h
21 #define YQImage_h
22
23 #include <qlabel.h>
24 #include <qmovie.h>
25
26 #include "YImage.h"
27 #include "YUI.h"
28
29
30 class YQImage : public QLabel, public YImage
31 {
32     Q_OBJECT
33
34 public:
35     /**
36      * Constructor.
37      *
38      * 'animated' indicates if 'imageFileName' is an animated image format
39      * (e.g., MNG).
40      **/
41     YQImage( YWidget *          parent,
42              const string &     imageFileName,
43              bool               animated = false );
44
45     /**
46      * Destructor.
47      **/
48     virtual ~YQImage();
49
50     /**
51      * Set and display a new image.
52      *
53      * Reimplemented from YImage.
54      **/
55     virtual void setImage( const string & imageFileName, bool animated = false );
56     
57     /**
58      * Make the image fit into the available space.
59      *
60      * Reimplemented from YImage.
61      **/
62     virtual void setAutoScale( bool autoScale = true );
63
64     /**
65      * Preferred width of the widget.
66      *
67      * Reimplemented from YWidget.
68      **/
69     virtual int preferredWidth();
70
71     /**
72      * Preferred height of the widget.
73      *
74      * Reimplemented from YWidget.
75      **/
76     virtual int preferredHeight();
77
78     /**
79      * Set the new size of the widget.
80      *
81      * Reimplemented from YWidget.
82      **/
83     virtual void setSize( int newWidth, int newHeight );
84
85 protected:
86
87     int         _pixmapWidth;
88     int         _pixmapHeight;
89 };
90
91 #endif // YQImage_h