libyui-qt
Loading...
Searching...
No Matches
YQImage.h
1/*
2 Copyright (C) 2000-2012 Novell, Inc
3 This library is free software; you can redistribute it and/or modify
4 it under the terms of the GNU Lesser General Public License as
5 published by the Free Software Foundation; either version 2.1 of the
6 License, or (at your option) version 3.0 of the License. This library
7 is distributed in the hope that it will be useful, but WITHOUT ANY
8 WARRANTY; without even the implied warranty of MERCHANTABILITY or
9 FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
10 License for more details. You should have received a copy of the GNU
11 Lesser General Public License along with this library; if not, write
12 to the Free Software Foundation, Inc., 51 Franklin Street, Fifth
13 Floor, Boston, MA 02110-1301 USA
14*/
15
16
17/*-/
18
19 File: YQImage.h
20
21 Author: Stefan Hundhammer <shundhammer@suse.de>
22
23/-*/
24
25
26#ifndef YQImage_h
27#define YQImage_h
28
29#include <qlabel.h>
30#include <qmovie.h>
31
32#include <yui/YImage.h>
33#include <yui/YUI.h>
34
35
36class YQImage : public QLabel, public YImage
37{
38 Q_OBJECT
39
40public:
47 YQImage( YWidget * parent,
48 const std::string & imageFileName,
49 bool animated = false );
50
54 virtual ~YQImage();
55
61 virtual void setImage( const std::string & imageFileName, bool animated = false );
62
68 virtual void setAutoScale( bool autoScale = true );
69
73 virtual void setEnabled( bool enabled );
74
80 virtual int preferredWidth();
81
87 virtual int preferredHeight();
88
94 virtual void setSize( int newWidth, int newHeight );
95
96protected:
97
98 int _pixmapWidth;
99 int _pixmapHeight;
100};
101
102#endif // YQImage_h
Definition YQImage.h:37
virtual void setEnabled(bool enabled)
Definition YQImage.cc:192
virtual void setImage(const std::string &imageFileName, bool animated=false)
Definition YQImage.cc:67
virtual void setSize(int newWidth, int newHeight)
Definition YQImage.cc:186
virtual int preferredWidth()
Definition YQImage.cc:142
virtual ~YQImage()
Definition YQImage.cc:60
virtual void setAutoScale(bool autoScale=true)
Definition YQImage.cc:129
virtual int preferredHeight()
Definition YQImage.cc:164