implement something like applications->profiles->pers

Login to reply to this topic.
Mon, 2005-02-21 12:30
Joined: 2004-12-09
Forum posts: 78
hi all .
       Im girish from india. Iwanted to to know to implement  something like the apllication given in nokia emulator . The path is applications->profiles.
When we choose activate option we get  a setting list.  When we want to select a file in the  ringing tone or ringing type . We get a popup menu list containing some file names. When we select  the file the name shuld come in the  main setting lisst window. I am using a setting list . In the EditItemL  function I do the following to get a popup menu list. The problem now is to update the edwin control which will show the file selected.

   if(aIndex==4){
   HBufC* hi;
//   HBufC* hi1;
   _LIT(Klit,"None");
   TBuf<50> buf(Klit);
   hi=buf.AllocL();

   
   // First phase construction of menu list
   CAknSinglePopupMenuStyleListBox* savedGameMenuList =
      new (ELeave) CAknSinglePopupMenuStyleListBox;
   CleanupStack::PushL(savedGameMenuList);
   
   // Create a popuplist to show the menu list in
   CAknPopupList* popupList = CAknPopupList::NewL(
                           savedGameMenuList,
                           R_AVKON_SOFTKEYS_OK_BACK);
   
   CleanupStack::PushL(popupList);

   // Second phase construction of menulist
   savedGameMenuList->ConstructL(popupList,EAknListBoxMenuList);
   // Set up scroll bars
   SetupScrollBarsL (*savedGameMenuList);

   // Set up menu items
   CTextListBoxModel* model = savedGameMenuList->Model();  // not taking ownership
   model->SetOwnershipType (ELbmOwnsItemArray);
   CDesCArray* savedGameMenuListArray = STATIC_CAST(CDesCArray*, model->ItemTextArray());
   LoadLevelsForSavedGameL(*savedGameMenuListArray);
   
   // Set title
   HBufC* title;
   title= StringLoader::LoadLC(R_SAVED_GAME_MENU_LIST_TITLE);   // Pushes title onto the Cleanup Stack.
   popupList->SetTitleL(*title);
   CleanupStack::PopAndDestroy(title);


Can u help me please.
Regards
Girish

Fri, 2005-02-25 08:45
Joined: 2004-12-09
Forum posts: 78
was able to do it but a new problem arises
hi
  I was able to do it. All I had to do was to call the  UpdateListBoxTextL()
after  storing the nam of the file in a buffer and then setting the name  in the
variable which was used to initialize that setting list component.
it was like this
Code:
       TPtrC level =  itEntry.iName;
CleanupStack::PopAndDestroy(SoundMenuList);
buf.Zero();
buf.Append(level);
iSettings.SetFileName(buf);
(*SettingItemArray())[aIndex]->LoadL();
(*SettingItemArray())[aIndex]->UpdateListBoxTextL();
now I want that  when the user scrolls up and down in the popmenu list he shuld be able to listen the ringing tones. I m stuck here.
As in the main setting list  I dynamically crreate the pop up menu list inside the
Code:
 
EditItemL (TInt aIndex, TBool /*aCalledFromMenu*/)
if(aIndex==2){

---
--

I use  a CAknSinglePopupMenuStyleListBox , CAknPopupList  and a CTextListBoxModel to conastruct the menu list.
Is there any way in which I can make the user hear the music files which he is scrolling up and down. in the op up menu list which in turn is created inside the setting item list .
Bye
Thu, 2006-01-26 15:12
Joined: 2005-05-27
Forum posts: 11
Re: implement something like applications->profiles->pers
Hi Grirish,

Did you find a way to listen themusic files while scrolling up and down?

If got the same problem now...
Mon, 2006-02-06 11:07
Joined: 2004-12-09
Forum posts: 78
Re: implement something like applications->profiles->pers
It can be done by using the list box observer class MEikListBoxObserver you can get the selected list box item can pass it to the audio player like the CMdaAudioPlayerUtilty . You can use the
Code:
void HandleListBoxEventL(CEikListBox* aListBox, TListBoxEvent aListBoxEvent);

method and perform the play back here.
Cheers
Girish
  • Login to reply to this topic.