radioapp/radiouiengine/inc/radiolocalization.h
changeset 16 f54ebcfc1b80
parent 14 63aabac4416d
child 17 2cf3bab7c5c6
child 19 afea38384506
equal deleted inserted replaced
14:63aabac4416d 16:f54ebcfc1b80
     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 
       
    18 // System includes
       
    19 #include <QObject>
       
    20 
       
    21 typedef struct{ const char* source; const char* comment; } Translation;
       
    22 
       
    23 #define TRANSLATE(string) tr( string.source, string.comment )
       
    24 #define QTRANSLATE(string) QObject::tr( string.source, string.comment )
       
    25 
       
    26 static const char* KContextApplication      = "RadioApplication";
       
    27 static const char* KContextViewBase         = "RadioViewBase";
       
    28 static const char* KContextModel            = "RadioStationModel";
       
    29 static const char* KContextTuningView       = "RadioTuningView";
       
    30 static const char* KContextStationControl   = "RadioStationControlWidget";
       
    31 static const char* KContextStationsView     = "RadioStationsView";
       
    32 static const char* KContextWizardView       = "RadioWizardView";
       
    33 static const char* KContextPresetScanner    = "RadioFrequencyScanner";
       
    34 static const char* KContextMenuBar          = "Menu";
       
    35 
       
    36 //:
       
    37 //* loc-layout_id foo_dialog
       
    38 //* loc-blank False
       
    39 //* loc-viewid vid1
       
    40 //* loc-positionid pid1
       
    41 const Translation KConnectHeadsetAntenna = QT_TRANSLATE_NOOP3( KContextTuningView, "Connect headset antenna", "txt_rad_list_connect_headset_antenna" );
       
    42 
       
    43 //: Headset disconnected popup title
       
    44 //* loc-layout_id foo_dialog
       
    45 //* loc-blank False
       
    46 //* loc-viewid vid1
       
    47 //* loc-positionid pid1
       
    48 const Translation KTitleHeadsetDisconnectedPopup = QT_TRANSLATE_NOOP3( KContextApplication, "Headset disconnected", "txt_fmradio_popup_headset_disconnected" );
       
    49 
       
    50 //: FMRadio application name
       
    51 //* loc-layout_id foo_dialog
       
    52 //* loc-blank False
       
    53 //* loc-viewid vid1
       
    54 //* loc-positionid pid1
       
    55 const Translation KApplicationName = QT_TRANSLATE_NOOP3( KContextViewBase, "FM Radio", "txt_fmradio_appname" );
       
    56 
       
    57 //: Error message telling that radio receiver startup failed
       
    58 //* loc-layout_id foo_dialog
       
    59 //* loc-blank False
       
    60 //* loc-viewid vid1
       
    61 //* loc-positionid pid1
       
    62 const Translation KErrorEngineStartFailed = QT_TRANSLATE_NOOP3( KContextApplication, "Failed to start radio receiver", "txt_fmradio_popup_start_failed" );
       
    63 
       
    64 //: Radio frequency megahertz abbreviation
       
    65 //* loc-layout_id foo_dialog
       
    66 //* loc-blank False
       
    67 //* loc-viewid vid1
       
    68 //* loc-positionid pid1
       
    69 const Translation KFrequencyMhz = QT_TRANSLATE_NOOP3( KContextModel, "%1 Mhz", "txt_fmradio_model_mhz" );
       
    70 
       
    71 // TUNING VIEW
       
    72 
       
    73 //: Menu item in the tuning view menu to activate the stations view
       
    74 //* loc-layout_id foo_dialog
       
    75 //* loc-blank False
       
    76 //* loc-viewid vid1
       
    77 //* loc-positionid pid1
       
    78 const Translation KMenuActivateStationsView = QT_TRANSLATE_NOOP3( KContextTuningView, "Go to Stations View", "txt_fmradio_action_activate_stationsview" );
       
    79 
       
    80 //: Text in the Station information area when seeking is ongoing
       
    81 //* loc-layout_id foo_dialog
       
    82 //* loc-blank False
       
    83 //* loc-viewid vid1
       
    84 //* loc-positionid pid1
       
    85 const Translation KHeadingSeeking = QT_TRANSLATE_NOOP3( KContextTuningView, "Seeking", "txt_fmradio_heading_seeking" );
       
    86 
       
    87 // STATIONS VIEW
       
    88 
       
    89 //: Menu item in the stations view menu to activate Wizard view
       
    90 //* loc-layout_id foo_dialog
       
    91 //* loc-blank False
       
    92 //* loc-viewid vid1
       
    93 //* loc-positionid pid1
       
    94 const Translation KMenuScanLocalStations = QT_TRANSLATE_NOOP3( KContextStationsView, "Scan local stations", "txt_fmradio_action_scan_local_stations" );
       
    95 
       
    96 //: Menu item in the stations view menu to activate the tuning view
       
    97 //* loc-layout_id foo_dialog
       
    98 //* loc-blank False
       
    99 //* loc-viewid vid1
       
   100 //* loc-positionid pid1
       
   101 const Translation KMenuActivateTuningView = QT_TRANSLATE_NOOP3( KContextStationsView, "Go to Tuning View", "txt_fmradio_action_activate_tuningview" );
       
   102 
       
   103 //: Filter button to show only the favorite stations in the stations view
       
   104 //* loc-layout_id foo_dialog
       
   105 //* loc-blank False
       
   106 //* loc-viewid vid1
       
   107 //* loc-positionid pid1
       
   108 const Translation KBtnTextFavorites = QT_TRANSLATE_NOOP3( KContextStationsView, "Favorites", "txt_fmradio_show_favorites" );
       
   109 
       
   110 //: Filter button to show only the local stations in the stations view
       
   111 //* loc-layout_id foo_dialog
       
   112 //* loc-blank False
       
   113 //* loc-viewid vid1
       
   114 //* loc-positionid pid1
       
   115 const Translation KBtnTextLocalStations = QT_TRANSLATE_NOOP3( KContextStationsView, "Local stations", "txt_fmradio_show_local_stations" );
       
   116 
       
   117 //: Heading text to indicate that stations list is currently displaying favorite stations
       
   118 //* loc-layout_id foo_dialog
       
   119 //* loc-blank False
       
   120 //* loc-viewid vid1
       
   121 //* loc-positionid pid1
       
   122 const Translation KHeadingTextFavorites = QT_TRANSLATE_NOOP3( KContextStationsView, "Favorites", "txt_fmradio_heading_favorites" );
       
   123 
       
   124 //: Prefix of the text in a button that changes view to tuning view.
       
   125 //* loc-layout_id foo_dialog
       
   126 //* loc-blank False
       
   127 //* loc-viewid vid1
       
   128 //* loc-positionid pid1
       
   129 const Translation KBtnTextNowPlaying = QT_TRANSLATE_NOOP3( KContextStationsView, "Now Playing: %1", "txt_fmradio_btn_now_playing" );
       
   130 
       
   131 //: Text in a button that changes view to tuning view (headset disconnected case).
       
   132 //* loc-layout_id foo_dialog
       
   133 //* loc-blank False
       
   134 //* loc-viewid vid1
       
   135 //* loc-positionid pid1
       
   136 const Translation KBtnTextConnectHeadsetAntenna = QT_TRANSLATE_NOOP3( KContextStationsView, "Connect headset antenna", "txt_fmradio_btn_connect_headset_antenna" );
       
   137 
       
   138 //: Heading text to indicate that stations list is currently displaying local stations
       
   139 //* loc-layout_id foo_dialog
       
   140 //* loc-blank False
       
   141 //* loc-viewid vid1
       
   142 //* loc-positionid pid1
       
   143 const Translation KHeadingTextLocalStations = QT_TRANSLATE_NOOP3( KContextStationsView, "Local stations", "txt_fmradio_heading_local_stations" );
       
   144 
       
   145 //: Title for the progress note for scanning local stations
       
   146 //* loc-layout_id foo_dialog
       
   147 //* loc-blank False
       
   148 //* loc-viewid vid1
       
   149 //* loc-positionid pid1
       
   150 const Translation KProgressTitleScanStations = QT_TRANSLATE_NOOP3( KContextPresetScanner, "Scanning local stations", "txt_fmradio_title_scan_stations" );
       
   151 
       
   152 //: Title for the progress note for scanning local stations. Shows the amount of stations found so far
       
   153 //* loc-layout_id foo_dialog
       
   154 //* loc-blank False
       
   155 //* loc-viewid vid1
       
   156 //* loc-positionid pid1
       
   157 const Translation KProgressTitleStationsFound = QT_TRANSLATE_NOOP3( KContextPresetScanner, "%1 stations found", "txt_fmradio_title_stations_found" );
       
   158 
       
   159 // Stations view context sentive menu texts
       
   160 
       
   161 //: Title for the "rename station" menu item in the stationsview context sensitive menu
       
   162 //* loc-layout_id foo_dialog
       
   163 //* loc-blank False
       
   164 //* loc-viewid vid1
       
   165 //* loc-positionid pid1
       
   166 const Translation KMenuItemRenameStation = QT_TRANSLATE_NOOP3( KContextStationsView, "Rename station", "txt_fmradio_menu_rename_station" );
       
   167 
       
   168 //: Title for the "remove renaming" menu item in the stationsview context sensitive menu
       
   169 //* loc-layout_id foo_dialog
       
   170 //* loc-blank False
       
   171 //* loc-viewid vid1
       
   172 //* loc-positionid pid1
       
   173 const Translation KMenuItemRemoveRenaming = QT_TRANSLATE_NOOP3( KContextStationsView, "Remove renaming", "txt_fmradio_menu_remove_renaming" );
       
   174 
       
   175 //: Title for the input query used to rename the station
       
   176 //* loc-layout_id foo_dialog
       
   177 //* loc-blank False
       
   178 //* loc-viewid vid1
       
   179 //* loc-positionid pid1
       
   180 const Translation KQueryEnterStationName = QT_TRANSLATE_NOOP3( KContextStationsView, "Enter station name", "txt_fmradio_query_enter_station_name" );
       
   181 
       
   182 //: Title for the "set as favorite" menu item in the stationsview context sensitive menu
       
   183 //* loc-layout_id foo_dialog
       
   184 //* loc-blank False
       
   185 //* loc-viewid vid1
       
   186 //* loc-positionid pid1
       
   187 const Translation KMenuItemSetAsFavorite = QT_TRANSLATE_NOOP3( KContextStationsView, "Set as favorite", "txt_fmradio_menu_set_favorite" );
       
   188 
       
   189 //: Title for the "remove favorite" menu item in the stationsview context sensitive menu
       
   190 //* loc-layout_id foo_dialog
       
   191 //* loc-blank False
       
   192 //* loc-viewid vid1
       
   193 //* loc-positionid pid1
       
   194 const Translation KMenuItemRemoveFavorite = QT_TRANSLATE_NOOP3( KContextStationsView, "Remove favorite", "txt_fmradio_menu_remove_favorite" );
       
   195 
       
   196 //: Title for the "remove station" menu item in the stationsview context sensitive menu
       
   197 //* loc-layout_id foo_dialog
       
   198 //* loc-blank False
       
   199 //* loc-viewid vid1
       
   200 //* loc-positionid pid1
       
   201 const Translation KMenuItemRemoveStation = QT_TRANSLATE_NOOP3( KContextStationsView, "Remove station", "txt_fmradio_menu_remove_station" );
       
   202 
       
   203 // WIZARD VIEW
       
   204 
       
   205 //: Heading text to indicate that user can select favourite stations from the stations list
       
   206 //* loc-layout_id foo_dialog
       
   207 //* loc-blank False
       
   208 //* loc-viewid vid1
       
   209 //* loc-positionid pid1
       
   210 const Translation KHeadingTextSelectFavorites = QT_TRANSLATE_NOOP3( KContextWizardView, "Select favourite stations", "txt_fmradio_heading_select_favorites" );
       
   211 
       
   212 //: Button for marking all Wizard view station listbox items
       
   213 //* loc-layout_id foo_dialog
       
   214 //* loc-blank False
       
   215 //* loc-viewid vid1
       
   216 //* loc-positionid pid1
       
   217 const Translation KBtnTextMarkAll = QT_TRANSLATE_NOOP3( KContextWizardView, "Mark All", "txt_fmradio_mark_all" );
       
   218 
       
   219 //: Button for unmarking all Wizard view station listbox items
       
   220 //* loc-layout_id foo_dialog
       
   221 //* loc-blank False
       
   222 //* loc-viewid vid1
       
   223 //* loc-positionid pid1
       
   224 const Translation KBtnTextUnmarkAll = QT_TRANSLATE_NOOP3( KContextWizardView, "Unmark All", "txt_fmradio_unmark_all" );
       
   225 
       
   226 //: Confirmation query for starting in offline mode
       
   227 //* loc-layout_id foo_dialog
       
   228 //* loc-blank False
       
   229 //* loc-viewid vid1
       
   230 //* loc-positionid pid1
       
   231 const Translation KQueryTextStartOffline = QT_TRANSLATE_NOOP3( KContextWizardView, "Start in offline mode?", "txt_fmradio_start_offline" );
       
   232 //: Confirmation for favourite station selections in Wizard view
       
   233 //* loc-layout_id foo_dialog
       
   234 //* loc-blank False
       
   235 //* loc-viewid vid1
       
   236 //* loc-positionid pid1
       
   237 const Translation KBtnTextDone = QT_TRANSLATE_NOOP3( KContextWizardView, "Done", "txt_fmradio_done" );
       
   238 
       
   239 // STATION CONTROL WIDGET
       
   240 
       
   241 //: Button to tag the current song in the station control widget in tuning view
       
   242 //* loc-layout_id foo_dialog
       
   243 //* loc-blank False
       
   244 //* loc-viewid vid1
       
   245 //* loc-positionid pid1
       
   246 const Translation KBtnTagSong = QT_TRANSLATE_NOOP3( KContextStationControl, "Tag this song", "txt_fmradio_btn_tag_song" );
       
   247 
       
   248 //: Button to open play history in the station control widget in tuning view
       
   249 //* loc-layout_id foo_dialog
       
   250 //* loc-blank False
       
   251 //* loc-viewid vid1
       
   252 //* loc-positionid pid1
       
   253 const Translation KBtnPlayHistory = QT_TRANSLATE_NOOP3( KContextStationControl, "Play history", "txt_fmradio_btn_play_history" );
       
   254 
       
   255 //: Button to open a web address in the station control widget in tuning view
       
   256 //* loc-layout_id foo_dialog
       
   257 //* loc-blank False
       
   258 //* loc-viewid vid1
       
   259 //* loc-positionid pid1
       
   260 const Translation KBtnGotoWeb = QT_TRANSLATE_NOOP3( KContextStationControl, "Go to web address", "txt_fmradio_btn_goto_web" );
       
   261 
       
   262 //: Button to mark current station as favorite in the station control widget in tuning view
       
   263 //* loc-layout_id foo_dialog
       
   264 //* loc-blank False
       
   265 //* loc-viewid vid1
       
   266 //* loc-positionid pid1
       
   267 const Translation KBtnSetFavorite = QT_TRANSLATE_NOOP3( KContextStationControl, "Set as favorite", "txt_fmradio_btn_set_favorite" );
       
   268 
       
   269 //: Button to remove the favorite status from the current station in the station control widget in tuning view
       
   270 //* loc-layout_id foo_dialog
       
   271 //* loc-blank False
       
   272 //* loc-viewid vid1
       
   273 //* loc-positionid pid1
       
   274 const Translation KBtnRemoveFavorite = QT_TRANSLATE_NOOP3( KContextStationControl, "Remove favorite", "txt_fmradio_btn_remove_favorite" );
       
   275 
       
   276 // Generic texts
       
   277 
       
   278 //: Menu item in the view menu to exit the application
       
   279 //* loc-layout_id foo_dialog
       
   280 //* loc-blank False
       
   281 //* loc-viewid vid1
       
   282 //* loc-positionid pid1
       
   283 const Translation KMenuExit = QT_TRANSLATE_NOOP3( KContextMenuBar, "Exit", "txt_fmradio_action_exit" );
       
   284 
       
   285 //: Menu item to route audio to loudspeaker
       
   286 //* loc-layout_id foo_dialog
       
   287 //* loc-blank False
       
   288 //* loc-viewid vid1
       
   289 //* loc-positionid pid1
       
   290 const Translation KMenuUseLoudspeaker = QT_TRANSLATE_NOOP3( KContextMenuBar, "Use loudspeaker", "txt_fmradio_menu_use_loudspeaker" );
       
   291 
       
   292 //: Menu item to route audio to headset
       
   293 //* loc-layout_id foo_dialog
       
   294 //* loc-blank False
       
   295 //* loc-viewid vid1
       
   296 //* loc-positionid pid1
       
   297 const Translation KMenuUseHeadset = QT_TRANSLATE_NOOP3( KContextMenuBar, "Use headset", "txt_fmradio_menu_use_headset" );