equal
deleted
inserted
replaced
42 #ifndef BLURPICKER_H |
42 #ifndef BLURPICKER_H |
43 #define BLURPICKER_H |
43 #define BLURPICKER_H |
44 |
44 |
45 #include <QGraphicsEffect> |
45 #include <QGraphicsEffect> |
46 #include <QGraphicsView> |
46 #include <QGraphicsView> |
47 #include <QTimeLine> |
47 #include <QPropertyAnimation> |
48 |
48 |
49 #include "blureffect.h" |
49 #include "blureffect.h" |
50 |
50 |
51 class BlurPicker: public QGraphicsView |
51 class BlurPicker: public QGraphicsView |
52 { |
52 { |
53 Q_OBJECT |
53 Q_OBJECT |
|
54 Q_PROPERTY(qreal index READ index WRITE setIndex) |
54 |
55 |
55 public: |
56 public: |
56 BlurPicker(QWidget *parent = 0); |
57 BlurPicker(QWidget *parent = 0); |
57 |
58 |
|
59 qreal index() const; |
|
60 void setIndex(qreal); |
|
61 |
58 protected: |
62 protected: |
59 void keyPressEvent(QKeyEvent *event); |
63 void keyPressEvent(QKeyEvent *event); |
60 |
|
61 private slots: |
|
62 void updateIconPositions(); |
|
63 |
64 |
64 private: |
65 private: |
65 void setupScene(); |
66 void setupScene(); |
66 |
67 |
67 private: |
68 private: |
68 qreal m_index; |
69 qreal m_index; |
69 QGraphicsScene m_scene; |
|
70 QList<QGraphicsItem*> m_icons; |
70 QList<QGraphicsItem*> m_icons; |
71 QTimeLine m_timeLine; |
71 QPropertyAnimation m_animation; |
72 }; |
72 }; |
73 |
73 |
74 #endif // BLURPICKER_H |
74 #endif // BLURPICKER_H |