--- a/controlpanelui/src/cpplugins/personalizationplugin/src/cppersonalizationgroupitemdata.cpp Fri Apr 16 14:59:22 2010 +0300
+++ b/controlpanelui/src/cpplugins/personalizationplugin/src/cppersonalizationgroupitemdata.cpp Mon May 03 12:32:06 2010 +0300
@@ -15,115 +15,46 @@
*
*/
#include "cppersonalizationgroupitemdata.h"
+#include <cplogger.h>
#include <hbdataformmodelitem.h>
#include <cpsettingformentryitemdataimpl.h>
#include <cpbasesettingview.h>
#include <cpitemdatahelper.h>
#include <hbmessagebox.h>
-#include "cppersonalizationcustomviewitem.h"
-#include "cpmastervolumevaluecontroller.h"
#include <cpprofilemodel.h>
+#include "cppersonalizationadvanceview.h"
+#include "cppersonalizationentryitemdata.h"
CpPersonalizationGroupItemData::CpPersonalizationGroupItemData(HbDataFormModelItem::DataItemType type,
const QString &label,
const QString &configFile,
const HbDataFormModelItem *parent):
- CpCategorySettingFormItemData(type, label, configFile, parent),
- mMasterVolume(0),
- mMasterVibra(0),
- mRingTone(0),
- mMessageTone(0),
- mEmailTone(0),
- mReminderTone(0),
- mClockTone(0),
- mSayCallerName(0),
- mProfileModel(0),
- mMasterVolumeValueController(0)
+ CpCategorySettingFormItemData(type, label, configFile, parent)
+
{
- mProfileModel = new CpProfileModel();
+ CPFW_LOG("CpPersonalizationGroupItemData::CpPersonalizationGroupItemData(), START");
+ CPFW_LOG("CpPersonalizationGroupItemData::CpPersonalizationGroupItemData(), END");
}
CpPersonalizationGroupItemData::~CpPersonalizationGroupItemData()
{
- delete mProfileModel;
- delete mMasterVolumeValueController;
}
void CpPersonalizationGroupItemData::beforeLoadingConfigPlugins(CpItemDataHelper &itemDataHelper)
{
- /*
- itemDataHelper.addItemPrototype(new CpPersonalizationCustomViewItem);
- mMasterVolume = new HbDataFormModelItem(static_cast<HbDataFormModelItem::DataItemType>(MasterVolumeSliderItem));
- mMasterVolumeValueController = new CpMasterVolumeValueController(mProfileModel,mMasterVolume,itemDataHelper);
-
- //mMasterVolume->setContentWidgetData("maxmum",10);
- //mMasterVolume->setContentWidgetData("minmum",1);
- //itemDataHelper.addConnection(mMasterVolume,SIGNAL(valueChanged (int)),this,SLOT(masterVolumeValueChanged(int)) );
- this->appendChild(mMasterVolume);
- mMasterVibra = new HbDataFormModelItem(HbDataFormModelItem::CheckBoxItem,
- QString());
- mMasterVibra->setContentWidgetData("text",QObject::tr("Vibrating alerts"));
- itemDataHelper.addConnection(mMasterVibra,SIGNAL(stateChanged(int)),this,SLOT(onVibraValueChange(int)));
-
-
- if (mProfileModel->vibraStatus()) {
- mMasterVibra->setContentWidgetData("checkState", Qt::Checked);
- }
- else {
- mMasterVibra->setContentWidgetData("checkState", Qt::Unchecked);
- }
-
- this->appendChild(mMasterVibra);
-
- */
-
+ // keep this interface for development in the futrue
+ CPFW_LOG("CpPersonalizationGroupItemData::beforeLoadingConfigPlugins(), START");
- mRingTone = new CpSettingFormEntryItemDataImpl<CpBaseSettingView>(itemDataHelper,
- tr("Ring tone"),
- tr("Nokia tone"));
- this->appendChild(mRingTone);
-
- /*mSayCallerName = new HbDataFormModelItem(HbDataFormModelItem::CheckBoxItem, QString());
- mSayCallerName->setContentWidgetData("text", tr("Say caller's name"));
- this->appendChild(mSayCallerName);*/
-
-
- mMessageTone = new CpSettingFormEntryItemDataImpl<CpBaseSettingView>(itemDataHelper,
- tr("Message tone"),
- tr("Nokia message tone"));
- this->appendChild(mMessageTone);
- mEmailTone = new CpSettingFormEntryItemDataImpl<CpBaseSettingView>(itemDataHelper,
- tr("E-mail tone"),
- tr("Nokia e-mail tone"));
- this->appendChild(mEmailTone);
- mReminderTone = new CpSettingFormEntryItemDataImpl<CpBaseSettingView>(itemDataHelper,
- tr("Reminder tone"),
- tr("Nokia calendar tone"));
- this->appendChild(mReminderTone);
- mClockTone = new CpSettingFormEntryItemDataImpl<CpBaseSettingView>(itemDataHelper,
- tr("Clock tone"),
- tr("Nokia clock tone"));
- this->appendChild(mClockTone);
-
-
+ CPFW_LOG("CpPersonalizationGroupItemData::beforeLoadingConfigPlugins(), END");
+}
+void CpPersonalizationGroupItemData::afterLoadingConfigPlugins(CpItemDataHelper &itemDataHelper)
+{
+ CPFW_LOG("CpPersonalizationGroupItemData::afterLoadingConfigPlugins(), START");
+ CpSettingFormEntryItemData *advanceSettingItem =
+ new CpSettingFormEntryItemDataImpl<CpPersonalizationAdvanceView>(itemDataHelper, hbTrId("txt_cp_button_advanced_settings"));
+ appendChild(advanceSettingItem);
+ CPFW_LOG("CpPersonalizationGroupItemData::afterLoadingConfigPlugins(), END");
}
-void CpPersonalizationGroupItemData::masterVolumeValueChanged(int value)
-{
- Q_UNUSED(value);
- HbMessageBox::information(QString("volume changed to:%1").arg(value));
-}
-void CpPersonalizationGroupItemData::onVibraValueChange(int isVibra)
-{
- //Q_UNUSED(isVibra);
- if (isVibra) {
- mProfileModel->setVibraStatus(true);
- }
- else {
- mProfileModel->setVibraStatus(false);
- }
-}
-
-