src/hbwidgets/dataform/hbdataformviewitem.h
branchGCC_SURGE
changeset 15 f378acbc9cfb
parent 6 c3690ec91ef8
equal deleted inserted replaced
9:730c025d4b77 15:f378acbc9cfb
    21 ** If you have questions regarding the use of this file, please contact
    21 ** If you have questions regarding the use of this file, please contact
    22 ** Nokia at developer.feedback@nokia.com.
    22 ** Nokia at developer.feedback@nokia.com.
    23 **
    23 **
    24 ****************************************************************************/
    24 ****************************************************************************/
    25 
    25 
    26 #ifndef HBDATAFORMITEM_H
    26 #ifndef HBDATAFORMVIEWITEM_H
    27 #define HBDATAFORMITEM_H
    27 #define HBDATAFORMVIEWITEM_H
    28 
    28 
    29 #include <hbabstractviewitem.h>
    29 #include <hbabstractviewitem.h>
    30 
    30 
    31 class HbDataFormModel;
    31 class HbDataFormModel;
    32 class HbDataFormModelItem;
    32 class HbDataFormModelItem;
    39     Q_OBJECT
    39     Q_OBJECT
    40     Q_PROPERTY(bool expanded READ isExpanded WRITE setExpanded)
    40     Q_PROPERTY(bool expanded READ isExpanded WRITE setExpanded)
    41     
    41     
    42 public:
    42 public:
    43 
    43 
       
    44 
       
    45 
    44     explicit HbDataFormViewItem(QGraphicsItem *parent = 0);
    46     explicit HbDataFormViewItem(QGraphicsItem *parent = 0);
    45     virtual ~HbDataFormViewItem();
    47     virtual ~HbDataFormViewItem();
    46 
    48 
    47     enum {Type = Hb::ItemType_DataFormViewItem};
    49     enum {Type = Hb::ItemType_DataFormViewItem};
    48     virtual int type() const {
    50     virtual int type() const {
    53     virtual bool canSetModelIndex(const QModelIndex &index) const;
    55     virtual bool canSetModelIndex(const QModelIndex &index) const;
    54     virtual void updateChildItems();
    56     virtual void updateChildItems();
    55     
    57     
    56     void setExpanded(bool expanded);
    58     void setExpanded(bool expanded);
    57     bool isExpanded() const;
    59     bool isExpanded() const;
    58     
    60    
    59     HbWidget* dataItemContentWidget()const;
    61     HbWidget* dataItemContentWidget()const;
    60 
    62 
    61 public slots:
    63 public slots:
    62 
    64 
    63     virtual void restore();
    65     virtual void restore();
    75 
    77 
    76     virtual void pressStateChanged(bool value, bool animate);
    78     virtual void pressStateChanged(bool value, bool animate);
    77     void initStyleOption(HbStyleOptionDataFormViewItem *option) const;
    79     void initStyleOption(HbStyleOptionDataFormViewItem *option) const;
    78 
    80 
    79     void showEvent(QShowEvent * event);
    81     void showEvent(QShowEvent * event);
       
    82     QVariant itemChange( GraphicsItemChange change, const QVariant &value );
    80 
    83 
    81 private:
    84 private:
    82     Q_DECLARE_PRIVATE_D(d_ptr, HbDataFormViewItem)
    85     Q_DECLARE_PRIVATE_D(d_ptr, HbDataFormViewItem)
    83 };
    86 };
    84 
    87 
    85 #endif //HBDATAFORMITEM_H
    88 #endif //HBDATAFORMVIEWITEM_H