95 if (keyCode==Qt::Key_1) { |
95 if (keyCode==Qt::Key_1) { |
96 HbIcon mboxIcon(vmbxIcon); |
96 HbIcon mboxIcon(vmbxIcon); |
97 button->setIcon(mboxIcon); |
97 button->setIcon(mboxIcon); |
98 } |
98 } |
99 |
99 |
100 // for Yes-key clicked() signal is enough |
|
101 if (keyCode!=Qt::Key_Yes) { |
100 if (keyCode!=Qt::Key_Yes) { |
102 connect(button,SIGNAL(pressed()), |
101 connect(button,SIGNAL(pressed()), |
103 mKeyPressedSignalMapper,SLOT(map())); |
102 mKeyPressedSignalMapper,SLOT(map())); |
104 mKeyPressedSignalMapper->setMapping(button,keyCode); |
103 mKeyPressedSignalMapper->setMapping(button,keyCode); |
105 |
104 |
106 connect(button,SIGNAL(released()), |
105 connect(button,SIGNAL(released()), |
107 mKeyReleasedSignalMapper,SLOT(map())); |
106 mKeyReleasedSignalMapper,SLOT(map())); |
108 mKeyReleasedSignalMapper->setMapping(button,keyCode); |
107 mKeyReleasedSignalMapper->setMapping(button,keyCode); |
|
108 } else { |
|
109 // for Yes-key longPress() functionality is same as clicked() |
|
110 connect(button,SIGNAL(longPress(QPointF)), |
|
111 mKeyClickedSignalMapper,SLOT(map())); |
|
112 mKeyClickedSignalMapper->setMapping(button,keyCode); |
109 } |
113 } |
110 |
114 |
111 connect(button,SIGNAL(clicked()),mKeyClickedSignalMapper,SLOT(map())); |
115 connect(button,SIGNAL(clicked()),mKeyClickedSignalMapper,SLOT(map())); |
112 mKeyClickedSignalMapper->setMapping(button,keyCode); |
116 mKeyClickedSignalMapper->setMapping(button,keyCode); |
113 } |
117 } |