qtinternetradio/ui/inc/irnowplayingview.h
changeset 0 09774dfdd46b
child 3 ee64f059b8e1
equal deleted inserted replaced
-1:000000000000 0:09774dfdd46b
       
     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 #ifndef IRNOWPLAYINGVIEW_H
       
    18 #define IRNOWPLAYINGVIEW_H
       
    19 
       
    20 #include <hbeffect.h>
       
    21 
       
    22 #include "irbaseview.h"
       
    23 #include "irqevent.h"
       
    24 
       
    25 class IRNowPlayingContainer;
       
    26 class IRStationDetailsContainer;
       
    27 class HbAction;
       
    28 class IRQPreset;
       
    29 class IRQMusicShop;
       
    30 class IRQStatisticsReporter;
       
    31 class IRQMetaData;
       
    32 class IRQStationExporter;
       
    33 
       
    34 /**
       
    35  * This class shows the station information when it's played.
       
    36  */
       
    37 
       
    38 class IRNowPlayingView : public IRBaseView
       
    39       
       
    40 {
       
    41     Q_OBJECT
       
    42 
       
    43 public:
       
    44     ~IRNowPlayingView();
       
    45 
       
    46 protected:
       
    47     IRNowPlayingView(IRApplication* aApplication, TIRViewId aViewId);
       
    48     //from base class IRBaseView
       
    49     TIRHandleResult handleSystemEvent(TIRSystemEventType aEvent);
       
    50 
       
    51     //from base class IRBaseView
       
    52     TIRHandleResult handleCommand(TIRViewCommand aCommand, TIRViewCommandReason aReason);
       
    53 
       
    54     //from base class IRBaseView
       
    55     void launchAction();
       
    56 
       
    57     
       
    58 
       
    59 private slots:
       
    60     void presetLogoDownload(IRQPreset* aPreset);
       
    61     void playStopControl();
       
    62     void stop();
       
    63     void playingStarted();
       
    64     void playingStopped();
       
    65     void add2FavControl();
       
    66     void flipControl();
       
    67     void hidePlayingWidgetComplete(HbEffect::EffectStatus status);
       
    68     void hideDetailsWidgetComplete(HbEffect::EffectStatus status);
       
    69     void stereoControl();
       
    70     void openWebAddressControl();
       
    71     void launchSettingsView();
       
    72     void updateSongInfo(IRQMetaData*);
       
    73     void updateLogoInfo();
       
    74     void initializeLogo();
       
    75     void networkRequestNotified(IRQNetworkEvent aEvent);
       
    76     void findInMusicShop();
       
    77     void helpAction();
       
    78     void playPressed();
       
    79     void gotoMusicStore();
       
    80     void recognizeSong();
       
    81     void openAdvLink();
       
    82     void shareStationViaMms();
       
    83     void prepareMenu();
       
    84 
       
    85 private:
       
    86     void createMenu();
       
    87     void createToolBar();
       
    88     void updateStationInfo();
       
    89     void updateAdvImage();
       
    90     void showWidget();
       
    91     void initialize();
       
    92     void updateMusicStatus();
       
    93 
       
    94 private:
       
    95     // preset to save station big logo
       
    96     IRQPreset *iLogoPreset;
       
    97     IRNowPlayingContainer *iNowPlayingContainer;
       
    98     IRStationDetailsContainer *iStationDetailsContainer;
       
    99     // save the pointer of idle container
       
   100     QGraphicsWidget *iIdleContainer;
       
   101     IRQMusicShop *iMusicShop;
       
   102     IRQStatisticsReporter *iStatisticsReporter;
       
   103     IRQStationExporter *iStationExporter;
       
   104 
       
   105     // menu bar actions
       
   106     HbAction *iStereoAction;
       
   107 
       
   108     // tool bar actions
       
   109     HbAction *iMusicShopAction;
       
   110     HbAction *iPlayStopAction;
       
   111     HbAction *iAdd2FavAction;
       
   112     HbAction *iFlipAction;
       
   113 
       
   114     QString iAdvImageUrl;
       
   115     QString iTempAdvClickThroughUrl;
       
   116     QString iAdvClickThroughUrl;
       
   117     bool    iGettingAdv;
       
   118     HbIcon *iStationLogo;
       
   119 
       
   120     int  iStereoMode;
       
   121     bool iShowStationInfo;
       
   122 
       
   123     enum LogoState
       
   124     {
       
   125         EDefaultLogo    = 0, // Use default logo
       
   126         ERequestIssued  = 1, // Issue request to get logo from server
       
   127         ELogoDetermined = 2, // Logo got from server or user defined
       
   128                              // stations with default logo
       
   129     };
       
   130     LogoState iLogoStatus;
       
   131     
       
   132     bool iFindinNmsAllowed;
       
   133     
       
   134     bool iSongNameAvailable;
       
   135     
       
   136     friend class IRViewManager;
       
   137 };
       
   138 
       
   139 #endif   //IRNOWPLAYINGVIEW_H