~ubuntu-branches/ubuntu/wily/sflphone/wily

« back to all changes in this revision

Viewing changes to kde/src/klib/tipanimationwrapper.h

  • Committer: Package Import Robot
  • Author(s): Mark Purcell
  • Date: 2014-01-28 18:23:36 UTC
  • mfrom: (1.1.11)
  • mto: This revision was merged to the branch mainline in revision 24.
  • Revision ID: package-import@ubuntu.com-20140128182336-3xenud1kbnwmf3mz
* New upstream release 
  - Fixes "New Upstream Release" (Closes: #735846)
  - Fixes "Ringtone does not stop" (Closes: #727164)
  - Fixes "[sflphone-kde] crash on startup" (Closes: #718178)
  - Fixes "sflphone GUI crashes when call is hung up" (Closes: #736583)
* Build-Depends: ensure GnuTLS 2.6
  - libucommon-dev (>= 6.0.7-1.1), libccrtp-dev (>= 2.0.6-3)
  - Fixes "FTBFS Build-Depends libgnutls{26,28}-dev" (Closes: #722040)
* Fix "boost 1.49 is going away" unversioned Build-Depends: (Closes: #736746)
* Add Build-Depends: libsndfile-dev, nepomuk-core-dev

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
/* Copyright 2012-2013 by Savoir-Faire Linux                                    *
 
1
/* Copyright 2012-2014 by Savoir-Faire Linux                                    *
2
2
 * Author : Emmanuel Lepage Vallee <emmanuel.lepage@savoirfairelinux.com>       *
3
3
 *                                                                              *
4
4
 * This library is free software; you can redistribute it and/or                *
22
22
//Qt
23
23
#include <QtCore/QRect>
24
24
#include <QtCore/QSize>
 
25
#include <QtCore/QAbstractAnimation>
25
26
#include <QtGui/QImage>
26
27
class QTimer;
27
28
 
28
29
//SFLPhone
29
30
#include "tip.h"
30
 
class TipManager;
31
31
 
32
32
//Structs
33
33
struct FrameDescription {
36
36
   float  opacity;
37
37
};
38
38
 
39
 
class TipAnimationWrapper : public QObject
 
39
class LIB_EXPORT TipAnimationWrapper : public QObject
40
40
{
 
41
   #pragma GCC diagnostic push
 
42
   #pragma GCC diagnostic ignored "-Wzero-as-null-pointer-constant"
41
43
   Q_OBJECT
 
44
   #pragma GCC diagnostic pop
42
45
public:
43
 
   explicit TipAnimationWrapper(TipManager* parent);
 
46
   explicit TipAnimationWrapper(QObject* parent = nullptr);
44
47
   virtual ~TipAnimationWrapper();
45
48
 
46
49
   //Mutator
47
50
   void start(bool show = true);
48
51
 
49
52
   //Setter
50
 
   void setTip(Tip* tip) {m_pTip = tip;}
 
53
   void setTip(Tip* tip);
51
54
 
52
55
   //Getter
53
56
   const QImage& currentImage();
66
69
   QRect   m_ParentRect;
67
70
   QSize   m_TipSize;
68
71
   QImage  m_CurrentImage;
69
 
   TipManager* m_pParent;
70
72
   Tip*    m_pCurrentTip;
71
73
   FrameDescription m_pCurrentDesc;
72
74
 
75
77
 
76
78
private Q_SLOTS:
77
79
   void step();
78
 
   void sizeChanged(QRect rect,bool ignoreAnim);
 
80
   void sizeChanged(const QRect &rect,bool ignoreAnim);
79
81
   void currentChanged(Tip* newCurrent);
80
82
   void tipChanged();
81
83
 
82
84
Q_SIGNALS:
83
85
   void animationStep(FrameDescription desc);
84
86
   void animationEnded();
 
87
   void transitionStarted(QAbstractAnimation::Direction direction, QAbstractAnimation::State state);
85
88
};
86
89
#endif