ginebra2/ActionButtonSnippet.cpp
changeset 16 3c88a81ff781
parent 3 0954f5dd2cd0
equal deleted inserted replaced
14:6aeb7a756187 16:3c88a81ff781
    31   }
    31   }
    32 
    32 
    33   ActionButtonSnippet * ActionButtonSnippet::instance(const QString& elementId, ChromeWidget * chrome, const QWebElement & element)
    33   ActionButtonSnippet * ActionButtonSnippet::instance(const QString& elementId, ChromeWidget * chrome, const QWebElement & element)
    34   {
    34   {
    35       ActionButtonSnippet* that = new ActionButtonSnippet(elementId, chrome, 0, element);
    35       ActionButtonSnippet* that = new ActionButtonSnippet(elementId, chrome, 0, element);
    36       that->setChromeWidget( new ActionButton( that ) );
    36       that->setChromeWidget( new ActionButton( that, elementId ) );
    37       return that;
    37       return that;
    38   }
    38   }
    39 
    39 
    40   QAction * ActionButtonSnippet::getDefaultAction()
    40   QAction * ActionButtonSnippet::getDefaultAction()
    41   {
    41   {
    96   void ActionButtonSnippet::setActive( bool enabled )
    96   void ActionButtonSnippet::setActive( bool enabled )
    97   {
    97   {
    98     static_cast<ActionButton*>(m_widget)->setActive(enabled);
    98     static_cast<ActionButton*>(m_widget)->setActive(enabled);
    99   }
    99   }
   100 
   100 
       
   101   void ActionButtonSnippet::setTriggerOnUp( bool triggeronup )
       
   102   {
       
   103     static_cast<ActionButton*>(m_widget)->setTriggerOnUp(triggeronup);
       
   104   }
       
   105 
   101   void ActionButtonSnippet::setActiveOnPress( bool active )
   106   void ActionButtonSnippet::setActiveOnPress( bool active )
   102   {
   107   {
   103     static_cast<ActionButton*>(m_widget)->setActiveOnPress(active);
   108     static_cast<ActionButton*>(m_widget)->setActiveOnPress(active);
   104   }
   109   }
   105 
   110