ui/views/detailsview/inc/glxdetailsview.h
changeset 29 2c833fc9e98f
parent 24 99ad1390cd33
child 44 aa2fa096cbfb
equal deleted inserted replaced
26:c499df2dbb33 29:2c833fc9e98f
    25 class HbDataFormModel;
    25 class HbDataFormModel;
    26 class GlxMediaModel;
    26 class GlxMediaModel;
    27 class QAbstractItemModel;
    27 class QAbstractItemModel;
    28 class HbIconItem;
    28 class HbIconItem;
    29 class GlxDetailsCustomWidgets;
    29 class GlxDetailsCustomWidgets;
       
    30 class GlxDetailsCustomIcon;
       
    31 class GlxFavMediaModel;
       
    32 
    30 
    33 
    31 class GlxDetailsView : public GlxView  
    34 class GlxDetailsView : public GlxView  
    32 {
    35 {
    33 
    36 
    34     Q_OBJECT
    37     Q_OBJECT
    74 
    77 
    75 
    78 
    76 public slots:
    79 public slots:
    77     void updateLayout(Qt::Orientation);
    80     void updateLayout(Qt::Orientation);
    78     void rowsRemoved(const QModelIndex &parent, int start, int end);
    81     void rowsRemoved(const QModelIndex &parent, int start, int end);
    79 
    82     void dataChanged(QModelIndex startIndex, QModelIndex endIndex);
       
    83     void updateFavourites();
       
    84     
    80 private:
    85 private:
    81 
    86 
    82    //Adds the Widget required to show the details
    87    //Adds the Widget required to show the details
    83     void addWidgets();
    88     void addWidgets();
    84 
    89 
   106     void initializeNewModel();
   111     void initializeNewModel();
   107     /*
   112     /*
   108      * clear all the model releted connection and data
   113      * clear all the model releted connection and data
   109      */
   114      */
   110     void clearCurrentModel();
   115     void clearCurrentModel();
       
   116     
       
   117     /*
       
   118      * cleans up the resources used.
       
   119      */
       
   120     void cleanUp();
       
   121     
       
   122     /*
       
   123      * create the favourite model
       
   124      */
       
   125     void setFavModel();
   111 
   126 
   112 
   127 
   113 private:
   128 private:
       
   129     
       
   130     //Contains the thumbnail shown in teh details view.
   114     HbIconItem *mDetailsIcon;
   131     HbIconItem *mDetailsIcon;
   115 
   132     
   116     //The media Model to acess the attributes not owned
   133     //Contains the favourite icon which adds or removes the image to favourite folder
       
   134     GlxDetailsCustomIcon *mFavIcon;
       
   135     
       
   136     //The media Model to acess the attributes; not owned,dont delete.
   117     QAbstractItemModel *mModel; 
   137     QAbstractItemModel *mModel; 
       
   138     
       
   139     //The media Model to acess the attributes whether image is in favourite folder or not;owned by this view
       
   140     GlxFavMediaModel *mFavModel;
       
   141     
       
   142     //The Model for the Form
       
   143     HbDataFormModel *mDetailModel;
   118 
   144 
   119     //The reference to the Main Window
   145     //The reference to the Main Window
   120     HbMainWindow *mWindow;
   146     HbMainWindow *mWindow;
   121 
   147 
   122     //The data form for the detail 
   148     //The data form for the detail 
   123     HbDataForm * mDataForm;
   149     HbDataForm * mDataForm;
   124 
   150 
   125     //The Model for the Form
   151     //Custom widgets which will contain the widgets not created/supported by data form 
   126     HbDataFormModel *mDetailModel;
       
   127 
       
   128     //Custom widgets
       
   129     GlxDetailsCustomWidgets *mCustomPrototype;
   152     GlxDetailsCustomWidgets *mCustomPrototype;
   130     
   153     
   131     int mSelIndex;
   154     int mSelIndex;
   132 
   155     
       
   156     //Contains the Datelabel item
       
   157     HbDataFormModelItem *mDateLabelItem;
       
   158     
       
   159     //Contains the ImageLabel item
       
   160     HbDataFormModelItem *mImageLabelitem;
       
   161     
       
   162     //Contains the Comments item
       
   163     HbDataFormModelItem *mCommentsLabelitem;
   133 };
   164 };
   134 #endif //GLXDETAILSVIEW_H
   165 #endif //GLXDETAILSVIEW_H