cmmanager/cpdestinationplugin/src/cpdestinationentryitem.cpp
changeset 73 70ee5458c95d
parent 61 8b0c979bbe8c
equal deleted inserted replaced
72:0c32cf868819 73:70ee5458c95d
   145 {
   145 {
   146     OstTraceFunctionEntry0(CPDESTINATIONENTRYITEMDATA_CREATESETTINGVIEW_ENTRY);
   146     OstTraceFunctionEntry0(CPDESTINATIONENTRYITEMDATA_CREATESETTINGVIEW_ENTRY);
   147     CpBaseSettingView* view = new CpBaseSettingView();
   147     CpBaseSettingView* view = new CpBaseSettingView();
   148     constructSettingView(view);
   148     constructSettingView(view);
   149     
   149     
   150     // Toolbar. Allow arrange if more than one AP is shown
   150     // Toolbar and menu. Allow arrange if more than one AP is shown.
   151     if (mDestinationId != 0 && mAps->count() > 1) {
   151     if (mDestinationId != 0 && mAps->count() > 1) {
   152         HbToolBar *tb = view->toolBar();
   152         HbToolBar *tb = view->toolBar();
   153         HbIcon arrangeIcon("qtg_mono_sort");
   153         HbIcon arrangeIcon("qtg_mono_sort");
   154         (void) tb->addAction(arrangeIcon, "", this, SLOT(activateArrangeMode()));
   154         (void) tb->addAction(arrangeIcon, "", this, SLOT(activateArrangeMode()));
       
   155         HbMenu *menu = view->menu();
       
   156         (void) menu->addAction(
       
   157             hbTrId("txt_occ_opt_arrange"),
       
   158             this,
       
   159             SLOT(activateArrangeMode()));
   155     }
   160     }
   156     OstTraceFunctionExit0(CPDESTINATIONENTRYITEMDATA_CREATESETTINGVIEW_EXIT);
   161     OstTraceFunctionExit0(CPDESTINATIONENTRYITEMDATA_CREATESETTINGVIEW_EXIT);
   157     return view;        
   162     return view;        
   158 }
   163 }
   159 
   164 
   252     if (mainWnd) {
   257     if (mainWnd) {
   253         HbView *view = mainWnd->currentView();
   258         HbView *view = mainWnd->currentView();
   254         CpBaseSettingView  *cpView = static_cast<CpBaseSettingView  *>(view);
   259         CpBaseSettingView  *cpView = static_cast<CpBaseSettingView  *>(view);
   255         constructSettingView(cpView);
   260         constructSettingView(cpView);
   256         
   261         
   257         // Remove Toolbar if necessary
   262         // Remove toolbar and menu actions if necessary
   258         if (mDestinationId != 0 && mAps->count() <= 1) {
   263         if (mDestinationId != 0 && mAps->count() <= 1) {
   259             HbToolBar *tb = view->toolBar();
   264             HbToolBar *tb = view->toolBar();
   260             tb->clearActions();
   265             tb->clearActions();
       
   266             HbMenu *menu = view->menu();
       
   267             menu->clearActions();
   261         }
   268         }
   262     }
   269     }
   263     OstTrace0(TRACE_NORMAL, CPDESTINATIONENTRYITEMDATA_UPDATEDESTINATIONVIEW, "CpDestinationEntryItemData::updateDestinationView: Emit destination changed");
   270     OstTrace0(TRACE_NORMAL, CPDESTINATIONENTRYITEMDATA_UPDATEDESTINATIONVIEW, "CpDestinationEntryItemData::updateDestinationView: Emit destination changed");
   264     emit destChanged();
   271     emit destChanged();
   265     OstTraceFunctionExit0(CPDESTINATIONENTRYITEMDATA_UPDATEDESTINATIONVIEW_EXIT);
   272     OstTraceFunctionExit0(CPDESTINATIONENTRYITEMDATA_UPDATEDESTINATIONVIEW_EXIT);
   619     QList<QSharedPointer<CmConnectionMethodShim> >  apList;
   626     QList<QSharedPointer<CmConnectionMethodShim> >  apList;
   620     fetchReferencedAps(apList, mCmm);   
   627     fetchReferencedAps(apList, mCmm);   
   621     CmDestinationShim *destination = NULL;
   628     CmDestinationShim *destination = NULL;
   622     mList = new HbListWidget();
   629     mList = new HbListWidget();
   623     view->setWidget(mList);
   630     view->setWidget(mList);
       
   631     view->setTitle(hbTrId("txt_cp_title_control_panel"));
   624     
   632     
   625     try {
   633     try {
   626         destination = mCmm->destination(mDestinationId);
   634         destination = mCmm->destination(mDestinationId);
   627         for (int i = 0; i < apList.count(); i++) {
   635         for (int i = 0; i < apList.count(); i++) {
   628             HbListWidgetItem *item = new HbListWidgetItem();
   636             HbListWidgetItem *item = new HbListWidgetItem();