homescreenapp/widgetplugins/hsshortcutwidgetplugin/src/hsshortcutwidget.cpp
changeset 36 cdae8c6c3876
parent 35 f9ce957a272c
child 39 4e8ebe173323
equal deleted inserted replaced
35:f9ce957a272c 36:cdae8c6c3876
    14 * Description:  Shortcut widget
    14 * Description:  Shortcut widget
    15 *
    15 *
    16 */
    16 */
    17 
    17 
    18 #include <QGraphicsLinearLayout>
    18 #include <QGraphicsLinearLayout>
       
    19 #include <QGraphicsSceneMouseEvent>
    19 
    20 
    20 #include <HbStackedLayout>
    21 #include <HbStackedLayout>
    21 #include <HbIconItem>
    22 #include <HbIconItem>
    22 #include <HbTextItem>
    23 #include <HbTextItem>
    23 
    24 
   145 
   146 
   146     Hides the widget
   147     Hides the widget
   147 */
   148 */
   148 void HsShortcutWidget::onHide()
   149 void HsShortcutWidget::onHide()
   149 {
   150 {
   150     hide();
       
   151 }
   151 }
   152 
   152 
   153 /*!
   153 /*!
   154     \fn void HsShortcutWidget::mouseReleaseEvent(QGraphicsSceneMouseEvent *event)
   154     \fn void HsShortcutWidget::mouseReleaseEvent(QGraphicsSceneMouseEvent *event)
   155 
   155 
   156     Executes configured action
   156     Executes configured action
   157 */
   157 */
   158 void HsShortcutWidget::mouseReleaseEvent(QGraphicsSceneMouseEvent *event)
   158 void HsShortcutWidget::mouseReleaseEvent(QGraphicsSceneMouseEvent *event)
   159 {
   159 {   
   160     Q_UNUSED(event)
   160     if (!contains(event->pos())) {
   161     
   161         return;
       
   162     }
       
   163 
   162     CaEntry *entry = CaService::instance()->getEntry(mMcsId);
   164     CaEntry *entry = CaService::instance()->getEntry(mMcsId);
   163     if (!entry) {
   165     if (!entry) {
   164         return;
   166         return;
   165     }
   167     }
   166 
   168 
   242     
   244     
   243     CaNotifier *itemNotifier = CaService::instance()->createNotifier(filter);
   245     CaNotifier *itemNotifier = CaService::instance()->createNotifier(filter);
   244     itemNotifier->setParent(this);
   246     itemNotifier->setParent(this);
   245 
   247 
   246     connect(itemNotifier,
   248     connect(itemNotifier,
   247         SIGNAL(entryChanged(const CaEntry&, ChangeType)),
   249         SIGNAL(entryChanged(CaEntry,ChangeType)),
   248         SLOT(onEntryChanged(const CaEntry&, ChangeType)),Qt::QueuedConnection);
   250         SLOT(onEntryChanged(CaEntry,ChangeType)),Qt::QueuedConnection);
   249 }
   251 }
   250 
   252 
   251 /*!
   253 /*!
   252     \internal
   254     \internal
   253 */
   255 */