21 #include <hbdataform.h> |
21 #include <hbdataform.h> |
22 #include <hblineedit.h> |
22 #include <hblineedit.h> |
23 #include <hbdataformmodelitem.h> |
23 #include <hbdataformmodelitem.h> |
24 */ |
24 */ |
25 #include "cpprofilesettingform.h" |
25 #include "cpprofilesettingform.h" |
26 #include "cpprofilenameeditdialog.h" |
|
27 |
26 |
28 #include <cppluginutility.h> |
27 #include <cppluginutility.h> |
29 #include <hbaction.h> |
28 #include <hbaction.h> |
30 #include <hbmenu.h> |
29 #include <hbmenu.h> |
|
30 #include <hbstyleloader.h> |
|
31 |
31 CpPersonalizationAdvanceView::CpPersonalizationAdvanceView(QGraphicsItem *parent /*=0*/): |
32 CpPersonalizationAdvanceView::CpPersonalizationAdvanceView(QGraphicsItem *parent /*=0*/): |
32 CpBaseSettingView(0,parent) |
33 CpBaseSettingView(0,parent) |
33 { |
34 { |
34 // 1.init the dataform for advance settings here |
35 // 1.init the dataform for advance settings here |
35 // 2.please modify the cpprofilesettingform.h/ cpp according to current ui spec |
36 // 2.please modify the cpprofilesettingform.h/ cpp according to current ui spec |
36 // 3.NOTICE! you can get controlpanel's text map from the controlpanel ui wiki, use current text id for strings |
37 // 3.NOTICE! you can get controlpanel's text map from the controlpanel ui wiki, use current text id for strings |
37 // 4.use cppersonalizationentryitemdata class to create ringtone, message tone... |
38 // 4.use cppersonalizationentryitemdata class to create ringtone, message tone... |
38 // 5.ignore cpmastervolumeslider class, please use default slideritem to create keyandscreen slider, new property added in slider, if any question, please contact me. |
39 // 5.ignore cpmastervolumeslider class, please use default slideritem to create keyandscreen slider, new property added in slider, if any question, please contact me. |
39 // 6. don't forget the cfg file in data folder, you can try to add the profile activator plugin and ringtone plugin here |
40 // 6. don't forget the cfg file in data folder, you can try to add the profile activator plugin and ringtone plugin here |
40 HbDataForm *form = new CpProfileSettingForm(); |
41 HbStyleLoader::registerFilePath(":/resources/hbslider_color.css"); |
41 setWidget( form ); |
42 mDataForm = new CpProfileSettingForm(); |
42 CpPluginUtility::addCpItemPrototype(form); |
43 setWidget( mDataForm ); |
|
44 CpPluginUtility::addCpItemPrototype(mDataForm); |
43 initMenu(); |
45 initMenu(); |
44 } |
46 } |
45 CpPersonalizationAdvanceView::~CpPersonalizationAdvanceView() |
47 CpPersonalizationAdvanceView::~CpPersonalizationAdvanceView() |
46 { |
48 { |
47 |
|
48 } |
49 } |
49 |
50 |
50 void CpPersonalizationAdvanceView::initMenu() |
51 void CpPersonalizationAdvanceView::initMenu() |
51 { |
52 { |
52 HbAction *editNameAction = new HbAction( this ); |
53 HbAction *editNameAction = new HbAction( this ); |
53 editNameAction->setObjectName( "editNameAction" ); |
54 editNameAction->setObjectName( "editNameAction" ); |
54 editNameAction->setText( hbTrId( "txt_cp_list_edit_name" ) ); |
55 editNameAction->setText( hbTrId( "txt_cp_list_edit_name" ) ); |
55 |
56 |
56 menu()->addAction( editNameAction ); |
57 menu()->addAction( editNameAction ); |
57 connect( editNameAction, SIGNAL( triggered() ), this, SLOT( on_editNameAction_triggered() )); |
58 connect( editNameAction, SIGNAL( triggered() ), mDataForm, SLOT( on_editNameAction_triggered() )); |
58 } |
59 } |
59 |
60 |
60 void CpPersonalizationAdvanceView::on_editNameAction_triggered() |
61 |
61 { |
|
62 QString string = QString( "general" ); |
|
63 bool ret = CpProfileNameEditDialog::launchProfileNameEditDialog( string ); |
|
64 } |
|