radioapp/radiowidgets/inc/radiomainview.h
branchGCC_SURGE
changeset 37 451b2e1545b2
parent 33 11b6825f0862
child 48 e14766a36cdc
equal deleted inserted replaced
26:6bcf277166c1 37:451b2e1545b2
    21 // System includes
    21 // System includes
    22 #include <QScopedPointer>
    22 #include <QScopedPointer>
    23 
    23 
    24 // User includes
    24 // User includes
    25 #include "radioviewbase.h"
    25 #include "radioviewbase.h"
    26 #include "radiowidgetsexport.h"
       
    27 
    26 
    28 // Forward declarations
    27 // Forward declarations
    29 class RadioWindow;
    28 class RadioWindow;
    30 class RadioStationModel;
    29 class RadioStationModel;
    31 class HbPushButton;
    30 class HbPushButton;
    32 class RadioUiLoader;
    31 class RadioUiLoader;
    33 class RadioFrequencyScanner;
    32 class RadioFrequencyScanner;
    34 class RadioStationCarousel;
    33 class RadioStationCarousel;
    35 class RadioFrequencyStrip;
    34 class RadioFrequencyStrip;
       
    35 class RadioStation;
    36 
    36 
    37 // Class declaration
    37 // Class declaration
    38 class WIDGETS_DLL_EXPORT RadioMainView : public RadioViewBase
    38 class RadioMainView : public RadioViewBase
    39     {
    39     {
    40     Q_OBJECT
    40     Q_OBJECT
    41 
    41 
    42 public:
    42 public:
    43 
    43 
    44     explicit RadioMainView();
    44     explicit RadioMainView();
    45     ~RadioMainView();
    45     ~RadioMainView();
    46 
    46 
    47     void setScanningMode( bool scanning );
    47     void setScanningMode( bool scanning );
    48 
    48 
       
    49 signals:
       
    50 
       
    51     void applicationReady();
       
    52 
    49 private slots:
    53 private slots:
    50 
    54 
    51     void setFrequencyFromWidget( uint frequency, int reason );
    55     void setFrequencyFromWidget( uint frequency, int reason, int direction );
    52     void setFrequencyFromEngine( uint frequency, int reason );
    56     void setFrequencyFromEngine( uint frequency, int reason );
    53     void skip( int skipMode );
    57     void skip( int skipMode );
       
    58     void openStationsView();
    54     void toggleScanning();
    59     void toggleScanning();
       
    60     void toggleFavorite();
    55     void seekingStarted();
    61     void seekingStarted();
       
    62     void updateAntennaStatus( bool connected );
    56     void updateAudioRoute( bool loudspeaker );
    63     void updateAudioRoute( bool loudspeaker );
       
    64     void setManualSeekMode( bool manualSeekActive );
       
    65     void handleFavoriteChange( const RadioStation& station );
       
    66     void saveActivity();
       
    67 
       
    68     void toggleSkippingMode();  //TODO: Remove. Temporary test code
       
    69     void resetFirstTimeCount(); //TODO: Remove. Temporary test code
    57 
    70 
    58 private:
    71 private:
    59 
    72 
    60 // from base class RadioViewBase
    73 // from base class RadioViewBase
    61 
    74 
       
    75     void preLazyLoadInit();
    62     void init();
    76     void init();
    63     void setOrientation();
    77     void setOrientation();
    64     void userAccepted();
    78     void userAccepted();
       
    79 
       
    80 // from base class QObject
       
    81 
       
    82     bool eventFilter( QObject* watched, QEvent* event );
       
    83 
       
    84 // New functions
       
    85 
       
    86     void updateFavoriteButton();
    65 
    87 
    66 private: // data
    88 private: // data
    67 
    89 
    68     QScopedPointer<RadioFrequencyScanner>   mFrequencyScanner;
    90     QScopedPointer<RadioFrequencyScanner>   mFrequencyScanner;
    69     RadioStationCarousel*                   mCarousel;
    91     RadioStationCarousel*                   mCarousel;
    70     RadioFrequencyStrip*                    mFrequencyStrip;
    92     RadioFrequencyStrip*                    mFrequencyStrip;
    71 
    93 
       
    94     HbAction*                               mSkippingAction;    //TODO: Remove. Temporary test code
       
    95     bool                                    mAlternateSkipping; //TODO: Remove. Temporary test code
       
    96 
    72     };
    97     };
    73 
    98 
    74 #endif // RADIOMAINVIEW_H
    99 #endif // RADIOMAINVIEW_H