contacts_plat/contacts_ui_extensions_api/inc/cnteditviewitem.h
changeset 37 fd64c38c277d
parent 27 de1630741fbe
equal deleted inserted replaced
31:2a11b5b00470 37:fd64c38c277d
    20 
    20 
    21 #include <QObject>
    21 #include <QObject>
    22 #include <QVariant>
    22 #include <QVariant>
    23 #include <QPointF>
    23 #include <QPointF>
    24 #include <hbnamespace.h>
    24 #include <hbnamespace.h>
       
    25 #include <cnteditviewitemcallback.h>
    25 
    26 
    26 // Value enum for EditViewItemRole::ERoleItemType
    27 // Value enum for EditViewItemRole::ERoleItemType
    27 enum EditViewItemType
    28 enum EditViewItemType
    28 {
    29 {
    29     ETypeUiExtension = 0,
    30     ETypeUiExtension = 0,
    50 
    51 
    51     /**
    52     /**
    52      * Returns data for a given role.
    53      * Returns data for a given role.
    53      * ETypeUiExtension must be returned for ERoleItemType
    54      * ETypeUiExtension must be returned for ERoleItemType
    54      *
    55      *
       
    56      * Other supported roles and restrictions:
       
    57      * Qt::DisplayRole -> QStringList with 1-2 QStrings
       
    58      * Qt::DecorationRole -> 0-1 HbIcon
       
    59      *
    55      * @param int, role
    60      * @param int, role
    56      * @return QVariant, data for the given role
    61      * @return QVariant, data for the given role
    57      */   
    62      */
    58     virtual QVariant data(int role) const = 0;
    63     virtual QVariant data(int role) const = 0;
    59 
    64 
    60     /**
    65     /**
    61      * Called when this item is activated (tapped) in the list.
    66      * Called when this item is activated (tapped) in the list.
       
    67      *
       
    68      * @param CntEditViewItemCallback*, callback interface for possible view switching and list refreshing requests, ownership NOT given
    62      */   
    69      */   
    63     virtual void activated() = 0;
    70     virtual void activated(CntEditViewItemCallback* interface) = 0;
    64 
    71 
    65     /**
    72     /**
    66      * Called when this item is longpressed in the list.
    73      * Called when this item is longpressed in the list.
    67      *
    74      *
    68      * @param QPointF&, coordinates from where the longpress was initiated
    75      * @param QPointF&, coordinates from where the longpress was initiated
       
    76      * @param CntEditViewItemCallback*, callback interface for possible view switching and list refreshing requests, ownership NOT given
    69      */   
    77      */   
    70     virtual void longPressed(const QPointF& coords) = 0;
    78     virtual void longPressed(const QPointF& coords, CntEditViewItemCallback* interface) = 0;
    71 };
    79 };
    72 
    80 
    73 #endif // CNTEDITVIEWITEM_H
    81 #endif // CNTEDITVIEWITEM_H
    74 
    82