messagingapp/msgui/msgaudiofetcher/inc/msgaudiofetcherview.h
changeset 56 f42d9a78f435
parent 55 5b3b2fa8c3ec
child 58 5401a102f08b
equal deleted inserted replaced
55:5b3b2fa8c3ec 56:f42d9a78f435
     1 /*
       
     2  * Copyright (c) 2010 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  *     The header file for messaging's audio fetcher view.
       
    16  *
       
    17  */
       
    18 
       
    19 #ifndef MSGAUDIOFETCHERVIEW_H
       
    20 #define MSGAUDIOFETCHERVIEW_H
       
    21 
       
    22 #ifdef BUILD_MSGAUDIOFETCHER_DLL
       
    23 #define MSGAUDIOFETCHER_DLL_EXPORT Q_DECL_EXPORT
       
    24 #else
       
    25 #define MSGAUDIOFETCHER_DLL_EXPORT Q_DECL_IMPORT
       
    26 #endif
       
    27 
       
    28 // SYSTEM INCLUDES
       
    29 #include <QObject>
       
    30 #include <hblistwidget.h>
       
    31 
       
    32 // USER INCLUDES
       
    33 #include "msgbaseview.h"
       
    34 #include "convergedmessage.h"
       
    35 
       
    36 // FORWARD DECLARATIONS
       
    37 class MsgAudioFetcherWidget;
       
    38 class HbAction;
       
    39 
       
    40 /**
       
    41  * @class MsgAudioFetcherView
       
    42  * @brief This class is messaging's audio fetcher view
       
    43  */
       
    44 class MSGAUDIOFETCHER_DLL_EXPORT MsgAudioFetcherView : public MsgBaseView
       
    45 {
       
    46 Q_OBJECT
       
    47 
       
    48 public:
       
    49     /**
       
    50      * Constructor
       
    51      */
       
    52     explicit MsgAudioFetcherView(const QVariantList& data);
       
    53 
       
    54     /**
       
    55      * Destructor
       
    56      */
       
    57     ~MsgAudioFetcherView();
       
    58 private:
       
    59     /**
       
    60      * Creates a widget and sets it to the view
       
    61      */
       
    62     void initMainWidget();
       
    63 
       
    64     /**
       
    65      * Initializes view's toolbar actions
       
    66      */
       
    67     void initToolBar();
       
    68 
       
    69     /**
       
    70      * tool bar actions must to be removed in case the app crashes.
       
    71      */
       
    72     void removeToolBarAction();
       
    73 
       
    74 private slots:
       
    75     /**
       
    76      * Handles toolbar's leftaction (play/pause)
       
    77      */
       
    78     void on_leftAction_triggered();
       
    79 
       
    80     /**
       
    81      * Handles toolbar's rightaction (select)
       
    82      */
       
    83     void on_rightAction_triggered();
       
    84 
       
    85     /**
       
    86      * enable toolbar actions, only when an item is selected
       
    87      */
       
    88     void enableToolBar(bool enable);
       
    89 
       
    90 private:
       
    91     /**
       
    92      * view's main widget
       
    93      */
       
    94     MsgAudioFetcherWidget *mWidget;
       
    95     
       
    96     /**
       
    97      * Toolbar's left action
       
    98      */
       
    99     HbAction *mToolBarLeftAction;
       
   100 
       
   101     /**
       
   102      * Toolbar's right action
       
   103      */
       
   104     HbAction *mToolBarRightAction;
       
   105     
       
   106     /**
       
   107      * Converged Message object
       
   108      * owned
       
   109      */
       
   110     ConvergedMessage* message;
       
   111 };
       
   112 
       
   113 #endif /* MSGAUDIOFETCHERVIEW_H */