messagingapp/msgui/unifiedviewer/inc/univiewermediawidget.h
branchGCC_SURGE
changeset 47 5b14749788d7
parent 35 a32b19fb291e
parent 44 36f374c67aa8
equal deleted inserted replaced
35:a32b19fb291e 47:5b14749788d7
     1 /*
       
     2  * Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
       
     3  * All rights reserved.
       
     4  * This component and the accompanying materials are made available
       
     5  * under the terms of "Eclipse Public License v1.0"
       
     6  * which accompanies this distribution, and is available
       
     7  * at the URL "http://www.eclipse.org/legal/epl-v10.html".
       
     8  *
       
     9  * Initial Contributors:
       
    10  * Nokia Corporation - initial contribution.
       
    11  *
       
    12  * Contributors:
       
    13  *
       
    14  * Description:
       
    15  *
       
    16  */
       
    17 
       
    18 #ifndef UNIVIEWERMEDIAWIDGET_H
       
    19 #define UNIVIEWERMEDIAWIDGET_H
       
    20 
       
    21 // SYSTEM INCLUDES
       
    22 #include <HbWidget>
       
    23 
       
    24 // FORWARD DECLARATIONS
       
    25 class HbTextItem;
       
    26 class HbIconItem;
       
    27 class HbIcon;
       
    28 class HbPushButton;
       
    29 
       
    30 /**
       
    31  * Widget for displaying inline media objects.
       
    32  */
       
    33 class UniViewerMediaWidget : public HbWidget
       
    34 {
       
    35     Q_OBJECT
       
    36 
       
    37 public:
       
    38 
       
    39     /**
       
    40      * Constructor
       
    41      */
       
    42     explicit UniViewerMediaWidget(QGraphicsItem *parent = 0);
       
    43 
       
    44     /**
       
    45      * Destructor
       
    46      */
       
    47     virtual ~UniViewerMediaWidget();
       
    48 
       
    49     /**
       
    50      * Initialize method
       
    51      */
       
    52     void init();
       
    53 
       
    54     /**
       
    55      * Populates the widget contents.
       
    56      * @param icon Media icon name.
       
    57      * @param name Media file name.
       
    58      * @param info Media information.
       
    59      * @param bgFrame Background frame.
       
    60      */
       
    61     void populate(const QString &icon, const QString &name,
       
    62                   const QString &info, const QString &bgFrame);
       
    63 
       
    64     /**
       
    65      * Clears the contents of the widget.
       
    66      */
       
    67     void clearContent();
       
    68 
       
    69 signals:
       
    70 
       
    71     /**
       
    72      * Signal emitted when widget is clicked.
       
    73      */
       
    74     void clicked();
       
    75 
       
    76 private:
       
    77 
       
    78     /**
       
    79      * Media icon item.
       
    80      * Own
       
    81      */
       
    82     HbIconItem *mMediaIcon;
       
    83 
       
    84     /**
       
    85      * Media name text item.
       
    86      * Own
       
    87      */
       
    88     HbTextItem *mName;
       
    89 
       
    90     /**
       
    91      * Media information text item.
       
    92      * Own
       
    93      */
       
    94     HbTextItem *mInfo;
       
    95 
       
    96     /**
       
    97      * Background item of widget.
       
    98      * Own
       
    99      */
       
   100     HbPushButton *mFrameItem;
       
   101 };
       
   102 
       
   103 #endif // UNIVIEWERMEDIAWIDGET_H
       
   104 // EOF