201017_2
authorhgs
Thu, 13 May 2010 23:17:48 +0300
changeset 29 1f1fcd7e941c
parent 28 860702281757
child 30 8dde790cab74
201017_2
cmmanager/cpdestinationplugin/src/cpadddestinationentryitemdata.cpp
cmmanager/cpdestinationplugin/src/cpdestinationentryitem.cpp
cmmanager/cpdestinationplugin/src/cpdestinationgroup.cpp
cmmanager/cpdestinationplugin/src/cpiapitem.cpp
connectionutilities/ConnectionDialogs/ConnectionUiUtilities/NotifInc/devicedialogobserver.h
connectionutilities/ConnectionDialogs/ConnectionUiUtilities/inc/connectionstatuspopup.h
--- a/cmmanager/cpdestinationplugin/src/cpadddestinationentryitemdata.cpp	Thu May 13 23:10:21 2010 +0300
+++ b/cmmanager/cpdestinationplugin/src/cpadddestinationentryitemdata.cpp	Thu May 13 23:17:48 2010 +0300
@@ -56,7 +56,7 @@
  */
 CpAddDestinationEntryItemData::CpAddDestinationEntryItemData(CpItemDataHelper &itemDataHelper,
                                                              CpDestinationGroup *parent)
-    : CpSettingFormEntryItemData(itemDataHelper),
+    : CpSettingFormEntryItemData(CpSettingFormEntryItemData::ButtonEntryItem, itemDataHelper),
     mParent(parent),
     mDialog(0)
 {
--- a/cmmanager/cpdestinationplugin/src/cpdestinationentryitem.cpp	Thu May 13 23:10:21 2010 +0300
+++ b/cmmanager/cpdestinationplugin/src/cpdestinationentryitem.cpp	Thu May 13 23:17:48 2010 +0300
@@ -28,6 +28,7 @@
 #include <HbListWidget>
 #include <HbListWidgetItem>
 #include <HbMainWindow>
+#include <HbInstance>
 #include <cppluginutility.h>
 #include <cpitemdatahelper.h>
 #include <cpbasesettingview.h>
@@ -63,7 +64,7 @@
     @param[in] itemDataHelper Helper for connecting signals and slots.
  */
 CpDestinationEntryItemData::CpDestinationEntryItemData(CpItemDataHelper &itemDataHelper)
-    : CpSettingFormEntryItemData(itemDataHelper),
+    : CpSettingFormEntryItemData(CpSettingFormEntryItemData::ButtonEntryItem, itemDataHelper),
     mList(0),
     mDialog(0),
     mOkAction(0)
@@ -235,7 +236,6 @@
     }
     
     itemDataHelper->bindToForm(form);
-    delete itemDataHelper;
     OstTraceFunctionExit0(CPDESTINATIONENTRYITEMDATA_CONSTRUCTSETTINGVIEW_EXIT);
 }
 
