equal
deleted
inserted
replaced
38 #include "hblabel.h" |
38 #include "hblabel.h" |
39 #include "hbstyleoptionlabel_p.h" |
39 #include "hbstyleoptionlabel_p.h" |
40 #include "hbinputexactwordpopup.h" |
40 #include "hbinputexactwordpopup.h" |
41 #include "hbiconitem.h" |
41 #include "hbiconitem.h" |
42 #include "hbinputsettingproxy.h" |
42 #include "hbinputsettingproxy.h" |
43 #include "hbdialog_p.h" |
43 #include "hbinputpopupbase_p.h" |
|
44 |
|
45 /*! |
|
46 @stable |
|
47 @hbinput |
|
48 \class HbInputExactWordPopup |
|
49 \brief Displays exact typing popup for predictive input. |
|
50 */ |
44 |
51 |
45 const QString HbCandidateListBackground("qtg_fr_popup_secondary"); |
52 const QString HbCandidateListBackground("qtg_fr_popup_secondary"); |
46 class HbExactWordPopupPrivate : public HbDialogPrivate |
53 class HbExactWordPopupPrivate : public HbInputPopupBasePrivate |
47 { |
54 { |
48 Q_DECLARE_PUBLIC(HbExactWordPopup) |
55 Q_DECLARE_PUBLIC(HbExactWordPopup) |
49 |
56 |
50 public: |
57 public: |
51 HbExactWordPopupPrivate(); |
58 HbExactWordPopupPrivate(); |
90 /*! |
97 /*! |
91 Constructor. |
98 Constructor. |
92 \param parent An optional parameter. |
99 \param parent An optional parameter. |
93 */ |
100 */ |
94 HbExactWordPopup::HbExactWordPopup(QGraphicsWidget *parent, HbExactWordPopupIndicator indicatorArrow) |
101 HbExactWordPopup::HbExactWordPopup(QGraphicsWidget *parent, HbExactWordPopupIndicator indicatorArrow) |
95 : HbDialog(*new HbExactWordPopupPrivate(), parent) |
102 : HbInputPopupBase(*new HbExactWordPopupPrivate(), parent) |
96 { |
103 { |
97 Q_D(HbExactWordPopup); |
104 Q_D(HbExactWordPopup); |
98 HbInputRegionCollector::instance()->attach(this); |
105 HbInputRegionCollector::instance()->attach(this); |
99 |
106 |
100 d->mText = new HbLabel(); |
107 d->mText = new HbLabel(); |
110 setBackgroundFaded(false); |
117 setBackgroundFaded(false); |
111 setDismissPolicy(HbPopup::TapInside); |
118 setDismissPolicy(HbPopup::TapInside); |
112 setFocusPolicy(Qt::ClickFocus); |
119 setFocusPolicy(Qt::ClickFocus); |
113 setModal(false); |
120 setModal(false); |
114 setContentsMargins(0, 0, 0, 0); |
121 setContentsMargins(0, 0, 0, 0); |
115 |
|
116 // Make sure the exact word popup never steals focus. |
|
117 setFlag(QGraphicsItem::ItemIsPanel, true); |
|
118 d->mActivePopup = false; |
|
119 setActive(false); |
|
120 |
122 |
121 setIndicatorArrow(indicatorArrow); |
123 setIndicatorArrow(indicatorArrow); |
122 } |
124 } |
123 |
125 |
124 /*! |
126 /*! |