--- a/controlpanel/controlpanel_plat/inc/cpsettingformentryitemdata.h Fri Jun 11 13:56:17 2010 +0300
+++ b/controlpanel/controlpanel_plat/inc/cpsettingformentryitemdata.h Wed Jun 23 18:30:54 2010 +0300
@@ -92,8 +92,7 @@
Q_DISABLE_COPY(CpSettingFormEntryItemData)
Q_DECLARE_PRIVATE_D(d_ptr, CpSettingFormEntryItemData)
Q_PRIVATE_SLOT(d_func(), void _q_itemPressed(const QModelIndex &index))
- Q_PRIVATE_SLOT(d_func(), void _q_itemReleased(const QModelIndex &index))
- Q_PRIVATE_SLOT(d_func(), void _q_scrollingStarted())
+ Q_PRIVATE_SLOT(d_func(), void _q_itemActivated(const QModelIndex &index))
private:
CpSettingFormEntryItemDataPrivate *d_ptr;
};
--- a/controlpanel/src/cpframework/src/cpsettingformentryitemdata_p.cpp Fri Jun 11 13:56:17 2010 +0300
+++ b/controlpanel/src/cpframework/src/cpsettingformentryitemdata_p.cpp Wed Jun 23 18:30:54 2010 +0300
@@ -26,8 +26,7 @@
CpSettingFormEntryItemDataPrivate::CpSettingFormEntryItemDataPrivate()
: mDataForm(0),
mItemDataHelper(0),
- mItemPressed(false),
- mDataFormScrolling(false)
+ mItemPressed(false)
{
}
@@ -35,8 +34,7 @@
CpSettingFormEntryItemDataPrivate::CpSettingFormEntryItemDataPrivate(CpItemDataHelper *itemDataHelper)
: mDataForm(0),
mItemDataHelper(itemDataHelper),
- mItemPressed(false),
- mDataFormScrolling(false)
+ mItemPressed(false)
{
}
@@ -44,8 +42,7 @@
CpSettingFormEntryItemDataPrivate::CpSettingFormEntryItemDataPrivate(HbDataForm *dataForm)
: mDataForm(dataForm),
mItemDataHelper(0),
- mItemPressed(false),
- mDataFormScrolling(false)
+ mItemPressed(false)
{
}
@@ -62,13 +59,11 @@
{
if (mItemDataHelper) {
mItemDataHelper->connectToForm(SIGNAL(pressed (QModelIndex)),mParent,SLOT(_q_itemPressed(QModelIndex)));
- mItemDataHelper->connectToForm(SIGNAL(released (QModelIndex)),mParent,SLOT(_q_itemReleased(QModelIndex)));
- mItemDataHelper->connectToForm(SIGNAL(scrollingStarted ()),mParent,SLOT(_q_scrollingStarted()));
+ mItemDataHelper->connectToForm(SIGNAL(activated(QModelIndex)),mParent,SLOT(_q_itemActivated(QModelIndex)));
}
else if (mDataForm) {
QObject::connect( mDataForm,SIGNAL(pressed(QModelIndex)),mParent,SLOT(_q_itemPressed(QModelIndex)) );
- QObject::connect( mDataForm,SIGNAL(released(QModelIndex)),mParent,SLOT(_q_itemReleased(QModelIndex)) );
- QObject::connect( mDataForm,SIGNAL(scrollingStarted()),mParent,SLOT(_q_scrollingStarted()) );
+ QObject::connect( mDataForm,SIGNAL(activated(QModelIndex)),mParent,SLOT(_q_itemActivated(QModelIndex)) );
}
}
break;
@@ -200,18 +195,15 @@
mItemPressed = ( modelItemFromModelIndex(index) == mParent );
}
-void CpSettingFormEntryItemDataPrivate::_q_itemReleased(const QModelIndex &index)
-{
- if (!mDataFormScrolling && mItemPressed && modelItemFromModelIndex(index) == mParent) {
+
+void CpSettingFormEntryItemDataPrivate::_q_itemActivated(const QModelIndex &index)
+{
+ if (mItemPressed && modelItemFromModelIndex(index) == mParent) {
mParent->onLaunchView();
}
- mDataFormScrolling = false;
+ mItemPressed = false;
}
-void CpSettingFormEntryItemDataPrivate::_q_scrollingStarted()
-{
- mDataFormScrolling = true;
-}
HbDataFormModelItem *CpSettingFormEntryItemDataPrivate::modelItemFromModelIndex(const QModelIndex &index)
{
--- a/controlpanel/src/cpframework/src/cpsettingformentryitemdata_p.h Fri Jun 11 13:56:17 2010 +0300
+++ b/controlpanel/src/cpframework/src/cpsettingformentryitemdata_p.h Wed Jun 23 18:30:54 2010 +0300
@@ -50,10 +50,9 @@
HbIcon entryItemIcon() const;
void setEntryItemIcon(const HbIcon &icon);
- //SLOTS
+ //private slots
void _q_itemPressed(const QModelIndex &index);
- void _q_itemReleased(const QModelIndex &index);
- void _q_scrollingStarted();
+ void _q_itemActivated(const QModelIndex &index);
HbDataFormModelItem *modelItemFromModelIndex(const QModelIndex &index);
@@ -62,7 +61,6 @@
CpItemDataHelper *mItemDataHelper;
QPointer<HbView> mSettingViewPtr;
bool mItemPressed;
- bool mDataFormScrolling;
};