@@ -245,8 +245,8 @@
 void CpDestinationEntryItemData::updateDestinationView()
 {
     OstTraceFunctionEntry0(CPDESTINATIONENTRYITEMDATA_UPDATEDESTINATIONVIEW_ENTRY);
-    HbDataForm *form = static_cast<HbDataForm*>(QObject::parent()->parent()); 
-    HbMainWindow *mainWnd = form->mainWindow();
+    QList< HbMainWindow* > mainWindows = hbInstance->allMainWindows();            
+    HbMainWindow *mainWnd = mainWindows.front();
        
     if (mainWnd) {
         HbView *view = mainWnd->currentView();
@@ -393,8 +393,8 @@
 void CpDestinationEntryItemData::activateArrangeMode()
 {
     OstTraceFunctionEntry0(CPDESTINATIONENTRYITEMDATA_ACTIVATEARRANGEMODE_ENTRY);
-    HbDataForm *form = static_cast<HbDataForm*>(QObject::parent()->parent());             
-    HbMainWindow *mainWnd = form->mainWindow();
+    QList< HbMainWindow* > mainWindows = hbInstance->allMainWindows();            
+    HbMainWindow *mainWnd = mainWindows.front();
     HbView *view = new HbView();
     createArrangeModeView(view);
     
@@ -448,8 +448,8 @@
         return;
     }
     
-    HbDataForm *form = static_cast<HbDataForm*>(QObject::parent()->parent());
-    HbMainWindow *mainWnd = form->mainWindow();
+    QList< HbMainWindow* > mainWindows = hbInstance->allMainWindows();            
+    HbMainWindow *mainWnd = mainWindows.front();
     HbView* view = mainWnd->currentView();
     
     if (mainWnd && view)  {
@@ -468,8 +468,8 @@
 void CpDestinationEntryItemData::viewCancel()
 {
     OstTraceFunctionEntry0(CPDESTINATIONENTRYITEMDATA_VIEWCANCEL_ENTRY);
-    HbDataForm *form = static_cast<HbDataForm*>(QObject::parent()->parent());
-    HbMainWindow *mainWnd = form->mainWindow();
+    QList< HbMainWindow* > mainWindows = hbInstance->allMainWindows();            
+    HbMainWindow *mainWnd = mainWindows.front();
     HbView* view = mainWnd->currentView();
     
     if (mainWnd && view) {
--- a/cmmanager/cpdestinationplugin/src/cpdestinationgroup.cpp	Thu May 13 23:10:21 2010 +0300
+++ b/cmmanager/cpdestinationplugin/src/cpdestinationgroup.cpp	Thu May 13 23:17:48 2010 +0300
@@ -23,6 +23,7 @@
 #include <HbDataform>
 #include <HbDataFormModel>
 #include <HbDataFormViewItem>
+#include <HbParameterLengthLimiter>
 #include <cpbasesettingview.h>
 #include <cpitemdatahelper.h>
 #include <cpsettingformentryitemdataimpl.h>
@@ -134,10 +135,6 @@
     destDataItem->setDestinationName(dest);
     connect(destDataItem, SIGNAL(destChanged()), this, SLOT(updateDestinationInformation()));
     
-    // Use ItemDataHelper to make connections
-    QObject* form = QObject::parent()->parent();
-    mItemDataHelper->bindToForm(static_cast<HbDataForm*>(form));
-    
     // Insert Child to correct position
     QList<QSharedPointer<CmDestinationShim> > destinationList;
     fetchDestinations(destinationList);
@@ -236,13 +233,6 @@
         destDataItem->setContentWidgetData(QString("additionalText"), iapCount);
         destDataItem->setContentWidgetData(QString("text"), destDataItem->destinationName());
     }
-    // Update UI
-    HbDataForm *form = static_cast<HbDataForm*>(QObject::parent()->parent());
-    HbDataFormModel* model = static_cast<HbDataFormModel*>(QObject::parent());
-    QModelIndex index = model->indexFromItem(this);
-    HbDataFormViewItem *viewItem = static_cast<HbDataFormViewItem *>(form->itemByIndex(index));
-    viewItem->setExpanded(false);
-    viewItem->setExpanded(true);
     OstTraceFunctionExit0(CPDESTINATIONGROUP_UPDATEDESTINATIONINFORMATION_EXIT);
 }
 
@@ -336,7 +326,8 @@
     OstTraceFunctionEntry0(CPDESTINATIONGROUP_GETDESTINATIONADDITIONALTEXT_ENTRY);
     QString result = "";
     if (iapCount > 0) {
-        result = hbTrId("txt_occ_dblist_internet_val_ln_access_points", iapCount);
+        //result = hbTrId("txt_occ_dblist_internet_val_ln_access_points", iapCount);
+        result = HbParameterLengthLimiter("txt_occ_dblist_internet_val_ln_access_points").arg(iapCount);
     } else {
         result = hbTrId("txt_occ_dblist_internet_val_no_access_points");
     }
--- a/cmmanager/cpdestinationplugin/src/cpiapitem.cpp	Thu May 13 23:10:21 2010 +0300
+++ b/cmmanager/cpdestinationplugin/src/cpiapitem.cpp	Thu May 13 23:17:48 2010 +0300
@@ -76,7 +76,8 @@
     int destId,
     bool apProtected,
     CpBearerApPluginInterface *bearerPlugin) :
-    CpSettingFormEntryItemData(itemDataHelper), 
+    CpSettingFormEntryItemData(CpSettingFormEntryItemData::ButtonEntryItem, itemDataHelper), 
+    mItemDataHelper(&itemDataHelper),
     mIapId(iapId), 
     mIapName(iapName),
     mDestId(destId),
@@ -233,10 +234,7 @@
         deleteSuccessful = false;
     }
     if (deleteSuccessful) {
-        HbDataForm *form = static_cast<HbDataForm*>(QObject::parent()->parent());
-        QModelIndex index = static_cast<HbDataFormModel*>(QObject::parent())->indexFromItem(this);
-        HbAbstractViewItem *viewItem = form->itemByIndex(index);
-        viewItem->deleteLater();
+        this->deleteLater();
         OstTrace0(TRACE_NORMAL, CPIAPITEM_DELETECONFIRMED, "CpIapItem::deleteConfirmed: Emit access point changed signal");
         emit iapChanged();
     } else {
@@ -261,12 +259,12 @@
     }
     // Disconnect because we need to do this only after returning
     // from accees point settings view
-    HbDataForm *form = static_cast<HbDataForm*>(QObject::parent()->parent());
-    disconnect(
-        form, 
+    CpItemDataHelper *itemDataHelper = new CpItemDataHelper();
+    itemDataHelper->disconnectFromForm( 
         SIGNAL(itemShown(const QModelIndex)),
         this, 
         SLOT(updateIap(const QModelIndex)));
+    delete itemDataHelper;
     OstTrace0( TRACE_FLOW, DUP1_CPIAPITEM_UPDATEIAP_EXIT, "CpIapItem::updateIap exit" );
 }
 
@@ -279,16 +277,16 @@
 {
     OstTraceFunctionEntry0(CPIAPITEM_CREATESETTINGVIEW_ENTRY);
     CpBaseSettingView *view = NULL;
+    CpItemDataHelper *itemDataHelper = new CpItemDataHelper();
     if (mBearerPlugin != NULL) {
-        HbDataForm *form = static_cast<HbDataForm*>(QObject::parent()->parent()); 
-        bool connected = connect(
-            form, 
+        CpIapItem *iap = const_cast<CpIapItem*>(this);
+        itemDataHelper->connectToForm( 
             SIGNAL(itemShown(const QModelIndex)),
-            this, 
+            iap, 
             SLOT(updateIap(const QModelIndex)));
-        Q_ASSERT(connected);
         view = mBearerPlugin->createSettingView(mIapId);
     }
+    delete itemDataHelper;
     OstTraceFunctionExit0(CPIAPITEM_CREATESETTINGVIEW_EXIT);
     return view;
 }
--- a/connectionutilities/ConnectionDialogs/ConnectionUiUtilities/NotifInc/devicedialogobserver.h	Thu May 13 23:10:21 2010 +0300
+++ b/connectionutilities/ConnectionDialogs/ConnectionUiUtilities/NotifInc/devicedialogobserver.h	Thu May 13 23:17:48 2010 +0300
@@ -18,7 +18,7 @@
 #ifndef __DEVICEDIALOGOBSERVER_H__
 #define __DEVICEDIALOGOBSERVER_H__
 
-#include "CellularDataConfirmation.h"
+#include "cellulardataconfirmation.h"
 
 NONSHARABLE_CLASS ( CDeviceDialogObserver ) : public CBase, public MHbDeviceDialogObserver
     {
--- a/connectionutilities/ConnectionDialogs/ConnectionUiUtilities/inc/connectionstatuspopup.h	Thu May 13 23:10:21 2010 +0300
+++ b/connectionutilities/ConnectionDialogs/ConnectionUiUtilities/inc/connectionstatuspopup.h	Thu May 13 23:17:48 2010 +0300
@@ -19,7 +19,7 @@
 
 // INCLUDES
 #include <e32base.h>
-#include "HbDeviceNotificationDialogSymbian.h"
+#include "hbdevicenotificationdialogsymbian.h"
 
 /**
  * CConnectionStatusPopup