equal
deleted
inserted
replaced
35 // |
35 // |
36 |
36 |
37 #ifndef HBSELECTIONCONTROL_P_H |
37 #ifndef HBSELECTIONCONTROL_P_H |
38 #define HBSELECTIONCONTROL_P_H |
38 #define HBSELECTIONCONTROL_P_H |
39 |
39 |
40 #include "hbpopup.h" |
40 #include "hbwidget.h" |
41 |
41 |
42 class HbSelectionControlPrivate; |
42 class HbSelectionControlPrivate; |
43 class HbAbstractEdit; |
43 class HbAbstractEdit; |
44 QT_FORWARD_DECLARE_CLASS(QGraphicsSceneMouseEvent) |
44 QT_FORWARD_DECLARE_CLASS(QGraphicsSceneMouseEvent) |
45 |
45 |
46 class HbSelectionControl : public HbPopup |
46 class HbSelectionControl : public HbWidget |
47 { |
47 { |
48 |
48 |
49 Q_OBJECT |
49 Q_OBJECT |
50 |
50 |
51 public: |
51 public: |
54 DummyHandle, |
54 DummyHandle, |
55 SelectionStartHandle, |
55 SelectionStartHandle, |
56 SelectionEndHandle |
56 SelectionEndHandle |
57 }; |
57 }; |
58 |
58 |
59 explicit HbSelectionControl(HbAbstractEdit *edit); |
59 static HbSelectionControl* attachEditor(HbAbstractEdit *edit); |
60 |
60 void detachEditor(); |
61 void hideHandles(); |
61 void hideHandles(); |
62 void showHandles(); |
62 void showHandles(); |
|
63 bool event(QEvent *event); |
63 |
64 |
64 public slots: |
65 public slots: |
65 void panStarted(); |
66 void scrollStarted(); |
66 void panFinished(); |
67 void scrollFinished(); |
67 void updatePrimitives(); |
68 void updatePrimitives(); |
68 |
69 |
69 protected: |
70 protected: |
70 |
71 |
71 void mousePressEvent (QGraphicsSceneMouseEvent *event); |
|
72 void mouseMoveEvent (QGraphicsSceneMouseEvent *event); |
|
73 void mouseReleaseEvent (QGraphicsSceneMouseEvent *event); |
|
74 void timerEvent (QTimerEvent *event); |
72 void timerEvent (QTimerEvent *event); |
75 void polish( HbStyleParameters& params ); |
73 void polish( HbStyleParameters& params ); |
76 QVariant itemChange(GraphicsItemChange change, const QVariant &value); |
74 QVariant itemChange(GraphicsItemChange change, const QVariant &value); |
|
75 void gestureEvent(QGestureEvent* event); |
77 |
76 |
78 private: |
77 private: |
|
78 HbSelectionControl(); |
79 Q_DECLARE_PRIVATE_D(d_ptr, HbSelectionControl) |
79 Q_DECLARE_PRIVATE_D(d_ptr, HbSelectionControl) |
80 Q_DISABLE_COPY(HbSelectionControl) |
80 Q_DISABLE_COPY(HbSelectionControl) |
|
81 Q_PRIVATE_SLOT(d_func(), void _q_aboutToChangeView()) |
81 }; |
82 }; |
82 |
83 |
83 #endif // HBSELECTIONCONTROL_P_H |
84 #endif // HBSELECTIONCONTROL_P_H |