akregator/src/librss

image.h
1 /*
2  * image.h
3  *
4  * Copyright (c) 2001, 2002, 2003 Frerich Raabe <raabe@kde.org>
5  *
6  * This program is distributed in the hope that it will be useful, but WITHOUT
7  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
8  * FOR A PARTICULAR PURPOSE. For licensing and distribution details, check the
9  * accompanying file 'COPYING'.
10  */
11 #ifndef LIBRSS_IMAGE_H
12 #define LIBRSS_IMAGE_H
13 
14 #include "global.h"
15 
16 #include <tqobject.h>
17 
18 class TQDomNode;
19 
20 namespace TDEIO
21 {
22  class Job;
23 }
24 class KURL;
25 
26 namespace RSS
27 {
34  class TDE_EXPORT Image : public TQObject
35  {
36  TQ_OBJECT
37 
38  public:
42  Image();
43 
48  Image(const Image &other);
49 
55  Image(const TQDomNode &node);
56 
62  Image &operator=(const Image &other);
63 
71  bool operator==(const Image &other) const;
72 
78  bool operator!=(const Image &other) const { return !operator==(other); }
79 
83  virtual ~Image();
84 
90  TQString title() const;
91 
101  const KURL &url() const;
102 
111  const KURL &link() const;
112 
120  TQString description() const;
121 
132  unsigned int height() const;
133 
143  unsigned int width() const;
144 
150  void getPixmap();
151  void abort();
152 
153  signals:
161  void gotPixmap(const TQPixmap &pixmap);
162 
163  private slots:
164  void slotData(TDEIO::Job *job, const TQByteArray &data);
165  void slotResult(TDEIO::Job *job);
166 
167  private:
168  struct Private;
169  Private *d;
170  };
171 }
172 
173 #endif // LIBRSS_IMAGE_H
Represents an image as stored in a RSS file.
Definition: image.h:35
void gotPixmap(const TQPixmap &pixmap)
Emitted when this Image is done downloading the actual graphics data as referenced by the URL returne...
bool operator!=(const Image &other) const
Convenience method.
Definition: image.h:78