31 QGraphicsItem *parent) |
31 QGraphicsItem *parent) |
32 : HbView(parent), |
32 : HbView(parent), |
33 mStartParam(startParam), |
33 mStartParam(startParam), |
34 mApplication(application) |
34 mApplication(application) |
35 { |
35 { |
|
36 NM_FUNCTION; |
36 } |
37 } |
37 |
38 |
38 /*! |
39 /*! |
39 Destructor |
40 Destructor |
40 */ |
41 */ |
41 NmBaseView::~NmBaseView() |
42 NmBaseView::~NmBaseView() |
42 { |
43 { |
|
44 NM_FUNCTION; |
|
45 |
43 delete mStartParam; |
46 delete mStartParam; |
44 } |
47 } |
45 |
48 |
46 /*! |
49 /*! |
47 Is it ok to exit current view. Function is called when exiting the view. |
50 Is it ok to exit current view. Function is called when exiting the view. |
48 Views can override this function and deside are they going to signal popView |
51 Views can override this function and deside are they going to signal popView |
49 or not. For example based on the user query. |
52 or not. For example based on the user query. |
50 */ |
53 */ |
51 void NmBaseView::okToExitView() |
54 void NmBaseView::okToExitView() |
52 { |
55 { |
|
56 NM_FUNCTION; |
|
57 |
53 mApplication.popView(); |
58 mApplication.popView(); |
54 } |
59 } |
55 |
60 |
56 /*! |
61 /*! |
57 About to exit view. Function is called before view is removed from |
62 About to exit view. Function is called before view is removed from |
58 view stack and deleted. Views can override this function and do pre-exit |
63 view stack and deleted. Views can override this function and do pre-exit |
59 functions. For example editor can store message to drafts at this stage. |
64 functions. For example editor can store message to drafts at this stage. |
60 */ |
65 */ |
61 void NmBaseView::aboutToExitView() |
66 void NmBaseView::aboutToExitView() |
62 { |
67 { |
|
68 NM_FUNCTION; |
63 } |
69 } |
64 |
70 |
65 /*! |
71 /*! |
66 view ready. Function is called after mainwindow has received viewReady |
72 view ready. Function is called after mainwindow has received viewReady |
67 lazy loading signal. Views can choose to implement this function |
73 lazy loading signal. Views can choose to implement this function |
68 if it makes sense to construct items after main view is shown. |
74 if it makes sense to construct items after main view is shown. |
69 */ |
75 */ |
70 void NmBaseView::viewReady() |
76 void NmBaseView::viewReady() |
71 { |
77 { |
|
78 NM_FUNCTION; |
72 } |
79 } |
73 |
80 |
74 /*! |
81 /*! |
75 About to change orientation. View can override this function if special |
82 About to change orientation. View can override this function if special |
76 handling is needed for the view when orientation is about to change. |
83 handling is needed for the view when orientation is about to change. |
77 */ |
84 */ |
78 void NmBaseView::aboutToChangeOrientation() |
85 void NmBaseView::aboutToChangeOrientation() |
79 { |
86 { |
|
87 NM_FUNCTION; |
80 } |
88 } |
81 |
89 |
82 /*! |
90 /*! |
83 Orientation changed. View can override this function if special |
91 Orientation changed. View can override this function if special |
84 handling is needed for the view when orientation is changed. |
92 handling is needed for the view when orientation is changed. |
85 */ |
93 */ |
86 void NmBaseView::orientationChanged(Qt::Orientation orientation) |
94 void NmBaseView::orientationChanged(Qt::Orientation orientation) |
87 { |
95 { |
|
96 NM_FUNCTION; |
|
97 |
88 Q_UNUSED(orientation); |
98 Q_UNUSED(orientation); |
89 } |
99 } |
90 |
100 |
91 /*! |
101 /*! |
92 Mouse release event. View can override this function if special |
102 Mouse release event. View can override this function if special |
93 handling is required because of overlaying scroll area (viewer and editor) |
103 handling is required because of overlaying scroll area (viewer and editor) |
94 */ |
104 */ |
95 void NmBaseView::handleMouseReleaseEvent(QGraphicsSceneMouseEvent *event) |
105 void NmBaseView::handleMouseReleaseEvent(QGraphicsSceneMouseEvent *event) |
96 { |
106 { |
|
107 NM_FUNCTION; |
|
108 |
97 Q_UNUSED(event); |
109 Q_UNUSED(event); |
98 } |
110 } |
99 |
111 |
100 /*! |
112 /*! |
101 Mouse press event. View can override this function if special |
113 Mouse press event. View can override this function if special |
102 handling is required because of overlaying scroll area (viewer and editor) |
114 handling is required because of overlaying scroll area (viewer and editor) |
103 */ |
115 */ |
104 void NmBaseView::handleMousePressEvent(QGraphicsSceneMouseEvent *event) |
116 void NmBaseView::handleMousePressEvent(QGraphicsSceneMouseEvent *event) |
105 { |
117 { |
|
118 NM_FUNCTION; |
|
119 |
106 Q_UNUSED(event); |
120 Q_UNUSED(event); |
107 } |
121 } |
108 |
122 |
109 |
123 |
110 /*! |
124 /*! |
111 Mouse move event. View can override this function if special |
125 Mouse move event. View can override this function if special |
112 handling is required because of overlaying scroll area (viewer and editor) |
126 handling is required because of overlaying scroll area (viewer and editor) |
113 */ |
127 */ |
114 void NmBaseView::handleMouseMoveEvent(QGraphicsSceneMouseEvent *event) |
128 void NmBaseView::handleMouseMoveEvent(QGraphicsSceneMouseEvent *event) |
115 { |
129 { |
|
130 NM_FUNCTION; |
|
131 |
116 Q_UNUSED(event); |
132 Q_UNUSED(event); |
117 } |
133 } |
118 |
134 |
119 |
135 |