diff -r fa1df4b99609 -r ebe688cedc25 messagingapp/msgui/msgaudiofetcher/inc/msgaudiofetcherview.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/messagingapp/msgui/msgaudiofetcher/inc/msgaudiofetcherview.h Tue Aug 31 15:11:31 2010 +0300 @@ -0,0 +1,113 @@ +/* + * Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies). + * All rights reserved. + * This component and the accompanying materials are made available + * under the terms of "Eclipse Public License v1.0" + * which accompanies this distribution, and is available + * at the URL "http://www.eclipse.org/legal/epl-v10.html". + * + * Initial Contributors: + * Nokia Corporation - initial contribution. + * + * Contributors: + * + * Description: + * The header file for messaging's audio fetcher view. + * + */ + +#ifndef MSGAUDIOFETCHERVIEW_H +#define MSGAUDIOFETCHERVIEW_H + +#ifdef BUILD_MSGAUDIOFETCHER_DLL +#define MSGAUDIOFETCHER_DLL_EXPORT Q_DECL_EXPORT +#else +#define MSGAUDIOFETCHER_DLL_EXPORT Q_DECL_IMPORT +#endif + +// SYSTEM INCLUDES +#include +#include + +// USER INCLUDES +#include "msgbaseview.h" +#include "convergedmessage.h" + +// FORWARD DECLARATIONS +class MsgAudioFetcherWidget; +class HbAction; + +/** + * @class MsgAudioFetcherView + * @brief This class is messaging's audio fetcher view + */ +class MSGAUDIOFETCHER_DLL_EXPORT MsgAudioFetcherView : public MsgBaseView +{ +Q_OBJECT + +public: + /** + * Constructor + */ + explicit MsgAudioFetcherView(const QVariantList& data); + + /** + * Destructor + */ + ~MsgAudioFetcherView(); +private: + /** + * Creates a widget and sets it to the view + */ + void initMainWidget(); + + /** + * Initializes view's toolbar actions + */ + void initToolBar(); + + /** + * tool bar actions must to be removed in case the app crashes. + */ + void removeToolBarAction(); + +private slots: + /** + * Handles toolbar's leftaction (play/pause) + */ + void on_leftAction_triggered(); + + /** + * Handles toolbar's rightaction (select) + */ + void on_rightAction_triggered(); + + /** + * enable toolbar actions, only when an item is selected + */ + void enableToolBar(bool enable); + +private: + /** + * view's main widget + */ + MsgAudioFetcherWidget *mWidget; + + /** + * Toolbar's left action + */ + HbAction *mToolBarLeftAction; + + /** + * Toolbar's right action + */ + HbAction *mToolBarRightAction; + + /** + * Converged Message object + * owned + */ + ConvergedMessage* message; +}; + +#endif /* MSGAUDIOFETCHERVIEW_H */