contacts_plat/contacts_ui_extensions_api/inc/cntuiextensiongroup.h
changeset 37 fd64c38c277d
parent 27 de1630741fbe
equal deleted inserted replaced
31:2a11b5b00470 37:fd64c38c277d
    18 #ifndef CNTUIEXTENSIONGROUP_H
    18 #ifndef CNTUIEXTENSIONGROUP_H
    19 #define CNTUIEXTENSIONGROUP_H
    19 #define CNTUIEXTENSIONGROUP_H
    20 
    20 
    21 #include <QObject>
    21 #include <QObject>
    22 #include <cntviewparams.h>
    22 #include <cntviewparams.h>
       
    23 #include <cntextensiongroupcallback.h>
    23 
    24 
    24 class QPointF;
    25 class QPointF;
    25 
    26 
    26 /**
    27 /**
    27  * Handle to specific group provided by the group supplier
    28  * Handle to specific group provided by the group supplier
       
    29  *
       
    30  * Example usage for CntViewParameters callbacks:
       
    31  *
       
    32  * MyExtensionGroup::activated(CntViewParameters& callBack) const {
       
    33  *     callBack.insert(EViewId, customView); <- when item is tapped, it opens the view specified here
       
    34  *     callBack.insert(ECustomParam, myCustomParam); <- custom parameters can also be used if needed
       
    35  * }
       
    36  * 
       
    37  * see cntviewparams.h for more information on view parameters
    28  */
    38  */
    29 class CntUiExtensionGroup
    39 class CntUiExtensionGroup
    30 {
    40 {
    31 public:
    41 public:
    32 
    42 
    78      * @return int, unique service id for the group
    88      * @return int, unique service id for the group
    79      */               
    89      */               
    80     virtual int serviceId() const = 0;
    90     virtual int serviceId() const = 0;
    81 
    91 
    82     /**
    92     /**
    83      * Called when this item is activated (tapped) in the list.
    93      * Called when this item is activated (tapped) in the list. The callback is handled 
       
    94      * synchronously and therefore it is assumed that this should be used for
       
    95      * opening a new view.
    84      *
    96      *
    85      * @param CntViewParameters&, callback for view switching
    97      * @param CntViewParameters&, callback for view switching
    86      */   
    98      */   
    87     virtual void activated(CntViewParameters& callBack) const = 0;
    99     virtual void activated(CntViewParameters& callBack) = 0;
    88 
   100 
    89     /**
   101     /**
    90      * Called when this item is longpressed in the list.
   102      * Called when this item is longpressed in the list.
    91      *
   103      *
    92      * @param QPointF&, coordinates from where the longpress was initiated
   104      * @param QPointF&, coordinates from where the longpress was initiated
    93      * @param CntViewParameters&, callback for view switching
   105      * @param CntExtensionGroupCallback*, callback interface for view switching, ownership NOT given
    94      */   
   106      */   
    95     virtual void longPressed(const QPointF& coords, CntViewParameters &callBack) const = 0;
   107     virtual void longPressed(const QPointF& coords, CntExtensionGroupCallback *interface) = 0;
    96 
   108 
    97     virtual void* GroupExtension(
   109     virtual void* GroupExtension(
    98             int /*aExtensionId*/ )
   110             int /*aExtensionId*/ )
    99     {
   111     {
   100         return NULL;
   112         return NULL;