phoneuis/bubblemanager2/bubblecore/src/bubbleexpandedhandler.cpp
branchGCC_SURGE
changeset 51 f39ed5e045e0
parent 30 ebdbd102c78a
parent 45 6b911d05207e
equal deleted inserted replaced
40:bab96b7ed1a4 51:f39ed5e045e0
    98     if ( actions.count()==1 && mButtonCenter ) {
    98     if ( actions.count()==1 && mButtonCenter ) {
    99         HbAction* action = actions.at(0);
    99         HbAction* action = actions.at(0);
   100         mButtonCenter->setIcon( action->icon() );
   100         mButtonCenter->setIcon( action->icon() );
   101         connect(mButtonCenter, SIGNAL( clicked() ),
   101         connect(mButtonCenter, SIGNAL( clicked() ),
   102                 action, SLOT( trigger() ) );
   102                 action, SLOT( trigger() ) );
       
   103         connect(mButtonCenter, SIGNAL( longPress(QPointF)),
       
   104                 action, SLOT( trigger() ) );
   103         BubbleUtils::setButtonStyleForAction(*mButtonCenter,*action);
   105         BubbleUtils::setButtonStyleForAction(*mButtonCenter,*action);
   104         mButtonCenter->show();
   106         mButtonCenter->show();
   105     } else  if (actions.count()==2 && mButtonLeft && mButtonRight ) {
   107     } else  if (actions.count()==2 && mButtonLeft && mButtonRight ) {
   106         // Left button
   108         // Left button
   107         HbAction* action1 = actions.at(0);
   109         HbAction* action1 = actions.at(0);
   108         mButtonLeft->setIcon(action1->icon());
   110         mButtonLeft->setIcon(action1->icon());
   109         connect( mButtonLeft, SIGNAL( clicked() ),
   111         connect( mButtonLeft, SIGNAL( clicked() ),
   110                  action1, SLOT( trigger() ) );
   112                  action1, SLOT( trigger() ) );
       
   113         connect( mButtonLeft, SIGNAL( longPress(QPointF)),
       
   114                  action1, SLOT( trigger() ) );
   111         BubbleUtils::setButtonStyleForAction(*mButtonLeft,*action1);
   115         BubbleUtils::setButtonStyleForAction(*mButtonLeft,*action1);
   112         mButtonLeft->show();
   116         mButtonLeft->show();
   113         // Right button
   117         // Right button
   114         HbAction* action2 = actions.at(1);
   118         HbAction* action2 = actions.at(1);
   115         mButtonRight->setIcon( action2->icon() );
   119         mButtonRight->setIcon( action2->icon() );
   116         connect( mButtonRight, SIGNAL( clicked() ),
   120         connect( mButtonRight, SIGNAL( clicked() ),
       
   121                  action2, SLOT( trigger() ) );
       
   122         connect( mButtonRight, SIGNAL( longPress(QPointF)),
   117                  action2, SLOT( trigger() ) );
   123                  action2, SLOT( trigger() ) );
   118         BubbleUtils::setButtonStyleForAction(*mButtonRight,*action2);
   124         BubbleUtils::setButtonStyleForAction(*mButtonRight,*action2);
   119         mButtonRight->show();
   125         mButtonRight->show();
   120     }
   126     }
   121 }
   127 }