diff -r 579cc610882e -r ef813d54df51 clock/clockui/clocksettingsview/src/clocksettingsview.cpp --- a/clock/clockui/clocksettingsview/src/clocksettingsview.cpp Tue Jul 06 14:14:56 2010 +0300 +++ b/clock/clockui/clocksettingsview/src/clocksettingsview.cpp Wed Aug 18 09:47:38 2010 +0300 @@ -38,6 +38,11 @@ #include "timezoneclient.h" #include "settingsdatatypes.h" #include "settingscustomitem.h" +#include "OstTraceDefinitions.h" +#ifdef OST_TRACE_COMPILER_IN_USE +#include "clocksettingsviewTraces.h" +#endif + /*! \class ClockSettingsView @@ -54,6 +59,7 @@ ClockSettingsView::ClockSettingsView(QObject *parent) :QObject(parent) { + OstTraceFunctionEntry0( CLOCKSETTINGSVIEW_CLOCKSETTINGSVIEW_ENTRY ); // Load the translation file and install the editor specific translator mTranslator = new HbTranslator("clocksettingsview"); @@ -102,6 +108,7 @@ connect( mSettingsManager, SIGNAL(valueChanged(XQSettingsKey, QVariant)), this, SLOT(eventMonitor(XQSettingsKey, QVariant))); + OstTraceFunctionExit0( CLOCKSETTINGSVIEW_CLOCKSETTINGSVIEW_EXIT ); } /*! @@ -109,6 +116,7 @@ */ ClockSettingsView::~ClockSettingsView() { + OstTraceFunctionEntry0( DUP1_CLOCKSETTINGSVIEW_CLOCKSETTINGSVIEW_ENTRY ); if (mDocLoader) { delete mDocLoader; } @@ -127,6 +135,7 @@ } + OstTraceFunctionExit0( DUP1_CLOCKSETTINGSVIEW_CLOCKSETTINGSVIEW_EXIT ); } /*! @@ -134,6 +143,7 @@ */ void ClockSettingsView::loadSettingsView() { + OstTraceFunctionEntry0( CLOCKSETTINGSVIEW_LOADSETTINGSVIEW_ENTRY ); bool loadSuccess; // Construct the document loader instance @@ -172,6 +182,7 @@ // Setup the view. setupView(); + OstTraceFunctionExit0( CLOCKSETTINGSVIEW_LOADSETTINGSVIEW_EXIT ); } /*! @@ -179,9 +190,11 @@ */ void ClockSettingsView::handleBackAction() { + OstTraceFunctionEntry0( CLOCKSETTINGSVIEW_HANDLEBACKACTION_ENTRY ); HbMainWindow *window = hbInstance->allMainWindows().first(); window->removeView(mSettingsView); deleteLater(); + OstTraceFunctionExit0( CLOCKSETTINGSVIEW_HANDLEBACKACTION_EXIT ); } /*! @@ -189,6 +202,7 @@ */ void ClockSettingsView::updatePlaceItem() { + OstTraceFunctionEntry0( CLOCKSETTINGSVIEW_UPDATEPLACEITEM_ENTRY ); // Get the current zone info. LocationInfo currentZoneInfo = mTimezoneClient->getCurrentZoneInfoL(); @@ -200,6 +214,7 @@ + tr(", ") + currentZoneInfo.countryName; mPlaceDataFormItem->setContentWidgetData("text", placeInfo); } + OstTraceFunctionExit0( CLOCKSETTINGSVIEW_UPDATEPLACEITEM_EXIT ); } /*! @@ -207,7 +222,9 @@ */ void ClockSettingsView::updateDateItem() { + OstTraceFunctionEntry0( CLOCKSETTINGSVIEW_UPDATEDATEITEM_ENTRY ); mDateDataFormItem->setContentWidgetData("text", mSettingsUtility->date()); + OstTraceFunctionExit0( CLOCKSETTINGSVIEW_UPDATEDATEITEM_EXIT ); } /*! @@ -215,6 +232,7 @@ */ void ClockSettingsView::updateTimeItem() { + OstTraceFunctionEntry0( CLOCKSETTINGSVIEW_UPDATETIMEITEM_ENTRY ); if (!mTickTimer->isActive()) { mTickTimer->stop(); } @@ -222,6 +240,7 @@ // Start the timer again. mTickTimer->start(60000 - 1000 * QTime::currentTime().second()); + OstTraceFunctionExit0( CLOCKSETTINGSVIEW_UPDATETIMEITEM_EXIT ); } /*! @@ -229,6 +248,7 @@ */ void ClockSettingsView::handleOrientationChanged(Qt::Orientation orientation) { + OstTraceFunctionEntry0( CLOCKSETTINGSVIEW_HANDLEORIENTATIONCHANGED_ENTRY ); bool success; // If horizontal, load the landscape section. if (Qt::Horizontal == orientation) { @@ -242,10 +262,12 @@ CLOCK_SETTINGS_VIEW_PORTRAIT_SECTION, &success); } + OstTraceFunctionExit0( CLOCKSETTINGSVIEW_HANDLEORIENTATIONCHANGED_EXIT ); } void ClockSettingsView::handleNetworkTimeStateChange(int state) { + OstTraceFunctionEntry0( CLOCKSETTINGSVIEW_HANDLENETWORKTIMESTATECHANGE_ENTRY ); bool cenrepValue = mTimezoneClient->timeUpdateOn(); if ((Qt::Checked == state && !cenrepValue) || (Qt::Unchecked == state && cenrepValue)) { @@ -258,6 +280,7 @@ mTimezoneClient->setTimeUpdateOn(false); } } + OstTraceFunctionExit0( CLOCKSETTINGSVIEW_HANDLENETWORKTIMESTATECHANGE_EXIT ); } /*! @@ -268,6 +291,7 @@ */ void ClockSettingsView::setupView() { + OstTraceFunctionEntry0( CLOCKSETTINGSVIEW_SETUPVIEW_ENTRY ); HbMainWindow *window = hbInstance->allMainWindows().first(); window->addView(mSettingsView); window->setCurrentView(mSettingsView); @@ -294,6 +318,7 @@ updatePlaceItem(); mTickTimer->start(60000 - 1000 * QTime::currentTime().second()); + OstTraceFunctionExit0( CLOCKSETTINGSVIEW_SETUPVIEW_EXIT ); } /*! @@ -301,6 +326,7 @@ */ void ClockSettingsView::createModel() { + OstTraceFunctionEntry0( CLOCKSETTINGSVIEW_CREATEMODEL_ENTRY ); // Remove the model. if (mSettingsForm->model()) { delete mSettingsForm->model(); @@ -312,6 +338,7 @@ // Add the items to the view. populateModel(); mSettingsForm->setModel(mSettingsModel); + OstTraceFunctionExit0( CLOCKSETTINGSVIEW_CREATEMODEL_EXIT ); } /*! @@ -319,6 +346,7 @@ */ void ClockSettingsView::populateModel() { + OstTraceFunctionEntry0( CLOCKSETTINGSVIEW_POPULATEMODEL_ENTRY ); if (!mSettingsModel) { createModel(); } @@ -335,6 +363,7 @@ "checkState", state); mNetworkTimeItem->setContentWidgetData( "text", QString(hbTrId("txt_clk_setlabel_use_network_date_time"))); + mNetworkTimeItem->setContentWidgetData("objectName", "networkTime"); mSettingsForm->addConnection( mNetworkTimeItem, SIGNAL(stateChanged(int)), this, SLOT(handleNetworkTimeStateChange(int))); @@ -347,6 +376,7 @@ mTimeDataFormItem = mSettingsModel->appendDataFormItem( timeItemType, QString(hbTrId("txt_clock_setlabel_time"))); mTimeDataFormItem->setContentWidgetData("text", mSettingsUtility->time()); + mTimeDataFormItem->setContentWidgetData("objectName", "timeItem"); // Add the date item. // Custom data type for adding a time button to the data form. @@ -356,6 +386,7 @@ mDateDataFormItem = mSettingsModel->appendDataFormItem( dateItemType, QString(hbTrId("txt_clock_setlabel_date"))); mDateDataFormItem->setContentWidgetData("text", mSettingsUtility->date()); + mDateDataFormItem->setContentWidgetData("objectName", "dateItem"); // Add the place item. HbDataFormModelItem::DataItemType placeItemType = @@ -372,6 +403,7 @@ } placeItemText.append(currentZoneInfo.countryName); mPlaceDataFormItem->setContentWidgetData("text", placeItemText); + mPlaceDataFormItem->setContentWidgetData("objectName", "placeItem"); if (networkTime) { mTimeDataFormItem->setEnabled(false); @@ -387,7 +419,12 @@ HbDataFormModelItem::DataItemType regionalSettingsItem = static_cast (HbDataFormModelItem::CustomItemBase + RegionalSettingsItem); - mSettingsModel->appendDataFormItem(regionalSettingsItem); + mRegionalDataFormItem = mSettingsModel->appendDataFormItem( + regionalSettingsItem); + mRegionalDataFormItem->setContentWidgetData( + "text", hbTrId("txt_clock_button_regional_date_time_settings")); + mRegionalDataFormItem->setContentWidgetData( + "objectName", "regionalSettings"); // Add the clock type item. HbDataFormModelItem::DataItemType clockTypeSettingsItem = @@ -405,6 +442,7 @@ mClockTypeItem->setContentWidgetData("text", clockTypeList[1]); mClockTypeItem->setContentWidgetData("additionalText", clockTypeList[0]); } + mClockTypeItem->setContentWidgetData("objectName", "clockType"); mSettingsForm->addConnection( mClockTypeItem, SIGNAL(clicked()), this, SLOT(handleClockTypeChanged())); @@ -414,10 +452,10 @@ HbDataFormModelItem::ComboBoxItem, hbTrId("txt_clock_setlabel_alarm_snooze_time")); QStringList alramSnoozeTimes; - alramSnoozeTimes << hbTrId("txt_clock_set_ln_mins", 5) - << hbTrId("txt_clock_set_ln_mins", 10) - << hbTrId("txt_clock_set_ln_mins", 15) - << hbTrId("txt_clock_set_ln_mins", 30); + alramSnoozeTimes << hbTrId("txt_clock_setlabel_ln_mins", 5) + << hbTrId("txt_clock_setlabel_ln_mins", 10) + << hbTrId("txt_clock_setlabel_ln_mins", 15) + << hbTrId("txt_clock_setlabel_ln_mins", 30); // Build the hash map for the reminder. mAlarmSnoozeTimeHash[0] = 5; @@ -436,10 +474,12 @@ index = mAlarmSnoozeTimeHash.key(15); } mAlarmSnoozeItem->setContentWidgetData("currentIndex", index); + mAlarmSnoozeItem->setContentWidgetData("objectName", "alarmSnooze"); mSettingsForm->addConnection( mAlarmSnoozeItem, SIGNAL(currentIndexChanged(int)), this, SLOT(handleAlarmSnoozeTimeChanged(int))); + OstTraceFunctionExit0( CLOCKSETTINGSVIEW_POPULATEMODEL_EXIT ); } /*! @@ -449,6 +489,7 @@ */ void ClockSettingsView::handleAutoTimeUpdateChange(int value) { + OstTraceFunctionEntry0( CLOCKSETTINGSVIEW_HANDLEAUTOTIMEUPDATECHANGE_ENTRY ); int state = (mNetworkTimeItem->contentWidgetData("checkState")).toInt(); if (value) { @@ -483,6 +524,7 @@ } } updatePlaceItem(); + OstTraceFunctionExit0( CLOCKSETTINGSVIEW_HANDLEAUTOTIMEUPDATECHANGE_EXIT ); } /*! @@ -492,10 +534,12 @@ */ void ClockSettingsView::handleAlarmSnoozeTimeChanged(int index) { + OstTraceFunctionEntry0( CLOCKSETTINGSVIEW_HANDLEALARMSNOOZETIMECHANGED_ENTRY ); if (mAlarmSnoozeTimeHash.value(index)) { mSettingsManager->writeItemValue( *mAlarmSnoozeTimeKey, mAlarmSnoozeTimeHash.value(index)); } + OstTraceFunctionExit0( CLOCKSETTINGSVIEW_HANDLEALARMSNOOZETIMECHANGED_EXIT ); } /*! @@ -503,8 +547,10 @@ */ void ClockSettingsView::handleClockTypeChanged() { - mSettingsUtility->setClockType( - mClockTypeItem->contentWidgetData("text").toString()); + OstTraceFunctionEntry0( CLOCKSETTINGSVIEW_HANDLECLOCKTYPECHANGED_ENTRY ); + mSettingsUtility->setClockType( + mClockTypeItem->contentWidgetData("text").toString()); + OstTraceFunctionExit0( CLOCKSETTINGSVIEW_HANDLECLOCKTYPECHANGED_EXIT ); } /*! @@ -516,6 +562,7 @@ void ClockSettingsView::eventMonitor( const XQSettingsKey& key, const QVariant& value) { + OstTraceFunctionEntry0( CLOCKSETTINGSVIEW_EVENTMONITOR_ENTRY ); if (key.uid() == KCRUidClockApp && key.key() == KClockAppSnoozeTime) { if (mSettingsManager->error() == XQSettingsManager::NoError) { @@ -529,6 +576,7 @@ } } } + OstTraceFunctionExit0( CLOCKSETTINGSVIEW_EVENTMONITOR_EXIT ); } // End of file --Don't remove this.