controlpanelui/src/cpapplication/src/cpmainview.cpp
changeset 10 0a74be98a8bc
child 11 10d0dd0e43f1
equal deleted inserted replaced
0:254040eb3b7d 10:0a74be98a8bc
       
     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 #include "cpmainview.h"
       
    19 #include "cpmainmodel.h"
       
    20 #include <QList>
       
    21 #include <hbdataform.h>
       
    22 #include <cpitemdatahelper.h>
       
    23 
       
    24 CpMainView::CpMainView(QGraphicsItem *parent /*= 0*/)
       
    25 : CpBaseSettingView(0,parent), mMainModel(0), mItemDataHelper(0)
       
    26 {
       
    27 	if (HbDataForm *form = settingForm()) {
       
    28         mItemDataHelper = new CpItemDataHelper(form);
       
    29 		mMainModel = new CpMainModel;
       
    30         mMainModel->initialize(*mItemDataHelper);
       
    31 		form->setModel(mMainModel);
       
    32 	}	
       
    33 	setTitle( QObject::tr("Control Panel") );	//should use qtTrId("txt_cp_title_control_panel")
       
    34 }
       
    35 
       
    36 CpMainView::~CpMainView()
       
    37 {
       
    38     delete mMainModel;
       
    39     delete mItemDataHelper;
       
    40 }
       
    41 
       
    42 // End of File