qtinternetradio/irhswidgetplugin/inc/irhswidget.h
changeset 12 608f67c22514
parent 11 f683e24efca3
child 14 896e9dbc5f19
equal deleted inserted replaced
11:f683e24efca3 12:608f67c22514
    17 
    17 
    18 #ifndef IRHSWIDGET_H
    18 #ifndef IRHSWIDGET_H
    19 #define IRHSWIDGET_H
    19 #define IRHSWIDGET_H
    20 
    20 
    21 // System includes
    21 // System includes
    22 #include <QObject>
       
    23 #include <hbwidget.h>
    22 #include <hbwidget.h>
    24 #include <hbicon.h>
       
    25 
    23 
    26 // User includes
    24 // User includes
    27 #include "irservicedef.h"
    25 #include "irservicedef.h"
    28 
    26 
    29 // Forward declarations
    27 // Forward declarations
    30 class HbLabel;
    28 class QString;
       
    29 class QGraphicsLinearLayout;
       
    30 class IrHsWidgetTitleRow;
       
    31 class IrHsWidgetMetaDataRow;
    31 class IrServiceClient;
    32 class IrServiceClient;
    32 
    33 
    33 class IrHsWidget : public HbWidget
    34 class IrHsWidget : public HbWidget
    34 {
    35 {
    35     Q_OBJECT
    36     Q_OBJECT
    59         ELoading   = 3
    60         ELoading   = 3
    60         
    61         
    61     };
    62     };
    62     void handleHsWidgetStateChange(IrHsWidgetState aNewState);
    63     void handleHsWidgetStateChange(IrHsWidgetState aNewState);
    63     
    64     
    64     void loadStationLogo();
    65        
       
    66     void initHomeSreenWidget();
       
    67     void resizeHomeScreenWidget();
    65     
    68     
    66     void initHomeSreenWidget();
       
    67     void loadInitLayout();
    69     void loadInitLayout();
    68     void loadStoppedLayout();
    70     void loadStoppedLayout();
    69     void loadPlayingLayout();
    71     void loadPlayingLayout();
    70     void loadLoadingLayout();
    72     void loadLoadingLayout();
    71 
    73     
    72     // from QObject
    74     void enableUserAction();
    73     bool eventFilter(QObject *aObject, QEvent *aEvent);
    75     void disableUserAction();
    74 
    76 
    75 private slots:
    77 private slots:
    76     // handle user press event
    78     // handle user press event
    77     void handleLogoAreaAction();
    79     void handleCommonAreaAction();
    78     void handleControlAreaAction();
    80     void handleControlAreaAction();
    79     void handleGoToIrAreaAction();
       
    80     void handleCentralAreaAction();
       
    81     
    81     
    82     void handleControlFailed();
    82     void handleControlFailed();
    83 
    83 
    84     // for service notification
    84     // for service notification
    85     void handleStationNameUpdated(const QString &aStationName);
    85     void handleStationNameUpdated(const QString &aStationName);
    86     void handleStationLogoUpdated(bool aLogoAvailable);
    86     void handleStationLogoUpdated(bool aLogoAvailable);
    87     void handleMetaDataUpdated(const QString &aMetaData);
    87     void handleMetaDataUpdated(const QString &aMetaData);
    88     void handleIrStateUpdated(IrAppState::Type aNewState);
    88     void handleIrStateUpdated(IrAppState::Type aNewState);
    89 
    89 
    90 private:   
    90 private:    
    91     HbIcon   mLoadingIcon;
    91     bool mUserActionEnabled;
    92     
    92     
    93     HbLabel *mLogoLabel;
    93     QGraphicsLinearLayout   *mRowLayout;
    94     HbLabel *mControlLabel;
    94     IrHsWidgetTitleRow      *mTitleRow;
    95     HbLabel *mGoToIrLabel;
    95     IrHsWidgetMetaDataRow   *mMetaDataRow;
    96     HbLabel *mStationNameLabel;
       
    97     HbLabel *mMetadataLabel;
       
    98 
       
    99     HbWidget *mInfoControlArea;
       
   100     HbWidget *mCentralArea;
       
   101 
    96 
   102     IrServiceClient *mServiceClient;
    97     IrServiceClient *mServiceClient;
   103 
    98 
   104     IrAppState::Type mIrState;
    99     IrAppState::Type mIrState;
   105     IrHsWidgetState  mIrHsWidgetState;
   100     IrHsWidgetState  mIrHsWidgetState;