radiohswidget/inc/radiohswidget.h
changeset 57 21be958eb3ce
parent 47 74b7c6e79031
equal deleted inserted replaced
56:04837bf3a628 57:21be958eb3ce
    18 #ifndef RADIOHSWIDGET_H
    18 #ifndef RADIOHSWIDGET_H
    19 #define RADIOHSWIDGET_H
    19 #define RADIOHSWIDGET_H
    20 
    20 
    21 // System includes
    21 // System includes
    22 #include <HbWidget>
    22 #include <HbWidget>
       
    23 
       
    24 // User includes
       
    25 #include "radio_global.h"
    23 
    26 
    24 // Forward declarations
    27 // Forward declarations
    25 class HbLabel;
    28 class HbLabel;
    26 class HbPushButton;
    29 class HbPushButton;
    27 class XQSettingsManager;
    30 class XQSettingsManager;
    73 private:
    76 private:
    74     /*! Enum for information area layout states. */
    77     /*! Enum for information area layout states. */
    75     enum InformationAreaLayout
    78     enum InformationAreaLayout
    76     {
    79     {
    77         OneRow,
    80         OneRow,
    78         TwoRows,
    81         OneRowWithFavorite,
       
    82         TwoRowsWithFavorite,
    79         Animation
    83         Animation
    80     };
    84     };
    81 
    85 
    82     /*! Enum for control button identifier. */
    86     /*! Enum for control button identifier. */
    83     enum ControlButtonIdentifier{
    87     enum ControlButtonIdentifier{
   190         const QString &information);
   194         const QString &information);
   191     void changeInRadioInformation();
   195     void changeInRadioInformation();
   192     void clearRadioInformation();
   196     void clearRadioInformation();
   193     
   197     
   194     void changeInformationAreaLayout(const InformationAreaLayout layout);
   198     void changeInformationAreaLayout(const InformationAreaLayout layout);
       
   199     void changeFavoriteIcon(bool visibility);
   195     void changePowerButtonOn(const bool isPowerOn);
   200     void changePowerButtonOn(const bool isPowerOn);
   196     void enableStationButtons();
   201     void enableStationButtons();
   197     void defineButton(HbPushButton &target, const QString &graphicsId,
   202     void defineButton(HbPushButton &target, const QString &graphicsId,
   198         const QStringList &suffix, const QString &icon,
   203         const QStringList &suffix, const QString &icon,
   199         const QString &iconColor);
   204         const QString &iconColor);
   215     HbPushButton *mPowerButton;
   220     HbPushButton *mPowerButton;
   216     /*! Control button for previous station. */
   221     /*! Control button for previous station. */
   217     HbPushButton *mPreviousButton;
   222     HbPushButton *mPreviousButton;
   218     /*! Control button for next station. */
   223     /*! Control button for next station. */
   219     HbPushButton *mNextButton;
   224     HbPushButton *mNextButton;
   220     /*! Layout for information area. */
   225     /*! Layout for one row with favorite icon in information area. */
       
   226     QGraphicsWidget *mInformationAreaOneRowWithFavoriteLayout;
       
   227     /*! Label that is shown when there is only one row of information and
       
   228         favorite icon is shown. */
       
   229     HbLabel *mInformationOneRowWithFavoriteLabel;
       
   230     /*! Layout for two rows in information area. */
   221     QGraphicsWidget *mInformationAreaTwoRowsLayout;
   231     QGraphicsWidget *mInformationAreaTwoRowsLayout;
   222     /*! Label that is shown when there is only one row of information. */
   232     /*! Label that is shown when there is only one row of information. */
   223     HbLabel *mInformationLonelyRowLabel;
   233     HbLabel *mInformationLonelyRowLabel;
   224     /*! Label for first row when there is two rows of information. */
   234     /*! Label for first row when there is two rows of information. */
   225     HbLabel *mInformationFirstRowLabel;
   235     HbLabel *mInformationFirstRowWithFavoriteLabel;
   226     // TODO: This label should be modified to support marquee scrolling when Orbit supports it.
   236     // TODO: This label should be modified to support marquee scrolling when Orbit supports it.
   227     /*! Label for first second when there is two rows of information. */
   237     /*! Label for first second when there is two rows of information. */
   228     HbLabel *mInformationSecondRowLabel;
   238     HbLabel *mInformationSecondRowLabel;
   229     /*! Label for displaying animation. */
   239     /*! Label for displaying animation. */
   230     HbLabel *mAnimationIcon;
   240     HbLabel *mAnimationIcon;
       
   241     /*! Icon for displaying favorite/unfavorite star. */
       
   242     HbLabel *mFavoriteIcon;
   231     
   243     
   232     /*! Stores the state of the FM Radio application. */
   244     /*! Stores the state of the FM Radio application. */
   233     FmRadio::State mFmRadioState;
   245     FmRadio::State mFmRadioState;
       
   246     /*! Stores the region of the FM Radio. Needed for the genre localization. */
       
   247     RadioRegion::Region mRadioRegion;
   234 
   248 
   235     /*! Stores the count of favorite stations. */
   249     /*! Stores the count of favorite stations. */
   236     int mFavoriteStationCount;
   250     int mFavoriteStationCount;
   237     /*! Stores the count of local stations. */
   251     /*! Stores the count of local stations. */
   238     int mLocalStationCount;
   252     int mLocalStationCount;