equal
deleted
inserted
replaced
32 #include "hbmainwindow.h" |
32 #include "hbmainwindow.h" |
33 #include "hbpopup.h" |
33 #include "hbpopup.h" |
34 #include "hbdeviceprofile.h" |
34 #include "hbdeviceprofile.h" |
35 |
35 |
36 /*! |
36 /*! |
37 \proto |
37 @stable |
38 \class HbInputRegionCollector |
38 \class HbInputRegionCollector |
39 \brief Installs a filter on a HbWidget and observes for a change in position, size and visibility |
39 \brief Installs a filter on a HbWidget and observes for a change in position, size and visibility |
40 of the attached widget. As soon as it detects a change in size, position or visibility it calculates |
40 of the attached widget. As soon as it detects a change in size, position or visibility it calculates |
41 total of the region of all the widgets attached and emits updateRegion signal. |
41 total of the region of all the widgets attached and emits updateRegion signal. |
42 |
42 |
44 that the application is not having any HbMainWindow. |
44 that the application is not having any HbMainWindow. |
45 |
45 |
46 */ |
46 */ |
47 |
47 |
48 /// @cond |
48 /// @cond |
49 |
|
50 class HbWidgetFilterList |
|
51 { |
|
52 public: |
|
53 HbWidgetFilterList(HbWidget *w) |
|
54 : mWidget(w), mIsVisible(false) { |
|
55 } |
|
56 bool operator ==(const HbWidgetFilterList &other) const { |
|
57 return mWidget == other.mWidget; |
|
58 } |
|
59 QPointer <HbWidget> mWidget; |
|
60 // visibility is needed as the time when we get show event inside eventFilter |
|
61 // widget is not visible. |
|
62 bool mIsVisible; |
|
63 }; |
|
64 |
|
65 class HbInputRegionCollectorPrivate |
|
66 { |
|
67 public: |
|
68 HbInputRegionCollectorPrivate() |
|
69 : mEnabled(false), mModalDialogs(0) {} |
|
70 QList < HbWidgetFilterList > mInputWidgets; |
|
71 bool mEnabled; |
|
72 int mModalDialogs; |
|
73 }; |
|
74 |
|
75 |
49 |
76 /*! |
50 /*! |
77 Creates a static instance of HbInputRegionCollector. |
51 Creates a static instance of HbInputRegionCollector. |
78 */ |
52 */ |
79 HbInputRegionCollector *HbInputRegionCollector::instance() |
53 HbInputRegionCollector *HbInputRegionCollector::instance() |