radioapp/radiowidgets/inc/radiouiloader.h
branchGCC_SURGE
changeset 37 451b2e1545b2
parent 33 11b6825f0862
child 53 bb6ed1806599
equal deleted inserted replaced
26:6bcf277166c1 37:451b2e1545b2
    23 
    23 
    24 // Constants
    24 // Constants
    25 
    25 
    26 namespace DOCML
    26 namespace DOCML
    27 {
    27 {
    28     static QString FILE_MAINVIEW                    = ":/layout/mainview.docml";
    28     static const QLatin1String FILE_MAINVIEW                    ( ":/layout/mainview.docml" );
    29     static QString FILE_STATIONSVIEW                = ":/layout/stationsview.docml";
    29     static const QLatin1String FILE_STATIONSVIEW                ( ":/layout/stationsview.docml" );
    30     static QString FILE_HISTORYVIEW                 = ":/layout/historyview.docml";
    30     static const QLatin1String FILE_HISTORYVIEW                 ( ":/layout/historyview.docml" );
    31 
    31 
    32     // Generic XML UI definitions
    32     // Generic XML UI definitions
    33     static QString NAME_VIEW                        = "view";
    33     static const QLatin1String NAME_VIEW                        ( "view" );
    34     static QString SECTION_PORTRAIT                 = "portrait";
    34     static const QLatin1String SECTION_LAZY_LOAD                ( "lazy_load" );
    35     static QString SECTION_LANDSCAPE                = "landscape";
    35     static const QLatin1String SECTION_PORTRAIT                 ( "portrait" );
    36     static QString NAME_LOUDSPEAKER_ACTION          = "loudspeaker_action";
    36     static const QLatin1String SECTION_LANDSCAPE                ( "landscape" );
       
    37     static const QLatin1String NAME_LOUDSPEAKER_ACTION          ( "loudspeaker_action" );
       
    38     static const QLatin1String NAME_EXIT_ACTION                 ( "exit_action" );
    37 
    39 
    38     // RadioMainView
    40     // RadioMainView
    39     static QString MV_NAME_HISTORYVIEW_ACTION       = "mv:historyview_action";
    41     static const QLatin1String MV_NAME_HISTORYVIEW_ACTION       ( "mv:historyview_action" );
    40     static QString MV_NAME_STATION_CAROUSEL         = "mv:station_carousel";
    42     static const QLatin1String MV_NAME_CAROUSEL_BACKGROUND      ( "mv:carousel_background" );
    41     static QString MV_NAME_FREQUENCY_STRIP          = "mv:frequency_strip";
    43     static const QLatin1String MV_NAME_CAROUSEL_OVERLAY         ( "mv:carousel_overlay" );
    42     static QString MV_NAME_STATIONS_BUTTON          = "mv:stations_button";
    44     static const QLatin1String MV_NAME_STATION_CAROUSEL         ( "mv:station_carousel" );
    43     static QString MV_NAME_SCAN_BUTTON              = "mv:scan_button";
    45     static const QLatin1String MV_NAME_FREQUENCY_BACKGROUND     ( "mv:frequency_background" );
    44     static QString MV_NAME_SPEAKER_BUTTON           = "mv:loudspeaker_button";
    46     static const QLatin1String MV_NAME_FREQUENCY_STRIP          ( "mv:frequency_strip" );
    45     static QString MV_SECTION_NO_ANTENNA            = "mv:no_antenna";
    47     static const QLatin1String MV_NAME_STATIONS_BUTTON          ( "mv:stations_button" );
    46     static QString MV_SECTION_SEEKING               = "mv:seeking";
    48     static const QLatin1String MV_NAME_FAVORITE_BUTTON          ( "mv:favorite_button" );
    47     static QString MV_SECTION_SCANNING              = "mv:scanning";
    49     static const QLatin1String MV_NAME_SPEAKER_BUTTON           ( "mv:loudspeaker_button" );
    48     static QString MV_SECTION_NO_FAVORITES          = "mv:no_favorites";
    50     static const QLatin1String MV_NAME_PREV_BUTTON              ( "mv:prev_button" );
    49     static QString MV_SECTION_NORMAL                = "mv:normal";
    51     static const QLatin1String MV_NAME_NEXT_BUTTON              ( "mv:next_button" );
       
    52     static const QLatin1String MV_NAME_SCAN_ACTION              ( "mv:scan_action" );
       
    53     static const QLatin1String MV_NAME_CAROUSEL_RT_MENU         ( "mv:carousel_rt_menu" );
       
    54     static const QLatin1String MV_SECTION_NO_ANTENNA            ( "mv:no_antenna" );
       
    55     static const QLatin1String MV_SECTION_SEEKING               ( "mv:seeking" );
       
    56     static const QLatin1String MV_SECTION_SCANNING              ( "mv:scanning" );
       
    57     static const QLatin1String MV_SECTION_NO_FAVORITES          ( "mv:no_favorites" );
       
    58     static const QLatin1String MV_SECTION_NORMAL                ( "mv:normal" );
    50 
    59 
    51     // RadioStationsView
    60     // RadioStationsView
    52     static QString SV_NAME_HEADING_BANNER           = "sv:heading_banner";
    61     static const QLatin1String SV_NAME_HEADING_BANNER           ( "sv:heading_banner" );
    53     static QString SV_NAME_STATIONS_LIST            = "sv:stations_list";
    62     static const QLatin1String SV_NAME_STATIONS_LIST            ( "sv:stations_list" );
    54     static QString SV_NAME_FAVORITES_BUTTON         = "sv:favorite_stations_button";
    63     static const QLatin1String SV_NAME_FAVORITES_BUTTON         ( "sv:favorite_stations_button" );
    55     static QString SV_NAME_LOCALS_BUTTON            = "sv:local_stations_button";
    64     static const QLatin1String SV_NAME_LOCALS_BUTTON            ( "sv:local_stations_button" );
    56     static QString SV_NAME_SCAN_ACTION              = "sv:scan_action";
    65     static const QLatin1String SV_NAME_SCAN_ACTION              ( "sv:scan_action" );
    57     static QString SV_NAME_CLEAR_LIST_ACTION        = "sv:clear_list_action";
    66     static const QLatin1String SV_NAME_CLEAR_LIST_ACTION        ( "sv:clear_list_action" );
    58     static QString SV_NAME_SCAN_BUTTON              = "sv:scan_button";
    67     static const QLatin1String SV_NAME_SCAN_BUTTON              ( "sv:scan_button" );
       
    68     static const QLatin1String SV_NAME_PLAY_ACTION              ( "sv:play_action" );
       
    69     static const QLatin1String SV_NAME_RENAME_ACTION            ( "sv:rename_action" );
       
    70     static const QLatin1String SV_NAME_FAVORITE_ACTION          ( "sv:toggle_favorite_action" );
       
    71     static const QLatin1String SV_NAME_DELETE_ACTION            ( "sv:delete_action" );
    59 
    72 
    60     static QString SV_SECTION_SHOW_ALL_STATIONS     = "show_all_stations";
    73     static const QLatin1String SV_SECTION_SHOW_ALL_STATIONS     ( "show_all_stations" );
    61     static QString SV_SECTION_SHOW_FAVORITES        = "show_favorites";
    74     static const QLatin1String SV_SECTION_SHOW_FAVORITES        ( "show_favorites" );
    62     static QString SV_SECTION_SHOW_SCAN_TEXT        = "show_scan_text";
    75     static const QLatin1String SV_SECTION_SHOW_SCAN_TEXT        ( "show_scan_text" );
    63     static QString SV_SECTION_HIDE_SCAN_TEXT        = "hide_scan_text";
    76     static const QLatin1String SV_SECTION_HIDE_SCAN_TEXT        ( "hide_scan_text" );
    64 
    77 
    65     // RadioStationsView Context Menu
    78     // RadioStationsView Context Menu
    66     static QString NAME_CONTEXT_MENU                = "sv:context_menu";
    79     static const QLatin1String NAME_CONTEXT_MENU                ( "sv:context_menu" );
    67     static QString NAME_CONTEXT_RENAME              = "sv:rename_action";
    80     static const QLatin1String NAME_CONTEXT_RENAME              ( "sv:rename_action" );
    68     static QString NAME_CONTEXT_FAVORITE            = "sv:toggle_favorite_action";
    81     static const QLatin1String NAME_CONTEXT_FAVORITE            ( "sv:toggle_favorite_action" );
    69     static QString NAME_CONTEXT_DELETE              = "sv:delete_action";
    82     static const QLatin1String NAME_CONTEXT_DELETE              ( "sv:delete_action" );
    70     static QString NAME_INPUT_QUERY                 = "sv:station_name_query";
    83     static const QLatin1String NAME_INPUT_QUERY                 ( "sv:station_name_query" );
    71 
    84 
    72     // Station Carousel
    85     // Station Carousel
    73     static QString MV_NAME_INFO_FIRST_ROW           = "mv:InfoFirstRow";
    86     static const QLatin1String MV_NAME_INFO_FIRST_ROW           ( "mv:InfoFirstRow" );
    74     static QString MV_NAME_INFO_SECOND_ROW          = "mv:InfoSecondRow";
    87     static const QLatin1String MV_NAME_INFO_SECOND_ROW          ( "mv:InfoSecondRow" );
    75     static QString MV_NAME_INFO_THIRD_ROW           = "mv:InfoThirdRow";
    88     static const QLatin1String MV_NAME_INFO_THIRD_ROW           ( "mv:InfoThirdRow" );
    76     static QString MV_NAME_INFO_FOURTH_ROW          = "mv:InfoFourthRow";
    89     static const QLatin1String MV_NAME_INFO_FOURTH_ROW          ( "mv:InfoFourthRow" );
    77     static QString MV_NAME_INFO_TEXT                = "mv:info_text";
    90     static const QLatin1String MV_NAME_INFO_TEXT                ( "mv:info_text" );
    78 
    91 
    79     // History View
    92     // History View
    80     static QString HV_NAME_CLEAR_LIST_ACTION        = "hv:clear_list_action";
    93     static const QLatin1String HV_NAME_CLEAR_LIST_ACTION        ( "hv:clear_list_action" );
    81     static QString HV_NAME_HISTORY_LIST             = "hv:history_list";
    94     static const QLatin1String HV_NAME_HISTORY_LIST             ( "hv:history_list" );
    82     static QString HV_NAME_ALL_SONGS_BUTTON         = "hv:all_songs_button";
    95     static const QLatin1String HV_NAME_ALL_SONGS_BUTTON         ( "hv:all_songs_button" );
    83     static QString HV_NAME_TAGGED_SONGS_BUTTON      = "hv:tagged_songs_button";
    96     static const QLatin1String HV_NAME_TAGGED_SONGS_BUTTON      ( "hv:tagged_songs_button" );
    84     static QString HV_SECTION_SHOW_LIST             = "hv:show_list";
    97     static const QLatin1String HV_SECTION_SHOW_LIST             ( "hv:show_list" );
    85     static QString HV_SECTION_HIDE_LIST             = "hv:hide_list";
    98     static const QLatin1String HV_SECTION_HIDE_LIST             ( "hv:hide_list" );
    86     static QString HV_SECTION_HISTORY_MODE          = "hv:history_mode";
    99     static const QLatin1String HV_SECTION_HISTORY_MODE          ( "hv:history_mode" );
    87     static QString HV_SECTION_FAVORITE_MODE         = "hv:tagged_mode";
   100     static const QLatin1String HV_SECTION_FAVORITE_MODE         ( "hv:tagged_mode" );
    88     static QString HV_NAME_CONTEXT_MENU             = "hv:context_menu";
   101     static const QLatin1String HV_NAME_CONTEXT_MENU             ( "hv:context_menu" );
       
   102     static const QLatin1String HV_NAME_TOGGLE_TAG_ACTION        ( "hv:toggle_tag_action" );
       
   103     static const QLatin1String HV_NAME_OVI_STORE_ACTION         ( "hv:ovi_store_action" );
       
   104     static const QLatin1String HV_NAME_OTHER_STORE_ACTION       ( "hv:other_store_action" );
    89 
   105 
    90     // History View Context Menu
   106     // History View Context Menu
    91     static QString HV_NAME_CONTEXT_TAG              = "hv:toggle_tag_action";
   107     static const QLatin1String HV_NAME_CONTEXT_TAG              ( "hv:toggle_tag_action" );
    92     static QString HV_NAME_CONTEXT_SEARCH           = "hv:search_from_other_store_action";
   108     static const QLatin1String HV_NAME_CONTEXT_SEARCH           ( "hv:search_from_other_store_action" );
    93 
   109 
    94 }
   110 }
    95 
   111 
    96 // Class declaration
   112 // Class declaration
    97 class RadioUiLoader : public HbDocumentLoader
   113 class RadioUiLoader : public HbDocumentLoader