messagingapp/msgui/unifiededitor/inc/msgunieditorattachmentcontainer.h
changeset 76 60a8a215b0ec
parent 56 f42d9a78f435
equal deleted inserted replaced
73:ecf6a73a9186 76:60a8a215b0ec
    15  *
    15  *
    16  */
    16  */
    17 #ifndef MSG_UNIFIED_EDITOR_ATTACHMENT_CONTAINER_H
    17 #ifndef MSG_UNIFIED_EDITOR_ATTACHMENT_CONTAINER_H
    18 #define MSG_UNIFIED_EDITOR_ATTACHMENT_CONTAINER_H
    18 #define MSG_UNIFIED_EDITOR_ATTACHMENT_CONTAINER_H
    19 
    19 
    20 #include <HbWidget>
    20 #include <msgunieditorbasewidget.h>
    21 #include "msgunieditorattachment.h"
    21 #include "msgunieditorattachment.h"
    22 
    22 
    23 class QGraphicsLinearLayout;
    23 class QGraphicsLinearLayout;
    24 class MmsConformanceCheck;
    24 class MmsConformanceCheck;
    25 
    25 
    26 class MsgAttachmentContainer : public HbWidget
    26 class MsgAttachmentContainer : public MsgUnifiedEditorBaseWidget
    27     {
    27     {
    28     Q_OBJECT
    28     Q_OBJECT
    29 
    29 
    30 public:
    30 public:
    31     /**
    31     /**
    76     /**
    76     /**
    77      * Size of the attachment container
    77      * Size of the attachment container
    78      * @return size
    78      * @return size
    79      */
    79      */
    80     int containerSize();
    80     int containerSize();
       
    81     
       
    82     /**
       
    83      * check if given file name is in use or not.
       
    84      * @param fileName, file name under queation
       
    85      * @return true/false if in use/not use.
       
    86      */
       
    87     bool fileNameInUse(const QString& fileName);
    81 
    88 
    82 signals:
    89 signals:
    83     /**
       
    84      * emit when container content changes
       
    85      */
       
    86     void contentChanged();
       
    87 
    90 
    88     /**
    91     /**
    89      * emit to indicate view that container is now empty
    92      * emit to indicate view that container is now empty
    90 	 * View deletes the container if it becomes empty
    93 	 * View deletes the container if it becomes empty
    91      */
    94      */
    94 public slots:
    97 public slots:
    95     /**
    98     /**
    96      * delete attachment from the container
    99      * delete attachment from the container
    97      */
   100      */
    98     void deleteAttachment(MsgUnifiedEditorAttachment* attachment);
   101     void deleteAttachment(MsgUnifiedEditorAttachment* attachment);
    99     
       
   100 private:
       
   101     /**
       
   102      * size of the msg
       
   103      */
       
   104     int messageSize();
       
   105     
   102     
   106 private:
   103 private:
   107     
   104     
   108     /**
   105     /**
   109      * container's layout
   106      * container's layout
   122 
   119 
   123     /**
   120     /**
   124      * flag to tell, if container is holding MM content
   121      * flag to tell, if container is holding MM content
   125      */
   122      */
   126     bool mIsMMContent;
   123     bool mIsMMContent;
       
   124     
       
   125 #ifdef UNIEDITOR_UNIT_TEST
       
   126     friend class TestMsgAttachmentContainer;
       
   127 #endif
   127     };
   128     };
   128 
   129 
   129 #endif // MSG_UNIFIED_EDITOR_ATTACHMENT_CONTAINER_H
   130 #endif // MSG_UNIFIED_EDITOR_ATTACHMENT_CONTAINER_H