~ari-tczew/ubuntu/natty/clementine/lp-747113

« back to all changes in this revision

Viewing changes to src/widgets/tracksliderpopup.h

  • Committer: Artur Rona
  • Date: 2011-04-04 20:05:33 UTC
  • Revision ID: ari-tczew@ubuntu.com-20110404200533-6aclzasj5pp8t1hq
* New upstream release. (LP: #747113)
* Drop all patches, have been applied upstream.
* Update debian/copyright.
* Refresh description in debian/control in order to avoid lintian error.
* Bump debhelper to 8.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#ifndef TRACKSLIDERPOPUP_H
 
2
#define TRACKSLIDERPOPUP_H
 
3
 
 
4
#include <QWidget>
 
5
 
 
6
class TrackSliderPopup : public QWidget {
 
7
  Q_OBJECT
 
8
 
 
9
public:
 
10
  TrackSliderPopup(QWidget* parent);
 
11
 
 
12
public slots:
 
13
  void SetText(const QString& text);
 
14
  void SetSmallText(const QString& small_text);
 
15
  void SetPopupPosition(const QPoint& pos);
 
16
 
 
17
protected:
 
18
  void paintEvent(QPaintEvent*);
 
19
 
 
20
private:
 
21
  static const int kTextMargin;
 
22
  static const int kPointLength;
 
23
  static const int kPointWidth;
 
24
  static const int kBorderRadius;
 
25
  static const qreal kBlurRadius;
 
26
 
 
27
  void UpdatePixmap();
 
28
  void UpdatePosition();
 
29
  void SendMouseEventToParent(QMouseEvent* e);
 
30
 
 
31
private:
 
32
  QString text_;
 
33
  QString small_text_;
 
34
  QPoint pos_;
 
35
 
 
36
  QFont font_;
 
37
  QFont small_font_;
 
38
  QFontMetrics font_metrics_;
 
39
  QFontMetrics small_font_metrics_;
 
40
  QPixmap pixmap_;
 
41
  QPixmap background_cache_;
 
42
};
 
43
 
 
44
#endif // TRACKSLIDERPOPUP_H