controlpanelui/src/cpplugins/personalizationplugin/src/cppersonalizationadvanceview.cpp
changeset 12 624337f114fe
child 14 23411a3be0db
equal deleted inserted replaced
11:10d0dd0e43f1 12:624337f114fe
       
     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 #include "cppersonalizationadvanceview.h"
       
    18 #include <cpcategorysettingformitemdata.h>
       
    19 #include <cpitemdatahelper.h>
       
    20 /*#include <hbdataformmodel.h>
       
    21 #include <hbdataform.h>
       
    22 #include <hblineedit.h>
       
    23 #include <hbdataformmodelitem.h>
       
    24 */
       
    25 #include "cpprofilesettingform.h"
       
    26 #include "cpprofilenameeditdialog.h"
       
    27 
       
    28 #include <hbaction.h>
       
    29 #include <hbmenu.h>
       
    30 CpPersonalizationAdvanceView::CpPersonalizationAdvanceView(QGraphicsItem *parent /*=0*/):
       
    31     CpBaseSettingView(0,parent)
       
    32 {
       
    33     // 1.init the dataform for advance settings here
       
    34     // 2.please modify the cpprofilesettingform.h/ cpp according to current ui spec
       
    35     // 3.NOTICE! you can get controlpanel's text map from the controlpanel ui wiki, use current text id for strings
       
    36     // 4.use cppersonalizationentryitemdata class to create ringtone, message tone...
       
    37     // 5.ignore cpmastervolumeslider class, please use default slideritem to create keyandscreen slider, new property added in slider, if any question, please contact me.
       
    38     // 6. don't forget the cfg file in data folder, you can try to add the profile activator plugin and ringtone plugin here
       
    39     setSettingForm( new CpProfileSettingForm() );
       
    40     initMenu();
       
    41 }
       
    42 CpPersonalizationAdvanceView::~CpPersonalizationAdvanceView()
       
    43 {
       
    44     
       
    45 }
       
    46 
       
    47 void CpPersonalizationAdvanceView::initMenu()
       
    48 {
       
    49     HbAction *editNameAction = new HbAction( this );
       
    50     editNameAction->setObjectName( "editNameAction" );
       
    51     editNameAction->setText( hbTrId( "txt_cp_list_edit_name" ) );
       
    52     
       
    53     menu()->addAction( editNameAction );
       
    54     connect( editNameAction, SIGNAL( triggered() ), this, SLOT( on_editNameAction_triggered() ));
       
    55 }
       
    56 
       
    57 void CpPersonalizationAdvanceView::on_editNameAction_triggered()
       
    58 {
       
    59     QString string = QString( "general" );
       
    60     bool ret = CpProfileNameEditDialog::launchProfileNameEditDialog( string );
       
    61 }