~ubuntu-branches/ubuntu/wily/kid3/wily-proposed

« back to all changes in this revision

Viewing changes to src/gui/widgets/picturelabel.h

  • Committer: Package Import Robot
  • Author(s): Ana Beatriz Guerrero Lopez, Patrick Matthäi, Ana Beatriz Guerrero Lopez
  • Date: 2011-11-13 16:34:13 UTC
  • mfrom: (1.1.13) (2.1.11 sid)
  • Revision ID: package-import@ubuntu.com-20111113163413-5y0anlc4dqf511uh
Tags: 2.0.1-1
* New upstream release.

[ Patrick Matthäi ]
* Adjust build system.
* Add build dependency xsltproc.

[ Ana Beatriz Guerrero Lopez ]
* Some more adjustments to the build system taken from upstream's deb/
* directory.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/**
 
2
 * \file picturelabel.h
 
3
 * Label for picture preview.
 
4
 *
 
5
 * \b Project: Kid3
 
6
 * \author Urs Fleisch
 
7
 * \date 04 Jan 2009
 
8
 */
 
9
 
 
10
#ifndef PICTURELABEL_H
 
11
#define PICTURELABEL_H
 
12
 
 
13
#include <QLabel>
 
14
#include <QPixmap>
 
15
 
 
16
class QByteArray;
 
17
 
 
18
/**
 
19
 * Label for picture preview.
 
20
 */
 
21
class PictureLabel : public QLabel {
 
22
public:
 
23
  /**
 
24
   * Constructor.
 
25
   *
 
26
   * @param parent parent widget
 
27
   */
 
28
  PictureLabel(QWidget* parent);
 
29
 
 
30
  /**
 
31
   * Destructor.
 
32
   */
 
33
  virtual ~PictureLabel();
 
34
 
 
35
  /**
 
36
   * Get preferred height for a given width.
 
37
   * @return height.
 
38
   */
 
39
  virtual int heightForWidth(int w) const;
 
40
 
 
41
  /**
 
42
   * Set picture data.
 
43
   *
 
44
   * @param data picture data, 0 if no picture is available
 
45
   */
 
46
  void setData(const QByteArray* data);
 
47
 
 
48
private:
 
49
  /**
 
50
   * Set picture.
 
51
   */
 
52
  void setPicture();
 
53
 
 
54
  /**
 
55
   * Clear picture.
 
56
   */
 
57
  void clearPicture();
 
58
 
 
59
  QPixmap m_pixmap;
 
60
  uint m_pixmapHash;
 
61
};
 
62
 
 
63
#endif // PICTURELABEL_H