--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/contacts_plat/contacts_services_api/contacts_services_api.metaxml Fri Jul 23 12:43:48 2010 +0300
@@ -0,0 +1,13 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<api id="0ceeb483423b55b7ae987112142ea845" dataversion="2.0">
+ <name>Contacts services API</name>
+ <description>Qt Highway services offered by Contacts package.</description>
+ <type>c++</type>
+ <collection>phonebookui</collection>
+ <libs/>
+ <release category="platform" sinceversion=""/>
+ <attributes>
+ <htmldocprovided>no</htmldocprovided>
+ <adaptation>no</adaptation>
+ </attributes>
+</api>
--- a/contacts_plat/contacts_services_api/inc/cntservicescontact.h Wed Jul 21 11:37:51 2010 +0300
+++ b/contacts_plat/contacts_services_api/inc/cntservicescontact.h Fri Jul 23 12:43:48 2010 +0300
@@ -38,7 +38,7 @@
const int KCntServicesReturnValueContactSaved = 1;
const int KCntServicesReturnValueContactDeleted = -1;
const int KCntServicesReturnValueContactNotModified = 0;
-
+const int KCntServicesTerminated = -2;
/**
* A data container class to be used with "phonebookservices" Qt Highway services.
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/contacts_plat/contacts_ui_api/contacts_ui_api.metaxml Fri Jul 23 12:43:48 2010 +0300
@@ -0,0 +1,13 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<api id="8fe604687acb630749f264e1dcd3d6ca" dataversion="2.0">
+ <name>Contacts UI API</name>
+ <description>Contacts UI related APIs.</description>
+ <type>c++</type>
+ <collection>phonebookui</collection>
+ <libs/>
+ <release category="platform" sinceversion=""/>
+ <attributes>
+ <htmldocprovided>no</htmldocprovided>
+ <adaptation>no</adaptation>
+ </attributes>
+</api>
--- a/contacts_plat/contacts_ui_api/inc/cntabstractviewmanager.h Wed Jul 21 11:37:51 2010 +0300
+++ b/contacts_plat/contacts_ui_api/inc/cntabstractviewmanager.h Fri Jul 23 12:43:48 2010 +0300
@@ -34,7 +34,7 @@
/* New API */
virtual void changeView( const CntViewParameters aArgs ) = 0;
- virtual void back( const CntViewParameters aArgs ) = 0;
+ virtual void back( const CntViewParameters aArgs, bool toRoot = false ) = 0;
virtual QContactManager* contactManager( const QString& aType ) = 0;
};
--- a/contacts_plat/contacts_ui_api/inc/cntviewparams.h Wed Jul 21 11:37:51 2010 +0300
+++ b/contacts_plat/contacts_ui_api/inc/cntviewparams.h Fri Jul 23 12:43:48 2010 +0300
@@ -38,7 +38,7 @@
ESelectedDetail,
ESelectionMode,
EMyCard,
- EFinder,
+ EExtraAction,
ECustomParam = 100
};
@@ -46,7 +46,7 @@
{
noView=0, //exit
namesView,
- commLauncherView,
+ contactCardView,
serviceContactCardView,
serviceAssignContactCardView,
myCardView,
@@ -54,7 +54,7 @@
serviceContactSelectionView,
collectionView,
collectionFavoritesView,
- FavoritesMemberView,
+ favoritesMemberView,
editView,
serviceEditView,
serviceSubEditView,
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/contacts_plat/contacts_ui_extensions_api/contacts_ui_extensions_api.metaxml Fri Jul 23 12:43:48 2010 +0300
@@ -0,0 +1,13 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<api id="7bca5023bc11289d3473faf7c2e0c529" dataversion="2.0">
+ <name>Contacts UI extensions API</name>
+ <description>Plugin APIs for extending phonebook application.</description>
+ <type>c++</type>
+ <collection>phonebookui</collection>
+ <libs/>
+ <release category="platform" sinceversion=""/>
+ <attributes>
+ <htmldocprovided>no</htmldocprovided>
+ <adaptation>no</adaptation>
+ </attributes>
+</api>
--- a/contactwidgethsplugin/contactwidgeths/src/commlauncherwidget.cpp Wed Jul 21 11:37:51 2010 +0300
+++ b/contactwidgethsplugin/contactwidgeths/src/commlauncherwidget.cpp Fri Jul 23 12:43:48 2010 +0300
@@ -113,7 +113,11 @@
CommLauncherWidget::~CommLauncherWidget()
{
// Deleting request cancels all pending requests
- delete mRequest;
+ if (mRequest) {
+ delete mRequest;
+ mRequest = NULL;
+ }
+
}
/*!
@@ -518,12 +522,14 @@
*/
void CommLauncherWidget::keyPressEvent(QKeyEvent *event)
{
+ qDebug() << "keyPressEvent event=" << event->key();
if (event->key() == Qt::Key_Yes) {
// Call key initializes a call
makeCall();
event->accept();
} else {
- HbPopup::keyPressEvent(event);
+ close();
+ //HbPopup::keyPressEvent(event);
}
}
@@ -544,3 +550,4 @@
return width;
}
+
--- a/contactwidgethsplugin/contactwidgeths/src/contactwidgeths.cpp Wed Jul 21 11:37:51 2010 +0300
+++ b/contactwidgethsplugin/contactwidgeths/src/contactwidgeths.cpp Fri Jul 23 12:43:48 2010 +0300
@@ -135,15 +135,37 @@
*/
ContactWidgetHs::~ContactWidgetHs()
{
- delete mLauncher;
- delete mContactManager;
- delete mAppManager;
- delete mAvatar;
- // Deleting request cancels all pending requests
- delete mContactSelectRequest;
- //,,first cancel?
- delete mThumbnailManager;
- delete mTranslator;
+ if (mLauncher)
+ {
+ delete mLauncher;
+ }
+ if (mContactManager)
+ {
+ delete mContactManager;
+ }
+ if (mAppManager)
+ {
+ delete mAppManager;
+ }
+ if (mAvatar)
+ {
+ delete mAvatar;
+ }
+
+ // Deleting request cancels all pending requests
+ if (mContactSelectRequest)
+ {
+ delete mContactSelectRequest;
+ }
+
+ if (mThumbnailManager)
+ {
+ delete mThumbnailManager;
+ }
+ if (mTranslator)
+ {
+ delete mTranslator;
+ }
}
/*!
@@ -240,17 +262,38 @@
painter.end();
qDebug() << "setContactImage av 2"; //,,
+ int maxSize = (inputPixmap.width() > inputPixmap.height() ? inputPixmap.width():inputPixmap.height());
+ int minSize = (inputPixmap.width() < inputPixmap.height() ? inputPixmap.width():inputPixmap.height());
+ int sizeFrom = maxSize - minSize;
// We may draw the icon when thumnail processing is still in progress,
// so can't show the thumbnail yet.
if (inputPixmap.width()>0) {
+ if (inputPixmap.width() < inputPixmap.height())
+ {
+ QPixmap pm3 = inputPixmap.copy(0,sizeFrom/2,minSize,minSize);
+ QPixmap pm2 = pm3.scaled( QSize(contactIconSize, contactIconSize), Qt::KeepAspectRatio );
+ qDebug() << "pm2 " << pm2.width() << " " << pm2.height();
+ avatarPixmap = pm2;
+ }
+ else if (inputPixmap.width() > inputPixmap.height())
+ {
+ QPixmap pm3 = inputPixmap.copy(sizeFrom/2,0,minSize,minSize);
+ QPixmap pm2 = pm3.scaled( QSize(contactIconSize, contactIconSize), Qt::KeepAspectRatio );
+ qDebug() << "pm2 " << pm2.width() << " " << pm2.height();
+ avatarPixmap = pm2;
+ }else
+ {
QPixmap pm2 = inputPixmap.scaled( QSize(contactIconSize, contactIconSize), Qt::IgnoreAspectRatio );
qDebug() << "pm2 " << pm2.width() << " " << pm2.height();
avatarPixmap = pm2; //
+ }
}
HbIcon *avatarIcon = new HbIcon(QIcon(avatarPixmap));
mAvatarIconItem->setIcon(*avatarIcon);
+ mAvatarIconItem->setSize(QSize(contactIconSize, contactIconSize));
+ mAvatarIconItem->setAspectRatioMode(Qt::KeepAspectRatio);
// Then display the new image
update();
@@ -414,7 +457,21 @@
*/
void ContactWidgetHs::mousePressEvent(QGraphicsSceneMouseEvent *event)
{
- if (event && event->type() == QEvent::GraphicsSceneMousePress) {
+ Q_UNUSED(event);
+}
+
+/*!
+ \fn void ContactWidgetHs::mouseReleaseEvent(QGraphicsSceneMouseEvent* event)
+
+ Widget start is triggered from release \a event.
+ \sa
+*/
+void ContactWidgetHs::mouseReleaseEvent(QGraphicsSceneMouseEvent* event)
+{
+ qDebug() << "mouseReleaseEvent event->type() = " << (int)event->type();
+
+ //Q_UNUSED(event);
+ if (event && event->type() == QEvent::GraphicsSceneMouseRelease) {
// If the widget doesn't have contact yet and
// there are contacts, select one.
if (mContactLocalId == unUsedContactId) {
@@ -447,17 +504,6 @@
}
}
-/*!
- \fn void ContactWidgetHs::mouseReleaseEvent(QGraphicsSceneMouseEvent* event)
-
- Widget start is triggered from release \a event.
- \sa
-*/
-void ContactWidgetHs::mouseReleaseEvent(QGraphicsSceneMouseEvent* event)
-{
- Q_UNUSED(event);
-}
-
// Store contact data to member variables and to UI
void ContactWidgetHs::getContactData()
@@ -751,7 +797,17 @@
for(i=0; i<contactIds.count(); i++) {
if (contactIds.at(i) == mContactLocalId) {
qDebug() << "-deleting widget with removed contact " << mContactLocalId;
- // TODO this deletes the widget. Can we always delete the object immediately?
+
+ mAvatarIconItem->deleteLater();
+ mContactNameLabel->deleteLater();
+ mAppManager->deleteLater();
+ mLauncher->deleteLater();
+ mContactLocalId = unUsedContactId;
+ delete mAvatar;
+ mContactHasAvatarDetail = false;
+ mContactManager->deleteLater();
+ mThumbnailManager->deleteLater();
+
emit finished();
break;
}
--- a/inc/cntdebug.h Wed Jul 21 11:37:51 2010 +0300
+++ b/inc/cntdebug.h Fri Jul 23 12:43:48 2010 +0300
@@ -23,7 +23,8 @@
#include <QtGlobal> // qDebug()
// #define TRACK_MEMORY_LEAKS
-// #define CNT_TRACE2FILE
+// #define TRACES
+// #define TRACE2FILE
/*!
\def CNT_UNUSED(name)
@@ -350,7 +351,13 @@
by the streaming operator <<.
*/
-#if defined (_DEBUG) || defined (CNT_TRACE2FILE)
+// traces for debug builds by default, or if
+// TRACES macro is defined
+#if defined (_DEBUG) && !defined (TRACES)
+#define TRACES
+#endif
+
+#if defined (TRACES) || defined (TRACE2FILE)
#define CNT_UNUSED(name)
#define CNT_STATIC_ENTRY qDebug() << __PRETTY_FUNCTION__ << "entry";
#define CNT_STATIC_ENTRY_ARGS(args) qDebug() << __PRETTY_FUNCTION__ << "entry," << args;
@@ -376,7 +383,7 @@
#define CNT_WARNING(args)
#define CNT_CRITICAL(args)
#define CNT_FATAL(args)
-#endif // _DEBUG || CNT_TRACE2FILE
+#endif // TRACES || TRACE2FILE
// for tracing memory leaks
#ifdef TRACK_MEMORY_LEAKS
@@ -413,7 +420,7 @@
#endif
// filter phonebook app traces
-#ifdef CNT_TRACE2FILE
+#ifdef TRACE2FILE
#include <QFile>
#include <QTextStream>
static void cntCustomLog2File(QtMsgType type, const char *msg)
@@ -474,6 +481,6 @@
#else
#define MSG_HANDLER 0
#endif // Q_OS_SYMBIAN
-#endif // CNT_TRACE2FILE
+#endif // TRACE2FILE
#endif // CNTDEBUG_H
--- a/inc/cntglobal.h Wed Jul 21 11:37:51 2010 +0300
+++ b/inc/cntglobal.h Fri Jul 23 12:43:48 2010 +0300
@@ -47,5 +47,7 @@
#define CNT_ADD_ACTION "add"
#define CNT_FOCUS_ACTION "focus"
#define CNT_SAVE_ACTION "save"
+#define CNT_FIND_ACTION "find"
+#define CNT_ROOT_ACTION "root"
#endif // CNTGLOBAL_H
--- a/phonebookengines/cntactions/src/cntaction.cpp Wed Jul 21 11:37:51 2010 +0300
+++ b/phonebookengines/cntactions/src/cntaction.cpp Fri Jul 23 12:43:48 2010 +0300
@@ -165,20 +165,9 @@
// TODO: Using XQApplicationManager is not working with calls
// The factory method cannot create a request. Find out why
- bool isCallAction = (m_actionName == "call" || m_actionName == "videocall");
+ //bool isCallAction = (m_actionName == "call" || m_actionName == "videocall");
XQServiceRequest snd(interface, operation, false);
- delete m_request;
- m_request = NULL;
- m_request = m_AppManager.create(interface, operation, false); // not embedded
-
- if (!isCallAction) {
- if (!m_request) {
- emitResult(GeneralError, retValue);
- return;
- }
- }
-
//QContactType == TypeGroup
if (QContactType::TypeGroup == m_contact.type()) {
QContactPhoneNumber conferenceCall = m_contact.detail<QContactPhoneNumber>();
@@ -196,17 +185,9 @@
args << phoneNumber.number() << m_contact.localId() << m_contact.displayLabel();
- // TODO remove once call action works
- if (isCallAction) {
- snd << phoneNumber.number() << m_contact.localId() << m_contact.displayLabel();
- snd.send(retValue);
- emitResult(snd.latestError(), retValue);
- }
- else {
- m_request->setArguments(args);
- m_request->send(retValue);
- emitResult(m_request->lastError(), retValue);
- }
+ snd << phoneNumber.number() << m_contact.localId() << m_contact.displayLabel();
+ snd.send(retValue);
+ emitResult(snd.latestError(), retValue);
}
//QContactType == TypeContact
//if no detail, pick preferred
@@ -227,17 +208,9 @@
args << phoneNumber.number() << m_contact.localId() << m_contact.displayLabel();
- // TODO remove once call action works
- if (isCallAction) {
- snd << phoneNumber.number() << m_contact.localId() << m_contact.displayLabel();
- snd.send(retValue);
- emitResult(snd.latestError(), retValue);
- }
- else {
- m_request->setArguments(args);
- m_request->send(retValue);
- emitResult(m_request->lastError(), retValue);
- }
+ snd << phoneNumber.number() << m_contact.localId() << m_contact.displayLabel();
+ snd.send(retValue);
+ emitResult(snd.latestError(), retValue);
}
//else return an error
else {
--- a/phonebookengines/cntactions/src/cntemailaction.cpp Wed Jul 21 11:37:51 2010 +0300
+++ b/phonebookengines/cntactions/src/cntemailaction.cpp Fri Jul 23 12:43:48 2010 +0300
@@ -108,29 +108,6 @@
m_request->send(retValue);
emitResult(m_request->lastError(), retValue);
}
-
- // If no detail, pick preferred.
- // Todo : Temporary fix. Remove setting preferred when selection popup feature available.
- else if (m_detail.isEmpty()) {
- QContactDetail detail = m_contact.preferredDetail(m_actionName);
- QContactEmailAddress email;
-
- // If preferred is empty pick first email.
- if (detail.isEmpty()) {
- email = m_contact.detail<QContactEmailAddress>();
- }
- else {
- email = static_cast<QContactEmailAddress>(detail);
- }
-
- recipients.append(email.emailAddress());
- map.insert(EMAIL_SEND_TO_KEY, recipients);
- data.append(map);
-
- m_request->setArguments(data);
- m_request->send(retValue);
- emitResult(m_request->lastError(), retValue);
- }
else {
emitResult(GeneralError, retValue);
}
--- a/phonebookengines/cntactions/src/cntmessageaction.cpp Wed Jul 21 11:37:51 2010 +0300
+++ b/phonebookengines/cntactions/src/cntmessageaction.cpp Fri Jul 23 12:43:48 2010 +0300
@@ -66,10 +66,60 @@
void CntMessageAction::performAction()
{
- QString service("com.nokia.symbian.IMessageSend");
- QString type("send(QString,qint32,QString)");
+ QList<QVariant> data;
+ QVariant retValue;
- performNumberAction(service, type);
+ delete m_request;
+ m_request = NULL;
+
+ //QContactType == TypeGroup
+ if (QContactType::TypeGroup == m_contact.type()) {
+ QString interface("com.nokia.symbian.IMessageSend");
+ QString operation("send(QVariantMap,QString)");
+ m_request = m_AppManager.create(interface, operation, false); // not embedded
+ if (m_request==NULL) {
+ emitResult(GeneralError, retValue);
+ return;
+ }
+
+ QVariantMap recipientMap;
+ QVariant value = m_data.value("message");
+ if (value.canConvert<QVariantMap>()) {
+ recipientMap = value.toMap();
+ }
+ if (!recipientMap.isEmpty()) {
+ data.append(recipientMap); //recipients
+ data.append(QString()); //body text
+
+ m_request->setArguments(data);
+ m_request->send(retValue);
+ emitResult(m_request->lastError(), retValue);
+ }
+ else {
+ emitResult(GeneralError, retValue);
+ }
+ }
+ //QContactType == TypeContact
+ //detail exist use it
+ else if (m_detail.definitionName() == QContactPhoneNumber::DefinitionName) {
+ QString interface("com.nokia.symbian.IMessageSend");
+ QString operation("send(QString,qint32,QString)");
+ m_request = m_AppManager.create(interface, operation, false); // not embedded
+ if (m_request==NULL) {
+ emitResult(GeneralError, retValue);
+ return;
+ }
+
+ const QContactPhoneNumber &phoneNumber = static_cast<const QContactPhoneNumber &>(m_detail);
+ data << phoneNumber.number() << m_contact.localId() << m_contact.displayLabel();
+
+ m_request->setArguments(data);
+ m_request->send(retValue);
+ emitResult(m_request->lastError(), retValue);
+ }
+ else {
+ emitResult(GeneralError, retValue);
+ }
}
--- a/phonebookengines_old/contactsmodel/groupsql/cntmodel.iby Wed Jul 21 11:37:51 2010 +0300
+++ b/phonebookengines_old/contactsmodel/groupsql/cntmodel.iby Fri Jul 23 12:43:48 2010 +0300
@@ -23,7 +23,7 @@
#include <versit.iby>
#include <conarc.iby>
#include <charconv.iby>
-#include <BackupRestoreNotification.iby>
+#include <backuprestorenotification.iby>
#include <cntplsql.iby>
REM Log Engine contact matching plug-in implementation
#include <cntmatchlog.iby>
@@ -33,9 +33,9 @@
#define CONTACT_SERVER_MAX_HEAPSIZE 0x100000
#endif
-file=ABI_DIR\BUILD_DIR\cntsrv.exe System\Programs\cntsrv.exe heapmax=CONTACT_SERVER_MAX_HEAPSIZE
-file=ABI_DIR\BUILD_DIR\cntmodel.dll System\Libs\cntmodel.dll
-file=ABI_DIR\BUILD_DIR\cntview.dll System\Libs\cntview.dll
+file=ABI_DIR/BUILD_DIR/cntsrv.exe System/Programs/cntsrv.exe heapmax=CONTACT_SERVER_MAX_HEAPSIZE
+file=ABI_DIR/BUILD_DIR/cntmodel.dll System/Libs/cntmodel.dll
+file=ABI_DIR/BUILD_DIR/cntview.dll System/Libs/cntview.dll
ECOM_PLUGIN(cntvcard.dll,102035f8.rsc)
ECOM_PLUGIN(cntphone.dll,102035fb.rsc)
--- a/phonebookui/bwins/pbkcommonuiu.def Wed Jul 21 11:37:51 2010 +0300
+++ b/phonebookui/bwins/pbkcommonuiu.def Fri Jul 23 12:43:48 2010 +0300
@@ -27,114 +27,117 @@
??1CntEditView@@UAE@XZ @ 26 NONAME ; CntEditView::~CntEditView(void)
?qt_metacast@CntBaseSelectionView@@UAEPAXPBD@Z @ 27 NONAME ; void * CntBaseSelectionView::qt_metacast(char const *)
?metaObject@CntBaseSelectionView@@UBEPBUQMetaObject@@XZ @ 28 NONAME ; struct QMetaObject const * CntBaseSelectionView::metaObject(void) const
- ?backPressed@CntContactCardView@@IAEXXZ @ 29 NONAME ; void CntContactCardView::backPressed(void)
- ?qt_metacall@CntViewNavigator@@UAEHW4Call@QMetaObject@@HPAPAX@Z @ 30 NONAME ; int CntViewNavigator::qt_metacall(enum QMetaObject::Call, int, void * *)
- ?activate@CntBaseSelectionView@@UAEXPAVCntAbstractViewManager@@V?$QMap@HVQVariant@@@@@Z @ 31 NONAME ; void CntBaseSelectionView::activate(class CntAbstractViewManager *, class QMap<int, class QVariant>)
- ?tr@CntDefaultViewManager@@SA?AVQString@@PBD0H@Z @ 32 NONAME ; class QString CntDefaultViewManager::tr(char const *, char const *, int)
- ?viewId@CntEditView@@UBEHXZ @ 33 NONAME ; int CntEditView::viewId(void) const
- ?qt_metacast@CntContactCardView@@UAEPAXPBD@Z @ 34 NONAME ; void * CntContactCardView::qt_metacast(char const *)
- ?activate@CntEditView@@UAEXPAVCntAbstractViewManager@@V?$QMap@HVQVariant@@@@@Z @ 35 NONAME ; void CntEditView::activate(class CntAbstractViewManager *, class QMap<int, class QVariant>)
- ?viewClosed@CntBaseSelectionView@@IAEXXZ @ 36 NONAME ; void CntBaseSelectionView::viewClosed(void)
- ?showActionPopup@CntActionPopup@@QAE_NVQString@@@Z @ 37 NONAME ; bool CntActionPopup::showActionPopup(class QString)
- ?trUtf8@CntActionPopup@@SA?AVQString@@PBD0@Z @ 38 NONAME ; class QString CntActionPopup::trUtf8(char const *, char const *)
- ?keyPressed@CntMainWindow@@IAEXPAVQKeyEvent@@@Z @ 39 NONAME ; void CntMainWindow::keyPressed(class QKeyEvent *)
- ?tr@CntBaseSelectionView@@SA?AVQString@@PBD0H@Z @ 40 NONAME ; class QString CntBaseSelectionView::tr(char const *, char const *, int)
- ?metaObject@CntContactCardView@@UBEPBUQMetaObject@@XZ @ 41 NONAME ; struct QMetaObject const * CntContactCardView::metaObject(void) const
- ??0CntViewNavigator@@QAE@PAVQObject@@@Z @ 42 NONAME ; CntViewNavigator::CntViewNavigator(class QObject *)
- ?d_func@CntContactCardView@@ABEPBVCntContactCardViewPrivate@@XZ @ 43 NONAME ; class CntContactCardViewPrivate const * CntContactCardView::d_func(void) const
- ?trUtf8@CntBaseSelectionView@@SA?AVQString@@PBD0H@Z @ 44 NONAME ; class QString CntBaseSelectionView::trUtf8(char const *, char const *, int)
- ?getStaticMetaObject@CntBaseSelectionView@@SAABUQMetaObject@@XZ @ 45 NONAME ; struct QMetaObject const & CntBaseSelectionView::getStaticMetaObject(void)
- ??0CntDefaultViewManager@@QAE@PAVHbMainWindow@@@Z @ 46 NONAME ; CntDefaultViewManager::CntDefaultViewManager(class HbMainWindow *)
- ?getStaticMetaObject@CntActionPopup@@SAABUQMetaObject@@XZ @ 47 NONAME ; struct QMetaObject const & CntActionPopup::getStaticMetaObject(void)
- ?next@CntViewNavigator@@QAEXABHAAV?$QFlags@W4ViewSwitchFlag@Hb@@@@@Z @ 48 NONAME ; void CntViewNavigator::next(int const &, class QFlags<enum Hb::ViewSwitchFlag> &)
- ?createView@CntDefaultViewFactory@@UAEPAVCntAbstractView@@H@Z @ 49 NONAME ; class CntAbstractView * CntDefaultViewFactory::createView(int)
- ?qt_metacast@CntEditView@@UAEPAXPBD@Z @ 50 NONAME ; void * CntEditView::qt_metacast(char const *)
- ?contactRemoved@CntEditView@@IAEX_N@Z @ 51 NONAME ; void CntEditView::contactRemoved(bool)
- ?d_func@CntActionPopup@@ABEPBVCntActionPopupPrivate@@XZ @ 52 NONAME ; class CntActionPopupPrivate const * CntActionPopup::d_func(void) const
- ?trUtf8@CntContactCardView@@SA?AVQString@@PBD0@Z @ 53 NONAME ; class QString CntContactCardView::trUtf8(char const *, char const *)
- ?metaObject@CntActionPopup@@UBEPBUQMetaObject@@XZ @ 54 NONAME ; struct QMetaObject const * CntActionPopup::metaObject(void) const
- ?staticMetaObject@CntDefaultViewManager@@2UQMetaObject@@B @ 55 NONAME ; struct QMetaObject const CntDefaultViewManager::staticMetaObject
- ?removeException@CntViewNavigator@@QAEXABH@Z @ 56 NONAME ; void CntViewNavigator::removeException(int const &)
- ?trUtf8@CntViewNavigator@@SA?AVQString@@PBD0@Z @ 57 NONAME ; class QString CntViewNavigator::trUtf8(char const *, char const *)
- ?metaObject@CntMainWindow@@UBEPBUQMetaObject@@XZ @ 58 NONAME ; struct QMetaObject const * CntMainWindow::metaObject(void) const
- ??_ECntMainWindow@@UAE@I@Z @ 59 NONAME ; CntMainWindow::~CntMainWindow(unsigned int)
- ?metaObject@CntDefaultViewManager@@UBEPBUQMetaObject@@XZ @ 60 NONAME ; struct QMetaObject const * CntDefaultViewManager::metaObject(void) const
- ?back@CntViewNavigator@@QAEABHAAV?$QFlags@W4ViewSwitchFlag@Hb@@@@@Z @ 61 NONAME ; int const & CntViewNavigator::back(class QFlags<enum Hb::ViewSwitchFlag> &)
- ?changeView@CntDefaultViewManager@@UAEXV?$QMap@HVQVariant@@@@@Z @ 62 NONAME ; void CntDefaultViewManager::changeView(class QMap<int, class QVariant>)
- ??_ECntContactCardView@@UAE@I@Z @ 63 NONAME ; CntContactCardView::~CntContactCardView(unsigned int)
- ?staticMetaObject@CntViewNavigator@@2UQMetaObject@@B @ 64 NONAME ; struct QMetaObject const CntViewNavigator::staticMetaObject
- ?qt_metacall@CntContactCardView@@UAEHW4Call@QMetaObject@@HPAPAX@Z @ 65 NONAME ; int CntContactCardView::qt_metacall(enum QMetaObject::Call, int, void * *)
- ?qt_metacall@CntMainWindow@@UAEHW4Call@QMetaObject@@HPAPAX@Z @ 66 NONAME ; int CntMainWindow::qt_metacall(enum QMetaObject::Call, int, void * *)
- ?trUtf8@CntMainWindow@@SA?AVQString@@PBD0@Z @ 67 NONAME ; class QString CntMainWindow::trUtf8(char const *, char const *)
- ?staticMetaObject@CntMainWindow@@2UQMetaObject@@B @ 68 NONAME ; struct QMetaObject const CntMainWindow::staticMetaObject
- ??1CntContactCardView@@UAE@XZ @ 69 NONAME ; CntContactCardView::~CntContactCardView(void)
- ?isDefault@CntContactCardView@@UBE_NXZ @ 70 NONAME ; bool CntContactCardView::isDefault(void) const
- ?qt_metacall@CntActionPopup@@UAEHW4Call@QMetaObject@@HPAPAX@Z @ 71 NONAME ; int CntActionPopup::qt_metacall(enum QMetaObject::Call, int, void * *)
- ??0CntBaseSelectionView@@QAE@XZ @ 72 NONAME ; CntBaseSelectionView::CntBaseSelectionView(void)
- ??0CntMainWindow@@QAE@PAVQWidget@@H@Z @ 73 NONAME ; CntMainWindow::CntMainWindow(class QWidget *, int)
- ??1CntActionPopup@@UAE@XZ @ 74 NONAME ; CntActionPopup::~CntActionPopup(void)
- ?viewId@CntContactCardView@@UBEHXZ @ 75 NONAME ; int CntContactCardView::viewId(void) const
- ?removeEffect@CntViewNavigator@@QAEXABH@Z @ 76 NONAME ; void CntViewNavigator::removeEffect(int const &)
- ?getStaticMetaObject@CntContactCardView@@SAABUQMetaObject@@XZ @ 77 NONAME ; struct QMetaObject const & CntContactCardView::getStaticMetaObject(void)
- ?back@CntDefaultViewManager@@UAEXV?$QMap@HVQVariant@@@@@Z @ 78 NONAME ; void CntDefaultViewManager::back(class QMap<int, class QVariant>)
- ?activate@CntContactCardView@@UAEXPAVCntAbstractViewManager@@V?$QMap@HVQVariant@@@@@Z @ 79 NONAME ; void CntContactCardView::activate(class CntAbstractViewManager *, class QMap<int, class QVariant>)
- ?staticMetaObject@CntActionPopup@@2UQMetaObject@@B @ 80 NONAME ; struct QMetaObject const CntActionPopup::staticMetaObject
- ?staticMetaObject@CntEditView@@2UQMetaObject@@B @ 81 NONAME ; struct QMetaObject const CntEditView::staticMetaObject
- ?viewOpened@CntBaseSelectionView@@IAEXPAVCntAbstractViewManager@@V?$QMap@HVQVariant@@@@@Z @ 82 NONAME ; void CntBaseSelectionView::viewOpened(class CntAbstractViewManager *, class QMap<int, class QVariant>)
- ?isDefault@CntEditView@@UBE_NXZ @ 83 NONAME ; bool CntEditView::isDefault(void) const
- ??_ECntViewNavigator@@UAE@I@Z @ 84 NONAME ; CntViewNavigator::~CntViewNavigator(unsigned int)
- ?trUtf8@CntContactCardView@@SA?AVQString@@PBD0H@Z @ 85 NONAME ; class QString CntContactCardView::trUtf8(char const *, char const *, int)
- ?addException@CntViewNavigator@@QAEXABH0@Z @ 86 NONAME ; void CntViewNavigator::addException(int const &, int const &)
- ?closeApp@CntDefaultViewManager@@MAEXXZ @ 87 NONAME ; void CntDefaultViewManager::closeApp(void)
- ?deactivate@CntBaseSelectionView@@UAEXXZ @ 88 NONAME ; void CntBaseSelectionView::deactivate(void)
- ?d_func@CntEditView@@ABEPBVCntEditViewPrivate@@XZ @ 89 NONAME ; class CntEditViewPrivate const * CntEditView::d_func(void) const
- ?setViewFactory@CntDefaultViewManager@@QAEXPAVCntAbstractViewFactory@@@Z @ 90 NONAME ; void CntDefaultViewManager::setViewFactory(class CntAbstractViewFactory *)
- ?getStaticMetaObject@CntViewNavigator@@SAABUQMetaObject@@XZ @ 91 NONAME ; struct QMetaObject const & CntViewNavigator::getStaticMetaObject(void)
- ?tr@CntViewNavigator@@SA?AVQString@@PBD0@Z @ 92 NONAME ; class QString CntViewNavigator::tr(char const *, char const *)
- ?trUtf8@CntActionPopup@@SA?AVQString@@PBD0H@Z @ 93 NONAME ; class QString CntActionPopup::trUtf8(char const *, char const *, int)
- ?tr@CntViewNavigator@@SA?AVQString@@PBD0H@Z @ 94 NONAME ; class QString CntViewNavigator::tr(char const *, char const *, int)
- ?tr@CntActionPopup@@SA?AVQString@@PBD0H@Z @ 95 NONAME ; class QString CntActionPopup::tr(char const *, char const *, int)
- ?qt_metacast@CntDefaultViewManager@@UAEPAXPBD@Z @ 96 NONAME ; void * CntDefaultViewManager::qt_metacast(char const *)
- ?qt_metacall@CntDefaultViewManager@@UAEHW4Call@QMetaObject@@HPAPAX@Z @ 97 NONAME ; int CntDefaultViewManager::qt_metacall(enum QMetaObject::Call, int, void * *)
- ??0CntEditView@@QAE@XZ @ 98 NONAME ; CntEditView::CntEditView(void)
- ?qt_metacast@CntViewNavigator@@UAEPAXPBD@Z @ 99 NONAME ; void * CntViewNavigator::qt_metacast(char const *)
- ?view@CntContactCardView@@UBEPAVHbView@@XZ @ 100 NONAME ; class HbView * CntContactCardView::view(void) const
- ?tr@CntContactCardView@@SA?AVQString@@PBD0H@Z @ 101 NONAME ; class QString CntContactCardView::tr(char const *, char const *, int)
- ?tr@CntContactCardView@@SA?AVQString@@PBD0@Z @ 102 NONAME ; class QString CntContactCardView::tr(char const *, char const *)
- ?tr@CntEditView@@SA?AVQString@@PBD0@Z @ 103 NONAME ; class QString CntEditView::tr(char const *, char const *)
- ?d_func@CntContactCardView@@AAEPAVCntContactCardViewPrivate@@XZ @ 104 NONAME ; class CntContactCardViewPrivate * CntContactCardView::d_func(void)
- ?metaObject@CntViewNavigator@@UBEPBUQMetaObject@@XZ @ 105 NONAME ; struct QMetaObject const * CntViewNavigator::metaObject(void) const
- ?staticMetaObject@CntContactCardView@@2UQMetaObject@@B @ 106 NONAME ; struct QMetaObject const CntContactCardView::staticMetaObject
- ?tr@CntBaseSelectionView@@SA?AVQString@@PBD0@Z @ 107 NONAME ; class QString CntBaseSelectionView::tr(char const *, char const *)
- ?trUtf8@CntBaseSelectionView@@SA?AVQString@@PBD0@Z @ 108 NONAME ; class QString CntBaseSelectionView::trUtf8(char const *, char const *)
- ?switchView@CntDefaultViewManager@@AAEXV?$QMap@HVQVariant@@@@V?$QFlags@W4ViewSwitchFlag@Hb@@@@@Z @ 109 NONAME ; void CntDefaultViewManager::switchView(class QMap<int, class QVariant>, class QFlags<enum Hb::ViewSwitchFlag>)
- ?deactivate@CntEditView@@UAEXXZ @ 110 NONAME ; void CntEditView::deactivate(void)
- ?contactManager@CntDefaultViewManager@@UAEPAVQContactManager@QtMobility@@ABVQString@@@Z @ 111 NONAME ; class QtMobility::QContactManager * CntDefaultViewManager::contactManager(class QString const &)
- ?addEffect@CntViewNavigator@@QAEXABH0@Z @ 112 NONAME ; void CntViewNavigator::addEffect(int const &, int const &)
- ??_ECntActionPopup@@UAE@I@Z @ 113 NONAME ; CntActionPopup::~CntActionPopup(unsigned int)
- ?d_func@CntActionPopup@@AAEPAVCntActionPopupPrivate@@XZ @ 114 NONAME ; class CntActionPopupPrivate * CntActionPopup::d_func(void)
- ?metaObject@CntEditView@@UBEPBUQMetaObject@@XZ @ 115 NONAME ; struct QMetaObject const * CntEditView::metaObject(void) const
- ?contactUpdated@CntEditView@@IAEXH@Z @ 116 NONAME ; void CntEditView::contactUpdated(int)
- ??1CntDefaultViewManager@@UAE@XZ @ 117 NONAME ; CntDefaultViewManager::~CntDefaultViewManager(void)
- ??0CntContactCardView@@QAE@XZ @ 118 NONAME ; CntContactCardView::CntContactCardView(void)
- ?deactivate@CntContactCardView@@UAEXXZ @ 119 NONAME ; void CntContactCardView::deactivate(void)
- ?getStaticMetaObject@CntDefaultViewManager@@SAABUQMetaObject@@XZ @ 120 NONAME ; struct QMetaObject const & CntDefaultViewManager::getStaticMetaObject(void)
- ?trUtf8@CntViewNavigator@@SA?AVQString@@PBD0H@Z @ 121 NONAME ; class QString CntViewNavigator::trUtf8(char const *, char const *, int)
- ?qt_metacall@CntEditView@@UAEHW4Call@QMetaObject@@HPAPAX@Z @ 122 NONAME ; int CntEditView::qt_metacall(enum QMetaObject::Call, int, void * *)
- ?tr@CntEditView@@SA?AVQString@@PBD0H@Z @ 123 NONAME ; class QString CntEditView::tr(char const *, char const *, int)
- ?getStaticMetaObject@CntEditView@@SAABUQMetaObject@@XZ @ 124 NONAME ; struct QMetaObject const & CntEditView::getStaticMetaObject(void)
- ??1CntViewNavigator@@UAE@XZ @ 125 NONAME ; CntViewNavigator::~CntViewNavigator(void)
- ?qt_metacast@CntMainWindow@@UAEPAXPBD@Z @ 126 NONAME ; void * CntMainWindow::qt_metacast(char const *)
- ?trUtf8@CntEditView@@SA?AVQString@@PBD0@Z @ 127 NONAME ; class QString CntEditView::trUtf8(char const *, char const *)
- ?isDefault@CntBaseSelectionView@@UBE_NXZ @ 128 NONAME ; bool CntBaseSelectionView::isDefault(void) const
- ??1CntBaseSelectionView@@UAE@XZ @ 129 NONAME ; CntBaseSelectionView::~CntBaseSelectionView(void)
- ?tr@CntMainWindow@@SA?AVQString@@PBD0H@Z @ 130 NONAME ; class QString CntMainWindow::tr(char const *, char const *, int)
- ?createPluginView@CntDefaultViewFactory@@AAEPAVCntAbstractView@@H@Z @ 131 NONAME ; class CntAbstractView * CntDefaultViewFactory::createPluginView(int)
- ??_ECntEditView@@UAE@I@Z @ 132 NONAME ; CntEditView::~CntEditView(unsigned int)
- ??0CntActionPopup@@QAE@PAVQContact@QtMobility@@@Z @ 133 NONAME ; CntActionPopup::CntActionPopup(class QtMobility::QContact *)
- ?executeContactAction@CntActionPopup@@IAEXAAVQContact@QtMobility@@VQContactDetail@3@VQString@@@Z @ 134 NONAME ; void CntActionPopup::executeContactAction(class QtMobility::QContact &, class QtMobility::QContactDetail, class QString)
- ?getStaticMetaObject@CntMainWindow@@SAABUQMetaObject@@XZ @ 135 NONAME ; struct QMetaObject const & CntMainWindow::getStaticMetaObject(void)
- ?tr@CntDefaultViewManager@@SA?AVQString@@PBD0@Z @ 136 NONAME ; class QString CntDefaultViewManager::tr(char const *, char const *)
- ?removeCurrentView@CntDefaultViewManager@@AAEXXZ @ 137 NONAME ; void CntDefaultViewManager::removeCurrentView(void)
- ?actionPopupCancelPressed@CntActionPopup@@IAEXXZ @ 138 NONAME ; void CntActionPopup::actionPopupCancelPressed(void)
+ ?back@CntDefaultViewManager@@UAEXV?$QMap@HVQVariant@@@@_N@Z @ 29 NONAME ; void CntDefaultViewManager::back(class QMap<int, class QVariant>, bool)
+ ?backPressed@CntContactCardView@@IAEXXZ @ 30 NONAME ; void CntContactCardView::backPressed(void)
+ ?qt_metacall@CntViewNavigator@@UAEHW4Call@QMetaObject@@HPAPAX@Z @ 31 NONAME ; int CntViewNavigator::qt_metacall(enum QMetaObject::Call, int, void * *)
+ ?activate@CntBaseSelectionView@@UAEXPAVCntAbstractViewManager@@V?$QMap@HVQVariant@@@@@Z @ 32 NONAME ; void CntBaseSelectionView::activate(class CntAbstractViewManager *, class QMap<int, class QVariant>)
+ ?tr@CntDefaultViewManager@@SA?AVQString@@PBD0H@Z @ 33 NONAME ; class QString CntDefaultViewManager::tr(char const *, char const *, int)
+ ?viewId@CntEditView@@UBEHXZ @ 34 NONAME ; int CntEditView::viewId(void) const
+ ?qt_metacast@CntContactCardView@@UAEPAXPBD@Z @ 35 NONAME ; void * CntContactCardView::qt_metacast(char const *)
+ ?activate@CntEditView@@UAEXPAVCntAbstractViewManager@@V?$QMap@HVQVariant@@@@@Z @ 36 NONAME ; void CntEditView::activate(class CntAbstractViewManager *, class QMap<int, class QVariant>)
+ ?viewClosed@CntBaseSelectionView@@IAEXXZ @ 37 NONAME ; void CntBaseSelectionView::viewClosed(void)
+ ?showActionPopup@CntActionPopup@@QAE_NVQString@@@Z @ 38 NONAME ; bool CntActionPopup::showActionPopup(class QString)
+ ?trUtf8@CntActionPopup@@SA?AVQString@@PBD0@Z @ 39 NONAME ; class QString CntActionPopup::trUtf8(char const *, char const *)
+ ?keyPressed@CntMainWindow@@IAEXPAVQKeyEvent@@@Z @ 40 NONAME ; void CntMainWindow::keyPressed(class QKeyEvent *)
+ ?tr@CntBaseSelectionView@@SA?AVQString@@PBD0H@Z @ 41 NONAME ; class QString CntBaseSelectionView::tr(char const *, char const *, int)
+ ?metaObject@CntContactCardView@@UBEPBUQMetaObject@@XZ @ 42 NONAME ; struct QMetaObject const * CntContactCardView::metaObject(void) const
+ ??0CntViewNavigator@@QAE@PAVQObject@@@Z @ 43 NONAME ; CntViewNavigator::CntViewNavigator(class QObject *)
+ ?d_func@CntContactCardView@@ABEPBVCntContactCardViewPrivate@@XZ @ 44 NONAME ; class CntContactCardViewPrivate const * CntContactCardView::d_func(void) const
+ ?trUtf8@CntBaseSelectionView@@SA?AVQString@@PBD0H@Z @ 45 NONAME ; class QString CntBaseSelectionView::trUtf8(char const *, char const *, int)
+ ?getStaticMetaObject@CntBaseSelectionView@@SAABUQMetaObject@@XZ @ 46 NONAME ; struct QMetaObject const & CntBaseSelectionView::getStaticMetaObject(void)
+ ??0CntDefaultViewManager@@QAE@PAVHbMainWindow@@@Z @ 47 NONAME ; CntDefaultViewManager::CntDefaultViewManager(class HbMainWindow *)
+ ?actionPopupCancelPressed@CntActionPopup@@IAEXXZ @ 48 NONAME ; void CntActionPopup::actionPopupCancelPressed(void)
+ ?getStaticMetaObject@CntActionPopup@@SAABUQMetaObject@@XZ @ 49 NONAME ; struct QMetaObject const & CntActionPopup::getStaticMetaObject(void)
+ ?next@CntViewNavigator@@QAEXABHAAV?$QFlags@W4ViewSwitchFlag@Hb@@@@@Z @ 50 NONAME ; void CntViewNavigator::next(int const &, class QFlags<enum Hb::ViewSwitchFlag> &)
+ ?createView@CntDefaultViewFactory@@UAEPAVCntAbstractView@@H@Z @ 51 NONAME ; class CntAbstractView * CntDefaultViewFactory::createView(int)
+ ?qt_metacast@CntEditView@@UAEPAXPBD@Z @ 52 NONAME ; void * CntEditView::qt_metacast(char const *)
+ ??0CntContactCardView@@QAE@_N@Z @ 53 NONAME ; CntContactCardView::CntContactCardView(bool)
+ ?contactRemoved@CntEditView@@IAEX_N@Z @ 54 NONAME ; void CntEditView::contactRemoved(bool)
+ ?d_func@CntActionPopup@@ABEPBVCntActionPopupPrivate@@XZ @ 55 NONAME ; class CntActionPopupPrivate const * CntActionPopup::d_func(void) const
+ ?trUtf8@CntContactCardView@@SA?AVQString@@PBD0@Z @ 56 NONAME ; class QString CntContactCardView::trUtf8(char const *, char const *)
+ ?metaObject@CntActionPopup@@UBEPBUQMetaObject@@XZ @ 57 NONAME ; struct QMetaObject const * CntActionPopup::metaObject(void) const
+ ?staticMetaObject@CntDefaultViewManager@@2UQMetaObject@@B @ 58 NONAME ; struct QMetaObject const CntDefaultViewManager::staticMetaObject
+ ?removeException@CntViewNavigator@@QAEXABH@Z @ 59 NONAME ; void CntViewNavigator::removeException(int const &)
+ ?trUtf8@CntViewNavigator@@SA?AVQString@@PBD0@Z @ 60 NONAME ; class QString CntViewNavigator::trUtf8(char const *, char const *)
+ ?metaObject@CntMainWindow@@UBEPBUQMetaObject@@XZ @ 61 NONAME ; struct QMetaObject const * CntMainWindow::metaObject(void) const
+ ??_ECntMainWindow@@UAE@I@Z @ 62 NONAME ; CntMainWindow::~CntMainWindow(unsigned int)
+ ?metaObject@CntDefaultViewManager@@UBEPBUQMetaObject@@XZ @ 63 NONAME ; struct QMetaObject const * CntDefaultViewManager::metaObject(void) const
+ ?changeView@CntDefaultViewManager@@UAEXV?$QMap@HVQVariant@@@@@Z @ 64 NONAME ; void CntDefaultViewManager::changeView(class QMap<int, class QVariant>)
+ ??_ECntContactCardView@@UAE@I@Z @ 65 NONAME ; CntContactCardView::~CntContactCardView(unsigned int)
+ ?staticMetaObject@CntViewNavigator@@2UQMetaObject@@B @ 66 NONAME ; struct QMetaObject const CntViewNavigator::staticMetaObject
+ ?qt_metacall@CntContactCardView@@UAEHW4Call@QMetaObject@@HPAPAX@Z @ 67 NONAME ; int CntContactCardView::qt_metacall(enum QMetaObject::Call, int, void * *)
+ ?qt_metacall@CntMainWindow@@UAEHW4Call@QMetaObject@@HPAPAX@Z @ 68 NONAME ; int CntMainWindow::qt_metacall(enum QMetaObject::Call, int, void * *)
+ ?trUtf8@CntMainWindow@@SA?AVQString@@PBD0@Z @ 69 NONAME ; class QString CntMainWindow::trUtf8(char const *, char const *)
+ ?staticMetaObject@CntMainWindow@@2UQMetaObject@@B @ 70 NONAME ; struct QMetaObject const CntMainWindow::staticMetaObject
+ ?isDefault@CntContactCardView@@UBE_NXZ @ 71 NONAME ; bool CntContactCardView::isDefault(void) const
+ ??1CntContactCardView@@UAE@XZ @ 72 NONAME ; CntContactCardView::~CntContactCardView(void)
+ ?qt_metacall@CntActionPopup@@UAEHW4Call@QMetaObject@@HPAPAX@Z @ 73 NONAME ; int CntActionPopup::qt_metacall(enum QMetaObject::Call, int, void * *)
+ ??0CntBaseSelectionView@@QAE@XZ @ 74 NONAME ; CntBaseSelectionView::CntBaseSelectionView(void)
+ ??0CntMainWindow@@QAE@PAVQWidget@@H@Z @ 75 NONAME ; CntMainWindow::CntMainWindow(class QWidget *, int)
+ ??1CntActionPopup@@UAE@XZ @ 76 NONAME ; CntActionPopup::~CntActionPopup(void)
+ ?viewId@CntContactCardView@@UBEHXZ @ 77 NONAME ; int CntContactCardView::viewId(void) const
+ ?removeEffect@CntViewNavigator@@QAEXABH@Z @ 78 NONAME ; void CntViewNavigator::removeEffect(int const &)
+ ?getStaticMetaObject@CntContactCardView@@SAABUQMetaObject@@XZ @ 79 NONAME ; struct QMetaObject const & CntContactCardView::getStaticMetaObject(void)
+ ?activate@CntContactCardView@@UAEXPAVCntAbstractViewManager@@V?$QMap@HVQVariant@@@@@Z @ 80 NONAME ; void CntContactCardView::activate(class CntAbstractViewManager *, class QMap<int, class QVariant>)
+ ?staticMetaObject@CntActionPopup@@2UQMetaObject@@B @ 81 NONAME ; struct QMetaObject const CntActionPopup::staticMetaObject
+ ?staticMetaObject@CntEditView@@2UQMetaObject@@B @ 82 NONAME ; struct QMetaObject const CntEditView::staticMetaObject
+ ?viewOpened@CntBaseSelectionView@@IAEXPAVCntAbstractViewManager@@V?$QMap@HVQVariant@@@@@Z @ 83 NONAME ; void CntBaseSelectionView::viewOpened(class CntAbstractViewManager *, class QMap<int, class QVariant>)
+ ?isDefault@CntEditView@@UBE_NXZ @ 84 NONAME ; bool CntEditView::isDefault(void) const
+ ??_ECntViewNavigator@@UAE@I@Z @ 85 NONAME ; CntViewNavigator::~CntViewNavigator(unsigned int)
+ ?trUtf8@CntContactCardView@@SA?AVQString@@PBD0H@Z @ 86 NONAME ; class QString CntContactCardView::trUtf8(char const *, char const *, int)
+ ?addException@CntViewNavigator@@QAEXABH0@Z @ 87 NONAME ; void CntViewNavigator::addException(int const &, int const &)
+ ?closeApp@CntDefaultViewManager@@MAEXXZ @ 88 NONAME ; void CntDefaultViewManager::closeApp(void)
+ ?deactivate@CntBaseSelectionView@@UAEXXZ @ 89 NONAME ; void CntBaseSelectionView::deactivate(void)
+ ?d_func@CntEditView@@ABEPBVCntEditViewPrivate@@XZ @ 90 NONAME ; class CntEditViewPrivate const * CntEditView::d_func(void) const
+ ?setViewFactory@CntDefaultViewManager@@QAEXPAVCntAbstractViewFactory@@@Z @ 91 NONAME ; void CntDefaultViewManager::setViewFactory(class CntAbstractViewFactory *)
+ ?getStaticMetaObject@CntViewNavigator@@SAABUQMetaObject@@XZ @ 92 NONAME ; struct QMetaObject const & CntViewNavigator::getStaticMetaObject(void)
+ ?tr@CntViewNavigator@@SA?AVQString@@PBD0@Z @ 93 NONAME ; class QString CntViewNavigator::tr(char const *, char const *)
+ ?trUtf8@CntActionPopup@@SA?AVQString@@PBD0H@Z @ 94 NONAME ; class QString CntActionPopup::trUtf8(char const *, char const *, int)
+ ?tr@CntViewNavigator@@SA?AVQString@@PBD0H@Z @ 95 NONAME ; class QString CntViewNavigator::tr(char const *, char const *, int)
+ ?tr@CntActionPopup@@SA?AVQString@@PBD0H@Z @ 96 NONAME ; class QString CntActionPopup::tr(char const *, char const *, int)
+ ?qt_metacast@CntDefaultViewManager@@UAEPAXPBD@Z @ 97 NONAME ; void * CntDefaultViewManager::qt_metacast(char const *)
+ ?qt_metacall@CntDefaultViewManager@@UAEHW4Call@QMetaObject@@HPAPAX@Z @ 98 NONAME ; int CntDefaultViewManager::qt_metacall(enum QMetaObject::Call, int, void * *)
+ ??0CntEditView@@QAE@XZ @ 99 NONAME ; CntEditView::CntEditView(void)
+ ?qt_metacast@CntViewNavigator@@UAEPAXPBD@Z @ 100 NONAME ; void * CntViewNavigator::qt_metacast(char const *)
+ ?view@CntContactCardView@@UBEPAVHbView@@XZ @ 101 NONAME ; class HbView * CntContactCardView::view(void) const
+ ?addToContacts@CntContactCardView@@IAEXXZ @ 102 NONAME ; void CntContactCardView::addToContacts(void)
+ ?tr@CntContactCardView@@SA?AVQString@@PBD0H@Z @ 103 NONAME ; class QString CntContactCardView::tr(char const *, char const *, int)
+ ?addRoot@CntViewNavigator@@QAEXABH@Z @ 104 NONAME ; void CntViewNavigator::addRoot(int const &)
+ ?tr@CntContactCardView@@SA?AVQString@@PBD0@Z @ 105 NONAME ; class QString CntContactCardView::tr(char const *, char const *)
+ ?tr@CntEditView@@SA?AVQString@@PBD0@Z @ 106 NONAME ; class QString CntEditView::tr(char const *, char const *)
+ ?d_func@CntContactCardView@@AAEPAVCntContactCardViewPrivate@@XZ @ 107 NONAME ; class CntContactCardViewPrivate * CntContactCardView::d_func(void)
+ ?metaObject@CntViewNavigator@@UBEPBUQMetaObject@@XZ @ 108 NONAME ; struct QMetaObject const * CntViewNavigator::metaObject(void) const
+ ?staticMetaObject@CntContactCardView@@2UQMetaObject@@B @ 109 NONAME ; struct QMetaObject const CntContactCardView::staticMetaObject
+ ?tr@CntBaseSelectionView@@SA?AVQString@@PBD0@Z @ 110 NONAME ; class QString CntBaseSelectionView::tr(char const *, char const *)
+ ?trUtf8@CntBaseSelectionView@@SA?AVQString@@PBD0@Z @ 111 NONAME ; class QString CntBaseSelectionView::trUtf8(char const *, char const *)
+ ?switchView@CntDefaultViewManager@@AAEXV?$QMap@HVQVariant@@@@V?$QFlags@W4ViewSwitchFlag@Hb@@@@@Z @ 112 NONAME ; void CntDefaultViewManager::switchView(class QMap<int, class QVariant>, class QFlags<enum Hb::ViewSwitchFlag>)
+ ?deactivate@CntEditView@@UAEXXZ @ 113 NONAME ; void CntEditView::deactivate(void)
+ ?contactManager@CntDefaultViewManager@@UAEPAVQContactManager@QtMobility@@ABVQString@@@Z @ 114 NONAME ; class QtMobility::QContactManager * CntDefaultViewManager::contactManager(class QString const &)
+ ?addEffect@CntViewNavigator@@QAEXABH0@Z @ 115 NONAME ; void CntViewNavigator::addEffect(int const &, int const &)
+ ??_ECntActionPopup@@UAE@I@Z @ 116 NONAME ; CntActionPopup::~CntActionPopup(unsigned int)
+ ?d_func@CntActionPopup@@AAEPAVCntActionPopupPrivate@@XZ @ 117 NONAME ; class CntActionPopupPrivate * CntActionPopup::d_func(void)
+ ?metaObject@CntEditView@@UBEPBUQMetaObject@@XZ @ 118 NONAME ; struct QMetaObject const * CntEditView::metaObject(void) const
+ ?contactUpdated@CntEditView@@IAEXH@Z @ 119 NONAME ; void CntEditView::contactUpdated(int)
+ ??1CntDefaultViewManager@@UAE@XZ @ 120 NONAME ; CntDefaultViewManager::~CntDefaultViewManager(void)
+ ?deactivate@CntContactCardView@@UAEXXZ @ 121 NONAME ; void CntContactCardView::deactivate(void)
+ ?getStaticMetaObject@CntDefaultViewManager@@SAABUQMetaObject@@XZ @ 122 NONAME ; struct QMetaObject const & CntDefaultViewManager::getStaticMetaObject(void)
+ ?trUtf8@CntViewNavigator@@SA?AVQString@@PBD0H@Z @ 123 NONAME ; class QString CntViewNavigator::trUtf8(char const *, char const *, int)
+ ?qt_metacall@CntEditView@@UAEHW4Call@QMetaObject@@HPAPAX@Z @ 124 NONAME ; int CntEditView::qt_metacall(enum QMetaObject::Call, int, void * *)
+ ?tr@CntEditView@@SA?AVQString@@PBD0H@Z @ 125 NONAME ; class QString CntEditView::tr(char const *, char const *, int)
+ ?getStaticMetaObject@CntEditView@@SAABUQMetaObject@@XZ @ 126 NONAME ; struct QMetaObject const & CntEditView::getStaticMetaObject(void)
+ ??1CntViewNavigator@@UAE@XZ @ 127 NONAME ; CntViewNavigator::~CntViewNavigator(void)
+ ?qt_metacast@CntMainWindow@@UAEPAXPBD@Z @ 128 NONAME ; void * CntMainWindow::qt_metacast(char const *)
+ ?trUtf8@CntEditView@@SA?AVQString@@PBD0@Z @ 129 NONAME ; class QString CntEditView::trUtf8(char const *, char const *)
+ ?isDefault@CntBaseSelectionView@@UBE_NXZ @ 130 NONAME ; bool CntBaseSelectionView::isDefault(void) const
+ ?back@CntViewNavigator@@QAEABHAAV?$QFlags@W4ViewSwitchFlag@Hb@@@@_N@Z @ 131 NONAME ; int const & CntViewNavigator::back(class QFlags<enum Hb::ViewSwitchFlag> &, bool)
+ ??1CntBaseSelectionView@@UAE@XZ @ 132 NONAME ; CntBaseSelectionView::~CntBaseSelectionView(void)
+ ?tr@CntMainWindow@@SA?AVQString@@PBD0H@Z @ 133 NONAME ; class QString CntMainWindow::tr(char const *, char const *, int)
+ ?createPluginView@CntDefaultViewFactory@@AAEPAVCntAbstractView@@H@Z @ 134 NONAME ; class CntAbstractView * CntDefaultViewFactory::createPluginView(int)
+ ??_ECntEditView@@UAE@I@Z @ 135 NONAME ; CntEditView::~CntEditView(unsigned int)
+ ??0CntActionPopup@@QAE@PAVQContact@QtMobility@@@Z @ 136 NONAME ; CntActionPopup::CntActionPopup(class QtMobility::QContact *)
+ ?executeContactAction@CntActionPopup@@IAEXAAVQContact@QtMobility@@VQContactDetail@3@VQString@@@Z @ 137 NONAME ; void CntActionPopup::executeContactAction(class QtMobility::QContact &, class QtMobility::QContactDetail, class QString)
+ ?getStaticMetaObject@CntMainWindow@@SAABUQMetaObject@@XZ @ 138 NONAME ; struct QMetaObject const & CntMainWindow::getStaticMetaObject(void)
+ ?tr@CntDefaultViewManager@@SA?AVQString@@PBD0@Z @ 139 NONAME ; class QString CntDefaultViewManager::tr(char const *, char const *)
+ ?removeCurrentView@CntDefaultViewManager@@AAEXXZ @ 140 NONAME ; void CntDefaultViewManager::removeCurrentView(void)
+ ?currentViewId@CntDefaultViewManager@@QAEHXZ @ 141 NONAME ; int CntDefaultViewManager::currentViewId(void)
--- a/phonebookui/cnthistorymodel/inc/cnthistorymodelconsts.h Wed Jul 21 11:37:51 2010 +0300
+++ b/phonebookui/cnthistorymodel/inc/cnthistorymodelconsts.h Fri Jul 23 12:43:48 2010 +0300
@@ -20,10 +20,8 @@
enum Attributes
{
CntIncoming = 1,
- CntOutgoing = 2,
- CntUnseen = 4,
- CntSeen = 8,
- CntAttachment = 16
+ CntUnseen = 2,
+ CntAttachment = 4
};
enum ItemType
--- a/phonebookui/cnthistorymodel/src/cnthistorymodel_p.cpp Wed Jul 21 11:37:51 2010 +0300
+++ b/phonebookui/cnthistorymodel/src/cnthistorymodel_p.cpp Fri Jul 23 12:43:48 2010 +0300
@@ -22,6 +22,7 @@
#include <hbframebackground.h>
#include "cnthistorymodel_p.h"
+#include "cntdebug.h"
// Unnamed namespace for helper functions
@@ -36,6 +37,33 @@
{
return ((*t1).timeStamp < (*t2).timeStamp);
}
+
+#ifdef TRACES
+#define LOG_ITEM(i) logItem(i)
+#else
+#define LOG_ITEM(i)
+#endif
+
+ void logItem(const HistoryItem& item)
+ {
+ QStringList l;
+
+ l << item.message << item.number << item.timeStamp.toString() << item.title;
+ l << (item.flags & CntIncoming ? "incoming" : "outgoing");
+ l << (item.flags & CntUnseen ? "unseen" : "seen");
+ l << (item.flags & CntAttachment ? "attachment" : "");
+ l << (item.flags & CntCallLog ? "call" : "message");
+ if (item.flags & CntReceivedCall)
+ l << "recieved";
+ else if (item.flags & CntMissedCall)
+ l << "missed";
+ else if (item.flags & CntDialledCall)
+ l << "dialled";
+
+ l.removeAll("");
+
+ qDebug() << l;
+ }
}
Q_DECLARE_METATYPE(LogsEvent *)
@@ -382,16 +410,20 @@
}
}
- if ( event->direction() == LogsEvent::DirOut )
- item.flags |= CntOutgoing;
- else
+ if ( event->direction() == LogsEvent::DirMissed
+ || event->direction() == LogsEvent::DirIn ) {
item.flags |= CntIncoming;
+ } else {
+ item.flags &= ~CntIncoming;
+ }
item.message = bodyText;
item.title = title;
item.timeStamp = event->time().toLocalTime();
item.flags |= CntCallLog;
item.number = QString(event->number());
+
+ LOG_ITEM(item);
}
/*!
@@ -604,7 +636,7 @@
else
item.flags &= ~CntUnseen;
} else if ( event.direction() == MsgItem::MsgDirectionOutgoing )
- item.flags |= CntOutgoing;
+ item.flags &= ~CntIncoming;
// Attachment
if (event.isAttributeSet(MsgItem::MsgAttributeAttachment))
@@ -623,6 +655,8 @@
}
item.timeStamp = event.timeStamp().toLocalTime();
+
+ LOG_ITEM(item);
}
/*!
--- a/phonebookui/eabi/pbkcommonuiu.def Wed Jul 21 11:37:51 2010 +0300
+++ b/phonebookui/eabi/pbkcommonuiu.def Fri Jul 23 12:43:48 2010 +0300
@@ -30,135 +30,138 @@
_ZN14CntActionPopup16staticMetaObjectE @ 29 NONAME DATA 16
_ZN14CntActionPopup19getStaticMetaObjectEv @ 30 NONAME
_ZN14CntActionPopup20executeContactActionERN10QtMobility8QContactENS0_14QContactDetailE7QString @ 31 NONAME
- _ZN14CntActionPopupC1EPN10QtMobility8QContactE @ 32 NONAME
- _ZN14CntActionPopupC2EPN10QtMobility8QContactE @ 33 NONAME
- _ZN14CntActionPopupD0Ev @ 34 NONAME
- _ZN14CntActionPopupD1Ev @ 35 NONAME
- _ZN14CntActionPopupD2Ev @ 36 NONAME
- _ZN16CntViewNavigator11qt_metacallEN11QMetaObject4CallEiPPv @ 37 NONAME
- _ZN16CntViewNavigator11qt_metacastEPKc @ 38 NONAME
- _ZN16CntViewNavigator12addExceptionERKiS1_ @ 39 NONAME
- _ZN16CntViewNavigator12removeEffectERKi @ 40 NONAME
- _ZN16CntViewNavigator15removeExceptionERKi @ 41 NONAME
- _ZN16CntViewNavigator16staticMetaObjectE @ 42 NONAME DATA 16
- _ZN16CntViewNavigator19getStaticMetaObjectEv @ 43 NONAME
- _ZN16CntViewNavigator4backER6QFlagsIN2Hb14ViewSwitchFlagEE @ 44 NONAME
- _ZN16CntViewNavigator4nextERKiR6QFlagsIN2Hb14ViewSwitchFlagEE @ 45 NONAME
- _ZN16CntViewNavigator9addEffectERKiS1_ @ 46 NONAME
- _ZN16CntViewNavigatorC1EP7QObject @ 47 NONAME
- _ZN16CntViewNavigatorC2EP7QObject @ 48 NONAME
- _ZN16CntViewNavigatorD0Ev @ 49 NONAME
- _ZN16CntViewNavigatorD1Ev @ 50 NONAME
- _ZN16CntViewNavigatorD2Ev @ 51 NONAME
- _ZN18CntContactCardView10deactivateEv @ 52 NONAME
- _ZN18CntContactCardView11backPressedEv @ 53 NONAME
- _ZN18CntContactCardView11qt_metacallEN11QMetaObject4CallEiPPv @ 54 NONAME
- _ZN18CntContactCardView11qt_metacastEPKc @ 55 NONAME
- _ZN18CntContactCardView13viewActivatedEP22CntAbstractViewManager4QMapIi8QVariantE @ 56 NONAME
- _ZN18CntContactCardView16staticMetaObjectE @ 57 NONAME DATA 16
- _ZN18CntContactCardView19getStaticMetaObjectEv @ 58 NONAME
- _ZN18CntContactCardView8activateEP22CntAbstractViewManager4QMapIi8QVariantE @ 59 NONAME
- _ZN18CntContactCardViewC1Ev @ 60 NONAME
- _ZN18CntContactCardViewC2Ev @ 61 NONAME
- _ZN18CntContactCardViewD0Ev @ 62 NONAME
- _ZN18CntContactCardViewD1Ev @ 63 NONAME
- _ZN18CntContactCardViewD2Ev @ 64 NONAME
- _ZN20CntBaseSelectionView10deactivateEv @ 65 NONAME
- _ZN20CntBaseSelectionView10viewClosedEv @ 66 NONAME
- _ZN20CntBaseSelectionView10viewOpenedEP22CntAbstractViewManager4QMapIi8QVariantE @ 67 NONAME
- _ZN20CntBaseSelectionView11qt_metacallEN11QMetaObject4CallEiPPv @ 68 NONAME
- _ZN20CntBaseSelectionView11qt_metacastEPKc @ 69 NONAME
- _ZN20CntBaseSelectionView16staticMetaObjectE @ 70 NONAME DATA 16
- _ZN20CntBaseSelectionView19getStaticMetaObjectEv @ 71 NONAME
- _ZN20CntBaseSelectionView8activateEP22CntAbstractViewManager4QMapIi8QVariantE @ 72 NONAME
- _ZN20CntBaseSelectionView9closeViewEv @ 73 NONAME
- _ZN20CntBaseSelectionViewC2Ev @ 74 NONAME
- _ZN20CntBaseSelectionViewD0Ev @ 75 NONAME
- _ZN20CntBaseSelectionViewD1Ev @ 76 NONAME
- _ZN20CntBaseSelectionViewD2Ev @ 77 NONAME
- _ZN21CntDefaultViewFactory10createViewEi @ 78 NONAME
- _ZN21CntDefaultViewFactory16createPluginViewEi @ 79 NONAME
- _ZN21CntDefaultViewFactoryC1Ev @ 80 NONAME
- _ZN21CntDefaultViewFactoryC2Ev @ 81 NONAME
- _ZN21CntDefaultViewFactoryD0Ev @ 82 NONAME
- _ZN21CntDefaultViewFactoryD1Ev @ 83 NONAME
- _ZN21CntDefaultViewFactoryD2Ev @ 84 NONAME
- _ZN21CntDefaultViewManager10changeViewE4QMapIi8QVariantE @ 85 NONAME
- _ZN21CntDefaultViewManager10switchViewE4QMapIi8QVariantE6QFlagsIN2Hb14ViewSwitchFlagEE @ 86 NONAME
- _ZN21CntDefaultViewManager11qt_metacallEN11QMetaObject4CallEiPPv @ 87 NONAME
- _ZN21CntDefaultViewManager11qt_metacastEPKc @ 88 NONAME
- _ZN21CntDefaultViewManager13deleteOldViewEv @ 89 NONAME
- _ZN21CntDefaultViewManager14contactManagerERK7QString @ 90 NONAME
- _ZN21CntDefaultViewManager14setViewFactoryEP22CntAbstractViewFactory @ 91 NONAME
- _ZN21CntDefaultViewManager16setViewNavigatorEP16CntViewNavigator @ 92 NONAME
- _ZN21CntDefaultViewManager16staticMetaObjectE @ 93 NONAME DATA 16
- _ZN21CntDefaultViewManager17removeCurrentViewEv @ 94 NONAME
- _ZN21CntDefaultViewManager19getStaticMetaObjectEv @ 95 NONAME
- _ZN21CntDefaultViewManager4backE4QMapIi8QVariantE @ 96 NONAME
- _ZN21CntDefaultViewManager7cleanupEv @ 97 NONAME
- _ZN21CntDefaultViewManager8closeAppEv @ 98 NONAME
- _ZN21CntDefaultViewManagerC1EP12HbMainWindow @ 99 NONAME
- _ZN21CntDefaultViewManagerC2EP12HbMainWindow @ 100 NONAME
- _ZN21CntDefaultViewManagerD0Ev @ 101 NONAME
- _ZN21CntDefaultViewManagerD1Ev @ 102 NONAME
- _ZN21CntDefaultViewManagerD2Ev @ 103 NONAME
- _ZNK11CntEditView10metaObjectEv @ 104 NONAME
- _ZNK11CntEditView4viewEv @ 105 NONAME
- _ZNK11CntEditView6viewIdEv @ 106 NONAME
- _ZNK11CntEditView9isDefaultEv @ 107 NONAME
- _ZNK13CntMainWindow10metaObjectEv @ 108 NONAME
- _ZNK14CntActionPopup10metaObjectEv @ 109 NONAME
- _ZNK16CntViewNavigator10metaObjectEv @ 110 NONAME
- _ZNK18CntContactCardView10metaObjectEv @ 111 NONAME
- _ZNK18CntContactCardView4viewEv @ 112 NONAME
- _ZNK18CntContactCardView6viewIdEv @ 113 NONAME
- _ZNK18CntContactCardView9isDefaultEv @ 114 NONAME
- _ZNK20CntBaseSelectionView10metaObjectEv @ 115 NONAME
- _ZNK20CntBaseSelectionView4viewEv @ 116 NONAME
- _ZNK20CntBaseSelectionView9isDefaultEv @ 117 NONAME
- _ZNK21CntDefaultViewManager10metaObjectEv @ 118 NONAME
- _ZTI11CntEditView @ 119 NONAME
- _ZTI13CntMainWindow @ 120 NONAME
- _ZTI14CntActionPopup @ 121 NONAME
- _ZTI16CntViewNavigator @ 122 NONAME
- _ZTI18CntContactCardView @ 123 NONAME
- _ZTI20CntBaseSelectionView @ 124 NONAME
- _ZTI21CntDefaultViewFactory @ 125 NONAME
- _ZTI21CntDefaultViewManager @ 126 NONAME
- _ZTV11CntEditView @ 127 NONAME
- _ZTV13CntMainWindow @ 128 NONAME
- _ZTV14CntActionPopup @ 129 NONAME
- _ZTV16CntViewNavigator @ 130 NONAME
- _ZTV18CntContactCardView @ 131 NONAME
- _ZTV20CntBaseSelectionView @ 132 NONAME
- _ZTV21CntDefaultViewFactory @ 133 NONAME
- _ZTV21CntDefaultViewManager @ 134 NONAME
- _ZThn8_N11CntEditView10deactivateEv @ 135 NONAME
- _ZThn8_N11CntEditView8activateEP22CntAbstractViewManager4QMapIi8QVariantE @ 136 NONAME
- _ZThn8_N11CntEditViewD0Ev @ 137 NONAME
- _ZThn8_N11CntEditViewD1Ev @ 138 NONAME
- _ZThn8_N13CntMainWindowD0Ev @ 139 NONAME
- _ZThn8_N13CntMainWindowD1Ev @ 140 NONAME
- _ZThn8_N18CntContactCardView10deactivateEv @ 141 NONAME
- _ZThn8_N18CntContactCardView8activateEP22CntAbstractViewManager4QMapIi8QVariantE @ 142 NONAME
- _ZThn8_N18CntContactCardViewD0Ev @ 143 NONAME
- _ZThn8_N18CntContactCardViewD1Ev @ 144 NONAME
- _ZThn8_N20CntBaseSelectionView10deactivateEv @ 145 NONAME
- _ZThn8_N20CntBaseSelectionView8activateEP22CntAbstractViewManager4QMapIi8QVariantE @ 146 NONAME
- _ZThn8_N20CntBaseSelectionViewD0Ev @ 147 NONAME
- _ZThn8_N20CntBaseSelectionViewD1Ev @ 148 NONAME
- _ZThn8_N21CntDefaultViewManager10changeViewE4QMapIi8QVariantE @ 149 NONAME
- _ZThn8_N21CntDefaultViewManager14contactManagerERK7QString @ 150 NONAME
- _ZThn8_N21CntDefaultViewManager4backE4QMapIi8QVariantE @ 151 NONAME
- _ZThn8_N21CntDefaultViewManagerD0Ev @ 152 NONAME
- _ZThn8_N21CntDefaultViewManagerD1Ev @ 153 NONAME
- _ZThn8_NK11CntEditView4viewEv @ 154 NONAME
- _ZThn8_NK11CntEditView6viewIdEv @ 155 NONAME
- _ZThn8_NK11CntEditView9isDefaultEv @ 156 NONAME
- _ZThn8_NK18CntContactCardView4viewEv @ 157 NONAME
- _ZThn8_NK18CntContactCardView6viewIdEv @ 158 NONAME
- _ZThn8_NK18CntContactCardView9isDefaultEv @ 159 NONAME
- _ZThn8_NK20CntBaseSelectionView4viewEv @ 160 NONAME
- _ZThn8_NK20CntBaseSelectionView9isDefaultEv @ 161 NONAME
- _ZN14CntActionPopup24actionPopupCancelPressedEv @ 162 NONAME
+ _ZN14CntActionPopup24actionPopupCancelPressedEv @ 32 NONAME
+ _ZN14CntActionPopupC1EPN10QtMobility8QContactE @ 33 NONAME
+ _ZN14CntActionPopupC2EPN10QtMobility8QContactE @ 34 NONAME
+ _ZN14CntActionPopupD0Ev @ 35 NONAME
+ _ZN14CntActionPopupD1Ev @ 36 NONAME
+ _ZN14CntActionPopupD2Ev @ 37 NONAME
+ _ZN16CntViewNavigator11qt_metacallEN11QMetaObject4CallEiPPv @ 38 NONAME
+ _ZN16CntViewNavigator11qt_metacastEPKc @ 39 NONAME
+ _ZN16CntViewNavigator12addExceptionERKiS1_ @ 40 NONAME
+ _ZN16CntViewNavigator12removeEffectERKi @ 41 NONAME
+ _ZN16CntViewNavigator15removeExceptionERKi @ 42 NONAME
+ _ZN16CntViewNavigator16staticMetaObjectE @ 43 NONAME DATA 16
+ _ZN16CntViewNavigator19getStaticMetaObjectEv @ 44 NONAME
+ _ZN16CntViewNavigator4backER6QFlagsIN2Hb14ViewSwitchFlagEEb @ 45 NONAME
+ _ZN16CntViewNavigator4nextERKiR6QFlagsIN2Hb14ViewSwitchFlagEE @ 46 NONAME
+ _ZN16CntViewNavigator7addRootERKi @ 47 NONAME
+ _ZN16CntViewNavigator9addEffectERKiS1_ @ 48 NONAME
+ _ZN16CntViewNavigatorC1EP7QObject @ 49 NONAME
+ _ZN16CntViewNavigatorC2EP7QObject @ 50 NONAME
+ _ZN16CntViewNavigatorD0Ev @ 51 NONAME
+ _ZN16CntViewNavigatorD1Ev @ 52 NONAME
+ _ZN16CntViewNavigatorD2Ev @ 53 NONAME
+ _ZN18CntContactCardView10deactivateEv @ 54 NONAME
+ _ZN18CntContactCardView11backPressedEv @ 55 NONAME
+ _ZN18CntContactCardView11qt_metacallEN11QMetaObject4CallEiPPv @ 56 NONAME
+ _ZN18CntContactCardView11qt_metacastEPKc @ 57 NONAME
+ _ZN18CntContactCardView13addToContactsEv @ 58 NONAME
+ _ZN18CntContactCardView13viewActivatedEP22CntAbstractViewManager4QMapIi8QVariantE @ 59 NONAME
+ _ZN18CntContactCardView16staticMetaObjectE @ 60 NONAME DATA 16
+ _ZN18CntContactCardView19getStaticMetaObjectEv @ 61 NONAME
+ _ZN18CntContactCardView8activateEP22CntAbstractViewManager4QMapIi8QVariantE @ 62 NONAME
+ _ZN18CntContactCardViewC1Eb @ 63 NONAME
+ _ZN18CntContactCardViewC2Eb @ 64 NONAME
+ _ZN18CntContactCardViewD0Ev @ 65 NONAME
+ _ZN18CntContactCardViewD1Ev @ 66 NONAME
+ _ZN18CntContactCardViewD2Ev @ 67 NONAME
+ _ZN20CntBaseSelectionView10deactivateEv @ 68 NONAME
+ _ZN20CntBaseSelectionView10viewClosedEv @ 69 NONAME
+ _ZN20CntBaseSelectionView10viewOpenedEP22CntAbstractViewManager4QMapIi8QVariantE @ 70 NONAME
+ _ZN20CntBaseSelectionView11qt_metacallEN11QMetaObject4CallEiPPv @ 71 NONAME
+ _ZN20CntBaseSelectionView11qt_metacastEPKc @ 72 NONAME
+ _ZN20CntBaseSelectionView16staticMetaObjectE @ 73 NONAME DATA 16
+ _ZN20CntBaseSelectionView19getStaticMetaObjectEv @ 74 NONAME
+ _ZN20CntBaseSelectionView8activateEP22CntAbstractViewManager4QMapIi8QVariantE @ 75 NONAME
+ _ZN20CntBaseSelectionView9closeViewEv @ 76 NONAME
+ _ZN20CntBaseSelectionViewC2Ev @ 77 NONAME
+ _ZN20CntBaseSelectionViewD0Ev @ 78 NONAME
+ _ZN20CntBaseSelectionViewD1Ev @ 79 NONAME
+ _ZN20CntBaseSelectionViewD2Ev @ 80 NONAME
+ _ZN21CntDefaultViewFactory10createViewEi @ 81 NONAME
+ _ZN21CntDefaultViewFactory16createPluginViewEi @ 82 NONAME
+ _ZN21CntDefaultViewFactoryC1Ev @ 83 NONAME
+ _ZN21CntDefaultViewFactoryC2Ev @ 84 NONAME
+ _ZN21CntDefaultViewFactoryD0Ev @ 85 NONAME
+ _ZN21CntDefaultViewFactoryD1Ev @ 86 NONAME
+ _ZN21CntDefaultViewFactoryD2Ev @ 87 NONAME
+ _ZN21CntDefaultViewManager10changeViewE4QMapIi8QVariantE @ 88 NONAME
+ _ZN21CntDefaultViewManager10switchViewE4QMapIi8QVariantE6QFlagsIN2Hb14ViewSwitchFlagEE @ 89 NONAME
+ _ZN21CntDefaultViewManager11qt_metacallEN11QMetaObject4CallEiPPv @ 90 NONAME
+ _ZN21CntDefaultViewManager11qt_metacastEPKc @ 91 NONAME
+ _ZN21CntDefaultViewManager13currentViewIdEv @ 92 NONAME
+ _ZN21CntDefaultViewManager13deleteOldViewEv @ 93 NONAME
+ _ZN21CntDefaultViewManager14contactManagerERK7QString @ 94 NONAME
+ _ZN21CntDefaultViewManager14setViewFactoryEP22CntAbstractViewFactory @ 95 NONAME
+ _ZN21CntDefaultViewManager16setViewNavigatorEP16CntViewNavigator @ 96 NONAME
+ _ZN21CntDefaultViewManager16staticMetaObjectE @ 97 NONAME DATA 16
+ _ZN21CntDefaultViewManager17removeCurrentViewEv @ 98 NONAME
+ _ZN21CntDefaultViewManager19getStaticMetaObjectEv @ 99 NONAME
+ _ZN21CntDefaultViewManager4backE4QMapIi8QVariantEb @ 100 NONAME
+ _ZN21CntDefaultViewManager7cleanupEv @ 101 NONAME
+ _ZN21CntDefaultViewManager8closeAppEv @ 102 NONAME
+ _ZN21CntDefaultViewManagerC1EP12HbMainWindow @ 103 NONAME
+ _ZN21CntDefaultViewManagerC2EP12HbMainWindow @ 104 NONAME
+ _ZN21CntDefaultViewManagerD0Ev @ 105 NONAME
+ _ZN21CntDefaultViewManagerD1Ev @ 106 NONAME
+ _ZN21CntDefaultViewManagerD2Ev @ 107 NONAME
+ _ZNK11CntEditView10metaObjectEv @ 108 NONAME
+ _ZNK11CntEditView4viewEv @ 109 NONAME
+ _ZNK11CntEditView6viewIdEv @ 110 NONAME
+ _ZNK11CntEditView9isDefaultEv @ 111 NONAME
+ _ZNK13CntMainWindow10metaObjectEv @ 112 NONAME
+ _ZNK14CntActionPopup10metaObjectEv @ 113 NONAME
+ _ZNK16CntViewNavigator10metaObjectEv @ 114 NONAME
+ _ZNK18CntContactCardView10metaObjectEv @ 115 NONAME
+ _ZNK18CntContactCardView4viewEv @ 116 NONAME
+ _ZNK18CntContactCardView6viewIdEv @ 117 NONAME
+ _ZNK18CntContactCardView9isDefaultEv @ 118 NONAME
+ _ZNK20CntBaseSelectionView10metaObjectEv @ 119 NONAME
+ _ZNK20CntBaseSelectionView4viewEv @ 120 NONAME
+ _ZNK20CntBaseSelectionView9isDefaultEv @ 121 NONAME
+ _ZNK21CntDefaultViewManager10metaObjectEv @ 122 NONAME
+ _ZTI11CntEditView @ 123 NONAME
+ _ZTI13CntMainWindow @ 124 NONAME
+ _ZTI14CntActionPopup @ 125 NONAME
+ _ZTI16CntViewNavigator @ 126 NONAME
+ _ZTI18CntContactCardView @ 127 NONAME
+ _ZTI20CntBaseSelectionView @ 128 NONAME
+ _ZTI21CntDefaultViewFactory @ 129 NONAME
+ _ZTI21CntDefaultViewManager @ 130 NONAME
+ _ZTV11CntEditView @ 131 NONAME
+ _ZTV13CntMainWindow @ 132 NONAME
+ _ZTV14CntActionPopup @ 133 NONAME
+ _ZTV16CntViewNavigator @ 134 NONAME
+ _ZTV18CntContactCardView @ 135 NONAME
+ _ZTV20CntBaseSelectionView @ 136 NONAME
+ _ZTV21CntDefaultViewFactory @ 137 NONAME
+ _ZTV21CntDefaultViewManager @ 138 NONAME
+ _ZThn8_N11CntEditView10deactivateEv @ 139 NONAME
+ _ZThn8_N11CntEditView8activateEP22CntAbstractViewManager4QMapIi8QVariantE @ 140 NONAME
+ _ZThn8_N11CntEditViewD0Ev @ 141 NONAME
+ _ZThn8_N11CntEditViewD1Ev @ 142 NONAME
+ _ZThn8_N13CntMainWindowD0Ev @ 143 NONAME
+ _ZThn8_N13CntMainWindowD1Ev @ 144 NONAME
+ _ZThn8_N18CntContactCardView10deactivateEv @ 145 NONAME
+ _ZThn8_N18CntContactCardView8activateEP22CntAbstractViewManager4QMapIi8QVariantE @ 146 NONAME
+ _ZThn8_N18CntContactCardViewD0Ev @ 147 NONAME
+ _ZThn8_N18CntContactCardViewD1Ev @ 148 NONAME
+ _ZThn8_N20CntBaseSelectionView10deactivateEv @ 149 NONAME
+ _ZThn8_N20CntBaseSelectionView8activateEP22CntAbstractViewManager4QMapIi8QVariantE @ 150 NONAME
+ _ZThn8_N20CntBaseSelectionViewD0Ev @ 151 NONAME
+ _ZThn8_N20CntBaseSelectionViewD1Ev @ 152 NONAME
+ _ZThn8_N21CntDefaultViewManager10changeViewE4QMapIi8QVariantE @ 153 NONAME
+ _ZThn8_N21CntDefaultViewManager14contactManagerERK7QString @ 154 NONAME
+ _ZThn8_N21CntDefaultViewManager4backE4QMapIi8QVariantEb @ 155 NONAME
+ _ZThn8_N21CntDefaultViewManagerD0Ev @ 156 NONAME
+ _ZThn8_N21CntDefaultViewManagerD1Ev @ 157 NONAME
+ _ZThn8_NK11CntEditView4viewEv @ 158 NONAME
+ _ZThn8_NK11CntEditView6viewIdEv @ 159 NONAME
+ _ZThn8_NK11CntEditView9isDefaultEv @ 160 NONAME
+ _ZThn8_NK18CntContactCardView4viewEv @ 161 NONAME
+ _ZThn8_NK18CntContactCardView6viewIdEv @ 162 NONAME
+ _ZThn8_NK18CntContactCardView9isDefaultEv @ 163 NONAME
+ _ZThn8_NK20CntBaseSelectionView4viewEv @ 164 NONAME
+ _ZThn8_NK20CntBaseSelectionView9isDefaultEv @ 165 NONAME
--- a/phonebookui/pbkcommonui/inc/cntcollectionview.h Wed Jul 21 11:37:51 2010 +0300
+++ b/phonebookui/pbkcommonui/inc/cntcollectionview.h Fri Jul 23 12:43:48 2010 +0300
@@ -29,7 +29,6 @@
class HbView;
class HbListView;
class CntCollectionListModel;
-class CntFetchContacts;
class QModelIndex;
class QActionGroup;
class HbAbstractViewItem;
@@ -66,7 +65,9 @@
void newGroup();
void handleNewGroup(HbAction* action);
- void handleNewGroupMembers();
+ void handleNewGroupMembers( QSet<QContactLocalId> aMembers );
+ void handleCancelGroupMembers();
+ void notifyNewGroup();
void refreshDataModel();
@@ -96,7 +97,6 @@
HbAction* mDeleteGroupsAction; // owned by view
QContact* mHandledContact; // own, needed for asynchronous popups
- CntFetchContacts* mFetchView;
QSet<QContactLocalId> mSelectedContactsSet;
QActionGroup* mActionGroup;
--- a/phonebookui/pbkcommonui/inc/cntcontactcardview.h Wed Jul 21 11:37:51 2010 +0300
+++ b/phonebookui/pbkcommonui/inc/cntcontactcardview.h Fri Jul 23 12:43:48 2010 +0300
@@ -38,12 +38,13 @@
Q_OBJECT
public:
- CntContactCardView();
+ CntContactCardView(bool isTemporary = false);
~CntContactCardView();
signals:
void backPressed();
void viewActivated(CntAbstractViewManager* aMgr, const CntViewParameters aArgs);
+ void addToContacts();
public: // From CntAbstractView
void activate(CntAbstractViewManager* aMgr, const CntViewParameters aArgs);
--- a/phonebookui/pbkcommonui/inc/cntcontactcardview_p.h Wed Jul 21 11:37:51 2010 +0300
+++ b/phonebookui/pbkcommonui/inc/cntcontactcardview_p.h Fri Jul 23 12:43:48 2010 +0300
@@ -25,6 +25,7 @@
#include <QGraphicsSceneResizeEvent>
#include "cntglobal.h"
#include <cntmaptileservice.h>
+#include <xqappmgr.h>
class HbView;
class HbScrollArea;
@@ -47,6 +48,7 @@
class HbSelectionDialog;
class CntPresenceListener;
class HbLabel;
+class XQAiwRequest;
QTM_BEGIN_NAMESPACE
class QContact;
@@ -79,7 +81,7 @@
Q_DECLARE_PUBLIC(CntContactCardView)
public:
- CntContactCardViewPrivate();
+ CntContactCardViewPrivate(bool isTemporary);
virtual ~CntContactCardViewPrivate();
public slots:
@@ -91,6 +93,7 @@
void thumbnailReady(const QPixmap& pixmap, void *data, int id, int error);
void drawMenu(const QPointF &aCoords);
void sendToHs();
+ void onAddedToContacts();
void mapTileStatusReceived(int contactid, int addressType, int status);
void keyPressed(QKeyEvent *event);
@@ -106,11 +109,13 @@
void showPreviousView();
void doChangeImage();
void doRemoveImage();
+ void showRootView();
void handleMenuAction(HbAction* aAction);
void handleSendBusinessCard( HbAction* aAction );
void executeAction(QContact& aContact, const QContactDetail& aDetail, const QString& aAction);
void sendKeyCancelSlot();
+ void contactDeletedFromOtherSource(const QList<QContactLocalId>& contactIds);
#ifdef PBK_UNIT_TEST
public slots:
@@ -138,7 +143,7 @@
void preferredUpdated();
void backPressed();
void viewActivated(CntAbstractViewManager* aMgr, const CntViewParameters aArgs);
-
+ void addToContacts();
#ifdef PBK_UNIT_TEST
public:
@@ -175,7 +180,9 @@
QContactAction *mContactAction;
HbAction *mBackKey;
CntImageLabel *mImageLabel;
+ XQApplicationManager mAppManager;
XQServiceRequest *mHighwayService;
+ XQAiwRequest *mRequest; // own
HbIcon *mVCardIcon;
CntViewParameters mArgs;
ShareUi *mShareUi;
@@ -187,6 +194,8 @@
QTimer *mProgressTimer;
QList <CntContactCardMapTileDetail*> mAddressList;
QMap <int, HbLabel*> mMaptileLabelList;
+ bool mIsTemporary;
+ bool mIsExecutingAction;
};
#endif // CNTCOMMLAUNCHERVIEW_H
--- a/phonebookui/pbkcommonui/inc/cntdefaultviewmanager.h Wed Jul 21 11:37:51 2010 +0300
+++ b/phonebookui/pbkcommonui/inc/cntdefaultviewmanager.h Fri Jul 23 12:43:48 2010 +0300
@@ -47,8 +47,11 @@
public: // From CntAbstractViewManager
void changeView( const CntViewParameters aArgs );
- void back( const CntViewParameters aArgs );
+ void back( const CntViewParameters aArgs, bool toRoot = false );
QContactManager* contactManager( const QString& aType );
+
+public:
+ int currentViewId();
private slots:
void removeCurrentView();
--- a/phonebookui/pbkcommonui/inc/cntdetaileditor.h Wed Jul 21 11:37:51 2010 +0300
+++ b/phonebookui/pbkcommonui/inc/cntdetaileditor.h Fri Jul 23 12:43:48 2010 +0300
@@ -49,6 +49,8 @@
void handleItemShown(const QModelIndex& aIndex );
void saveContact();
+ void contactDeletedFromOtherSource(const QList<QContactLocalId>& contactIds);
+ void showRootView();
public:
void setViewId( int aId );
--- a/phonebookui/pbkcommonui/inc/cntdetailpopup.h Wed Jul 21 11:37:51 2010 +0300
+++ b/phonebookui/pbkcommonui/inc/cntdetailpopup.h Fri Jul 23 12:43:48 2010 +0300
@@ -19,46 +19,29 @@
#define CNTDETAILPOPUP_H
#include <QObject>
-#include <hbdialog.h>
+#include <hbselectiondialog.h>
#include <cntviewparams.h>
class QStandardItemModel;
-class HbListView;
typedef QList<int> CntViewIdList;
-class CntDetailPopup : public HbDialog
+class CntDetailPopup : public HbSelectionDialog
{
+ friend class TestCntDetailPopup;
Q_OBJECT
+
public:
static void selectDetail( CntViewIdList aList, QObject *receiver = 0, const char *member = 0 );
- int selectedDetail();
-#ifdef PBK_UNIT_TEST
-public slots:
-#else
-private slots:
-#endif
- void listItemSelected(QModelIndex index);
-
-#ifdef PBK_UNIT_TEST
-public:
-#else
private:
-#endif
CntDetailPopup(QGraphicsItem *parent, CntViewIdList aList );
~CntDetailPopup();
void addListItem(QString aIcon, QString label, int aId);
-#ifdef PBK_UNIT_TEST
-public:
-#else
private:
-#endif
QStandardItemModel *mListModel;
- HbListView *mListView;
- int mSelectedDetail;
CntViewIdList mViewIdList;
};
--- a/phonebookui/pbkcommonui/inc/cnteditview_p.h Wed Jul 21 11:37:51 2010 +0300
+++ b/phonebookui/pbkcommonui/inc/cnteditview_p.h Fri Jul 23 12:43:48 2010 +0300
@@ -80,6 +80,7 @@
void handleDeleteContact(int action);
void discardChanges();
void saveChanges();
+ void showRootView();
void openNameEditor();
void openImageEditor();
@@ -89,6 +90,7 @@
void setScrollPosition();
void ringToneFetchHandleError(int errorCode, const QString& errorMessage);
void ringToneFetchHandleOk(const QVariant &result);
+ void contactDeletedFromOtherSource(const QList<QContactLocalId>& contactIds);
private:
void loadAvatar();
--- a/phonebookui/pbkcommonui/inc/cntfavoritesmemberview.h Wed Jul 21 11:37:51 2010 +0300
+++ b/phonebookui/pbkcommonui/inc/cntfavoritesmemberview.h Fri Jul 23 12:43:48 2010 +0300
@@ -44,7 +44,7 @@
void deactivate();
bool isDefault() const { return false; }
HbView* view() const { return mView; }
- int viewId() const { return FavoritesMemberView; }
+ int viewId() const { return favoritesMemberView; }
void createModel();
public:
@@ -58,7 +58,7 @@
#endif
void manageFavorites();
- void handleManageFavorites();
+ void handleManageFavorites(QSet<QContactLocalId> aIds);
void onLongPressed (HbAbstractViewItem *item, const QPointF &coords);
void handleMenu(HbAction* action);
--- a/phonebookui/pbkcommonui/inc/cntfavoritesview.h Wed Jul 21 11:37:51 2010 +0300
+++ b/phonebookui/pbkcommonui/inc/cntfavoritesview.h Fri Jul 23 12:43:48 2010 +0300
@@ -21,10 +21,10 @@
#include <QObject>
#include <hbdocumentloader.h>
#include <cntabstractview.h>
+#include <QSet>
class HbAction;
class HbView;
-class CntFetchContacts;
QTM_BEGIN_NAMESPACE
class QContact;
@@ -52,7 +52,7 @@
private slots:
void showPreviousView();
void openSelectionPopup();
- void handleMemberSelection();
+ void handleMemberSelection( QSet<QContactLocalId> aIds );
void setOrientation(Qt::Orientation orientation);
private:
@@ -68,7 +68,6 @@
HbAction* mSoftkey;
CntAbstractViewManager* mViewManager;
HbDocumentLoader mDocumentLoader;
- CntFetchContacts* mFetchView;
};
#endif // CNTFAVORITESVIEW_H
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/phonebookui/pbkcommonui/inc/cntfetchcontactpopup.h Fri Jul 23 12:43:48 2010 +0300
@@ -0,0 +1,104 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:
+*
+*/
+
+#ifndef CNTFETCHCONTACTPOPUP_H_
+#define CNTFETCHCONTACTPOPUP_H_
+
+#include <qtcontacts.h>
+#include <hbabstractitemview.h>
+#include <QSet>
+
+class HbDialog;
+class HbListView;
+class HbTextItem;
+class HbLabel;
+class HbAction;
+class HbSearchPanel;
+class HbStaticVkbHost;
+
+class QGraphicsLinearLayout;
+class QItemSelectionModel;
+
+class CntListModel;
+class CntFetchMarkAll;
+class CntDocumentLoader;
+
+QTM_BEGIN_NAMESPACE
+class QContactManager;
+QTM_END_NAMESPACE
+QTM_USE_NAMESPACE
+
+/*!
+ CntFetchContactPopup is simple to use popup for fetching (selecting) number
+ of contacts.
+
+ \code
+ \endcode
+
+ Note that by default, CntFetchContactPopup deletes itself when closing the popup.
+*/
+class CntFetchContactPopup : public QObject
+{
+ Q_OBJECT
+
+public:
+ ~CntFetchContactPopup();
+
+ static CntFetchContactPopup* createMultiSelectionPopup( QString aTitle, QString aAction, QContactManager& aContactMgr );
+ static CntFetchContactPopup* createSingleSelectionPopup( QString aTitle, QContactManager& aContactMgr );
+
+ void setSelectedContacts( QSet<QContactLocalId> aIds );
+ void showPopup();
+
+signals:
+ void fetchReady( QSet<QContactLocalId> aIds );
+ void fetchCancelled();
+
+private slots:
+ void setFilter( const QString& aFilter );
+ void contactSelected( const QModelIndex& aIndex );
+ void contactsSelected( const QItemSelection & selected, const QItemSelection & deselected );
+ void selectAll( int aState );
+ void dialogDismissed( HbAction* aAction );
+ void loadLayout( Qt::Orientation aOrientation );
+ void handleKeypadOpen();
+ void handleKeypadClosed();
+ void closePopup();
+
+private:
+ CntFetchContactPopup( QContactManager& aManager );
+ void constructPopupDialog( QString aTitle, QString aAction, HbAbstractItemView::SelectionMode aMode );
+
+private:
+ QContactManager& mManager;
+ QList<QContactLocalId> mIdList;
+
+ HbDialog* mPopup; // own
+ HbListView* mListView; // own
+ HbTextItem* mEmptyView; // own
+ HbLabel* mHeading; // own
+ HbAction* mPrimaryAction; // own
+ HbSearchPanel* mSearch; //own
+ CntListModel* mModel; // own
+ HbStaticVkbHost* mVirtualKeyboard; // own
+ CntFetchMarkAll* mMarkAll; // own
+ QItemSelectionModel* mSelectionModel; // own
+ CntDocumentLoader* mDoc; // own
+ QString mTitle;
+};
+
+#endif /* CNTFETCHCONTACTPOPUP_H_ */
--- a/phonebookui/pbkcommonui/inc/cntfetchcontactsview.h Wed Jul 21 11:37:51 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,102 +0,0 @@
-/*
-* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:
-*
-*/
-
-#ifndef CntFetchContacts_H_
-#define CntFetchContacts_H_
-
-#include <hbabstractitemview.h>
-#include <hbwidget.h>
-#include <hbtextitem.h>
-#include <cntviewparams.h>
-#include <QSet>
-
-class HbDialog;
-class HbSearchPanel;
-class HbAction;
-class HbListView;
-class HbLabel;
-class HbStaticVkbHost;
-class HbIndexFeedback;
-
-class CntListModel;
-class QGraphicsLinearLayout;
-
-QTM_BEGIN_NAMESPACE
-class QContact;
-QTM_END_NAMESPACE
-
-QTM_USE_NAMESPACE
-
-class CntFetchContacts : public QObject
- {
- Q_OBJECT
-
-public:
- CntFetchContacts(QContactManager &aManager);
- ~CntFetchContacts();
-
-private slots:
- void memberSelectionChanged(const QModelIndex &index);
-
- void setFilter(const QString &filterString);
-
- void handleKeypadOpen();
- void handleKeypadClose();
-
- void handleUserResponse(HbAction* action);
-
-public:
- void displayContacts(HbAbstractItemView::SelectionMode aMode,
- QSet<QContactLocalId> aContacts);
-
- QSet<QContactLocalId> getSelectedContacts() const;
- bool wasCanceled() const;
- void setDetails(QString aTitle, QString aButtonText);
-
-private:
- void doInitialize(HbAbstractItemView::SelectionMode aMode,
- QSet<QContactLocalId> aContacts);
- void showPopup();
- void markMembersInView();
-
-signals:
- void clicked();
-
-private:
- HbDialog* mPopup;
- HbSearchPanel* mSearchPanel;
- CntListModel* mCntModel;
- HbListView* mListView;
- QGraphicsLinearLayout* mLayout;
- HbTextItem* mEmptyListLabel;
- HbWidget* mContainerWidget;
- HbAbstractItemView::SelectionMode mSelectionMode;
- QSet<QContactLocalId> mCurrentlySelected;
- QContactManager* mManager;
- bool mWasCanceled;
- HbLabel* mLabel;
- HbStaticVkbHost* mVirtualKeyboard;
- QString mButtonText;
- HbAction* mPrimaryAction;
- HbAction* mSecondaryAction;
- HbIndexFeedback* mIndexFeedback;
-
- friend class TestCntFetchUtility;
- friend class TestCntMyCardView;
- };
-
-#endif /* CntFetchContacts_H_ */
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/phonebookui/pbkcommonui/inc/cntfetchmarkall.h Fri Jul 23 12:43:48 2010 +0300
@@ -0,0 +1,53 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:
+*
+*/
+
+#ifndef CNTFETCHSELECTIONITEM_H
+#define CNTFETCHSELECTIONITEM_H
+
+#include <QObject>
+#include <hbwidget.h>
+
+class HbCheckBox;
+class HbTextItem;
+class HbFrameItem;
+
+class CntFetchMarkAll : public HbWidget
+{
+ Q_OBJECT
+
+public:
+ CntFetchMarkAll(QGraphicsItem *aParent = 0);
+ ~CntFetchMarkAll();
+
+ void setMaxContactCount( int aContactCount );
+ void setSelectedContactCount( int aSelectedCount );
+
+signals:
+ void markAll(int aState);
+
+private:
+ friend class TestCntFetchSelectionItems;
+
+ HbCheckBox* mCheckBox; // not own
+ HbTextItem* mCounterLabel; // not own
+ HbFrameItem* mFrame;
+
+ int mContactCount;
+ int mSelectionCount;
+};
+
+#endif // CNTFETCHSELECTIONITEM_H
--- a/phonebookui/pbkcommonui/inc/cntgroupactionsview.h Wed Jul 21 11:37:51 2010 +0300
+++ b/phonebookui/pbkcommonui/inc/cntgroupactionsview.h Fri Jul 23 12:43:48 2010 +0300
@@ -90,7 +90,8 @@
HbAction* mSoftkey; // owned by view
HbListView* mListView; // owned by layout
int mPopupCount;
- QStringList mActionParams;
+ QStringList mEmailActionParams;
+ QVariantMap mMessageActionParams;
};
#endif // CNTGROUPACTIONSVIEW_H
--- a/phonebookui/pbkcommonui/inc/cntgroupmemberview.h Wed Jul 21 11:37:51 2010 +0300
+++ b/phonebookui/pbkcommonui/inc/cntgroupmemberview.h Fri Jul 23 12:43:48 2010 +0300
@@ -21,13 +21,12 @@
#include <QObject>
#include <QList>
#include <hbdocumentloader.h>
-
+#include <QSet>
#include <cntabstractview.h>
class CntListModel;
class CntAbstractViewManager;
class CntContactCardHeadingItem;
-class CntFetchContacts;
class HbView;
class HbAction;
class HbListView;
@@ -67,7 +66,7 @@
void showPreviousView();
void openGroupActions();
void manageMembers();
- void handleManageMembers();
+ void handleManageMembers(QSet<QContactLocalId> aIds);
void editGroup();
void deleteGroup();
void handleDeleteGroup(int action);
@@ -85,6 +84,7 @@
void createModel();
void removeImage();
+ void sendToHs(const QModelIndex &index);
private:
QContactManager* getContactManager();
@@ -107,7 +107,6 @@
CntImageLabel* mImageLabel;
HbListView* mListView; // owned by layout
HbDocumentLoader* mDocument;
- CntFetchContacts* mFetchView;
QList<QContactLocalId> mOriginalGroupMembers;
QContactAvatar* mAvatar;
CntViewParameters mArgs;
--- a/phonebookui/pbkcommonui/inc/cnthistoryview.h Wed Jul 21 11:37:51 2010 +0300
+++ b/phonebookui/pbkcommonui/inc/cnthistoryview.h Fri Jul 23 12:43:48 2010 +0300
@@ -20,6 +20,7 @@
#include <QObject>
#include <cntabstractview.h>
+#include <qcontactid.h>
class HbListView;
class CntHistoryModel;
@@ -55,6 +56,8 @@
void itemActivated(const QModelIndex &index);
void showPreviousView();
void showClearHistoryMenu();
+ void showRootView();
+ void contactDeletedFromOtherSource(const QList<QContactLocalId>& contactIds);
--- a/phonebookui/pbkcommonui/inc/cntimageeditorview.h Wed Jul 21 11:37:51 2010 +0300
+++ b/phonebookui/pbkcommonui/inc/cntimageeditorview.h Fri Jul 23 12:43:48 2010 +0300
@@ -19,12 +19,12 @@
#define CNTIMAGEEDITORVIEW_H
#include <QObject>
-#include <hbdocumentloader.h>
+#include <cntdocumentloader.h>
#include <xqappmgr.h>
#include <cntabstractview.h>
-class HbLabel;
+class CntImageLabel;
class HbListView;
class XQAiwRequest;
class ThumbnailManager;
@@ -86,7 +86,7 @@
#endif
QContact *mContact; // own
QContactAvatar *mAvatar; // own
- HbLabel *mImageLabel; // owned by layout
+ CntImageLabel *mImageLabel; // owned by layout
XQAiwRequest *mRequest; // own
XQApplicationManager mAppManager;
ThumbnailManager *mThumbnailManager; // own
@@ -94,7 +94,7 @@
HbAction *mSoftkey; // owned by view
HbAction *mRemoveImage; // own
CntAbstractViewManager *mViewManager;
- HbDocumentLoader mDocumentLoader;
+ CntDocumentLoader mDocumentLoader;
HbListView *mListView; // owned by layout
QStandardItemModel *mModel; // own
CntSaveManager *mSaveManager; // own
--- a/phonebookui/pbkcommonui/inc/cntimagelabel.h Wed Jul 21 11:37:51 2010 +0300
+++ b/phonebookui/pbkcommonui/inc/cntimagelabel.h Fri Jul 23 12:43:48 2010 +0300
@@ -19,24 +19,41 @@
#define CNTIMAGELABEL_H
#include <QObject>
-#include <hblabel.h>
+#include <hbwidget.h>
class QGesture;
+class QPixmap;
+class HbIconItem;
+class HbIcon;
-class CntImageLabel : public HbLabel
+class CntImageLabel : public HbWidget
{
Q_OBJECT
+ Q_PROPERTY(HbIcon icon READ avatarIcon WRITE setAvatarIcon)
public:
CntImageLabel(QGraphicsItem *parent = 0);
~CntImageLabel();
+ void setAvatarIcon(const HbIcon &icon);
+ HbIcon avatarIcon() const;
+
+ void setIcon(const QPixmap &pixmap);
+ void clear();
+
protected:
void gestureEvent(QGestureEvent* event);
+ void paint(QPainter* painter, const QStyleOptionGraphicsItem* option, QWidget* widget);
signals:
void iconClicked();
void iconLongPressed(const QPointF&);
+
+private:
+ HbIconItem* mDefaultAvatar;
+ HbIcon mIcon;
+ QPixmap mPixmap;
+
};
#endif // CNTEDITVIEWHEADINGITEM_H
--- a/phonebookui/pbkcommonui/inc/cntmainwindow.h Wed Jul 21 11:37:51 2010 +0300
+++ b/phonebookui/pbkcommonui/inc/cntmainwindow.h Fri Jul 23 12:43:48 2010 +0300
@@ -50,6 +50,7 @@
protected:
#endif
CntDefaultViewManager *mViewManager;
+ int mDefaultView;
};
--- a/phonebookui/pbkcommonui/inc/cntmycardview.h Wed Jul 21 11:37:51 2010 +0300
+++ b/phonebookui/pbkcommonui/inc/cntmycardview.h Fri Jul 23 12:43:48 2010 +0300
@@ -19,12 +19,11 @@
#define CNTMYCARDVIEW_H_
#include <QObject>
+#include <QSet>
#include <hbdocumentloader.h>
-
#include <cntabstractview.h>
class CntAbstractViewManager;
-class CntFetchContacts;
class HbView;
class HbAction;
@@ -55,7 +54,7 @@
void showPreviousView();
void openNameEditor();
void openMyCardSelectionView();
- void handleMultiCardSelection();
+ void handleMultiCardSelection(QSet<QContactLocalId> aIds);
void setOrientation(Qt::Orientation orientation);
private:
@@ -68,7 +67,6 @@
HbDocumentLoader mDocumentLoader;
HbView* mView; // own
HbAction* mSoftkey;
- CntFetchContacts* mFetchView;
friend class TestCntMyCardView;
};
--- a/phonebookui/pbkcommonui/inc/cntnamesview_p.h Wed Jul 21 11:37:51 2010 +0300
+++ b/phonebookui/pbkcommonui/inc/cntnamesview_p.h Fri Jul 23 12:43:48 2010 +0300
@@ -60,7 +60,7 @@
void deleteContact( QContact& aContact );
void deleteMultipleContacts();
- void handleDeleteMultipleContacts();
+ void handleDeleteMultipleContacts( QSet<QContactLocalId> aIds );
void showPreviousView();
void showCollectionView();
@@ -79,6 +79,9 @@
void handleContactRemoval(const QList<QContactLocalId> & aRemovedList);
void handleSelfContactIdChange(const QContactLocalId & aOldId, const QContactLocalId & aNewId);
+private slots:
+ void switchOrientation();
+
public:
bool isFinderVisible();
void activate( CntAbstractViewManager* aMgr, const CntViewParameters aArgs );
@@ -114,7 +117,6 @@
HbAction* mNewContact;
QContactLocalId mHandledContactId;
HbAction* mMultipleDeleter;
- CntFetchContacts* mFetchView;
bool mIsDefault;
int mId;
QActionGroup* mActionGroup;
--- a/phonebookui/pbkcommonui/inc/cntviewnavigator.h Wed Jul 21 11:37:51 2010 +0300
+++ b/phonebookui/pbkcommonui/inc/cntviewnavigator.h Fri Jul 23 12:43:48 2010 +0300
@@ -50,7 +50,7 @@
/*!
* Back view returns the previous view
*/
- const int& back( QFlags<Hb::ViewSwitchFlag> &flags );
+ const int& back( QFlags<Hb::ViewSwitchFlag> &flags, bool toRoot );
/*!
* Add exceptions to next/back mechanism. Function will use the aBack argument
@@ -65,10 +65,16 @@
void addEffect( const int& aCurrent, const int& aBack );
void removeEffect( const int& aCurrent );
+ /*!
+ * Set a view as a root view.
+ */
+ void addRoot( const int& aCurrent );
+
private:
QStack<int> iViewStack;
QMap< int, int > iExceptions;
QMap< int, int > iEffects;
+ QList<int> iRoots;
int iTop;
};
#endif /* CNTVIEWNAVIGATOR_H_ */
--- a/phonebookui/pbkcommonui/pbkcommonui.pro Wed Jul 21 11:37:51 2010 +0300
+++ b/phonebookui/pbkcommonui/pbkcommonui.pro Fri Jul 23 12:43:48 2010 +0300
@@ -29,6 +29,7 @@
INCLUDEPATH += ../../inc
INCLUDEPATH += ../../phonebookengines/cntimageutility/inc
INCLUDEPATH += ../../phonebookengines/cntsimutility/inc
+INCLUDEPATH += ../phonebookapp/inc
INCLUDEPATH += ../cnthistorymodel/inc
INCLUDEPATH += $$APP_LAYER_SYSTEMINCLUDE
@@ -128,7 +129,8 @@
inc/cntgroupdeletepopup.h \
inc/cntextensionmanager.h \
inc/cntimagelabel.h \
- inc/cntfetchcontactsview.h \
+ inc/cntfetchcontactpopup.h \
+ inc/cntfetchmarkall.h \
inc/cntimportsview.h \
inc/cntsettingsview.h \
inc/cntpresencelistener.h \
@@ -204,7 +206,8 @@
src/cntextensionmanager.cpp \
src/cntimagelabel.cpp \
src/cntimportsview.cpp \
- src/cntfetchcontactsview.cpp \
+ src/cntfetchcontactpopup.cpp \
+ src/cntfetchmarkall.cpp \
src/cntsettingsview.cpp \
src/cntpresencelistener.cpp \
src/cntdetailorderinghelper.cpp \
@@ -214,7 +217,7 @@
src/cntactionpopup.cpp \
src/cntsavemanager.cpp
-RESOURCES += resources\pbkcommonui.qrc
+RESOURCES += resources/pbkcommonui.qrc
LIBS+= -lhbcore \
-lxqservice \
--- a/phonebookui/pbkcommonui/resources/contacts_contactcard.docml Wed Jul 21 11:37:51 2010 +0300
+++ b/phonebookui/pbkcommonui/resources/contacts_contactcard.docml Fri Jul 23 12:43:48 2010 +0300
@@ -12,6 +12,9 @@
<object name="cnt:activityStream" type="HbAction">
<icon iconName="qtg_mono_person_activitystream" name="icon"/>
</object>
+ <object name="cnt:addtocontact" type="HbAction">
+ <icon iconName="qtg_mono_add_to_contact" name="icon"/>
+ </object>
<object name="cnt:sendbusinesscard" type="HbAction">
<string locid="txt_phob_opt_send_as_a_business_card" name="text"/>
</object>
@@ -33,10 +36,7 @@
<widget name="cnt_contactcard_image" type="CntImageLabel">
<sizepolicy horizontalPolicy="Fixed" horizontalStretch="0" verticalPolicy="Fixed" verticalStretch="0"/>
<sizehint height="30.5un" type="FIXED" width="30.5un"/>
- <contentsmargins bottom="2un" left="2un" right="2un" top="2un"/>
<bool name="visible" value="FALSE"/>
- <string name="alignment" value="AlignCenter"/>
- <string name="aspectRatioMode" value="KeepAspectRatio"/>
<icon iconName="qtg_large_add_contact_picture" name="icon"/>
</widget>
<widget name="scrollArea" type="HbScrollArea">
@@ -94,9 +94,9 @@
<bool name="visible" value="TRUE"/>
</widget>
<layout type="anchor">
- <anchoritem dst="" dstEdge="LEFT" spacing="0un" src="cnt_contactcard_image" srcEdge="LEFT"/>
- <anchoritem dst="" dstEdge="TOP" spacing="0un" src="cnt_contactcard_image" srcEdge="TOP"/>
- <anchoritem dst="cnt_contactcard_heading" dstEdge="LEFT" spacing="0un" src="cnt_contactcard_image" srcEdge="RIGHT"/>
+ <anchoritem dst="" dstEdge="LEFT" spacing="-var(hb-param-margin-gene-left)" src="cnt_contactcard_image" srcEdge="LEFT"/>
+ <anchoritem dst="" dstEdge="TOP" spacing="-var(hb-param-margin-gene-top)" src="cnt_contactcard_image" srcEdge="TOP"/>
+ <anchoritem dst="cnt_contactcard_heading" dstEdge="LEFT" spacing="var(hb-param-margin-gene-right)" src="cnt_contactcard_image" srcEdge="RIGHT"/>
<anchoritem dst="" dstEdge="TOP" spacing="0un" src="cnt_contactcard_heading" srcEdge="TOP"/>
<anchoritem dst="scrollArea" dstEdge="TOP" spacing="0un" src="cnt_contactcard_heading" srcEdge="BOTTOM"/>
<anchoritem dst="" dstEdge="RIGHT" spacing="0un" src="cnt_contactcard_heading" srcEdge="RIGHT"/>
--- a/phonebookui/pbkcommonui/resources/contacts_ev.docml Wed Jul 21 11:37:51 2010 +0300
+++ b/phonebookui/pbkcommonui/resources/contacts_ev.docml Fri Jul 23 12:43:48 2010 +0300
@@ -34,9 +34,6 @@
<widget name="editViewImage" type="CntImageLabel">
<bool name="visible" value="FALSE"/>
- <contentsmargins bottom="2.0un" left="2.0un" right="2.0un" top="2.0un"/>
- <string name="alignment" value="AlignCenter"/>
- <string name="aspectRatioMode" value="KeepAspectRatio"/>
<sizehint height="30.5un" type="FIXED" width="30.5un"/>
<icon iconName="qtg_large_add_contact_picture" name="icon"/>
<sizepolicy horizontalPolicy="Fixed" horizontalStretch="0" verticalPolicy="Fixed" verticalStretch="0"/>
@@ -72,9 +69,9 @@
<anchoritem src="groupBox" srcEdge="LEFT" spacing="0.0un" dst="" dstEdge="LEFT"/>
<anchoritem src="groupBox" srcEdge="RIGHT" spacing="0.0un" dst="" dstEdge="RIGHT"/>
<anchoritem src="groupBox" srcEdge="TOP" spacing="0.0un" dst="" dstEdge="TOP"/>
- <anchoritem src="editViewImage" srcEdge="LEFT" spacing="0.0un" dst="" dstEdge="LEFT"/>
- <anchoritem src="editViewImage" srcEdge="TOP" spacing="0.0un" dst="groupBox" dstEdge="BOTTOM"/>
- <anchoritem src="editViewImage" srcEdge="RIGHT" spacing="0.0un" dst="editViewHeading" dstEdge="LEFT"/>
+ <anchoritem src="editViewImage" srcEdge="LEFT" spacing="-var(hb-param-margin-gene-left)" dst="" dstEdge="LEFT"/>
+ <anchoritem src="editViewImage" srcEdge="TOP" spacing="-var(hb-param-margin-gene-top)" dst="groupBox" dstEdge="BOTTOM"/>
+ <anchoritem src="editViewImage" srcEdge="RIGHT" spacing="var(hb-param-margin-gene-right)" dst="editViewHeading" dstEdge="LEFT"/>
<anchoritem src="editViewHeading" srcEdge="TOP" spacing="0.0un" dst="groupBox" dstEdge="BOTTOM"/>
<anchoritem src="editViewHeading" srcEdge="BOTTOM" spacing="0.0un" dst="listView" dstEdge="TOP"/>
<anchoritem src="editViewHeading" srcEdge="RIGHT" spacing="0.0un" dst="" dstEdge="RIGHT"/>
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/phonebookui/pbkcommonui/resources/contacts_fetchdialog.docml Fri Jul 23 12:43:48 2010 +0300
@@ -0,0 +1,186 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<hbdocument version="1.0">
+ <widget name="dialog" type="HbDialog">
+ <widget name="heading" role="HbDialog:headingWidget" type="HbLabel">
+ <string locid="txt_phob_title_contacts" name="plainText"/>
+ </widget>
+ <widget name="container" role="HbDialog:contentWidget" type="HbWidget">
+ <widget name="markAll" type="CntFetchMarkAll">
+ <bool name="visible" value="TRUE"/>
+ </widget>
+ <widget name="emptyLabel" type="HbLabel">
+ <fontspec name="fontSpec" role="Primary"/>
+ <string name="alignment" value="AlignCenter"/>
+ <string locid="txt_phob_info_no_matching_contacts" name="plainText"/>
+ <bool name="visible" value="FALSE"/>
+ </widget>
+ <widget name="listView" type="HbListView">
+ <bool name="visible" value="FALSE"/>
+ </widget>
+ <widget name="searchPanel" type="HbSearchPanel">
+ <bool name="visible" value="FALSE"/>
+ </widget>
+ </widget>
+ <enums name="dismissPolicy" value="NoDismiss"/>
+ <bool name="modal" value="TRUE"/>
+ </widget>
+
+ <section name="find_list">
+ <widget name="container" role="HbDialog:contentWidget" type="HbWidget">
+ <widget name="markAll" type="CntFetchMarkAll">
+ <bool name="visible" value="TRUE"/>
+ </widget>
+ <widget name="emptyLabel" type="HbLabel">
+ <bool name="visible" value="FALSE"/>
+ </widget>
+ <widget name="listView" type="HbListView">
+ <bool name="visible" value="TRUE"/>
+ </widget>
+ <widget name="searchPanel" type="HbSearchPanel">
+ <bool name="visible" value="TRUE"/>
+ </widget>
+ <layout orientation="Vertical" spacing="0un" type="linear">
+ <contentsmargins bottom="0un" left="0un" right="0un" top="0un"/>
+ <linearitem itemname="markAll"/>
+ <linearitem itemname="listView"/>
+ <linearitem itemname="searchPanel"/>
+ </layout>
+ <sizehint height="expr(var(hb-param-screen-long-edge) -2*var(hb-param-margin-gene-screen) )" type="PREFERRED" width="expr(var(hb-param-screen-short-edge) - 2*var(hb-param-margin-gene-screen) )"/>
+ <!--
+ <sizepolicy horizontalPolicy="Preferred" horizontalStretch="0" verticalPolicy="Preferred" verticalStretch="0"/>
+
+ <sizehint height="expr(var(hb-param-screen-height) -2*var(hb-param-margin-gene-screen) )" type="PREFERRED" width="expr(var(hb-param-screen-width) - 2*var(hb-param-margin-gene-screen) )"/>
+ <sizepolicy horizontalPolicy="Preferred" horizontalStretch="0" verticalPolicy="Preferred" verticalStretch="0"/> -->
+ </widget>
+ </section>
+
+ <section name="find_list_single">
+ <widget name="container" role="HbDialog:contentWidget" type="HbWidget">
+ <widget name="emptyLabel" type="HbLabel">
+ <bool name="visible" value="FALSE"/>
+ </widget>
+ <widget name="listView" type="HbListView">
+ <bool name="visible" value="TRUE"/>
+ </widget>
+ <widget name="searchPanel" type="HbSearchPanel">
+ <bool name="visible" value="TRUE"/>
+ </widget>
+ <layout orientation="Vertical" spacing="0un" type="linear">
+ <contentsmargins bottom="0un" left="0un" right="0un" top="0un"/>
+ <linearitem itemname="listView"/>
+ <linearitem itemname="searchPanel"/>
+ </layout>
+
+ <sizehint height="expr(var(hb-param-screen-long-edge) -2*var(hb-param-margin-gene-screen) )" type="PREFERRED" width="expr(var(hb-param-screen-short-edge) - 2*var(hb-param-margin-gene-screen) )"/>
+ </widget>
+ </section>
+
+ <section name="find_list_landscape">
+ <widget name="dialog" type="HbDialog">
+ <widget name="container" role="HbDialog:contentWidget" type="HbWidget">
+ <widget name="markAll" type="CntFetchMarkAll">
+ <bool name="visible" value="FALSE"/>
+ </widget>
+ <widget name="emptyLabel" type="HbLabel">
+ <bool name="visible" value="FALSE"/>
+ </widget>
+ <widget name="listView" type="HbListView">
+ <bool name="visible" value="TRUE"/>
+ </widget>
+ <widget name="searchPanel" type="HbSearchPanel">
+ <bool name="visible" value="TRUE"/>
+ </widget>
+ <layout orientation="Vertical" spacing="0un" type="linear">
+ <contentsmargins bottom="0un" left="0un" right="0un" top="0un"/>
+ <linearitem itemname="listView"/>
+ <linearitem itemname="searchPanel"/>
+ </layout>
+ </widget>
+ <sizehint height="expr(var(hb-param-screen-short-edge) - 2* var(hb-param-margin-gene-screen))" type="PREFERRED" width="expr(var(hb-param-screen-long-edge) - 2* var(hb-param-margin-gene-screen))"/>
+ <!-- <sizepolicy horizontalPolicy="Preferred" horizontalStretch="0" verticalPolicy="Preferred" verticalStretch="0"/> -->
+ </widget>
+ </section>
+
+ <section name="find_empty">
+ <widget name="container" role="HbDialog:contentWidget" type="HbWidget">
+ <widget name="markAll" type="CntFetchMarkAll">
+ <bool name="visible" value="TRUE"/>
+ </widget>
+ <widget name="emptyLabel" type="HbLabel">
+ <bool name="visible" value="TRUE"/>
+ </widget>
+ <widget name="listView" type="HbListView">
+ <bool name="visible" value="FALSE"/>
+ </widget>
+ <widget name="searchPanel" type="HbSearchPanel">
+ <bool name="visible" value="TRUE"/>
+ </widget>
+ <layout orientation="Vertical" spacing="0un" type="linear">
+ <contentsmargins bottom="0un" left="0un" right="0un" top="0un"/>
+ <linearitem itemname="markAll"/>
+ <linearitem itemname="emptyLabel"/>
+ <linearitem itemname="searchPanel"/>
+ </layout>
+ <sizehint height="expr(var(hb-param-screen-short-edge) - 2* var(hb-param-margin-gene-screen))" type="PREFERRED" width="expr(var(hb-param-screen-long-edge) - 2* var(hb-param-margin-gene-screen))"/>
+ </widget>
+ </section>
+
+ <section name="find_empty_single">
+ <widget name="container" role="HbDialog:contentWidget" type="HbWidget">
+ <widget name="emptyLabel" type="HbLabel">
+ <bool name="visible" value="TRUE"/>
+ </widget>
+ <widget name="listView" type="HbListView">
+ <bool name="visible" value="FALSE"/>
+ </widget>
+ <widget name="searchPanel" type="HbSearchPanel">
+ <bool name="visible" value="TRUE"/>
+ </widget>
+ <layout orientation="Vertical" spacing="0un" type="linear">
+ <contentsmargins bottom="0un" left="0un" right="0un" top="0un"/>
+ <linearitem itemname="emptyLabel"/>
+ <linearitem itemname="searchPanel"/>
+ </layout>
+ <sizehint height="expr(var(hb-param-screen-short-edge) - 2* var(hb-param-margin-gene-screen))" type="PREFERRED" width="expr(var(hb-param-screen-long-edge) - 2* var(hb-param-margin-gene-screen))"/>
+ </widget>
+ </section>
+
+ <section name="find_empty_landscape">
+ <widget name="dialog" type="HbDialog">
+ <sizehint height="expr(var(hb-param-screen-short-edge) - 2* var(hb-param-margin-gene-screen))" type="PREFERRED" width="expr(var(hb-param-screen-long-edge) - 2* var(hb-param-margin-gene-screen))"/>
+
+ <widget name="container" role="HbDialog:contentWidget" type="HbWidget">
+ <widget name="markAll" type="CntFetchMarkAll">
+ <bool name="visible" value="FALSE"/>
+ </widget>
+ <widget name="emptyLabel" type="HbLabel">
+ <bool name="visible" value="TRUE"/>
+ </widget>
+ <widget name="listView" type="HbListView">
+ <bool name="visible" value="FALSE"/>
+ </widget>
+ <widget name="searchPanel" type="HbSearchPanel">
+ <bool name="visible" value="TRUE"/>
+ </widget>
+ <layout orientation="Vertical" spacing="0un" type="linear">
+ <contentsmargins bottom="0un" left="0un" right="0un" top="0un"/>
+ <linearitem itemname="emptyLabel"/>
+ <linearitem itemname="searchPanel"/>
+ </layout>
+ </widget>
+ </widget>
+ </section>
+
+ <section name="size_section">
+ <widget name="dialog" type="HbDialog">
+ <sizehint height="expr(var(hb-param-screen-height) - 2* var(hb-param-margin-gene-screen))" type="PREFERRED" width="expr(var(hb-param-screen-width) - 2* var(hb-param-margin-gene-screen))"/>
+ </widget>
+ </section>
+
+ <metadata activeUIState="Common ui state" display="NHD portrait" unit="un">
+ <uistate name="Common ui state" sections="#common"/>
+ <uistate name="find_list" sections="#common find_list"/>
+ <uistate name="find_empty" sections="#common find_empty"/>
+ <uistate name="size_section" sections="#common size_section"/>
+ </metadata>
+</hbdocument>
--- a/phonebookui/pbkcommonui/resources/contacts_if.docml Wed Jul 21 11:37:51 2010 +0300
+++ b/phonebookui/pbkcommonui/resources/contacts_if.docml Fri Jul 23 12:43:48 2010 +0300
@@ -1,41 +1,38 @@
<?xml version="1.0" encoding="UTF-8"?>
-<hbdocument version="0.9">
+<hbdocument version="1.1">
<object name="cnt:removeimage" type="HbAction">
<string locid="txt_phob_menu_remove_image" name="text"/>
</object>
<widget name="view" type="HbView">
<widget name="content" role="HbView:widget" type="HbWidget">
<widget name="cnt_groupBox" type="HbGroupBox">
- <string name="heading" locid="txt_phob_subtitle_change_image"/>
<bool name="collapsable" value="FALSE"/>
+ <string locid="txt_phob_subtitle_change_image" name="heading"/>
</widget>
- <widget name="cnt_image_label" type="HbLabel">
- <contentsmargins bottom="2.0un" left="2.0un" right="2.0un" top="2.0un"/>
- <string name="alignment" value="AlignCenter"/>
- <string name="aspectRatioMode" value="KeepAspectRatio"/>
+ <widget name="cnt_image_label" type="CntImageLabel">
+ <sizepolicy horizontalPolicy="Fixed" horizontalStretch="0" verticalPolicy="Fixed" verticalStretch="0"/>
<sizehint height="30.5un" type="FIXED" width="30.5un"/>
<icon iconName="qtg_large_add_contact_picture" name="icon"/>
- <sizepolicy horizontalPolicy="Fixed" horizontalStretch="0" verticalPolicy="Fixed" verticalStretch="0"/>
</widget>
<widget name="cnt_listview" type="HbListView">
- <sizehint height="1.0un" type="PREFERRED" width="1.0un"/>
+ <enums name="scrollingStyle" value="PanWithFollowOn"/>
<sizepolicy horizontalPolicy="MinimumExpanding" horizontalStretch="0" verticalPolicy="MinimumExpanding" verticalStretch="0"/>
- <string name="scrollingStyle" value="PanWithFollowOn"/>
- <string name="clampingStyle" value="BounceBackClamping"/>
+ <sizehint height="1un" type="PREFERRED" width="1un"/>
+ <enums name="clampingStyle" value="BounceBackClamping"/>
</widget>
</widget>
<widget name="viewMenu" role="HbView:menu" type="HbMenu">
- <ref object="cnt:removeimage" role="HbMenu:addAction"/>
+ <ref object="cnt:removeimage" role="HbWidget:addAction"/>
</widget>
<string locid="txt_phob_title_contacts" name="title" value="Contacts"/>
</widget>
<section name="portrait">
<widget name="content" role="HbView:widget" type="HbWidget">
- <layout orientation="Vertical" type="linear" spacing="0.0un">
- <contentsmargins bottom="0.0un" left="0.0un" right="0.0un" top="0.0un"/>
- <linearitem itemname="cnt_groupBox" />
- <linearitem itemname="cnt_image_label" alignment="AlignCenter"/>
- <linearitem itemname="cnt_listview" />
+ <layout orientation="Vertical" spacing="0un" type="linear">
+ <contentsmargins bottom="0un" left="0un" right="0un" top="0un"/>
+ <linearitem itemname="cnt_groupBox" spacing="2un"/>
+ <linearitem itemname="cnt_image_label" spacing="2un" alignment="AlignCenter"/>
+ <linearitem itemname="cnt_listview"/>
</layout>
</widget>
</section>
@@ -45,9 +42,9 @@
<anchoritem src="cnt_groupBox" srcEdge="LEFT" spacing="0.0un" dst="" dstEdge="LEFT"/>
<anchoritem src="cnt_groupBox" srcEdge="TOP" spacing="0.0un" dst="" dstEdge="TOP"/>
<anchoritem src="cnt_groupBox" srcEdge="RIGHT" spacing="0.0un" dst="" dstEdge="RIGHT"/>
- <anchoritem src="cnt_image_label" srcEdge="LEFT" spacing="0.0un" dst="" dstEdge="LEFT"/>
- <anchoritem src="cnt_image_label" srcEdge="TOP" spacing="0.0un" dst="cnt_groupBox" dstEdge="BOTTOM"/>
- <anchoritem src="cnt_image_label" srcEdge="RIGHT" spacing="0.0un" dst="cnt_listview" dstEdge="LEFT"/>
+ <anchoritem src="cnt_image_label" srcEdge="LEFT" spacing="-var(hb-param-margin-gene-left)" dst="" dstEdge="LEFT"/>
+ <anchoritem src="cnt_image_label" srcEdge="TOP" spacing="-var(hb-param-margin-gene-top)" dst="cnt_groupBox" dstEdge="BOTTOM"/>
+ <anchoritem src="cnt_image_label" srcEdge="RIGHT" spacing="var(hb-param-margin-gene-right)" dst="cnt_listview" dstEdge="LEFT"/>
<anchoritem src="cnt_listview" srcEdge="TOP" spacing="0.0un" dst="cnt_groupBox" dstEdge="BOTTOM"/>
<anchoritem src="cnt_listview" srcEdge="RIGHT" spacing="0.0un" dst="" dstEdge="RIGHT"/>
<anchoritem src="cnt_listview" srcEdge="BOTTOM" spacing="0.0un" dst="" dstEdge="BOTTOM"/>
--- a/phonebookui/pbkcommonui/resources/pbkcommonui.qrc Wed Jul 21 11:37:51 2010 +0300
+++ b/phonebookui/pbkcommonui/resources/pbkcommonui.qrc Fri Jul 23 12:43:48 2010 +0300
@@ -17,6 +17,7 @@
<file alias="contacts_collections.docml" >contacts_collections.docml</file>
<file alias="contacts_groupmembers.docml" >contacts_groupmembers.docml</file>
<file alias="contacts_detail_editor.docml" >contacts_detail_editor.docml</file>
+ <file alias="contacts_fetchdialog.docml" >contacts_fetchdialog.docml</file>
<file alias="contacts_settings.docml" >contacts_settings.docml</file>
</qresource>
<qresource prefix="/style">
@@ -34,9 +35,12 @@
<file alias="cntcontactcardheadingitem_color.css">style/cntcontactcardheadingitem_color.css</file>
<file alias="cnthistoryviewitem.widgetml">style/cnthistoryviewitem.widgetml</file>
<file alias="cnthistoryviewitem.css">style/cnthistoryviewitem.css</file>
- <file alias="cntlocationbutton.hbpushbutton.widgetml">style/cntlocationbutton.hbpushbutton.widgetml</file>
- <file alias="cntlocationbutton.css">style/cntlocationbutton.css</file>
<file alias="cntcommondetailviewitem.widgetml">style/cntcommondetailviewitem.widgetml</file>
<file alias="cntcommondetailviewitem.css">style/cntcommondetailviewitem.css</file>
+ <file alias="cntimagelabel.widgetml">style/cntimagelabel.widgetml</file>
+ <file alias="cntimagelabel.css">style/cntimagelabel.css</file>
+ <file alias="cntfetchmarkall.widgetml">style/cntfetchmarkall.widgetml</file>
+ <file alias="cntfetchmarkall.css">style/cntfetchmarkall.css</file>
+ <file alias="cntfetchmarkall_color.css">style/cntfetchmarkall_color.css</file>
</qresource>
</RCC>
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/phonebookui/pbkcommonui/resources/style/cntfetchmarkall.css Fri Jul 23 12:43:48 2010 +0300
@@ -0,0 +1,13 @@
+CntFetchMarkAll{
+ layout:default;
+}
+
+CntFetchMarkAll::counter
+{
+ text-align: right;
+ text-height: var(hb-param-text-height-tiny);
+ text-line-count-max: 1;
+ text-line-count-min: 1;
+ font-variant:secondary;
+ right:var(hb-param-margin-gene-popup);
+}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/phonebookui/pbkcommonui/resources/style/cntfetchmarkall.widgetml Fri Jul 23 12:43:48 2010 +0300
@@ -0,0 +1,21 @@
+<hbwidget version="0.1" type="CntFetchMarkAll">
+
+ <layout name="default" type="mesh">
+
+ <meshitem src="checkbox" srcEdge="TOP" dst="" dstEdge="TOP" />
+ <meshitem src="checkbox" srcEdge="LEFT" dst="" dstEdge="LEFT" />
+ <meshitem src="checkbox" srcEdge="RIGHT" dst="counter" dstEdge="LEFT" />
+ <meshitem src="checkbox" srcEdge="BOTTOM" dst="" dstEdge="BOTTOM" />
+
+ <meshitem src="counter" srcEdge="CENTERV" dst="checkbox" dstEdge="CENTERV" />
+ <meshitem src="counter" srcEdge="RIGHT" dst="" dstEdge="RIGHT" />
+
+ <meshitem src="background" srcEdge="TOP" dst="" dstEdge="TOP" />
+ <meshitem src="background" srcEdge="BOTTOM" dst="" dstEdge="BOTTOM" />
+ <meshitem src="background" srcEdge="LEFT" dst="" dstEdge="LEFT" />
+ <meshitem src="background" srcEdge="RIGHT" dst="" dstEdge="RIGHT" />
+
+ </layout>
+
+</hbwidget>
+
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/phonebookui/pbkcommonui/resources/style/cntfetchmarkall_color.css Fri Jul 23 12:43:48 2010 +0300
@@ -0,0 +1,6 @@
+CntFetchMarkAll::counter
+{
+ color: var(qtc_viewtitle_normal);
+}
+
+
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/phonebookui/pbkcommonui/resources/style/cntimagelabel.css Fri Jul 23 12:43:48 2010 +0300
@@ -0,0 +1,4 @@
+CntImageLabel
+{
+ layout: avatar_layout;
+}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/phonebookui/pbkcommonui/resources/style/cntimagelabel.widgetml Fri Jul 23 12:43:48 2010 +0300
@@ -0,0 +1,10 @@
+<hbwidget version="0.1" type="bi">
+
+ <layout name="avatar_layout" type="mesh">
+ <meshitem src="icon" srcEdge="LEFT" dst="" dstEdge="LEFT"/>
+ <meshitem src="icon" srcEdge="TOP" dst="" dstEdge="TOP"/>
+ <meshitem src="icon" srcEdge="RIGHT" dst="" dstEdge="RIGHT"/>
+ <meshitem src="icon" srcEdge="BOTTOM" dst="" dstEdge="BOTTOM"/>
+ </layout>
+
+</hbwidget>
--- a/phonebookui/pbkcommonui/src/cntactionlauncher.cpp Wed Jul 21 11:37:51 2010 +0300
+++ b/phonebookui/pbkcommonui/src/cntactionlauncher.cpp Fri Jul 23 12:43:48 2010 +0300
@@ -49,6 +49,10 @@
this, SLOT(progress(QContactAction::State)));
executed = mContactAction->invokeAction( aContact, aDetail );
}
+ else
+ {
+ progress(QContactAction::FinishedWithErrorState);
+ }
return executed;
}
@@ -71,6 +75,10 @@
this, SLOT(progress(QContactAction::State)));
executed = mContactAction->invokeAction( aContact, aDetail, aParameters );
}
+ else
+ {
+ progress(QContactAction::FinishedWithErrorState);
+ }
return executed;
}
@@ -89,6 +97,10 @@
this, SLOT(progress(QContactAction::State)));
executed = mContactAction->invokeAction( aContact, aDetail );
}
+ else
+ {
+ progress(QContactAction::FinishedWithErrorState);
+ }
return executed;
}
--- a/phonebookui/pbkcommonui/src/cntaddressviewitem.cpp Wed Jul 21 11:37:51 2010 +0300
+++ b/phonebookui/pbkcommonui/src/cntaddressviewitem.cpp Fri Jul 23 12:43:48 2010 +0300
@@ -70,25 +70,21 @@
HbDataFormModelItem::DataItemType itemType = static_cast<HbDataFormModelItem::DataItemType>(
modelIndex().data(HbDataFormModelItem::ItemTypeRole).toInt());
- HbWidget* widget = new HbWidget();
+ HbWidget* widget = NULL;
+
if( itemType == HbDataFormModelItem::CustomItemBase )
{
- QGraphicsLinearLayout* layout = new QGraphicsLinearLayout(Qt::Horizontal);
- widget->setLayout(layout);
-
- HbStyleLoader::registerFilePath(":/style/cntlocationbutton.css");
- HbStyleLoader::registerFilePath(":/style/cntlocationbutton.hbpushbutton.widgetml");
- HbDataForm* form = static_cast<HbDataForm*> (itemView());
- HbDataFormModel* model = static_cast<HbDataFormModel*> (form->model());
+ HbPushButton* locationButton = new HbPushButton(this);
+
+ // Naming UI components for automation testability
+ locationButton->setObjectName("Select location button");
+ locationButton->setText( hbTrId("txt_phob_button_select_location") );
+ locationButton->setTextAlignment( Qt::AlignCenter );
+ locationButton->setContentsMargins(0,0,0,0);
- HbPushButton* mLocationButton = new HbPushButton(this);
- mLocationButton->setObjectName("cntlocationbutton");
- mLocationButton->setText( hbTrId("txt_phob_button_select_location") );
- mLocationButton->setTextAlignment( Qt::AlignCenter );
+ connect(locationButton, SIGNAL(clicked()), this, SLOT(launchLocationPicker()));
- connect(mLocationButton, SIGNAL(clicked()), this, SLOT(launchLocationPicker()));
-
- layout->addItem(mLocationButton);
+ widget = locationButton;
}
return widget;
@@ -151,6 +147,6 @@
}
- Q_IMPLEMENT_USER_METATYPE(QLocationPickerItem)
+Q_IMPLEMENT_USER_METATYPE(QLocationPickerItem)
// End of File
--- a/phonebookui/pbkcommonui/src/cntcollectionview.cpp Wed Jul 21 11:37:51 2010 +0300
+++ b/phonebookui/pbkcommonui/src/cntcollectionview.cpp Fri Jul 23 12:43:48 2010 +0300
@@ -16,7 +16,7 @@
*/
#include "cntcollectionview.h"
-#include "cntfetchcontactsview.h"
+#include "cntfetchcontactpopup.h"
#include "cntgroupdeletepopup.h"
#include "cntcollectionlistmodel.h"
#include "cntextensionmanager.h"
@@ -61,7 +61,6 @@
mNewGroupAction(NULL),
mDeleteGroupsAction(NULL),
mHandledContact(NULL),
- mFetchView(NULL),
mActionGroup(NULL)
{
bool ok = false;
@@ -111,9 +110,6 @@
delete mHandledContact;
mHandledContact = NULL;
-
- delete mFetchView;
- mFetchView = NULL;
}
/*!
@@ -190,7 +186,7 @@
void CntCollectionView::showNamesViewWithFinder()
{
CntViewParameters viewParameters;
- viewParameters.insert(EFinder, "show");
+ viewParameters.insert(EExtraAction, CNT_FIND_ACTION);
mViewManager->back(viewParameters);
}
@@ -234,7 +230,7 @@
else
{
CntViewParameters viewParameters;
- viewParameters.insert(EViewId, FavoritesMemberView);
+ viewParameters.insert(EViewId, favoritesMemberView);
QVariant var;
var.setValue(favoriteGroup);
viewParameters.insert(ESelectedGroupContact, var);
@@ -354,29 +350,29 @@
groupNameCreated = hbTrId("txt_phob_list_unnamed");
}
- if (!mFetchView)
- {
- mFetchView = new CntFetchContacts(*mViewManager->contactManager( SYMBIAN_BACKEND ));
- connect(mFetchView, SIGNAL(clicked()), this, SLOT(handleNewGroupMembers()));
- }
- mFetchView->setDetails(HbParameterLengthLimiter(hbTrId("txt_phob_title_members_of_1_group")).arg(groupNameCreated),
- hbTrId("txt_common_button_save"));
- mFetchView->displayContacts(HbAbstractItemView::MultiSelection, contactsSet);
+ CntFetchContactPopup* popup = CntFetchContactPopup::createMultiSelectionPopup(
+ HbParameterLengthLimiter(hbTrId("txt_phob_title_members_of_1_group")).arg(groupNameCreated),
+ hbTrId("txt_common_button_save"),
+ *mViewManager->contactManager(SYMBIAN_BACKEND));
+ connect( popup, SIGNAL(fetchReady(QSet<QContactLocalId>)), this, SLOT(handleNewGroupMembers(QSet<QContactLocalId>)) );
+ connect( popup, SIGNAL(fetchCancelled()), this, SLOT(handleCancelGroupMembers()) );
+
+ popup->setSelectedContacts( contactsSet );
+ popup->showPopup();
}
}
-void CntCollectionView::handleNewGroupMembers()
+void CntCollectionView::handleNewGroupMembers( QSet<QContactLocalId> aIds )
{
- mSelectedContactsSet = mFetchView->getSelectedContacts();
-
- if ( !mFetchView->wasCanceled() && mSelectedContactsSet.size() ) {
+ mSelectedContactsSet = aIds;
+
+ if ( aIds.size() > 0 )
+ {
saveNewGroup(mHandledContact);
- delete mFetchView;
- mFetchView = NULL;
-
CntViewParameters viewParameters;
viewParameters.insert(EViewId, groupMemberView);
+
QVariant var;
var.setValue(*mHandledContact);
viewParameters.insert(ESelectedGroupContact, var);
@@ -384,14 +380,23 @@
}
else
{
- // Add the new group
mModel->addGroup(mHandledContact->localId());
mDeleteGroupsAction->setEnabled(true);
-
- delete mFetchView;
- mFetchView = NULL;
}
+ notifyNewGroup();
+}
+
+void CntCollectionView::handleCancelGroupMembers()
+{
+ mSelectedContactsSet.clear();
+ mModel->addGroup(mHandledContact->localId());
+ mDeleteGroupsAction->setEnabled(true);
+ notifyNewGroup();
+}
+
+void CntCollectionView::notifyNewGroup()
+{
QString groupNameCreated = mHandledContact->displayLabel();
if (groupNameCreated.isEmpty())
{
@@ -406,8 +411,10 @@
void CntCollectionView::refreshDataModel()
{
mListView->setModel(0);
+
delete mModel;
- mModel = 0;
+ mModel = NULL;
+
mModel = new CntCollectionListModel(getContactManager(), mExtensionManager, this);
mListView->setModel(mModel);
}
--- a/phonebookui/pbkcommonui/src/cntcontactcardview.cpp Wed Jul 21 11:37:51 2010 +0300
+++ b/phonebookui/pbkcommonui/src/cntcontactcardview.cpp Fri Jul 23 12:43:48 2010 +0300
@@ -20,12 +20,13 @@
#include <hbview.h>
-CntContactCardView::CntContactCardView() : d_ptr(new CntContactCardViewPrivate())
+CntContactCardView::CntContactCardView(bool isTemporary) : d_ptr(new CntContactCardViewPrivate(isTemporary))
{
Q_D(CntContactCardView);
connect(d_ptr, SIGNAL(backPressed()), this, SIGNAL(backPressed()));
connect(d_ptr, SIGNAL(viewActivated(CntAbstractViewManager*, const CntViewParameters)),
this, SIGNAL(viewActivated(CntAbstractViewManager*, const CntViewParameters)));
+ connect(d_ptr, SIGNAL(addToContacts()), this, SIGNAL(addToContacts()));
}
/*!
@@ -62,7 +63,7 @@
int CntContactCardView::viewId() const
{
- return commLauncherView;
+ return contactCardView;
}
// end of file
--- a/phonebookui/pbkcommonui/src/cntcontactcardview_p.cpp Wed Jul 21 11:37:51 2010 +0300
+++ b/phonebookui/pbkcommonui/src/cntcontactcardview_p.cpp Fri Jul 23 12:43:48 2010 +0300
@@ -46,7 +46,10 @@
#include <qversitcontactexporter.h>
#include <qversitwriter.h>
#include <xqservicerequest.h>
+#include <xqaiwrequest.h>
+#include <xqaiwdecl.h>
#include <QTimer> //Progress indication icon
+#include <logsservices.h>
#include <cntdebug.h>
#include "cntcontactcarddatacontainer.h"
@@ -74,7 +77,7 @@
Constructor, initialize member variables.
\a viewManager is the parent that creates this view. \a parent is a pointer to parent QGraphicsItem (by default this is 0)
*/
-CntContactCardViewPrivate::CntContactCardViewPrivate() :
+CntContactCardViewPrivate::CntContactCardViewPrivate(bool isTemporary) :
QObject(),
mScrollArea(NULL),
mContainerWidget(NULL),
@@ -90,13 +93,16 @@
mContactAction(NULL),
mBackKey(NULL),
mImageLabel(NULL),
+ mRequest(NULL),
mVCardIcon(NULL),
mShareUi(NULL),
mAcceptSendKey(true),
mSendKeyListModel(NULL),
mPresenceListener(NULL),
mMaptile(NULL),
- mProgressTimer(NULL)
+ mProgressTimer(NULL),
+ mIsTemporary(isTemporary),
+ mIsExecutingAction(false)
{
bool ok;
document()->load(CNT_CONTACTCARDVIEW_XML, &ok);
@@ -119,7 +125,7 @@
mBackKey = new HbAction(Hb::BackNaviAction, mView);
mView->setNavigationAction(mBackKey);
connect(mBackKey, SIGNAL(triggered()), this, SLOT(showPreviousView()));
-
+
mProgressTimer = new QTimer(this);
mProgressTimer->setSingleShot(true);
connect(mProgressTimer, SIGNAL(timeout()),this, SLOT(updateSpinningIndicator()));
@@ -169,7 +175,11 @@
delete mPresenceListener;
mPresenceListener = NULL;
- delete mMaptile;
+
+ delete mRequest;
+ mRequest = NULL;
+
+ delete mMaptile;
mMaptile = NULL;
delete mProgressTimer;
@@ -195,14 +205,22 @@
//save the contact if avatar has been changed.
QContact contact = contactManager()->contact(mContact->localId());
- if ( contact != *mContact )
+ if ( contact != *mContact && contactManager()->error() == QContactManager::NoError)
{
contactManager()->saveContact(mContact);
}
-
+
mViewManager->back( mArgs );
}
+/*!
+Activates the root view
+*/
+void CntContactCardViewPrivate::showRootView()
+{
+ mViewManager->back( mArgs, true );
+}
+
/*
Activates a default view and setup name label texts
*/
@@ -213,8 +231,6 @@
mViewManager = aMgr;
mArgs = aArgs;
- mView->installEventFilter(this);
-
HbMainWindow* window = mView->mainWindow();
connect(window, SIGNAL(orientationChanged(Qt::Orientation)), this, SLOT(setOrientation(Qt::Orientation)));
connect(window, SIGNAL(keyPressed(QKeyEvent*)), this, SLOT(keyPressed(QKeyEvent*)));
@@ -234,6 +250,12 @@
{
mView->toolBar()->removeAction(static_cast<HbAction*>(document()->findObject(QString("cnt:sendMyCard"))));
}
+ if (mIsTemporary)
+ {
+ mView->menu()->clearActions();
+ mView->toolBar()->clearActions();
+ mView->toolBar()->addAction(static_cast<HbAction*>(document()->findObject(QString("cnt:addtocontact"))));
+ }
// add heading widget to the content
QGraphicsWidget *c = document()->findWidget(QString("content"));
@@ -241,8 +263,21 @@
mHeadingItem = static_cast<CntContactCardHeadingItem*>(document()->findWidget(QString("cnt_contactcard_heading")));
mHeadingItem->setDetails(mContact);
- connect(mHeadingItem, SIGNAL(passLongPressed(const QPointF&)), this, SLOT(drawMenu(const QPointF&)));
- connect(mHeadingItem, SIGNAL(passShortPressed(const QPointF&)), this, SLOT(doChangeImage()));
+
+ mImageLabel = static_cast<CntImageLabel*>(document()->findWidget("cnt_contactcard_image"));
+
+ if (!mIsTemporary)
+ {
+ connect(mHeadingItem, SIGNAL(passLongPressed(const QPointF&)), this, SLOT(drawMenu(const QPointF&)));
+ connect(mHeadingItem, SIGNAL(passShortPressed(const QPointF&)), this, SLOT(doChangeImage()));
+ connect(mImageLabel, SIGNAL(iconClicked()), this, SLOT(doChangeImage()));
+ connect(mImageLabel, SIGNAL(iconLongPressed(const QPointF&)), this, SLOT(drawMenu(const QPointF&)));
+ }
+ else
+ {
+ mHeadingItem->ungrabGesture(Qt::TapGesture);
+ mImageLabel->ungrabGesture(Qt::TapGesture);
+ }
// presence listener
mPresenceListener = new CntPresenceListener(*mContact);
@@ -253,9 +288,7 @@
QMap<QString, bool> presences = mPresenceListener->initialPresences(online);
mHeadingItem->setOnlineStatus(online);
- mImageLabel = static_cast<CntImageLabel*>(document()->findWidget("cnt_contactcard_image"));
- connect(mImageLabel, SIGNAL(iconClicked()), this, SLOT(doChangeImage()));
- connect(mImageLabel, SIGNAL(iconLongPressed(const QPointF&)), this, SLOT(drawMenu(const QPointF&)));
+
// avatar
QList<QContactAvatar> details = mContact->details<QContactAvatar>();
@@ -297,8 +330,12 @@
CntContactCardDetailItem* item = new CntContactCardDetailItem(index, mContainerWidget);
connect(item, SIGNAL(clicked()), this, SLOT(onItemActivated()));
- connect(item, SIGNAL(longPressed(const QPointF&)), this, SLOT(onLongPressed(const QPointF&)));
-
+
+ if (!mIsTemporary)
+ {
+ connect(item, SIGNAL(longPressed(const QPointF&)), this, SLOT(onLongPressed(const QPointF&)));
+ }
+
if (mContact->isPreferredDetail(dataItem->action(), dataItem->detail()))
{
dataItem->setSecondaryIcon(HbIcon("qtg_mono_favourites"));
@@ -376,7 +413,7 @@
CntContactCardMapTileDetail* detail = new CntContactCardMapTileDetail;
if( detail )
{
- detail->mContactId = mContact->id().localId();
+ detail->mContactId = mContact->localId();
if( dataItem->titleText() == hbTrId("txt_phob_formlabel_address") )
{
@@ -416,8 +453,8 @@
setAsFavorite = CntFavourite::isMemberOfFavouriteGroup( contactManager(), mContact );
mHeadingItem->setFavoriteStatus( setAsFavorite ); // if contact is part of favourites group
}
- qobject_cast<HbAction *>(document()->findObject("cnt:setasfavorite"))->setVisible( !setAsFavorite );
- qobject_cast<HbAction *>(document()->findObject("cnt:removefromfavorite"))->setVisible( setAsFavorite );
+ static_cast<HbAction *>(document()->findObject("cnt:setasfavorite"))->setVisible( !setAsFavorite );
+ static_cast<HbAction *>(document()->findObject("cnt:removefromfavorite"))->setVisible( setAsFavorite );
}
document()->findWidget("viewToolbar")->setParent(mView);
document()->findWidget("viewMenu")->setParent(mView);
@@ -431,8 +468,15 @@
connectAction("cnt:edit", SLOT(editContact()));
connectAction("cnt:history", SLOT(viewHistory()));
connectAction("cnt:sendMyCard", SLOT(sendBusinessCard()));
+ connectAction("cnt:addtocontact", SLOT(onAddedToContacts()));
connectAction("cnt:activityStream", NULL); // placeholder until this action is implemented (needed to avoid memory leak)
+ // disabled until this action is implemented
+ static_cast<HbAction *>(document()->findObject("cnt:activityStream"))->setEnabled(false);
+
+ connect(contactManager(), SIGNAL(contactsRemoved(const QList<QContactLocalId>&)),
+ this, SLOT(contactDeletedFromOtherSource(const QList<QContactLocalId>&)));
+
emit viewActivated( mViewManager, aArgs );
CNT_EXIT
@@ -479,7 +523,7 @@
CntMapTileService::ContactAddressType sourceAddressType =
static_cast <CntMapTileService::ContactAddressType>( mAddressList[index]->mAddressType );
- QContactLocalId contactId = mContact->id().localId();
+ QContactLocalId contactId = mContact->localId();
if( mAddressList[index]->mDetailItem != NULL )
{
@@ -578,7 +622,7 @@
//If there is no maptile displayed, return immediately
if( mMaptileLabelList.count() > 0 )
{
- QContactLocalId contactId = mContact->id().localId();
+ QContactLocalId contactId = mContact->localId();
QList<QContactAddress> addressDetails = mContact->details<QContactAddress>();
@@ -698,7 +742,7 @@
mHeadingItem->setIcon(icon);
mVCardIcon = new HbIcon(pixmap);
mImageLabel->clear();
- mImageLabel->setIcon(icon);
+ mImageLabel->setIcon(pixmap);
}
CNT_EXIT
@@ -710,7 +754,7 @@
void CntContactCardViewPrivate::sendToHs()
{
QVariantHash preferences;
- preferences["contactId"] = mContact->id().localId();
+ preferences["contactId"] = mContact->localId();
XQServiceRequest snd("com.nokia.symbian.IHomeScreenClient",
"addWidget(QString,QVariantHash)"
@@ -718,6 +762,27 @@
snd << QString("contactwidgethsplugin");
snd << preferences;
snd.send();
+
+ /*
+ if (mRequest)
+ {
+ delete mRequest;
+ mRequest = 0;
+ }
+
+ mRequest = mAppManager.create("com.nokia.symbian.IHomeScreenClient", "addWidget(QString,QVariantHash)", false);
+
+ if (mRequest)
+ {
+ QList<QVariant> args;
+ QVariantHash preferences;
+ preferences["contactId"] = mContact->localId();
+ args << preferences;
+ args << QString("contactwidgethsplugin");
+ mRequest->setArguments(args);
+ mRequest->send();
+ }
+ */
}
/*!
@@ -763,7 +828,7 @@
*/
void CntContactCardViewPrivate::deleteContact()
{
- QString name = contactManager()->synthesizedDisplayLabel(*mContact);
+ QString name = contactManager()->synthesizedContactDisplayLabel(*mContact);
if (name.isEmpty())
{
name = hbTrId("txt_phob_list_unnamed");
@@ -780,9 +845,12 @@
{
if (action == HbMessageBox::Delete)
{
+ disconnect(contactManager(), SIGNAL(contactsRemoved(const QList<QContactLocalId>&)),
+ this, SLOT(contactDeletedFromOtherSource(const QList<QContactLocalId>&)));
+
contactManager()->removeContact(mContact->localId());
emit backPressed();
- mViewManager->back( mArgs );
+ mViewManager->back( mArgs, true );
}
}
@@ -804,7 +872,7 @@
*/
void CntContactCardViewPrivate::deactivate()
{
- mView->removeEventFilter(this);
+
}
/*!
@@ -812,7 +880,8 @@
*/
void CntContactCardViewPrivate::sendBusinessCard()
{
- qDebug() << "CntContactCardViewPrivate::sendBusinessCard - IN";
+ CNT_ENTRY
+
// Check if the contact has an image.
QList<QContactAvatar> avatars = mContact->details<QContactAvatar>();
bool imageExists( false );
@@ -845,10 +914,11 @@
if ( !imageExists )
{
- qDebug() << "CntContactCardViewPrivate::sendBusinessCard without image";
+ CNT_LOG_ARGS("snd vCard without image")
handleSendBusinessCard( NULL ); // no image
}
- qDebug() << "CntContactCardViewPrivate::sendBusinessCard - OUT";
+
+ CNT_EXIT
}
/*!
@@ -897,6 +967,15 @@
*/
void CntContactCardViewPrivate::executeAction(QContact& aContact, const QContactDetail& aDetail, const QString& aAction, CntContactCardDetailItem* aItem)
{
+ if (mIsExecutingAction)
+ {
+ return;
+ }
+ else
+ {
+ mIsExecutingAction = true;
+ }
+
CntActionLauncher* other = new CntActionLauncher(*contactManager(), aAction);
connect(other, SIGNAL(actionExecuted(CntActionLauncher*)), this, SLOT(actionExecuted(CntActionLauncher*)));
if (aItem && aContact.preferredDetail(aAction).isEmpty())
@@ -921,6 +1000,7 @@
if (detail == aDetail && action == aAction)
{
detailItem = static_cast<CntContactCardDetailItem*>(mContainerLayout->itemAt(index));
+ break;
}
}
executeAction(aContact, aDetail, aAction, detailItem);
@@ -932,6 +1012,15 @@
*/
void CntContactCardViewPrivate::executeDynamicAction(QContact& aContact, QContactDetail aDetail, QContactActionDescriptor aActionDescriptor)
{
+ if (mIsExecutingAction)
+ {
+ return;
+ }
+ else
+ {
+ mIsExecutingAction = true;
+ }
+
CntActionLauncher* other = new CntActionLauncher(*contactManager());
connect(other, SIGNAL(actionExecuted(CntActionLauncher*)), this, SLOT(actionExecuted(CntActionLauncher*)));
other->execute(aContact, aDetail, aActionDescriptor);
@@ -940,6 +1029,7 @@
void CntContactCardViewPrivate::actionExecuted(CntActionLauncher* aAction)
{
aAction->deleteLater();
+ mIsExecutingAction = false;
}
/*!
@@ -1108,8 +1198,9 @@
void CntContactCardViewPrivate::handleSendBusinessCard( HbAction* aAction )
{
+ CNT_ENTRY
Q_UNUSED(aAction);
- qDebug() << "CntContactCardViewPrivate::handleSendBusinessCard - IN";
+
QList<QContact> list;
/*if ( aAction && aAction->objectName() == "cancel" )
{
@@ -1165,12 +1256,12 @@
// The vCard version needs to be 2.1 due to backward compatiblity when sending
if (exporter.exportContacts(list, QVersitDocument::VCard21Type))
{
- qDebug() << "CntContactCardViewPrivate::handleSendBusinessCard, VCard21Type";
+ CNT_LOG_ARGS("VCard21Type");
QList<QVersitDocument> docs = exporter.documents();
QFile f(vCardPath);
if ( f.open(QIODevice::WriteOnly) )
{
- qDebug() << "CntContactCardViewPrivate::handleSendBusinessCard write VCard";
+ CNT_LOG_ARGS("write VCard");
// Start creating the vCard
QVersitWriter writer;
writer.setDevice(&f);
@@ -1187,7 +1278,8 @@
mShareUi->send(l,false);
}
}
- qDebug() << "CntContactCardViewPrivate::handleSendBusinessCard - OUT";
+
+ CNT_EXIT
}
@@ -1231,7 +1323,7 @@
}
mAvatar->setImageUrl(QUrl());
mImageLabel->clear();
- mImageLabel->setIcon(HbIcon("qtg_large_add_contact_picture"));
+ mImageLabel->setAvatarIcon(HbIcon("qtg_large_add_contact_picture"));
mHeadingItem->setIcon(HbIcon("qtg_large_add_contact_picture"));
contactManager()->saveContact(mContact);
}
@@ -1295,22 +1387,36 @@
}
if (!count)
{
- XQServiceRequest snd("com.nokia.services.logsservices.starter", "start(int,bool)", false);
- snd << 0; // all calls
- snd << true; // show dialpad
- snd.send();
+ if (mRequest)
+ {
+ delete mRequest;
+ mRequest = 0;
+ }
+
+ mRequest = mAppManager.create("com.nokia.symbian.ILogsView", "show(QVariantMap)", false);
+
+ if (mRequest)
+ {
+ QList<QVariant> args;
+ QVariantMap map;
+ map.insert("view_index", QVariant(int(LogsServices::ViewAll)));
+ map.insert("show_dialpad", QVariant(true));
+ map.insert("dialpad_text", QVariant(QString()));
+ args.append(QVariant(map));
+ mRequest->setArguments(args);
+ mRequest->send();
+ }
}
else
{
QContactDetail preferredDetail = mContact->preferredDetail("call");
if (!preferredDetail.isEmpty())
{
- executeAction(*mContact, preferredDetail, "call", NULL);
+ executeAction(*mContact, preferredDetail, "call");
}
else if (count == 1 )
{
- mContact->setPreferredDetail("call", mContact->details<QContactPhoneNumber>().first());
- executeAction( *mContact, mContact->details<QContactPhoneNumber>().first(), "call", NULL);
+ executeAction( *mContact, mContact->details<QContactPhoneNumber>().first(), "call");
}
else if(count >= 2 && mAcceptSendKey)
{
@@ -1320,8 +1426,11 @@
connect( actionPopup, SIGNAL(executeContactAction(QContact&, QContactDetail, QString)), this,
SLOT(executeAction(QContact&, QContactDetail, QString)));
connect( actionPopup, SIGNAL(actionPopupCancelPressed()), this,
- SLOT(sendKeyCancelSlot()));
-
+ SLOT(sendKeyCancelSlot()));
+ }
+ else
+ {
+ //ignore
}
}
}
@@ -1330,4 +1439,20 @@
{
mAcceptSendKey = true;
}
+
+void CntContactCardViewPrivate::onAddedToContacts()
+{
+ emit addToContacts();
+}
+
+void CntContactCardViewPrivate::contactDeletedFromOtherSource(const QList<QContactLocalId>& contactIds)
+{
+ if ( contactIds.contains(mContact->localId()) )
+ {
+ // Do not switch to the previous view immediately. List views are
+ // not updated properly if this is not done in the event loop
+ QTimer::singleShot(0, this, SLOT(showRootView()));
+ }
+}
+
// end of file
--- a/phonebookui/pbkcommonui/src/cntdateeditorviewitem.cpp Wed Jul 21 11:37:51 2010 +0300
+++ b/phonebookui/pbkcommonui/src/cntdateeditorviewitem.cpp Fri Jul 23 12:43:48 2010 +0300
@@ -58,13 +58,27 @@
if ( detail.definitionName() == QContactBirthday::DefinitionName )
{
QContactBirthday bd = detail;
- editDate( bd.date(), hbTrId("txt_phob_formlabel_birthday") );
+ if (bd.date().isNull())
+ {
+ editDate( QDate::currentDate(), hbTrId("txt_phob_formlabel_birthday") );
+ }
+ else
+ {
+ editDate( bd.date(), hbTrId("txt_phob_formlabel_birthday") );
+ }
}
if ( detail.definitionName() == QContactAnniversary::DefinitionName )
{
QContactAnniversary anniversary = detail;
- editDate( anniversary.originalDate(), hbTrId("txt_phob_formlabel_anniversary") );
+ if (anniversary.originalDate().isNull())
+ {
+ editDate( QDate::currentDate(), hbTrId("txt_phob_formlabel_anniversary") );
+ }
+ else
+ {
+ editDate( anniversary.originalDate(), hbTrId("txt_phob_formlabel_anniversary") );
+ }
}
}
@@ -78,9 +92,11 @@
QContactDetail detail = item->detail();
QString text(hbTrId("txt_phob_formlabel_val_formlabel_val_no_date_set"));
+ QString buttonObjName;
if ( detail.definitionName() == QContactBirthday::DefinitionName )
{
+ buttonObjName = detail.definitionName() + " button";
QContactBirthday birthday = detail;
if ( !birthday.isEmpty() )
{
@@ -90,6 +106,7 @@
if ( detail.definitionName() == QContactAnniversary::DefinitionName )
{
+ buttonObjName = detail.definitionName() + " button";
QContactAnniversary anniversary = detail;
if ( !anniversary.isEmpty() )
{
@@ -97,6 +114,8 @@
}
}
mButton->setText( text );
+ // Naming UI components for automation testability
+ mButton->setObjectName(buttonObjName);
return mButton;
}
--- a/phonebookui/pbkcommonui/src/cntdefaultviewfactory.cpp Wed Jul 21 11:37:51 2010 +0300
+++ b/phonebookui/pbkcommonui/src/cntdefaultviewfactory.cpp Fri Jul 23 12:43:48 2010 +0300
@@ -57,7 +57,7 @@
{
case namesView:
return new CntNamesView(*mExtensionManager);
- case commLauncherView:
+ case contactCardView:
return new CntContactCardView();
case myCardView:
return new CntMyCardView();
@@ -67,7 +67,7 @@
return new CntCollectionView(*mExtensionManager);
case collectionFavoritesView:
return new CntFavoritesView();
- case FavoritesMemberView:
+ case favoritesMemberView:
return new CntFavoritesMemberView();
case editView:
return new CntEditView();
--- a/phonebookui/pbkcommonui/src/cntdefaultviewmanager.cpp Wed Jul 21 11:37:51 2010 +0300
+++ b/phonebookui/pbkcommonui/src/cntdefaultviewmanager.cpp Fri Jul 23 12:43:48 2010 +0300
@@ -113,14 +113,14 @@
CNT_EXIT
}
-void CntDefaultViewManager::back(const CntViewParameters aArgs)
+void CntDefaultViewManager::back(const CntViewParameters aArgs, bool toRoot)
{
CNT_ENTRY
mArgs.clear();
QFlags<Hb::ViewSwitchFlag> flags;
- int back = mNavigator->back( flags );
+ int back = mNavigator->back( flags, toRoot );
foreach( int k, aArgs.keys() )
{
@@ -132,7 +132,8 @@
{
switchView( mArgs, flags );
}
- else {
+ else
+ {
// exiting application
cleanup();
closeApp();
@@ -263,4 +264,10 @@
CNT_EXIT
}
+
+int CntDefaultViewManager::currentViewId()
+{
+ return mCurrent->viewId();
+}
+
// End of File
--- a/phonebookui/pbkcommonui/src/cntdetaileditor.cpp Wed Jul 21 11:37:51 2010 +0300
+++ b/phonebookui/pbkcommonui/src/cntdetaileditor.cpp Fri Jul 23 12:43:48 2010 +0300
@@ -37,6 +37,7 @@
#include <hbparameterlengthlimiter.h>
#include <QApplication>
+#include <QTimer>
const char *CNT_DETAILEDITOR_XML = ":/xml/contacts_detail_editor.docml";
@@ -126,6 +127,11 @@
selectedContact = aArgs.value(ESelectedContact).value<QContact>();
connect( mDataForm, SIGNAL(itemShown(const QModelIndex&)), this, SLOT(handleItemShown(const QModelIndex&)) );
}
+
+ QContactManager* cm = mViewManager->contactManager(SYMBIAN_BACKEND);
+ connect(cm, SIGNAL(contactsRemoved(const QList<QContactLocalId>&)),
+ this, SLOT(contactDeletedFromOtherSource(const QList<QContactLocalId>&)));
+
mEditorFactory->setupEditorView(*this, selectedContact);
QString myCard = mArgs.value( EMyCard ).toString();
@@ -164,6 +170,10 @@
QContactManager* mgr = mViewManager->contactManager(SYMBIAN_BACKEND);
mgr->saveContact( mDataFormModel->contact() );
}
+
+ QContactManager *cm = mViewManager->contactManager(SYMBIAN_BACKEND);
+ disconnect(cm, SIGNAL(contactsRemoved(const QList<QContactLocalId>&)),
+ this, SLOT(contactDeletedFromOtherSource(const QList<QContactLocalId>&)));
}
bool CntDetailEditor::isDefault() const
@@ -192,33 +202,42 @@
void CntDetailEditor::handleItemShown(const QModelIndex& aIndex )
{
- if ( mId == groupEditorView )
+ HbDataFormModelItem* modelItem = mDataFormModel->itemFromIndex( aIndex );
+
+ if ( modelItem->type() == HbDataFormModelItem::TextItem )
{
- CntGroupEditorModel* groupModel = static_cast<CntGroupEditorModel*>( mDataFormModel );
- if ( groupModel->isConferenceNumber(aIndex) )
+ HbDataFormViewItem* viewItem = static_cast<HbDataFormViewItem*>(mDataForm->itemByIndex( aIndex ));
+ HbLineEdit* edit = static_cast<HbLineEdit*>( viewItem->dataItemContentWidget() );
+ QString objName;
+
+ if ( mId == groupEditorView )
{
- HbDataFormViewItem* viewItem = static_cast<HbDataFormViewItem*>(mDataForm->itemByIndex( aIndex ));
- HbLineEdit* edit = static_cast<HbLineEdit*>( viewItem->dataItemContentWidget() );
- edit->setInputMethodHints( Qt::ImhDialableCharactersOnly );
+ CntGroupEditorModel* groupModel = static_cast<CntGroupEditorModel*>( mDataFormModel );
+ if ( groupModel->isConferenceNumber(aIndex) )
+ {
+ edit->setInputMethodHints( Qt::ImhDialableCharactersOnly );
+ objName = "Conference number line edit %1";
+ }
+ else
+ {
+ edit->setInputMethodHints( Qt::ImhNoPredictiveText );
+ objName = "Group name line edit %1";
+ }
}
else
{
- HbDataFormViewItem* viewItem = static_cast<HbDataFormViewItem*>(mDataForm->itemByIndex( aIndex ));
- HbLineEdit* edit = static_cast<HbLineEdit*>( viewItem->dataItemContentWidget() );
edit->setInputMethodHints( Qt::ImhNoPredictiveText );
+
+ if (modelItem->contentWidgetData( "preferDigits" ).toBool())
+ {
+ edit->setInputMethodHints( Qt::ImhPreferNumbers );
+ }
+
+ objName = mDataFormModel->detail().definitionName() + " line edit %1";
}
- }
- else
- {
- HbDataFormViewItem* viewItem = static_cast<HbDataFormViewItem*>(mDataForm->itemByIndex( aIndex ));
- HbLineEdit* edit = static_cast<HbLineEdit*>( viewItem->dataItemContentWidget() );
- edit->setInputMethodHints( Qt::ImhNoPredictiveText );
- HbDataFormModelItem* modelItem = mDataFormModel->itemFromIndex( aIndex );
- if (modelItem->contentWidgetData( "preferDigits" ).toBool())
- {
- edit->setInputMethodHints( Qt::ImhPreferNumbers );
- }
+ // Naming UI components for automation testability
+ edit->setObjectName(objName.arg(aIndex.row()));
}
}
@@ -269,7 +288,7 @@
{
mDataFormModel->saveContactDetails();
- QString name = mViewManager->contactManager(SYMBIAN_BACKEND)->synthesizedDisplayLabel(*mDataFormModel->contact());
+ QString name = mViewManager->contactManager(SYMBIAN_BACKEND)->synthesizedContactDisplayLabel(*mDataFormModel->contact());
if (name.isEmpty())
{
@@ -327,4 +346,28 @@
return mId;
}
+/*!
+Go back to the root view
+*/
+void CntDetailEditor::showRootView()
+{
+ mViewManager->back( mArgs, true );
+}
+
+
+void CntDetailEditor::contactDeletedFromOtherSource(const QList<QContactLocalId>& contactIds)
+{
+ CNT_ENTRY
+
+ QContact normalContact = mArgs.value(ESelectedContact).value<QContact>();
+ QContact groupContact = mArgs.value(ESelectedGroupContact).value<QContact>();
+ if ( contactIds.contains(normalContact.localId()) || contactIds.contains(groupContact.localId()) )
+ {
+ // Do not switch to the previous view immediately. List views are
+ // not updated properly if this is not done in the event loop
+ QTimer::singleShot(0, this, SLOT(showRootView()));
+ }
+ CNT_EXIT
+}
+
// End of File
--- a/phonebookui/pbkcommonui/src/cntdetailpopup.cpp Wed Jul 21 11:37:51 2010 +0300
+++ b/phonebookui/pbkcommonui/src/cntdetailpopup.cpp Fri Jul 23 12:43:48 2010 +0300
@@ -18,23 +18,13 @@
#include "cntdetailpopup.h"
#include <hblabel.h>
-#include <hbgroupbox.h>
-#include <hbaction.h>
-#include <qtcontacts.h>
-#include <hblistview.h>
-#include <hblistviewitem.h>
#include <QStandardItemModel>
-QTM_USE_NAMESPACE
-
CntDetailPopup::CntDetailPopup(QGraphicsItem *parent, CntViewIdList aList ):
- HbDialog(parent),
+ HbSelectionDialog(parent),
mListModel(NULL),
- mListView(NULL),
- mSelectedDetail(0),
mViewIdList( aList )
{
- mListView = new HbListView(this);
mListModel = new QStandardItemModel(this);
addListItem("qtg_small_mobile", hbTrId("txt_phob_list_number"), phoneNumberEditorView );
@@ -47,41 +37,21 @@
addListItem("qtg_small_company_details", hbTrId("txt_phob_list_company_details"), companyEditorView);
addListItem("qtg_small_family", hbTrId("txt_phob_list_family"), familyDetailEditorView);
- mListView->setModel(mListModel);
- mListView->setSelectionMode(HbAbstractItemView::NoSelection);
- // ownership of prototype is not transferred
- HbListViewItem* prototype = mListView->listItemPrototype();
- prototype->setGraphicsSize( HbListViewItem::SmallIcon );
-
HbLabel *label = new HbLabel(this);
label->setPlainText(hbTrId("txt_phob_title_add_field"));
setHeadingWidget(label);
- setContentWidget(mListView);
-
- HbAction *cancelAction = new HbAction(hbTrId("txt_common_button_cancel"), this);
- addAction(cancelAction);
setTimeout(HbDialog::NoTimeout);
setDismissPolicy(HbDialog::NoDismiss);
setAttribute(Qt::WA_DeleteOnClose, true);
setModal(true);
-
- connect(mListView, SIGNAL(activated(const QModelIndex&)), this, SLOT(listItemSelected(QModelIndex)));
+ setSelectionMode(HbAbstractItemView::SingleSelection);
+ setModel(mListModel);
}
CntDetailPopup::~CntDetailPopup()
{
-}
-
-void CntDetailPopup::listItemSelected(QModelIndex index)
-{
- mSelectedDetail = mListModel->item(index.row())->data(Qt::UserRole).toInt();
- close();
-}
-
-int CntDetailPopup::selectedDetail()
-{
- return mSelectedDetail;
+
}
void CntDetailPopup::selectDetail( CntViewIdList aList, QObject *receiver, const char *member )
--- a/phonebookui/pbkcommonui/src/cntdocumentloader.cpp Wed Jul 21 11:37:51 2010 +0300
+++ b/phonebookui/pbkcommonui/src/cntdocumentloader.cpp Fri Jul 23 12:43:48 2010 +0300
@@ -21,6 +21,7 @@
#include "cntdocumentloader.h"
#include "cnteditviewheadingitem.h"
#include "cntcontactcardheadingitem.h"
+#include "cntfetchmarkall.h"
#include "cntimagelabel.h"
CntDocumentLoader::CntDocumentLoader()
@@ -59,6 +60,14 @@
result->setObjectName(name);
}
}
+ else if ( type == "CntFetchMarkAll" )
+ {
+ result = new CntFetchMarkAll();
+ if ( result )
+ {
+ result->setObjectName(name);
+ }
+ }
else
{
result = HbDocumentLoader::createObject(type,name);
--- a/phonebookui/pbkcommonui/src/cnteditview_p.cpp Wed Jul 21 11:37:51 2010 +0300
+++ b/phonebookui/pbkcommonui/src/cnteditview_p.cpp Fri Jul 23 12:43:48 2010 +0300
@@ -23,6 +23,7 @@
#include "cntimagelabel.h"
#include "cntsavemanager.h"
#include "cntglobal.h"
+#include "cntdebug.h"
#include <qtcontacts.h>
#include <hbdocumentloader.h>
@@ -44,6 +45,7 @@
#include <QFileInfo>
#include <QApplication>
+#include <QTimer>
const char *CNT_EDIT_XML = ":/xml/contacts_ev.docml";
@@ -52,7 +54,7 @@
mImageLabel( NULL ),
mThumbnailManager( NULL ),
mContact( NULL ),
- mReq(0),
+ mReq(NULL),
mMenu(NULL),
mSaveManager(NULL)
{
@@ -140,6 +142,8 @@
void CntEditViewPrivate::activate( CntAbstractViewManager* aMgr, const CntViewParameters aArgs )
{
+ CNT_ENTRY
+
mMgr = aMgr;
mArgs = aArgs;
@@ -220,6 +224,8 @@
this, SLOT(thumbnailReady(QPixmap, void*, int, int)) );
loadAvatar();
+
+ CNT_EXIT
}
void CntEditViewPrivate::deactivate()
@@ -346,10 +352,12 @@
{
CntDetailPopup *popup = static_cast<CntDetailPopup*>(sender());
- if (popup && aAction != popup->actions().first())
+ if (popup && aAction != popup->actions().first() && popup->selectedItems().count())
{
- int id = popup->selectedDetail();
-
+ int row = popup->selectedItems().first().toInt();
+ QModelIndex index = popup->model()->index(row, 0);
+ int id = popup->model()->data(index, Qt::UserRole).toInt();
+
if (id != noView )
{
mArgs.insert(EViewId, id );
@@ -454,7 +462,7 @@
else
{
QContactManager* cm = mMgr->contactManager( SYMBIAN_BACKEND );
- QString name = cm->synthesizedDisplayLabel( *mContact );
+ QString name = cm->synthesizedContactDisplayLabel( *mContact );
if (name.isEmpty())
{
name = hbTrId("txt_phob_list_unnamed");
@@ -473,9 +481,11 @@
{
QContactManager* cm = mMgr->contactManager( SYMBIAN_BACKEND );
+ disconnect(cm, SIGNAL(contactsRemoved(const QList<QContactLocalId>&)),
+ this, SLOT(contactDeletedFromOtherSource(const QList<QContactLocalId>&)));
emit q->contactRemoved(cm->removeContact( mContact->localId() ));
- mMgr->back( mArgs );
+ mMgr->back( mArgs, true );
}
}
@@ -487,22 +497,30 @@
// get a fresh one from backend.
QContactManager* mgr = mMgr->contactManager(SYMBIAN_BACKEND);
- mContact = new QContact(mgr->contact( mContact->localId() ));
+ setSelectedContact( mgr->contact( mContact->localId()) );
QVariant var;
var.setValue(*mContact);
CntViewParameters viewParameters;
viewParameters.insert(ESelectedContact, var);
-
- mMgr->back( viewParameters );
-}
+
+ if ( mArgs.value( EExtraAction ).toString() == CNT_ROOT_ACTION )
+ {
+ mMgr->back( viewParameters, true );
+ }
+ else
+ {
+ mMgr->back( viewParameters );
+ }
+
+}
void CntEditViewPrivate::saveChanges()
{
Q_Q(CntEditView);
- QString name = mMgr->contactManager(SYMBIAN_BACKEND)->synthesizedDisplayLabel(*mContact);
+ QString name = mMgr->contactManager(SYMBIAN_BACKEND)->synthesizedContactDisplayLabel(*mContact);
if (name.isEmpty())
{
@@ -512,6 +530,7 @@
CntSaveManager::CntSaveResult result = mSaveManager->saveContact(mContact, mMgr->contactManager(SYMBIAN_BACKEND));
QVariant var;
+ bool backToRoot(false);
switch (result)
{
@@ -534,15 +553,21 @@
HbDeviceNotificationDialog::notification(QString(),hbTrId("SAVING FAILED!"));
break;
case CntSaveManager::EDeleted:
- emit q->contactUpdated(KCntServicesReturnValueContactDeleted);
+ emit q->contactRemoved(true);
+ backToRoot = true;
break;
case CntSaveManager::ENothingDone:
default:
emit q->contactUpdated(KCntServicesReturnValueContactNotModified);
break;
}
+
+ if ( mArgs.value( EExtraAction ).toString() == CNT_ROOT_ACTION )
+ {
+ backToRoot = true;
+ }
- mMgr->back( mArgs );
+ mMgr->back( mArgs, backToRoot );
}
void CntEditViewPrivate::openNameEditor()
@@ -607,7 +632,7 @@
mHeading->setIcon(icon);
mImageLabel->clear();
- mImageLabel->setIcon(icon);
+ mImageLabel->setIcon(pixmap);
}
}
@@ -681,14 +706,15 @@
void CntEditViewPrivate::addDetail( CntEditViewItem* aDetail )
{
QVariant id = aDetail->data( ERoleEditorViewId );
- CntViewParameters viewParameters;
- viewParameters.insert(EViewId, id.toInt());
+
+ mArgs.insert(EViewId, id.toInt());
+ mArgs.insert(ESelectedAction, CNT_ADD_ACTION );
QVariant var;
var.setValue(*mContact);
- viewParameters.insert(ESelectedContact, var);
- viewParameters.insert(ESelectedAction, CNT_ADD_ACTION );
-
- mMgr->changeView( viewParameters );
+
+ mArgs.insert(ESelectedContact, var);
+
+ mMgr->changeView( mArgs );
}
void CntEditViewPrivate::editDetail( CntEditViewItem* aDetail )
@@ -720,19 +746,37 @@
mContact = NULL;
}
mContact = new QContact( aContact );
- /*
- mListView->setModel( NULL );
- if ( mModel )
+ QContactManager* cm = mMgr->contactManager( SYMBIAN_BACKEND );
+ connect(cm, SIGNAL(contactsRemoved(const QList<QContactLocalId>&)),
+ this, SLOT(contactDeletedFromOtherSource(const QList<QContactLocalId>&)), Qt::UniqueConnection);
+}
+
+void CntEditViewPrivate::contactDeletedFromOtherSource(const QList<QContactLocalId>& contactIds)
+{
+ CNT_ENTRY
+
+ if ( contactIds.contains(mContact->localId()) )
{
- delete mModel;
- mModel = NULL;
+ // Do not switch to the previous view immediately. List views are
+ // not updated properly if this is not done in the event loop
+ QTimer::singleShot(0, this, SLOT(showRootView()));
}
- mModel = new CntEditViewListModel( mContact );
- if ( mListView )
- mListView->setModel( mModel );
- */
+ CNT_EXIT
}
+
+void CntEditViewPrivate::showRootView()
+{
+ CNT_ENTRY
+
+ Q_Q(CntEditView);
+
+ emit q->contactRemoved(true);
+ mMgr->back( mArgs, true );
+
+ CNT_EXIT
+}
+
// End of File
--- a/phonebookui/pbkcommonui/src/cntemaileditorviewitem.cpp Wed Jul 21 11:37:51 2010 +0300
+++ b/phonebookui/pbkcommonui/src/cntemaileditorviewitem.cpp Fri Jul 23 12:43:48 2010 +0300
@@ -69,7 +69,13 @@
connect( mItem->comboBox(), SIGNAL(currentIndexChanged(int)), this, SLOT(indexChanged(int)) );
connect( mItem->editor(), SIGNAL(textChanged(QString)),this, SLOT(textChanged(QString)) );
-
+
+ // Naming UI components for automation testability
+ QString editorObjName = detail.definitionName() + " line edit %1";
+ mItem->editor()->setObjectName(editorObjName.arg(modelIndex().row()));
+
+ QString comboBoxObjName = detail.definitionName() + " combo box %1";
+ mItem->comboBox()->setObjectName(comboBoxObjName.arg(modelIndex().row()));
return mItem;
}
--- a/phonebookui/pbkcommonui/src/cntfavoritesmemberview.cpp Wed Jul 21 11:37:51 2010 +0300
+++ b/phonebookui/pbkcommonui/src/cntfavoritesmemberview.cpp Fri Jul 23 12:43:48 2010 +0300
@@ -16,7 +16,7 @@
*/
#include "cntfavoritesmemberview.h"
-#include "cntfetchcontactsview.h"
+#include "cntfetchcontactpopup.h"
#include "cntglobal.h"
#include <hblistview.h>
@@ -137,16 +137,26 @@
membersFilter.setRelatedContactId(mContact->id());
mOriginalGroupMembers = getContactManager()->contactIds(membersFilter).toSet();
+ /*
if (!mFetchView) {
mFetchView = new CntFetchContacts(*getContactManager());
connect(mFetchView, SIGNAL(clicked()), this, SLOT(handleManageFavorites()));
}
mFetchView->setDetails(hbTrId("txt_phob_subtitle_favorites"), hbTrId("txt_common_button_save"));
mFetchView->displayContacts(HbAbstractItemView::MultiSelection, mOriginalGroupMembers);
+ */
+ CntFetchContactPopup* popup = CntFetchContactPopup::createMultiSelectionPopup(
+ hbTrId("txt_phob_subtitle_favorites"),
+ hbTrId("txt_common_button_save"),
+ *getContactManager());
+ connect( popup, SIGNAL(fetchReady(QSet<QContactLocalId>)), this, SLOT(handleManageFavorites(QSet<QContactLocalId>)) );
+ popup->setSelectedContacts( mOriginalGroupMembers );
+ popup->showPopup();
}
-void CntFavoritesMemberView::handleManageFavorites()
+void CntFavoritesMemberView::handleManageFavorites(QSet<QContactLocalId> aIds)
{
+/*
QSet<QContactLocalId> selectedContacts = mFetchView->getSelectedContacts();
bool saveChanges = !mFetchView->wasCanceled();
@@ -156,11 +166,11 @@
if (!saveChanges) {
return;
}
-
+*/
for (int i = 0; i < 2; ++i) {
// first iteration processes added members, second removed members
- QSet<QContactLocalId> members = (i == 0 ? selectedContacts - mOriginalGroupMembers
- : mOriginalGroupMembers - selectedContacts);
+ QSet<QContactLocalId> members = (i == 0 ? aIds - mOriginalGroupMembers
+ : mOriginalGroupMembers - aIds);
QList<QContactRelationship> memberships;
foreach (QContactLocalId id, members) {
@@ -261,7 +271,7 @@
QContact selectedContact = mModel->contact(index);
CntViewParameters viewParameters;
- viewParameters.insert(EViewId, commLauncherView);
+ viewParameters.insert(EViewId, contactCardView);
QVariant var;
var.setValue(selectedContact);
viewParameters.insert(ESelectedContact, var);
@@ -280,6 +290,9 @@
QVariant var;
var.setValue(selectedContact);
viewParameters.insert(ESelectedContact, var);
+ QVariant varGroup;
+ varGroup.setValue(*mContact);
+ viewParameters.insert(ESelectedGroupContact, varGroup);
mViewManager->changeView(viewParameters);
}
--- a/phonebookui/pbkcommonui/src/cntfavoritesview.cpp Wed Jul 21 11:37:51 2010 +0300
+++ b/phonebookui/pbkcommonui/src/cntfavoritesview.cpp Fri Jul 23 12:43:48 2010 +0300
@@ -16,7 +16,7 @@
*/
#include "cntfavoritesview.h"
-#include "cntfetchcontactsview.h"
+#include "cntfetchcontactpopup.h"
#include "cntglobal.h"
#include <hbpushbutton.h>
#include <hbaction.h>
@@ -30,8 +30,7 @@
mContact(NULL),
mView(NULL),
mSoftkey(NULL),
- mViewManager(NULL),
- mFetchView(NULL)
+ mViewManager(NULL)
{
bool ok = false;
mDocumentLoader.load(CNT_FAVORITE_UI_XML, &ok);
@@ -57,10 +56,7 @@
mView->deleteLater();
delete mContact;
- mContact = 0;
-
- delete mFetchView;
- mFetchView = 0;
+ mContact = NULL;
}
void CntFavoritesView::activate( CntAbstractViewManager* aMgr, const CntViewParameters aArgs )
@@ -85,50 +81,61 @@
void CntFavoritesView::openSelectionPopup()
{
+ /*
QSet<QContactLocalId> emptySet;
-
if (!mFetchView) {
mFetchView = new CntFetchContacts(*getContactManager());
connect(mFetchView, SIGNAL(clicked()), this, SLOT(handleMemberSelection()));
}
mFetchView->setDetails(hbTrId("txt_phob_subtitle_favorites"), hbTrId("txt_common_button_save"));
mFetchView->displayContacts(HbAbstractItemView::MultiSelection, emptySet);
+ */
+ CntFetchContactPopup* popup = CntFetchContactPopup::createMultiSelectionPopup(
+ hbTrId("txt_phob_subtitle_favorites"),
+ hbTrId("txt_common_button_save"),
+ *getContactManager());
+ connect(popup, SIGNAL(fetchReady(QSet<QContactLocalId>)),
+ this, SLOT(handleMemberSelection(QSet<QContactLocalId>)));
+ popup->showPopup();
}
-void CntFavoritesView::handleMemberSelection()
+void CntFavoritesView::handleMemberSelection( QSet<QContactLocalId> aIds )
{
- QSet<QContactLocalId> members = mFetchView->getSelectedContacts();
- QList<QContactRelationship> memberships;
- bool saveChanges = !mFetchView->wasCanceled();
+ //QSet<QContactLocalId> members = mFetchView->getSelectedContacts();
+ //bool saveChanges = !mFetchView->wasCanceled();
- delete mFetchView;
- mFetchView = 0;
-
- if (!saveChanges || members.count() == 0) {
- showPreviousView();
- return;
- }
+ //delete mFetchView;
+ //mFetchView = 0;
- foreach (QContactLocalId id, members) {
- QContact contact = getContactManager()->contact(id);
- QContactRelationship membership;
- membership.setRelationshipType(QContactRelationship::HasMember);
- membership.setFirst(mContact->id());
- membership.setSecond(contact.id());
- memberships.append(membership);
+ //if (!saveChanges || members.count() == 0)
+ if ( aIds.isEmpty() )
+ {
+ showPreviousView();
}
-
- if (!memberships.isEmpty()) {
- QMap<int, QContactManager::Error> errors;
- getContactManager()->saveRelationships(&memberships, &errors);
+ else
+ {
+ QList<QContactRelationship> memberships;
+ foreach (QContactLocalId id, aIds) {
+ QContact contact = getContactManager()->contact(id);
+ QContactRelationship membership;
+ membership.setRelationshipType(QContactRelationship::HasMember);
+ membership.setFirst(mContact->id());
+ membership.setSecond(contact.id());
+ memberships.append(membership);
+ }
+
+ if (!memberships.isEmpty()) {
+ QMap<int, QContactManager::Error> errors;
+ getContactManager()->saveRelationships(&memberships, &errors);
+ }
+
+ CntViewParameters viewParameters;
+ viewParameters.insert(EViewId, favoritesMemberView);
+ QVariant var;
+ var.setValue(*mContact);
+ viewParameters.insert(ESelectedGroupContact, var);
+ mViewManager->changeView(viewParameters);
}
-
- CntViewParameters viewParameters;
- viewParameters.insert(EViewId, FavoritesMemberView);
- QVariant var;
- var.setValue(*mContact);
- viewParameters.insert(ESelectedGroupContact, var);
- mViewManager->changeView(viewParameters);
}
void CntFavoritesView::setOrientation(Qt::Orientation orientation)
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/phonebookui/pbkcommonui/src/cntfetchcontactpopup.cpp Fri Jul 23 12:43:48 2010 +0300
@@ -0,0 +1,403 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:
+*
+*/
+#include "cntfetchcontactpopup.h"
+#include "cntdocumentloader.h"
+#include "cntfetchmarkall.h"
+#include "cntdebug.h"
+
+#include <cntlistmodel.h>
+#include <hblistview.h>
+#include <hbstyleloader.h>
+#include <hbindexfeedback.h>
+#include <hblistviewitem.h>
+#include <hbscrollbar.h>
+#include <hbmainwindow.h>
+#include <hbdialog.h>
+#include <hblabel.h>
+#include <hbsearchpanel.h>
+#include <hblineedit.h>
+#include <hbaction.h>
+#include <hbtextitem.h>
+#include <hbstaticvkbhost.h>
+
+#include <QGraphicsLinearLayout>
+#include <QCoreApplication>
+const char *CNT_FETCHLIST_XML = ":/xml/contacts_fetchdialog.docml";
+
+CntFetchContactPopup::CntFetchContactPopup( QContactManager& aMgr ) :
+mManager(aMgr),
+mPopup( NULL ),
+mListView( NULL ),
+mEmptyView( NULL ),
+mHeading( NULL ),
+mPrimaryAction( NULL ),
+mSearch( NULL ),
+mModel( NULL ),
+mMarkAll( NULL ),
+mDoc( NULL )
+{
+ mDoc = new CntDocumentLoader();
+
+ bool ok;
+ mDoc->load( CNT_FETCHLIST_XML, &ok );
+
+ if ( !ok )
+ {
+ qFatal("Unable to read %S", CNT_FETCHLIST_XML );
+ }
+ mPopup = static_cast<HbDialog*>( mDoc->findWidget( "dialog" ) );
+ mSearch = static_cast<HbSearchPanel*>( mDoc->findWidget( "searchPanel" ) );
+ mMarkAll = static_cast<CntFetchMarkAll*>( mDoc->findWidget("markAll") );
+ mEmptyView = static_cast<HbTextItem*>( mDoc->findWidget("emptyLabel" ));
+ mListView = static_cast<HbListView*>( mDoc->findWidget("listView") );
+ mHeading = static_cast<HbLabel*>( mDoc->findWidget("heading") );
+
+ connect(qApp, SIGNAL(aboutToQuit()), this, SLOT(closePopup()) );
+ connect(mPopup, SIGNAL(aboutToClose()), this, SLOT(closePopup()) );
+ connect(mSearch, SIGNAL(criteriaChanged(QString)), this, SLOT(setFilter(QString)));
+ connect(mMarkAll, SIGNAL(markAll(int)), this, SLOT(selectAll(int)) );
+
+ HbLineEdit *editor = static_cast<HbLineEdit*>( mSearch->primitive("lineedit"));
+ editor->setInputMethodHints(Qt::ImhNoPredictiveText);
+ mSearch->setCancelEnabled( false );
+
+ mVirtualKeyboard = new HbStaticVkbHost(editor);
+ connect(mVirtualKeyboard, SIGNAL(keypadOpened()), this, SLOT(handleKeypadOpen()));
+ connect(mVirtualKeyboard, SIGNAL(keypadClosed()), this, SLOT(handleKeypadClosed()));
+}
+
+CntFetchContactPopup::~CntFetchContactPopup()
+{
+ delete mDoc;
+}
+
+CntFetchContactPopup* CntFetchContactPopup::createMultiSelectionPopup( QString aTitle, QString aAction, QContactManager& aManager )
+{
+ CntFetchContactPopup* popup = new CntFetchContactPopup( aManager );
+ popup->constructPopupDialog( aTitle, aAction, HbAbstractItemView::MultiSelection );
+
+ return popup;
+}
+
+CntFetchContactPopup* CntFetchContactPopup::createSingleSelectionPopup( QString aTitle, QContactManager& aManager )
+{
+ CntFetchContactPopup* popup = new CntFetchContactPopup( aManager );
+ popup->constructPopupDialog( aTitle, "", HbAbstractItemView::NoSelection );
+
+ return popup;
+}
+
+void CntFetchContactPopup::setSelectedContacts( QSet<QContactLocalId> aIds )
+{
+ CNT_ENTRY
+ if ( mListView->selectionMode() == HbAbstractItemView::MultiSelection )
+ {
+ mIdList.clear();
+
+ foreach ( QContactLocalId id, aIds )
+ {
+ mIdList.append( id );
+ QContact contact = mManager.contact(id);
+ QModelIndex contactIndex = mModel->indexOfContact(contact);
+ mSelectionModel->select( contactIndex, QItemSelectionModel::Select );
+ }
+ }
+ CNT_EXIT
+}
+
+void CntFetchContactPopup::showPopup()
+{
+ CNT_ENTRY
+ HbMainWindow* window = mPopup->mainWindow();
+ if ( window )
+ {
+ connect(window, SIGNAL(orientationChanged(Qt::Orientation)),
+ this, SLOT(loadLayout(Qt::Orientation)) );
+ }
+
+ mPopup->open( this, SLOT(dialogDismissed(HbAction*)) );
+ CNT_EXIT
+}
+
+void CntFetchContactPopup::handleKeypadOpen()
+{
+ CNT_ENTRY
+ qreal height = mPopup->size().height() -
+ mVirtualKeyboard->keyboardArea().height() -
+ mSearch->size().height();
+
+ // in single selection we don't have the "mark all" option
+ if ( mMarkAll )
+ {
+ height = height - mMarkAll->size().height();
+ }
+
+ mEmptyView->setMaximumHeight( height );
+ mListView->setMaximumHeight( height );
+ CNT_EXIT
+}
+
+void CntFetchContactPopup::handleKeypadClosed()
+{
+ CNT_ENTRY
+
+ qreal height = mPopup->size().height() - mSearch->size().height();
+ if ( mMarkAll )
+ {
+ height = height - mMarkAll->size().height();
+ }
+
+ mListView->setMaximumHeight( height );
+ mEmptyView->setMaximumHeight( height );
+ CNT_EXIT
+}
+
+void CntFetchContactPopup::contactSelected( const QModelIndex& aIndex )
+{
+ CNT_ENTRY
+ if ( aIndex.isValid() )
+ {
+ QContact contact = mModel->contact( aIndex );
+ mIdList.append( contact.localId() );
+
+ emit fetchReady( mIdList.toSet() );
+ }
+
+ disconnect(mListView, SIGNAL(activated(const QModelIndex&)),
+ this, SLOT(contactSelected(const QModelIndex&)) );
+ mPopup->close();
+ CNT_EXIT
+}
+
+void CntFetchContactPopup::contactsSelected(
+ const QItemSelection& aSelected,
+ const QItemSelection& aDeselected )
+{
+ CNT_ENTRY
+
+ // remove all deselected items
+ foreach ( QModelIndex index, aDeselected.indexes() )
+ {
+ QContact contact = mModel->contact( index );
+ QContactLocalId id = contact.localId();
+ if ( mIdList.contains(id) )
+ {
+ mIdList.removeAll( id );
+ }
+ }
+
+ // add all selected items
+ foreach ( QModelIndex index, aSelected.indexes() )
+ {
+ QContact contact = mModel->contact( index );
+ QContactLocalId id = contact.localId();
+ if ( !mIdList.contains(id) )
+ {
+ mIdList.append( id );
+ }
+ }
+
+ mMarkAll->setSelectedContactCount( mIdList.size() );
+
+ CNT_EXIT
+}
+
+void CntFetchContactPopup::selectAll( int aState )
+{
+ CNT_ENTRY
+ if ( mListView->selectionMode() == HbAbstractItemView::MultiSelection )
+ {
+ switch ( aState )
+ {
+ case Qt::Checked:
+ mListView->selectAll();
+ mMarkAll->setSelectedContactCount( mIdList.count() );
+ break;
+
+ case Qt::Unchecked:
+ mListView->clearSelection();
+ mMarkAll->setSelectedContactCount( 0 );
+ break;
+ default:
+ break;
+ }
+ }
+ CNT_EXIT
+}
+
+void CntFetchContactPopup::dialogDismissed( HbAction* aAction )
+{
+ CNT_ENTRY
+
+ if ( aAction != mPrimaryAction )
+ {
+ emit fetchCancelled();
+ }
+ else if ( aAction )
+ {
+ disconnect(mSelectionModel, SIGNAL(selectionChanged(const QItemSelection&,const QItemSelection&)),
+ this, SLOT(contactsSelected(const QItemSelection&, const QItemSelection&)) );
+
+ QModelIndexList indexList = mSelectionModel->selectedIndexes();
+ foreach ( QModelIndex index, indexList )
+ {
+ QContact contact = mModel->contact( index );
+ mIdList.append( contact.localId() );
+ }
+ emit fetchReady( mIdList.toSet() );
+ }
+ else
+ {
+ // ignore.
+ }
+ CNT_EXIT
+}
+
+void CntFetchContactPopup::setFilter( const QString& aFilter )
+{
+ CNT_ENTRY
+ QContactDetailFilter detailfilter;
+ detailfilter.setMatchFlags( QContactFilter::MatchStartsWith );
+ detailfilter.setValue( aFilter.split(QRegExp("\\s+"), QString::SkipEmptyParts) );
+ detailfilter.setDetailDefinitionName(
+ QContactDisplayLabel::DefinitionName,
+ QContactDisplayLabel::FieldLabel);
+
+ mModel->setFilter(detailfilter);
+
+ HbMainWindow* window = mPopup->mainWindow();
+ if ( window )
+ {
+ loadLayout( window->orientation() );
+ }
+
+ setSelectedContacts( mIdList.toSet() );
+ CNT_EXIT
+}
+
+void CntFetchContactPopup::constructPopupDialog( QString aTitle, QString aAction, HbAbstractItemView::SelectionMode aMode )
+{
+ CNT_ENTRY
+ mIdList.clear();
+ mTitle = aTitle;
+
+ mPopup->setAttribute( Qt::WA_DeleteOnClose, true );
+
+ QContactDetailFilter contactsFilter;
+ contactsFilter.setDetailDefinitionName(QContactType::DefinitionName, QContactType::FieldType);
+ contactsFilter.setValue(QString(QLatin1String(QContactType::TypeContact)));
+
+ mModel = new CntListModel( &mManager, contactsFilter, false);
+ mModel->showMyCard(false);
+ mSelectionModel = new QItemSelectionModel( mModel );
+
+ mListView->setFrictionEnabled(true);
+ mListView->setScrollingStyle(HbScrollArea::PanWithFollowOn);
+ mListView->verticalScrollBar()->setInteractive(true);
+
+ HbIndexFeedback* indexFeedback = new HbIndexFeedback(mPopup);
+ indexFeedback->setIndexFeedbackPolicy(HbIndexFeedback::IndexFeedbackSingleCharacter);
+ indexFeedback->setItemView(mListView);
+
+ HbListViewItem *prototype = mListView->listItemPrototype();
+ prototype->setGraphicsSize(HbListViewItem::Thumbnail);
+ prototype->setStretchingStyle(HbListViewItem::StretchLandscape);
+
+ mListView->setSelectionMode( aMode );
+ mListView->setModel( mModel );
+ mListView->setSelectionModel( mSelectionModel );
+
+ HbMainWindow* window = mPopup->mainWindow();
+ if ( window )
+ {
+ loadLayout( window->orientation() );
+ }
+
+ if ( !aAction.isEmpty() )
+ {
+ mPrimaryAction = new HbAction( aAction, mPopup );
+ mPopup->addAction( mPrimaryAction );
+ }
+
+ HbAction* secondaryAction = new HbAction(hbTrId("txt_common_button_cancel"), mPopup);
+ mPopup->addAction( secondaryAction );
+
+ if ( aMode != HbListView::MultiSelection )
+ {
+ connect(mListView, SIGNAL(activated(const QModelIndex&)),
+ this, SLOT(contactSelected(const QModelIndex&)) );
+ mMarkAll->setVisible( false );
+ }
+ else
+ {
+ mMarkAll->setSelectedContactCount( 0 );
+ mMarkAll->setMaxContactCount( mModel->rowCount() );
+ connect(mSelectionModel, SIGNAL(selectionChanged(const QItemSelection&,const QItemSelection&)),
+ this, SLOT(contactsSelected(const QItemSelection&, const QItemSelection&)) );
+
+ }
+
+ CNT_EXIT
+}
+
+void CntFetchContactPopup::loadLayout( Qt::Orientation aOrientation )
+{
+ CNT_ENTRY
+
+ bool multi = mListView->selectionMode() == HbAbstractItemView::MultiSelection;
+ if ( mModel->rowCount() > 0 )
+ {
+ if ( aOrientation == Qt::Horizontal )
+ {
+ mPopup->setHeadingWidget( NULL );
+ mDoc->load( CNT_FETCHLIST_XML, "find_list_landscape");
+ }
+ else
+ {
+ mHeading = new HbLabel( mTitle );
+ mPopup->setHeadingWidget( mHeading );
+ mDoc->load( CNT_FETCHLIST_XML, multi ? "find_list" : "find_list_single");
+ }
+ }
+ else
+ {
+ if ( aOrientation == Qt::Horizontal )
+ {
+ mPopup->setHeadingWidget( NULL );
+ mDoc->load( CNT_FETCHLIST_XML, "find_empty_landscape" );
+ }
+ else
+ {
+ mHeading = new HbLabel( mTitle );
+ mPopup->setHeadingWidget( mHeading );
+ mDoc->load( CNT_FETCHLIST_XML, multi ? "find_empty" : "find_empty_single" );
+ }
+ }
+
+ CNT_EXIT
+}
+
+void CntFetchContactPopup::closePopup()
+{
+ CNT_ENTRY
+ disconnect(mVirtualKeyboard, SIGNAL(keypadOpened()), this, SLOT(handleKeypadOpen()));
+ disconnect(mVirtualKeyboard, SIGNAL(keypadClosed()), this, SLOT(handleKeypadClosed()));
+
+ deleteLater();
+ CNT_EXIT
+}
+// End of File
--- a/phonebookui/pbkcommonui/src/cntfetchcontactsview.cpp Wed Jul 21 11:37:51 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,356 +0,0 @@
-/*
-* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:
-*
-*/
-
-#include "cntfetchcontactsview.h"
-
-#include <cntlistmodel.h>
-
-#include <QGraphicsLinearLayout>
-
-#include <qcontactid.h>
-#include <hbdialog.h>
-#include <hbscrollbar.h>
-#include <hbindexfeedback.h>
-#include <hbaction.h>
-#include <hblabel.h>
-#include <hbaction.h>
-#include <hblineedit.h>
-#include <hbmainwindow.h>
-#include <hblistviewitem.h>
-#include <hblistview.h>
-#include <hbsearchpanel.h>
-#include <hbstaticvkbhost.h>
-
-/*!
-Given a contact manager, CntFetchContacts is responsible for
-retrieving a set of contacts, if any were chosen by the user.
-*/
-CntFetchContacts::CntFetchContacts(QContactManager &aManager) :
- QObject(),
- mPopup(NULL),
- mCntModel(NULL),
- mListView(NULL),
- mEmptyListLabel(NULL),
- mSelectionMode(HbAbstractItemView::MultiSelection),
- mManager(&aManager),
- mWasCanceled(false),
- mLabel(NULL),
- mVirtualKeyboard(NULL),
- mPrimaryAction(NULL),
- mSecondaryAction(NULL),
- mIndexFeedback(NULL)
-{
- mSearchPanel = new HbSearchPanel();
- mSearchPanel->setVisible(false);
- mSearchPanel->setCancelEnabled(false);
- connect(mSearchPanel, SIGNAL(criteriaChanged(QString)), this, SLOT(setFilter(QString)));
-
- HbLineEdit *editor = static_cast<HbLineEdit*>(mSearchPanel->primitive("lineedit"));
- editor->setInputMethodHints(Qt::ImhNoPredictiveText);
-
- mLayout = new QGraphicsLinearLayout(Qt::Vertical);
-
- mContainerWidget = new HbWidget();
-}
-
-CntFetchContacts::~CntFetchContacts()
-{
- delete mCntModel;
- mCntModel = NULL;
-}
-
-/*!
-Query to see if the user decided to press Cancel after selecting
-group members. Must be called to see if results are valid.
-*/
-bool CntFetchContacts::wasCanceled() const
-{
- return mWasCanceled;
-}
-
-void CntFetchContacts::setDetails(QString aTitle, QString aButtonText)
-{
- mButtonText = aButtonText;
-
- if (!mLabel) {
- mLabel = new HbLabel(aTitle);
- }
- else {
- mLabel->setPlainText(aTitle);
- }
-}
-
-/*!
-Brings up a list of contacts, awaiting user response. This function is asynchronous.
-When a response is given, a clicked signal will be sent.
-*/
-void CntFetchContacts::displayContacts(HbAbstractItemView::SelectionMode aMode,
- QSet<QContactLocalId> aContacts)
-{
- doInitialize(aMode,aContacts);
- markMembersInView();
- showPopup();
-}
-
-QSet<QContactLocalId> CntFetchContacts::getSelectedContacts() const
-{
- return mCurrentlySelected;
-}
-
-void CntFetchContacts::setFilter(const QString &filterString)
-{
- QStringList searchList = filterString.split(QRegExp("\\s+"), QString::SkipEmptyParts);
-
- QContactDetailFilter detailfilter;
- detailfilter.setDetailDefinitionName(QContactDisplayLabel::DefinitionName, QContactDisplayLabel::FieldLabel);
- detailfilter.setMatchFlags(QContactFilter::MatchStartsWith);
- detailfilter.setValue(searchList);
-
- mCntModel->setFilter(detailfilter);
-
- markMembersInView();
-
- if (mCntModel->rowCount() == 0) {
- mLayout->removeItem(mListView);
-
- if (mEmptyListLabel) {
- qreal searchHeight = mSearchPanel->size().height();
- HbLabel* heading = static_cast<HbLabel*>(mPopup->headingWidget());
- qreal heightToSet = mPopup->size().height() - mVirtualKeyboard->keyboardArea().height() - searchHeight;
- mEmptyListLabel->setMaximumHeight(heightToSet);
- mEmptyListLabel->setVisible(true);
- mLayout->insertItem(0, mEmptyListLabel);
- }
-
- mListView->setVisible(false);
- mSearchPanel->setVisible(true);
- }
- else {
- if (mEmptyListLabel) {
- mEmptyListLabel->setVisible(false);
- }
- mLayout->removeItem(mEmptyListLabel);
- mLayout->insertItem(0, mListView);
- mListView->setVisible(true);
- }
-}
-
-void CntFetchContacts::handleKeypadOpen()
-{
- qreal searchHeight = mSearchPanel->size().height();
- HbLabel* heading = static_cast<HbLabel*>(mPopup->headingWidget());
- qreal heightToSet = mPopup->size().height() - mVirtualKeyboard->keyboardArea().height() - searchHeight;
-
- if (mEmptyListLabel) {
- mEmptyListLabel->setMaximumHeight(heightToSet);
- }
-
- mListView->setMaximumHeight(heightToSet);
-}
-
-void CntFetchContacts::handleKeypadClose()
-{
- mListView->setMaximumHeight(mPopup->size().height());
-
- if (mEmptyListLabel) {
- mEmptyListLabel->setMaximumHeight(mPopup->size().height());
- }
-}
-
-/*!
-Notify client that we're done.
-*/
-void CntFetchContacts::handleUserResponse(HbAction* action)
-{
- bool userCanceled = (action == mSecondaryAction);
- if (userCanceled) {
- mCurrentlySelected.clear();
-
- mWasCanceled = true;
- }
- else {
- mWasCanceled = false;
- }
-
- mPopup->setVisible(false);
- mListView->setModel(NULL);
- delete mCntModel;
- mCntModel = NULL;
-
- emit clicked();
-}
-
-void CntFetchContacts::memberSelectionChanged(const QModelIndex &index)
-{
- if (!index.isValid()) return;
-
- if (mSelectionMode == HbAbstractItemView::SingleSelection) {
- mCurrentlySelected.clear();
- }
-
- QContactLocalId contactId = mCntModel->contact(index).localId();
-
- bool isSelected = mListView->selectionModel()->isSelected(index);
- if (isSelected != mCurrentlySelected.contains(contactId)) {
- if (isSelected) {
- mCurrentlySelected.insert(contactId);
- }
- else {
- mCurrentlySelected.remove(contactId);
- }
- }
-
- // Check for the case where there is a cancel button only. If so,
- // after selecting any contact, should dismiss the dialog immediately.
- if (mButtonText.isEmpty() && mSelectionMode == HbAbstractItemView::SingleSelection) {
- disconnect(mVirtualKeyboard, SIGNAL(keypadOpened()), this, SLOT(handleKeypadOpen()));
- disconnect(mVirtualKeyboard, SIGNAL(keypadClosed()), this, SLOT(handleKeypadClose()));
- mPopup->close();
- }
-}
-
-void CntFetchContacts::doInitialize(HbAbstractItemView::SelectionMode aMode,
- QSet<QContactLocalId> aContacts)
-{
- mSelectionMode = aMode;
- mCurrentlySelected = aContacts;
-
- if (!mPopup) {
- mPopup = new HbDialog;
- mPopup->setAttribute(Qt::WA_DeleteOnClose, true);
- }
-
- QContactDetailFilter contactsFilter;
- contactsFilter.setDetailDefinitionName(QContactType::DefinitionName, QContactType::FieldType);
- contactsFilter.setValue(QString(QLatin1String(QContactType::TypeContact)));
- if (!mCntModel) {
- mCntModel = new CntListModel(mManager, contactsFilter, false);
- }
-
- if (!mListView) {
- mListView = new HbListView(mPopup);
- mListView->setModel(mCntModel);
- mListView->setSelectionMode(mSelectionMode);
- mListView->setFrictionEnabled(true);
- mListView->setScrollingStyle(HbScrollArea::PanWithFollowOn);
- mListView->verticalScrollBar()->setInteractive(true);
-
- HbListViewItem *prototype = mListView->listItemPrototype();
- prototype->setGraphicsSize(HbListViewItem::Thumbnail);
- prototype->setStretchingStyle(HbListViewItem::StretchLandscape);
-
- mIndexFeedback = new HbIndexFeedback(mPopup);
- mIndexFeedback->setIndexFeedbackPolicy(HbIndexFeedback::IndexFeedbackSingleCharacter);
- mIndexFeedback->setItemView(mListView);
-
- // Note that the layout takes ownership of the item(s) it contains.
- if (mCntModel->rowCount()== 0) {
- mListView->setVisible(false);
- if (!mEmptyListLabel) {
- mEmptyListLabel = new HbTextItem(hbTrId("txt_phob_info_no_matching_contacts"));
- mEmptyListLabel->setSizePolicy(QSizePolicy::MinimumExpanding, QSizePolicy::MinimumExpanding);
- mEmptyListLabel->setFontSpec(HbFontSpec(HbFontSpec::Primary));
- mEmptyListLabel->setAlignment(Qt::AlignCenter);
- mLayout->insertItem(0, mEmptyListLabel);
- }
- }
- else {
- mLayout->addItem(mListView);
- }
-
- mCntModel->showMyCard(false);
- }
-
- // Handle the case where the model was removed for the list view
- if (!mListView->model()) {
- mListView->setModel(mCntModel);
- }
-
- // Main window is NULL in unit tests
- HbMainWindow* window = mListView->mainWindow();
- if (window) {
- mContainerWidget->setPreferredHeight(mListView->mainWindow()->size().height());
- }
- mContainerWidget->setSizePolicy(QSizePolicy::Preferred, QSizePolicy::Preferred);
-
- mSearchPanel->setVisible(true);
- mLayout->addItem(mSearchPanel);
- mContainerWidget->setLayout(mLayout);
-
- connect(mListView, SIGNAL(activated(const QModelIndex&)),
- this, SLOT(memberSelectionChanged(const QModelIndex&)), Qt::UniqueConnection);
-}
-
-void CntFetchContacts::showPopup()
-{
- mPopup->setTimeout(HbPopup::NoTimeout);
- mPopup->setDismissPolicy(HbPopup::NoDismiss);
- mPopup->setModal(true);
- mPopup->setContentWidget(mContainerWidget);
-
- if (!mVirtualKeyboard) {
- mVirtualKeyboard = new HbStaticVkbHost(mPopup);
- connect(mVirtualKeyboard, SIGNAL(keypadOpened()), this, SLOT(handleKeypadOpen()));
- connect(mVirtualKeyboard, SIGNAL(keypadClosed()), this, SLOT(handleKeypadClose()));
- }
-
- if (!mLabel) {
- mLabel = new HbLabel(hbTrId("txt_phob_title_contacts"));
- }
- mPopup->setHeadingWidget(mLabel);
-
- if (!mButtonText.isEmpty() && !mPrimaryAction) {
- mPrimaryAction = new HbAction(mButtonText, mPopup);
- mPopup->addAction(mPrimaryAction);
- }
-
- if (!mSecondaryAction) {
- mSecondaryAction = new HbAction(hbTrId("txt_common_button_cancel"), mPopup);
- mPopup->addAction(mSecondaryAction);
- }
-
- mPopup->open(this, SLOT(handleUserResponse(HbAction*)));
-}
-
-void CntFetchContacts::markMembersInView()
-{
- // If there are no contacts matching the current filter,
- // show "no matching contacts" label
- if (mCntModel->rowCount() == 0) {
- if (!mEmptyListLabel) {
- mEmptyListLabel = new HbTextItem(hbTrId("txt_phob_info_no_matching_contacts"));
- mEmptyListLabel->setSizePolicy(QSizePolicy::MinimumExpanding, QSizePolicy::MinimumExpanding);
- mEmptyListLabel->setFontSpec(HbFontSpec(HbFontSpec::Primary));
- mEmptyListLabel->setAlignment(Qt::AlignCenter);
- mLayout->insertItem(1, mEmptyListLabel);
- }
- }
- else {
- mLayout->removeItem(mEmptyListLabel);
- delete mEmptyListLabel;
- mEmptyListLabel = 0;
- }
-
- // Mark group members in the listview
- foreach (QContactLocalId id, mCurrentlySelected) {
- QContact contact = mManager->contact(id);
- QModelIndex contactIndex = mCntModel->indexOfContact(contact);
- mListView->selectionModel()->select(contactIndex, QItemSelectionModel::Select);
- }
-}
-
-// End of file
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/phonebookui/pbkcommonui/src/cntfetchmarkall.cpp Fri Jul 23 12:43:48 2010 +0300
@@ -0,0 +1,68 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:
+*
+*/
+
+#include "cntfetchmarkall.h"
+
+#include <QGraphicsLinearLayout>
+#include <hbcheckbox.h>
+#include <hbtextitem.h>
+#include <hbframeitem.h>
+
+CntFetchMarkAll::CntFetchMarkAll(QGraphicsItem *aParent)
+: HbWidget(aParent),
+ mCheckBox(NULL),
+ mCounterLabel(NULL),
+ mContactCount( 0 ),
+ mSelectionCount( 0 )
+{
+ setSizePolicy( QSizePolicy::MinimumExpanding, QSizePolicy::Fixed );
+
+ mCheckBox = new HbCheckBox(this);
+ mCheckBox->setText(hbTrId("txt_common_list_mark_all_items"));
+ mCheckBox->setSizePolicy(QSizePolicy::MinimumExpanding, QSizePolicy::MinimumExpanding);
+
+ connect(mCheckBox, SIGNAL(stateChanged(int)), this, SIGNAL(markAll(int)) );
+
+ mCounterLabel = new HbTextItem( this );
+
+ mFrame = new HbFrameItem(this);
+ mFrame->frameDrawer().setFrameGraphicsName("qtg_fr_groupbox_normal");
+ mFrame->frameDrawer().setFrameType(HbFrameDrawer::NinePieces);
+ mFrame->setZValue(-2);
+ style()->setItemName(mFrame, "background");
+
+ HbStyle::setItemName(mCheckBox,"checkbox");
+ HbStyle::setItemName(mCounterLabel,"counter");
+}
+
+void CntFetchMarkAll::setMaxContactCount( int aContactCount )
+{
+ mContactCount = aContactCount;
+ mCounterLabel->setText( QString("%1/%2").arg(mSelectionCount).arg(mContactCount) );
+}
+
+void CntFetchMarkAll::setSelectedContactCount( int aSelectedCount )
+{
+ mSelectionCount = aSelectedCount;
+ mCounterLabel->setText( QString("%1/%2").arg(mSelectionCount).arg(mContactCount) );
+}
+
+CntFetchMarkAll::~CntFetchMarkAll()
+{
+}
+
+// EOF
--- a/phonebookui/pbkcommonui/src/cntgroupactionsview.cpp Wed Jul 21 11:37:51 2010 +0300
+++ b/phonebookui/pbkcommonui/src/cntgroupactionsview.cpp Fri Jul 23 12:43:48 2010 +0300
@@ -125,7 +125,8 @@
mGroupContact = new QContact(aArgs.value(ESelectedGroupContact).value<QContact>());
mViewManager = aMgr;
- QString groupName = mGroupContact->displayLabel();
+ QContactName contactName = mGroupContact->detail( QContactName::DefinitionName );
+ QString groupName = contactName.value( QContactName::FieldCustomLabel );
if (groupName.isEmpty())
{
groupName = hbTrId("txt_phob_list_unnamed");
@@ -194,7 +195,8 @@
if (index.isValid()) {
//reset flags
mPopupCount=0;
- mActionParams.clear();
+ mEmailActionParams.clear();
+ mMessageActionParams.clear();
QString action = mModel->item(index.row())->data(Qt::UserRole+1).toString();
@@ -219,11 +221,11 @@
if (!preferredDetail.isEmpty()) {
if(action.compare("message", Qt::CaseInsensitive) == 0) {
QContactPhoneNumber phoneNumber = contact.detail<QContactPhoneNumber>();
- mActionParams.append(phoneNumber.number());
+ mMessageActionParams.insert(phoneNumber.number(),QVariant(contact.displayLabel()));
}
else {
QContactEmailAddress email = contact.detail<QContactEmailAddress>();
- mActionParams.append(email.emailAddress());
+ mEmailActionParams.append(email.emailAddress());
}
}
else {
@@ -245,7 +247,12 @@
if (mPopupCount==0) {
QVariantMap map;
QVariant params;
- params.setValue(mActionParams);
+ if (action.compare("message", Qt::CaseInsensitive) == 0) {
+ params.setValue(mMessageActionParams);
+ }
+ else if (action.compare("email", Qt::CaseInsensitive) == 0) {
+ params.setValue(mEmailActionParams);
+ }
map.insert(action,params);
CntActionLauncher* other = new CntActionLauncher(*mViewManager->contactManager(SYMBIAN_BACKEND), action);
connect(other, SIGNAL(actionExecuted(CntActionLauncher*)), this, SLOT(actionExecuted(CntActionLauncher*)));
@@ -261,11 +268,11 @@
if (action.compare("message", Qt::CaseInsensitive) == 0) {
QContactPhoneNumber phoneNumber = static_cast<QContactPhoneNumber>(detail);
- mActionParams.append(phoneNumber.number());
+ mMessageActionParams.insert(phoneNumber.number(),QVariant(contact.displayLabel()));
}
else if (action.compare("email", Qt::CaseInsensitive) == 0) {
QContactEmailAddress email = static_cast<QContactEmailAddress>(detail);
- mActionParams.append(email.emailAddress());
+ mEmailActionParams.append(email.emailAddress());
}
//actionpopup executed, decrement counter
@@ -273,7 +280,12 @@
if (mPopupCount==0) {
QVariantMap map;
QVariant params;
- params.setValue(mActionParams);
+ if (action.compare("message", Qt::CaseInsensitive) == 0) {
+ params.setValue(mMessageActionParams);
+ }
+ else if (action.compare("email", Qt::CaseInsensitive) == 0) {
+ params.setValue(mEmailActionParams);
+ }
map.insert(action,params);
CntActionLauncher* other = new CntActionLauncher(*mViewManager->contactManager(SYMBIAN_BACKEND), action);
--- a/phonebookui/pbkcommonui/src/cntgroupmemberview.cpp Wed Jul 21 11:37:51 2010 +0300
+++ b/phonebookui/pbkcommonui/src/cntgroupmemberview.cpp Fri Jul 23 12:43:48 2010 +0300
@@ -16,7 +16,7 @@
*/
#include "cntgroupmemberview.h"
-#include "cntfetchcontactsview.h"
+#include "cntfetchcontactpopup.h"
#include "cntcontactcardheadingitem.h"
#include "cntglobal.h"
#include "cntimagelabel.h"
@@ -36,6 +36,7 @@
#include <thumbnailmanager_qt.h>
#include <cntlistmodel.h>
#include <hbmainwindow.h>
+#include <xqservicerequest.h>
#include "cntdocumentloader.h"
@@ -63,7 +64,6 @@
mModel(NULL),
mImageLabel(NULL),
mListView(NULL),
- mFetchView(NULL),
mAvatar(NULL)
{
mDocument = new CntDocumentLoader;
@@ -124,13 +124,10 @@
mView->deleteLater();
delete mGroupContact;
- mGroupContact = 0;
+ mGroupContact = NULL;
delete mModel;
- mModel = 0;
-
- delete mFetchView;
- mFetchView = 0;
+ mModel = NULL;
delete mAvatar;
mAvatar = NULL;
@@ -203,7 +200,7 @@
if (mArgs.value(ESelectedAction).toString() == CNT_SAVE_ACTION)
{
- QString name = getContactManager()->synthesizedDisplayLabel(*mGroupContact);
+ QString name = getContactManager()->synthesizedContactDisplayLabel(*mGroupContact);
HbNotificationDialog::launchDialog(HbParameterLengthLimiter(hbTrId("txt_phob_dpophead_new_group_1_created").arg(name)));
}
}
@@ -240,56 +237,46 @@
membersFilter.setRelationshipType(QContactRelationship::HasMember);
membersFilter.setRelatedContactRole(QContactRelationship::First);
membersFilter.setRelatedContactId(mGroupContact->id());
+
mOriginalGroupMembers = getContactManager()->contactIds(membersFilter);
- QSet<QContactLocalId> contactsSet = mOriginalGroupMembers.toSet();
-
- QString groupName = mGroupContact->displayLabel();
+ QContactName contactName = mGroupContact->detail( QContactName::DefinitionName );
+ QString groupName = contactName.value( QContactName::FieldCustomLabel );
if (groupName.isEmpty())
{
groupName = hbTrId("txt_phob_list_unnamed");
}
- if (!mFetchView) {
- mFetchView = new CntFetchContacts(*mViewManager->contactManager( SYMBIAN_BACKEND ));
- connect(mFetchView, SIGNAL(clicked()), this, SLOT(handleManageMembers()));
- }
- mFetchView->setDetails(HbParameterLengthLimiter(hbTrId("txt_phob_title_members_of_1_group")).arg(groupName),
- hbTrId("txt_common_button_save"));
- mFetchView->displayContacts(HbAbstractItemView::MultiSelection, contactsSet);
+ CntFetchContactPopup* popup = CntFetchContactPopup::createMultiSelectionPopup(
+ HbParameterLengthLimiter(hbTrId("txt_phob_title_members_of_1_group")).arg(groupName),
+ hbTrId("txt_common_button_save"),
+ *mViewManager->contactManager(SYMBIAN_BACKEND));
+ connect( popup, SIGNAL(fetchReady(QSet<QContactLocalId>)),this, SLOT(handleManageMembers(QSet<QContactLocalId>)) );
+ popup->setSelectedContacts( mOriginalGroupMembers.toSet() );
+ popup->showPopup();
}
-void CntGroupMemberView::handleManageMembers()
+void CntGroupMemberView::handleManageMembers(QSet<QContactLocalId> aIds)
{
-
- QSet<QContactLocalId> selectedContacts = mFetchView->getSelectedContacts();
-
- if (mFetchView->wasCanceled()) {
- delete mFetchView;
- mFetchView = 0;
- return;
- }
-
QList<QContactRelationship> removedMemberships;
QList<QContactRelationship> addedMemberships;
- QSet<QContactLocalId> removedMembers = mOriginalGroupMembers.toSet() - selectedContacts;
+ QSet<QContactLocalId> removedMembers = mOriginalGroupMembers.toSet() - aIds;
setRelationship(removedMembers, removedMemberships);
- QSet<QContactLocalId> addedMembers = selectedContacts - mOriginalGroupMembers.toSet();
+ QSet<QContactLocalId> addedMembers = aIds - mOriginalGroupMembers.toSet();
setRelationship(addedMembers, addedMemberships);
QMap<int, QContactManager::Error> errors;
- if (!addedMemberships.isEmpty()) {
+ if (!addedMemberships.isEmpty())
+ {
getContactManager()->saveRelationships(&addedMemberships, &errors);
}
- if (!removedMemberships.isEmpty()) {
+ if (!removedMemberships.isEmpty())
+ {
getContactManager()->removeRelationships(removedMemberships, &errors);
}
-
- delete mFetchView;
- mFetchView = 0;
}
void CntGroupMemberView::createModel()
@@ -314,7 +301,8 @@
void CntGroupMemberView::deleteGroup()
{
- QString groupName = mGroupContact->displayLabel();
+ QContactName contactName = mGroupContact->detail( QContactName::DefinitionName );
+ QString groupName = contactName.value( QContactName::FieldCustomLabel );
if (groupName.isNull())
{
groupName = hbTrId("txt_phob_list_unnamed");
@@ -352,14 +340,17 @@
HbAction *removeFromGroupAction = 0;
HbAction *openContactAction = 0;
HbAction *editContactAction = 0;
+ HbAction *sendToHsAction = 0;
openContactAction = menu->addAction(hbTrId("txt_common_menu_open"));
editContactAction = menu->addAction(hbTrId("txt_common_menu_edit"));
removeFromGroupAction = menu->addAction(hbTrId("txt_phob_menu_remove_from_group"));
+ sendToHsAction = menu->addAction(hbTrId("txt_phob_menu_send_to_homescreen"));
openContactAction->setData( data );
editContactAction->setData( data );
removeFromGroupAction->setData( data );
+ sendToHsAction->setData( data );
menu->open(this, SLOT(handleMenu(HbAction*)));
}
@@ -382,15 +373,34 @@
{
removeFromGroup(index);
}
+ else if (action == menuItem->actions().at(3))
+ {
+ sendToHs(index);
+ }
}
+/*!
+Called after user clicked on the listview.
+*/
+void CntGroupMemberView::sendToHs(const QModelIndex &index)
+{
+ QVariantHash preferences;
+ preferences["contactId"] = mModel->contact(index).id().localId();
+
+ XQServiceRequest snd("com.nokia.symbian.IHomeScreenClient",
+ "addWidget(QString,QVariantHash)",
+ false);
+ snd << QString("contactwidgethsplugin");
+ snd << preferences;
+ snd.send();
+}
/*!
Called after user clicked on the listview.
*/
void CntGroupMemberView::showContactView(const QModelIndex &index)
{
- mArgs.insert(EViewId, commLauncherView);
+ mArgs.insert(EViewId, contactCardView);
QVariant var;
var.setValue(mModel->contact(index));
mArgs.insert(ESelectedContact, var);
@@ -429,12 +439,11 @@
Q_UNUSED(error);
if (!error)
{
- QIcon qicon(pixmap);
- HbIcon icon(qicon);
+ HbIcon icon(pixmap);
mHeadingItem->setIcon(icon);
mImageLabel->clear();
- mImageLabel->setIcon(icon);
+ mImageLabel->setIcon(pixmap);
}
}
@@ -504,7 +513,7 @@
}
mAvatar->setImageUrl(QUrl());
mImageLabel->clear();
- mImageLabel->setIcon(HbIcon("qtg_large_add_group_picture"));
+ mImageLabel->setAvatarIcon(HbIcon("qtg_large_add_group_picture"));
mHeadingItem->setIcon(HbIcon("qtg_large_add_group_picture"));
mViewManager->contactManager( SYMBIAN_BACKEND )->saveContact(mGroupContact);
}
--- a/phonebookui/pbkcommonui/src/cnthistoryview.cpp Wed Jul 21 11:37:51 2010 +0300
+++ b/phonebookui/pbkcommonui/src/cnthistoryview.cpp Fri Jul 23 12:43:48 2010 +0300
@@ -30,9 +30,12 @@
#include <hbparameterlengthlimiter.h>
#include <hbmainwindow.h>
#include <hbframebackground.h>
+#include <QTimer>
+#include <qtcontacts.h>
#include "cnthistoryviewitem.h"
#include "cntglobal.h"
+#include "cntdebug.h"
const char *CNT_HISTORYVIEW_XML = ":/xml/contacts_history.docml";
@@ -99,6 +102,9 @@
*/
void CntHistoryView::deactivate()
{
+ QContactManager* cm = mViewMgr->contactManager(SYMBIAN_BACKEND);
+ disconnect(cm, SIGNAL(contactsRemoved(const QList<QContactLocalId>&)),
+ this, SLOT(contactDeletedFromOtherSource(const QList<QContactLocalId>&)));
}
/**
@@ -108,6 +114,8 @@
{
mViewMgr = aMgr;
mArgs = aArgs;
+
+ QContactManager* cm = mViewMgr->contactManager(SYMBIAN_BACKEND);
mContact = new QContact(mArgs.value(ESelectedContact).value<QContact>());
// Set history view heading
@@ -130,8 +138,7 @@
// Connect listview items to respective slots
connect(mHistoryListView, SIGNAL(activated(const QModelIndex &)),
this, SLOT(itemActivated(const QModelIndex &)));
- mHistoryModel = new CntHistoryModel(mContact->localId(),
- mViewMgr->contactManager(SYMBIAN_BACKEND));
+ mHistoryModel = new CntHistoryModel(mContact->localId(), cm);
mHistoryListView->setModel(mHistoryModel); //ownership is not taken
//start listening to the events amount changing in the model
@@ -155,6 +162,9 @@
HbMainWindow* mainWindow = mView->mainWindow();
connect(mainWindow, SIGNAL(orientationChanged(Qt::Orientation)),
this, SLOT(updateScrollingPosition()));
+
+ connect(cm, SIGNAL(contactsRemoved(const QList<QContactLocalId>&)),
+ this, SLOT(contactDeletedFromOtherSource(const QList<QContactLocalId>&)));
}
/*!
@@ -220,17 +230,17 @@
operation = "dial(QString)";
args << number;
createRequest = true;
+
+ // TODO: Using XQApplicationManager is not working with calls
+ // The factory method cannot create a request. Find out why
+ createRequest = false;
+ QString service("com.nokia.symbian.ICallDial");
+ QString type("dial(QString,int)");
+ XQServiceRequest snd(interface, operation, false);
+ snd << number.toString() << mContact->localId();
+ snd.send();
}
- // TODO: Using XQApplicationManager is not working with calls
- // The factory method cannot create a request. Find out why
- createRequest = false;
- QString service("com.nokia.symbian.ICallDial");
- QString type("dial(QString)");
- XQServiceRequest snd(interface, operation, false);
- snd << number.toString();
- snd.send();
-
} else if ( flags & CntMessage ) {
// Open conversation view
QVariant id = index.data(CntConverstaionIdRole);
@@ -269,6 +279,27 @@
}
/*!
+Go back to the root view
+*/
+void CntHistoryView::showRootView()
+{
+ mViewMgr->back( mArgs, true );
+}
+
+
+void CntHistoryView::contactDeletedFromOtherSource(const QList<QContactLocalId>& contactIds)
+{
+ CNT_ENTRY
+ if ( contactIds.contains(mContact->localId()) )
+ {
+ // Do not switch to the previous view immediately. List views are
+ // not updated properly if this is not done in the event loop
+ QTimer::singleShot(0, this, SLOT(showRootView()));
+ }
+ CNT_EXIT
+}
+
+/*!
Show or hide the clear history menu
*/
void CntHistoryView::showClearHistoryMenu()
--- a/phonebookui/pbkcommonui/src/cntimageeditorview.cpp Wed Jul 21 11:37:51 2010 +0300
+++ b/phonebookui/pbkcommonui/src/cntimageeditorview.cpp Fri Jul 23 12:43:48 2010 +0300
@@ -18,6 +18,7 @@
#include "cntimageeditorview.h"
#include "cntimageutility.h"
#include "cntsavemanager.h"
+#include "cntimagelabel.h"
#include <hblabel.h>
#include <xqaiwrequest.h>
@@ -151,7 +152,8 @@
}
// set the correct image if the contact already has an image set
- mImageLabel = static_cast<HbLabel*>(mDocumentLoader.findWidget(QString("cnt_image_label")));
+ mImageLabel = static_cast<CntImageLabel*>(mDocumentLoader.findWidget(QString("cnt_image_label")));
+ mImageLabel->ungrabGesture(Qt::TapGesture);
QList<QContactAvatar> details = mContact->details<QContactAvatar>();
if (details.count() > 0)
{
@@ -171,7 +173,7 @@
mRemoveImage->setEnabled(false);
if (mContact->type() == QContactType::TypeGroup)
{
- mImageLabel->setIcon(HbIcon("qtg_large_add_group_picture"));
+ mImageLabel->setAvatarIcon(HbIcon("qtg_large_add_group_picture"));
}
}
@@ -307,9 +309,9 @@
mAvatar->setImageUrl(QUrl());
mImageLabel->clear();
if (mContact->type() == QContactType::TypeGroup)
- mImageLabel->setIcon(HbIcon("qtg_large_add_group_picture"));
+ mImageLabel->setAvatarIcon(HbIcon("qtg_large_add_group_picture"));
else
- mImageLabel->setIcon(HbIcon("qtg_large_add_contact_picture"));
+ mImageLabel->setAvatarIcon(HbIcon("qtg_large_add_contact_picture"));
mRemoveImage->setEnabled(false);
}
}
@@ -367,10 +369,8 @@
Q_UNUSED(id);
if (!error)
{
- QIcon qicon(pixmap);
- HbIcon icon(qicon);
mImageLabel->clear();
- mImageLabel->setIcon(icon);
+ mImageLabel->setIcon(pixmap);
}
CNT_EXIT
@@ -428,7 +428,7 @@
mContact->removeDetail(mAvatar);
}
- QString name = mViewManager->contactManager(SYMBIAN_BACKEND)->synthesizedDisplayLabel(*mContact);
+ QString name = mViewManager->contactManager(SYMBIAN_BACKEND)->synthesizedContactDisplayLabel(*mContact);
if (name.isEmpty())
{
--- a/phonebookui/pbkcommonui/src/cntimagelabel.cpp Wed Jul 21 11:37:51 2010 +0300
+++ b/phonebookui/pbkcommonui/src/cntimagelabel.cpp Fri Jul 23 12:43:48 2010 +0300
@@ -17,16 +17,40 @@
#include "cntimagelabel.h"
+#include <QPainter>
+#include <QGraphicsDropShadowEffect>
+
#include <hbinstantfeedback.h>
#include <hbtapgesture.h>
#include <hbeffect.h>
-#include <QGraphicsSceneMouseEvent>
+#include <hbdeviceprofile.h>
+#include <hbiconitem.h>
+#include <hbicon.h>
+#include <hbstyle.h>
+static const qreal ImageRounding = 1.5; // units
+
+/*
+ * Imagel label for landscape views.
+ */
CntImageLabel::CntImageLabel(QGraphicsItem *parent) :
- HbLabel(parent)
+ HbWidget(parent)
{
+ setFlag(QGraphicsItem::ItemHasNoContents, false);
+
+ mDefaultAvatar = new HbIconItem(this);
+ style()->setItemName(mDefaultAvatar, "icon");
+ mDefaultAvatar->setAlignment(Qt::AlignCenter);
+
grabGesture(Qt::TapGesture);
HbEffect::add(this, "groupbox_icon_click", "iconclick");
+
+ //shadow effect
+ QGraphicsDropShadowEffect *effect = new QGraphicsDropShadowEffect(this);
+ effect->setColor(QColor(0, 0, 0, 150));
+ effect->setBlurRadius(5);
+ effect->setOffset(3);
+ setGraphicsEffect(effect);
}
CntImageLabel::~CntImageLabel()
@@ -34,6 +58,76 @@
}
+void CntImageLabel::setIcon(const QPixmap &pixmap)
+{
+ mPixmap = pixmap;
+
+ if (!mPixmap.isNull())
+ {
+ mDefaultAvatar->setVisible(false);
+ mDefaultAvatar->setIcon(HbIcon());
+ }
+ else
+ {
+ mDefaultAvatar->setIconName(QLatin1String("qtg_large_add_contact_picture"));
+ mDefaultAvatar->setVisible(true);
+ }
+
+ update();
+}
+
+void CntImageLabel::setAvatarIcon(const HbIcon &icon)
+{
+ mIcon = icon;
+
+ if (mIcon.isNull())
+ {
+ mDefaultAvatar->setVisible(false);
+ mDefaultAvatar->setIcon(HbIcon());
+ }
+ else
+ {
+ mDefaultAvatar->setIcon(icon);
+ mDefaultAvatar->setVisible(true);
+ }
+}
+
+HbIcon CntImageLabel::avatarIcon() const
+{
+ return mIcon;
+}
+
+void CntImageLabel::clear()
+{
+ mIcon.clear();
+ mPixmap = NULL;
+ mDefaultAvatar->setIconName(QLatin1String("qtg_large_add_contact_picture"));
+ mDefaultAvatar->setVisible(true);
+}
+
+void CntImageLabel::paint(QPainter* painter,
+ const QStyleOptionGraphicsItem* option,
+ QWidget* widget)
+{
+ Q_UNUSED(option);
+ Q_UNUSED(widget);
+
+ if (mPixmap.isNull())
+ {
+ return;
+ }
+ else
+ {
+ painter->save();
+ QPainterPath clip;
+ qreal rounding = ImageRounding * HbDeviceProfile::profile(this).unitValue();
+ clip.addRoundRect(rect(), rounding, rounding);
+ painter->setClipPath(clip);
+ painter->drawPixmap(rect().toRect(), mPixmap);
+ painter->restore();
+ }
+}
+
void CntImageLabel::gestureEvent(QGestureEvent* event)
{
if (HbTapGesture *tap = qobject_cast<HbTapGesture *>(event->gesture(Qt::TapGesture)))
--- a/phonebookui/pbkcommonui/src/cntmainwindow.cpp Wed Jul 21 11:37:51 2010 +0300
+++ b/phonebookui/pbkcommonui/src/cntmainwindow.cpp Fri Jul 23 12:43:48 2010 +0300
@@ -19,23 +19,31 @@
#include "cntdefaultviewmanager.h"
#include "cntviewnavigator.h"
#include <QCoreApplication>
+#include <xqaiwrequest.h>
+#include <xqaiwdecl.h>
+#include <xqappmgr.h>
+#include <logsservices.h>
#include <cntdebug.h>
CntMainWindow::CntMainWindow(QWidget *parent, int defaultView)
: HbMainWindow(parent),
- mViewManager(NULL)
+ mViewManager(NULL),
+ mDefaultView(defaultView)
{
CNT_ENTRY
-
+
if (defaultView != noView)
{
CntViewNavigator* navigator = new CntViewNavigator(this);
- navigator->addException( editView, namesView );
- navigator->addException( FavoritesMemberView, collectionView );
+ navigator->addException( favoritesMemberView, collectionView );
navigator->addEffect( groupMemberView, groupActionsView );
navigator->addEffect( groupActionsView, groupMemberView );
- navigator->addEffect( commLauncherView, historyView );
- navigator->addEffect( historyView, commLauncherView );
+ navigator->addEffect( contactCardView, historyView );
+ navigator->addEffect( historyView, contactCardView );
+ navigator->addRoot( namesView );
+ navigator->addRoot( collectionView );
+ navigator->addRoot( groupMemberView );
+ navigator->addRoot( favoritesMemberView );
mViewManager = new CntDefaultViewManager( this );
mViewManager->setViewNavigator( navigator );
@@ -65,9 +73,29 @@
*/
void CntMainWindow::keyPressEvent(QKeyEvent *event)
{
- if (event->key() == Qt::Key_Yes || event->key() == Qt::Key_No)
+ if (event->key() == Qt::Key_Yes && mDefaultView != noView)
{
- emit keyPressed(event);
+ if (mViewManager->currentViewId() == contactCardView)
+ {
+ emit keyPressed(event);
+ }
+ else
+ {
+ XQApplicationManager appManager;
+ XQAiwRequest* request = appManager.create("com.nokia.symbian.ILogsView", "show(QVariantMap)", false);
+
+ if (request)
+ {
+ QList<QVariant> args;
+ QVariantMap map;
+ map.insert("view_index", QVariant(int(LogsServices::ViewAll)));
+ map.insert("show_dialpad", QVariant(true));
+ map.insert("dialpad_text", QVariant(QString()));
+ args.append(QVariant(map));
+ request->setArguments(args);
+ request->send();
+ }
+ }
}
else
{
--- a/phonebookui/pbkcommonui/src/cntmycardview.cpp Wed Jul 21 11:37:51 2010 +0300
+++ b/phonebookui/pbkcommonui/src/cntmycardview.cpp Fri Jul 23 12:43:48 2010 +0300
@@ -16,7 +16,7 @@
*/
#include "cntmycardview.h"
-#include "cntfetchcontactsview.h"
+#include "cntfetchcontactpopup.h"
#include "cntglobal.h"
#include <qtcontacts.h>
#include <hbpushbutton.h>
@@ -28,8 +28,7 @@
CntMyCardView::CntMyCardView() :
mContact(NULL),
- mViewManager(NULL),
- mFetchView(NULL)
+ mViewManager(NULL)
{
bool ok = false;
mDocumentLoader.load(CNT_MYCARD_UI_XML, &ok);
@@ -53,10 +52,7 @@
mView->deleteLater();
delete mContact;
- mContact = 0;
-
- delete mFetchView;
- mFetchView = NULL;
+ mContact = NULL;
}
/*!
@@ -130,6 +126,7 @@
QVariant var;
var.setValue(*mContact);
viewParameters.insert(ESelectedContact, var);
+ viewParameters.insert(EExtraAction, CNT_ROOT_ACTION);
mViewManager->changeView(viewParameters);
}
@@ -138,34 +135,25 @@
*/
void CntMyCardView::openMyCardSelectionView()
{
- // Display a list of contacts to choose a mycard from.
- if (!mFetchView) {
- mFetchView = new CntFetchContacts(*mViewManager->contactManager( SYMBIAN_BACKEND ));
- connect(mFetchView, SIGNAL(clicked()), this, SLOT(handleMultiCardSelection()));
- }
- mFetchView->setDetails(hbTrId("txt_phob_title_select_contact"), "");
- QSet<QContactLocalId> emptyContactsSet;
- mFetchView->displayContacts(HbAbstractItemView::SingleSelection, emptyContactsSet);
+ CntFetchContactPopup* popup = CntFetchContactPopup::createSingleSelectionPopup(
+ hbTrId("txt_phob_title_select_contact"),
+ *mViewManager->contactManager(SYMBIAN_BACKEND));
+ connect( popup, SIGNAL(fetchReady(QSet<QContactLocalId>)), this, SLOT(handleMultiCardSelection(QSet<QContactLocalId>)));
+ popup->showPopup();
}
-void CntMyCardView::handleMultiCardSelection()
+void CntMyCardView::handleMultiCardSelection( QSet<QContactLocalId> aIds )
{
QContactManager* manager = mViewManager->contactManager( SYMBIAN_BACKEND );
- QSet<QContactLocalId> selectedContacts = mFetchView->getSelectedContacts();
-
- if ( !mFetchView->wasCanceled() && !selectedContacts.isEmpty() ) {
- QList<QContactLocalId> selectedContactsList = selectedContacts.values();
+ if ( !aIds.isEmpty() ) {
+ QList<QContactLocalId> selectedContactsList = aIds.values();
QContact contact = manager->contact(selectedContactsList.front());
removeFromGroup(&contact);
manager->setSelfContactId( contact.localId() );
showPreviousView();
}
- else {
- delete mFetchView;
- mFetchView = NULL;
- }
}
void CntMyCardView::removeFromGroup(const QContact* aContact)
--- a/phonebookui/pbkcommonui/src/cntnamesview_p.cpp Wed Jul 21 11:37:51 2010 +0300
+++ b/phonebookui/pbkcommonui/src/cntnamesview_p.cpp Fri Jul 23 12:43:48 2010 +0300
@@ -17,15 +17,15 @@
#include "cntnamesview_p.h"
#include "cntactionlauncher.h"
-#include "cntfetchcontactsview.h"
+#include "cntfetchcontactpopup.h"
#include "cntextensionmanager.h"
#include "cntglobal.h"
#include "cntdebug.h"
+#include "cntapplication.h"
#include <cntuiextensionfactory.h>
#include <cntuisocialextension.h>
-#include <qapplication.h>
#include <hbabstractviewitem.h>
#include <hbaction.h>
#include <hbmenu.h>
@@ -64,7 +64,6 @@
mNamesAction(NULL),
mMenuBuilder(NULL),
mHandledContactId(0),
- mFetchView(NULL),
mIsDefault(true),
mId( namesView ),
mActionGroup(NULL),
@@ -137,16 +136,28 @@
connect(mSearchPanel, SIGNAL(exitClicked()), this, SLOT(hideFinder()));
connect(mSearchPanel, SIGNAL(criteriaChanged(QString)), this, SLOT(setFilter(QString)));
+ HbMainWindow* win = mView->mainWindow();
+ CntApplication* cntApp = static_cast<CntApplication*>(qApp);
+ connect(win, SIGNAL(viewReady()), cntApp, SIGNAL(applicationReady()));
+
+#ifdef __WINS__
+ mView->menu()->addAction("Change Orientation", this, SLOT(switchOrientation()) );
+#endif
CNT_EXIT
}
+void CntNamesViewPrivate::switchOrientation()
+{
+ HbMainWindow* win = mView->mainWindow();
+ Qt::Orientation orientation = win->orientation();
+
+ win->setOrientation( orientation == Qt::Horizontal ? Qt::Vertical : Qt::Horizontal );
+}
+
CntNamesViewPrivate::~CntNamesViewPrivate()
{
CNT_ENTRY
- delete mFetchView;
- mFetchView = NULL;
-
delete mListModel;
mListModel = NULL;
@@ -215,27 +226,29 @@
setScrollPosition(aArgs.value(ESelectedContact).value<QContact>().localId());
}
- if ( aArgs.value( EFinder ).toString() == "show" )
+ if ( aArgs.value( EExtraAction ).toString() == CNT_FIND_ACTION )
{
showFinder();
}
-
+
CNT_EXIT
}
void CntNamesViewPrivate::deactivate()
{
CNT_ENTRY
-
+ HbMainWindow* win = mView->mainWindow();
// in UTs there is no mainwindow and therefore calling HbView::visibleItems() would cause a crash
- if (mView->mainWindow() != NULL)
+ if ( win != NULL)
{
if (!(mView->visibleItems() & Hb::AllItems))
{
hideFinder();
}
+
+ CntApplication* cntApp = static_cast<CntApplication*>(qApp);
+ disconnect(win, SIGNAL(viewReady()), cntApp, SIGNAL(applicationReady()));
}
-
delete mMenuBuilder;
mMenuBuilder = NULL;
@@ -409,7 +422,7 @@
CNT_ENTRY
QContactManager* manager = mViewManager->contactManager( SYMBIAN_BACKEND );
- QString name = manager->synthesizedDisplayLabel(aContact);
+ QString name = manager->synthesizedContactDisplayLabel(aContact);
if (name.isEmpty())
{
name = hbTrId("txt_phob_list_unnamed");
@@ -426,36 +439,26 @@
void CntNamesViewPrivate::deleteMultipleContacts()
{
CNT_ENTRY
+ CntFetchContactPopup* popup = CntFetchContactPopup::createMultiSelectionPopup(
+ hbTrId("txt_phob_title_delete_contacts"),
+ hbTrId("txt_common_button_delete"),
+ *mViewManager->contactManager(SYMBIAN_BACKEND));
+ connect(popup, SIGNAL(fetchReady(QSet<QContactLocalId>)),
+ this, SLOT(handleDeleteMultipleContacts(QSet<QContactLocalId>)) );
- if (!mFetchView) {
- mFetchView = new CntFetchContacts(*mViewManager->contactManager( SYMBIAN_BACKEND ));
- connect(mFetchView, SIGNAL(clicked()), this, SLOT(handleDeleteMultipleContacts()));
- }
-
- mFetchView->setDetails(hbTrId("txt_phob_title_delete_contacts"),hbTrId("txt_common_button_delete"));
- QSet<QContactLocalId> emptyContactsSet;
-
- // Pop up a list of contacts for deletion
- mFetchView->displayContacts(HbAbstractItemView::MultiSelection, emptyContactsSet);
+ popup->showPopup();
CNT_EXIT
}
-void CntNamesViewPrivate::handleDeleteMultipleContacts()
+void CntNamesViewPrivate::handleDeleteMultipleContacts( QSet<QContactLocalId> aIds )
{
CNT_ENTRY
- QSet<QContactLocalId> selectedContacts = mFetchView->getSelectedContacts();
-
QContactManager* manager = mViewManager->contactManager( SYMBIAN_BACKEND );
- if ( !mFetchView->wasCanceled() && !selectedContacts.isEmpty() ) {
- foreach ( QContactLocalId id, selectedContacts.values() )
- {
- manager->removeContact( id );
- }
+ foreach ( QContactLocalId id, aIds )
+ {
+ manager->removeContact( id );
}
-
- delete mFetchView;
- mFetchView = NULL;
CNT_EXIT
}
@@ -475,7 +478,7 @@
CNT_ENTRY
CntViewParameters args;
- args.insert(EViewId, commLauncherView);
+ args.insert(EViewId, contactCardView);
if (aContact.localId() == mListModel->myCardId() && aContact.details().count() <= 4)
{
args.insert(EViewId, myCardView);
--- a/phonebookui/pbkcommonui/src/cntnoteeditorviewitem.cpp Wed Jul 21 11:37:51 2010 +0300
+++ b/phonebookui/pbkcommonui/src/cntnoteeditorviewitem.cpp Fri Jul 23 12:43:48 2010 +0300
@@ -71,6 +71,10 @@
widget->setLayout( mLayout );
connect( mEdit, SIGNAL(textChanged(QString)), this, SLOT(textChanged(QString)) );
+
+ // Naming UI components for automation testability
+ QString editorObjName = detail.definitionName() + " line edit %1";
+ mEdit->setObjectName(editorObjName.arg(modelIndex().row()));
return widget;
}
// End of File
--- a/phonebookui/pbkcommonui/src/cntphonenumberviewitem.cpp Wed Jul 21 11:37:51 2010 +0300
+++ b/phonebookui/pbkcommonui/src/cntphonenumberviewitem.cpp Fri Jul 23 12:43:48 2010 +0300
@@ -135,6 +135,12 @@
connect( mItem->comboBox(), SIGNAL(currentIndexChanged(int)), this, SLOT(indexChanged(int)) );
connect( mItem->editor(), SIGNAL(textChanged(QString)),this, SLOT(textChanged(QString)) );
+ // Naming UI components for automation testability
+ QString editorObjName = detail.definitionName() + " line edit %1";
+ mItem->editor()->setObjectName(editorObjName.arg(modelIndex().row()));
+
+ QString comboBoxObjName = detail.definitionName() + " combo box %1";
+ mItem->comboBox()->setObjectName(comboBoxObjName.arg(modelIndex().row()));
return mItem;
}
@@ -157,6 +163,7 @@
QContactPhoneNumber number;
number.setSubTypes( aSubType );
number.setContexts( aContext );
+ number.setNumber( mItem->editor()->text() );
aItem->setDetail( number );
}
else
--- a/phonebookui/pbkcommonui/src/cnturleditorviewitem.cpp Wed Jul 21 11:37:51 2010 +0300
+++ b/phonebookui/pbkcommonui/src/cnturleditorviewitem.cpp Fri Jul 23 12:43:48 2010 +0300
@@ -57,7 +57,13 @@
mItem->editor()->setText( detail.url() );
connect( mItem->comboBox(), SIGNAL(currentIndexChanged(int)), this, SLOT(indexChanged(int)) );
connect( mItem->editor(), SIGNAL(textChanged(QString)),this, SLOT(textChanged(QString)) );
-
+
+ // Naming UI components for automation testability
+ QString editorObjName = detail.definitionName() + " line edit %1";
+ mItem->editor()->setObjectName(editorObjName.arg(modelIndex().row()));
+
+ QString comboBoxObjName = detail.definitionName() + " combo box %1";
+ mItem->comboBox()->setObjectName(comboBoxObjName.arg(modelIndex().row()));
return mItem;
}
--- a/phonebookui/pbkcommonui/src/cntviewnavigator.cpp Wed Jul 21 11:37:51 2010 +0300
+++ b/phonebookui/pbkcommonui/src/cntviewnavigator.cpp Fri Jul 23 12:43:48 2010 +0300
@@ -47,7 +47,7 @@
iViewStack.push( aId );
}
-const int& CntViewNavigator::back( QFlags<Hb::ViewSwitchFlag> &flags )
+const int& CntViewNavigator::back( QFlags<Hb::ViewSwitchFlag> &flags, bool toRoot )
{
qDebug() << "CntViewNavigator::back() - IN";
iTop = noView;
@@ -59,8 +59,23 @@
{
int top = iViewStack.top();
+ // If we need to go to the latest root view
+ if ( toRoot )
+ {
+ while ( !iViewStack.isEmpty() )
+ {
+ int current = iViewStack.top();
+
+ if ( iRoots.contains( current ) )
+ {
+ iTop = current;
+ break;
+ }
+ iViewStack.pop();
+ }
+ }
// If any exception defined for the current (top) view
- if ( iExceptions.contains( top ) )
+ else if ( iExceptions.contains( top ) )
{
iTop = iExceptions.value( top );
// cleanup the history until the exception value is found
@@ -122,5 +137,10 @@
iEffects.remove( aCurrent );
}
}
+
+void CntViewNavigator::addRoot( const int& aCurrent )
+{
+ iRoots.append( aCurrent );
+}
// End of File
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/phonebookui/phonebookapp/inc/cntapplication.h Fri Jul 23 12:43:48 2010 +0300
@@ -0,0 +1,38 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:
+*
+*/
+
+
+#ifndef CNTAPP_H_
+#define CNTAPP_H_
+
+#include <hbapplication.h>
+
+class CntApplication : public HbApplication
+{
+ Q_OBJECT
+
+public:
+ CntApplication(int &argc,
+ char *argv[],
+ Hb::ApplicationFlags flags = Hb::DefaultApplicationFlags) :
+ HbApplication( argc, argv, flags ){}
+
+signals:
+ void applicationReady();
+};
+
+#endif /* CNTAPP_H_ */
--- a/phonebookui/phonebookapp/phonebookapp.pro Wed Jul 21 11:37:51 2010 +0300
+++ b/phonebookui/phonebookapp/phonebookapp.pro Fri Jul 23 12:43:48 2010 +0300
@@ -44,6 +44,7 @@
SERVICE.OPTIONS = embeddable
# Input
+HEADERS += inc/cntapplication.h
HEADERS += inc/cntinterface.h
HEADERS += inc/cntappservicehandler.h
--- a/phonebookui/phonebookapp/src/main.cpp Wed Jul 21 11:37:51 2010 +0300
+++ b/phonebookui/phonebookapp/src/main.cpp Fri Jul 23 12:43:48 2010 +0300
@@ -15,19 +15,19 @@
*
*/
-#include <hbapplication.h>
#include <QTranslator>
#include <QLocale>
#include "cntmainwindow.h"
#include "cntappservicehandler.h"
#include "cntglobal.h"
#include "cntdebug.h"
+#include "cntapplication.h"
int main(int argc, char **argv)
{
qInstallMsgHandler(MSG_HANDLER);
- HbApplication a( argc, argv );
+ CntApplication a( argc, argv );
QTranslator translator;
QString lang = QLocale::system().name();
--- a/phonebookui/phonebookservices/inc/cntabstractserviceprovider.h Wed Jul 21 11:37:51 2010 +0300
+++ b/phonebookui/phonebookservices/inc/cntabstractserviceprovider.h Fri Jul 23 12:43:48 2010 +0300
@@ -29,7 +29,7 @@
public:
/*!
- Complete the Qt Highway service (through a QqServiceProvider instance).
+ Complete the Qt Highway service (through a XQServiceProvider instance).
Closes the app after the completing is done (message sending to client is done).
*/
virtual void CompleteServiceAndCloseApp(const QVariant& retValue) = 0;
--- a/phonebookui/phonebookservices/inc/cntserviceassigncontactcardview.h Wed Jul 21 11:37:51 2010 +0300
+++ b/phonebookui/phonebookservices/inc/cntserviceassigncontactcardview.h Fri Jul 23 12:43:48 2010 +0300
@@ -40,7 +40,6 @@
public slots:
void doCloseView();
- void addActionsToToolBar();
void addToContacts();
void saveNew();
void updateExisting();
--- a/phonebookui/phonebookservices/inc/cntserviceprovideredit.h Wed Jul 21 11:37:51 2010 +0300
+++ b/phonebookui/phonebookservices/inc/cntserviceprovideredit.h Fri Jul 23 12:43:48 2010 +0300
@@ -49,6 +49,15 @@
void editCreateNew(const QString& definitionName, const QString& value);
/**
+ * Launch editor for creating a new contact with a given detail and subtype.
+ * If the given subtype string is empty, then QContactPhoneNumber::SubTypeMobile is used.
+ * @param definitionName The field type
+ * @param value The value for the field.
+ * @param subType The sub type for the field. (for eg. QContactPhoneNumber::SubTypeLandline)
+ */
+ void editCreateNew(const QString &definitionName, const QString &value, const QString &subType);
+
+ /**
* Launch editor for creating a new contact based on vCard file indicated in arg.
* @param vCardFile The vCard file name and path.
*/
@@ -68,6 +77,16 @@
*/
void editUpdateExisting(const QString &definitionName, const QString &value);
+ /**
+ * User can first choose a contact, and then an editor is opened.
+ * A new detail is provided by caller and it will be prefilled in the editor.
+ * The detail sub type can also be given.
+ * @param definitionName The field type
+ * @param value The value for the field.
+ * @param subType The sub type for the field. (for eg. QContactPhoneNumber::SubTypeLandline)
+ */
+ void editUpdateExisting(const QString &definitionName, const QString &value, const QString &subType);
+
private: // from CntAbstractServiceProvider
void CompleteServiceAndCloseApp(const QVariant& retValue);
--- a/phonebookui/phonebookservices/inc/cntservices.h Wed Jul 21 11:37:51 2010 +0300
+++ b/phonebookui/phonebookservices/inc/cntservices.h Fri Jul 23 12:43:48 2010 +0300
@@ -65,9 +65,26 @@
* @param definitionName The field type
* @param value The value for the field.
* @param aServiceProvider The service provider
+ * @param defaultForOnlineAccountIsImpp If no subtype is given, default
+ * for QContactOnlineAccount is QContactOnlineAccount::SubTypeImpp. If false, then
+ * the default is QContactOnlineAccount::SubTypeSipVoip.
*/
void editCreateNew(const QString &definitionName, const QString &value,
- CntAbstractServiceProvider& aServiceProvider );
+ CntAbstractServiceProvider& aServiceProvider, bool defaultForOnlineAccountIsImpp = true );
+
+ /**
+ * Launch editor for creating a new contact with a given detail and subtype.
+ * If the given subtype string is empty, then QContactPhoneNumber::SubTypeMobile is used.
+ * @param definitionName The field type
+ * @param value The value for the field.
+ * @param subType The subtype for the field. (for eg. QContactPhoneNumber::SubTypeLandline)
+ * @param aServiceProvider The service provider
+ * @param defaultForOnlineAccountIsImpp If no subtype is given, default
+ * for QContactOnlineAccount is QContactOnlineAccount::SubTypeImpp. If false, then
+ * the default is QContactOnlineAccount::SubTypeSipVoip.
+ */
+ void editCreateNew(const QString &definitionName, const QString &value, const QString& subType,
+ CntAbstractServiceProvider& aServiceProvider, bool defaultForOnlineAccountIsImpp = true );
/**
* Launch editor for creating a new contact based on vCard file indicated in arg.
@@ -85,7 +102,21 @@
* @param aServiceProvider The service provider
*/
void editUpdateExisting(const QString &definitionName, const QString &value,
- CntAbstractServiceProvider& aServiceProvider );
+ CntAbstractServiceProvider& aServiceProvider, bool defaultForOnlineAccountIsImpp = true );
+
+ /**
+ * User can first choose a contact, and then an editor is opened.
+ * A new detail is provided by caller and it will be prefilled in the editor.
+ * @param definitionName The field type
+ * @param value The value for the field.
+ * @param subType The subtype for the field. (for eg. QContactPhoneNumber::SubTypeLandline)
+ * @param aServiceProvider The service provider
+ * @param defaultForOnlineAccountIsImpp If no subtype is given, default
+ * for QContactOnlineAccount is QContactOnlineAccount::SubTypeImpp. If false, then
+ * the default is QContactOnlineAccount::SubTypeSipVoip.
+ */
+ void editUpdateExisting(const QString &definitionName, const QString &value, const QString& subType,
+ CntAbstractServiceProvider& aServiceProvider, bool defaultForOnlineAccountIsImpp = true );
/**
* Open the editor for an existing contact.'
@@ -113,20 +144,25 @@
CntAbstractServiceProvider& aServiceProvider );
/**
- * Set the flag that allows quiting the application explicitly
+ * Set the flag that allows quitting the application explicitly
* using the quitApp slot. By default the value is always true.
*/
- void setQuitable(bool quitable);
+ void setQuittable(bool quittable);
public slots:
/**
* Quit the application
*/
void quitApp();
+ /**
+ * Terminate a service
+ */
+ void terminateService();
private:
void removeNotSupportedFields(QContact& contact);
void removeNotSupportedDetails(QContact& contact);
+ void fillOnlineAccount( QContactOnlineAccount& account, const QString& value, const QString& subType, bool defaultForOnlineAccountIsImpp);
private: // from CntAbstractServiceProvider
void CompleteServiceAndCloseApp(const QVariant& retValue);
@@ -134,7 +170,7 @@
CntAbstractViewManager* mViewManager; // not owned
QStringList m_definitionNames;
CntAbstractServiceProvider* mCurrentProvider; // not owned
- bool mIsQuitable;
+ bool mIsQuittable;
};
#endif /* CNTSERVICES_H */
--- a/phonebookui/phonebookservices/inc/cntserviceviewmanager.h Wed Jul 21 11:37:51 2010 +0300
+++ b/phonebookui/phonebookservices/inc/cntserviceviewmanager.h Fri Jul 23 12:43:48 2010 +0300
@@ -37,6 +37,8 @@
~CntServiceViewManager();
protected slots:
virtual void closeApp();
+signals:
+ void applicationClosed();
};
#endif // CNTSERVICEVIEWMANAGER_H
--- a/phonebookui/phonebookservices/src/cntserviceassigncontactcardview.cpp Wed Jul 21 11:37:51 2010 +0300
+++ b/phonebookui/phonebookservices/src/cntserviceassigncontactcardview.cpp Fri Jul 23 12:43:48 2010 +0300
@@ -34,14 +34,13 @@
\a viewManager is the parent that creates this view. \a parent is a pointer to parent QGraphicsItem (by default this is 0)
*/
CntServiceAssignContactCardView::CntServiceAssignContactCardView( CntAbstractServiceProvider& aServiceProvider ) :
- CntContactCardView(),
-mProvider( aServiceProvider )
+ CntContactCardView(true),
+ mProvider( aServiceProvider )
{
CNT_ENTRY
connect(this, SIGNAL(backPressed()), this, SLOT(doCloseView()));
- connect(this, SIGNAL(viewActivated(CntAbstractViewManager*, QContactDetail)), this, SLOT(doViewActivated(CntAbstractViewManager*,QContactDetail)));
-
- addActionsToToolBar();
+ connect(this, SIGNAL(viewActivated(CntAbstractViewManager*, const CntViewParameters)), this, SLOT(doViewActivated(CntAbstractViewManager*,const CntViewParameters)));
+ connect(this, SIGNAL(addToContacts()), this, SLOT(addToContacts()));
CNT_EXIT
}
@@ -55,40 +54,47 @@
}
/*!
-Add actions to the toolbar
-*/
-void CntServiceAssignContactCardView::addActionsToToolBar()
-{
- CNT_ENTRY
- view()->toolBar()->clearActions();
- HbAction* addToContact = view()->toolBar()->addAction("txt_phob_button_add_to_contacts");
- connect(addToContact, SIGNAL(triggered()), this, SLOT(addToContacts()));
- CNT_EXIT
-}
-
-/*!
Opens the Add to Contacts popup
*/
void CntServiceAssignContactCardView::addToContacts()
{
CNT_ENTRY
- HbDialog *popup = new HbDialog();
+
+ HbDialog* popup = new HbDialog();
popup->setDismissPolicy(HbDialog::NoDismiss);
- popup->setHeadingWidget(new HbLabel(hbTrId("txt_phob_title_add_to_contacts"), popup));
+ popup->setHeadingWidget(
+ new HbLabel(hbTrId("txt_phob_title_add_to_contacts"), popup));
popup->setAttribute(Qt::WA_DeleteOnClose);
+ popup->setTimeout( HbPopup::NoTimeout );
+ popup->addAction(
+ new HbAction(hbTrId("txt_common_button_cancel"), popup));
- HbWidget *buttonWidget = new HbWidget(popup);
- QGraphicsLinearLayout *layout = new QGraphicsLinearLayout(Qt::Vertical);
- HbPushButton *addButton = new HbPushButton(hbTrId("txt_missing_list_save_as_a_new_contact"), buttonWidget);
+ HbWidget* buttonWidget = new HbWidget(popup);
+ QGraphicsLinearLayout* layout = new QGraphicsLinearLayout(Qt::Vertical);
+
+ HbPushButton* addButton = new HbPushButton(buttonWidget);
+ addButton->setStretched(true);
+ addButton->setText(hbTrId("txt_phob_button_save_as_a_new_contact"));
+ HbIcon plusIcon("qtg_mono_plus");
+ addButton->setIcon(plusIcon);
+ connect(addButton, SIGNAL(clicked()), popup, SLOT(close()));
connect(addButton, SIGNAL(clicked()), this, SLOT(saveNew()));
- HbPushButton *updateButton = new HbPushButton(hbTrId("txt_missing_list_update_existing_contact"), buttonWidget);
+
+ HbPushButton* updateButton = new HbPushButton(buttonWidget);
+ updateButton->setStretched(true);
+ updateButton->setText(hbTrId("txt_phob_button_update_existing_contact"));
+ updateButton->setIcon(plusIcon);
+ connect(updateButton, SIGNAL(clicked()), popup, SLOT(close()));
connect(updateButton, SIGNAL(clicked()), this, SLOT(updateExisting()));
+
layout->addItem(addButton);
layout->addItem(updateButton);
+
buttonWidget->setLayout(layout);
popup->setContentWidget(buttonWidget);
+
+ popup->open();
- popup->setSecondaryAction(new HbAction(hbTrId("txt_common_button_cancel"), popup));
CNT_EXIT
}
@@ -100,6 +106,8 @@
CNT_ENTRY
CntViewParameters viewParameters;
viewParameters.insert(EViewId, serviceEditView);
+ QContactName contactName = mContact.detail<QContactName>();
+ mContact.removeDetail(&contactName);
QVariant var;
var.setValue(mContact);
viewParameters.insert(ESelectedContact, var);
--- a/phonebookui/phonebookservices/src/cntserviceeditview.cpp Wed Jul 21 11:37:51 2010 +0300
+++ b/phonebookui/phonebookservices/src/cntserviceeditview.cpp Fri Jul 23 12:43:48 2010 +0300
@@ -18,7 +18,7 @@
#include "cntserviceeditview.h"
#include <cntservicescontact.h>
#include <QCoreApplication>
-
+#include "cntdebug.h"
CntServiceEditView::CntServiceEditView( CntAbstractServiceProvider& aServiceProvider )
: CntEditView(),
@@ -35,25 +35,37 @@
void CntServiceEditView::doContactUpdated(int aSuccess)
{
+ CNT_ENTRY_ARGS(aSuccess)
+
int retValue = aSuccess ? KCntServicesReturnValueContactSaved : KCntServicesReturnValueContactNotModified;
QVariant variant;
variant.setValue(retValue);
mProvider.CompleteServiceAndCloseApp(variant);
+
+ CNT_EXIT
}
void CntServiceEditView::doContactRemoved(bool aSuccess)
{
+ CNT_ENTRY_ARGS(aSuccess)
+
int retValue = aSuccess ? KCntServicesReturnValueContactDeleted : KCntServicesReturnValueContactNotModified;
QVariant variant;
variant.setValue(retValue);
mProvider.CompleteServiceAndCloseApp(variant);
+
+ CNT_EXIT
}
void CntServiceEditView::doChangesDiscarded()
{
+ CNT_ENTRY
+
QVariant variant;
variant.setValue(KCntServicesReturnValueContactNotModified);
mProvider.CompleteServiceAndCloseApp(variant);
+
+ CNT_EXIT
}
// EOF
--- a/phonebookui/phonebookservices/src/cntserviceprovideredit.cpp Wed Jul 21 11:37:51 2010 +0300
+++ b/phonebookui/phonebookservices/src/cntserviceprovideredit.cpp Fri Jul 23 12:43:48 2010 +0300
@@ -46,16 +46,25 @@
{
CNT_ENTRY
mCurrentRequestIndex = setCurrentRequestAsync();
- mServices.setQuitable(requestInfo().isEmbedded());
+ mServices.setQuittable(requestInfo().isEmbedded());
mServices.editCreateNew( definitionName, value, *this );
CNT_EXIT
}
+void CntServiceProviderEdit::editCreateNew(const QString& definitionName, const QString& value, const QString &subType)
+ {
+ CNT_ENTRY
+ mCurrentRequestIndex = setCurrentRequestAsync();
+ mServices.setQuittable(requestInfo().isEmbedded());
+ mServices.editCreateNew( definitionName, value, subType, *this );
+ CNT_EXIT
+ }
+
void CntServiceProviderEdit::editCreateNewFromVCard(const QString &vCardFile)
{
CNT_ENTRY
mCurrentRequestIndex = setCurrentRequestAsync();
- mServices.setQuitable(requestInfo().isEmbedded());
+ mServices.setQuittable(requestInfo().isEmbedded());
mServices.editCreateNewFromVCard( vCardFile, *this );
CNT_EXIT
}
@@ -64,7 +73,7 @@
{
CNT_ENTRY
mCurrentRequestIndex = setCurrentRequestAsync();
- mServices.setQuitable(requestInfo().isEmbedded());
+ mServices.setQuittable(requestInfo().isEmbedded());
mServices.editExisting( contactId, *this );
CNT_EXIT
}
@@ -73,11 +82,19 @@
{
CNT_ENTRY
mCurrentRequestIndex = setCurrentRequestAsync();
- mServices.setQuitable(requestInfo().isEmbedded());
+ mServices.setQuittable(requestInfo().isEmbedded());
mServices.editUpdateExisting( definitionName, value, *this );
CNT_EXIT
}
+void CntServiceProviderEdit::editUpdateExisting(const QString &definitionName, const QString &value, const QString &subType)
+ {
+ CNT_ENTRY
+ mCurrentRequestIndex = setCurrentRequestAsync();
+ mServices.setQuittable(requestInfo().isEmbedded());
+ mServices.editUpdateExisting( definitionName, value, subType, *this );
+ CNT_EXIT
+ }
void CntServiceProviderEdit::CompleteServiceAndCloseApp(const QVariant& retValue)
{
--- a/phonebookui/phonebookservices/src/cntserviceproviderfetch.cpp Wed Jul 21 11:37:51 2010 +0300
+++ b/phonebookui/phonebookservices/src/cntserviceproviderfetch.cpp Fri Jul 23 12:43:48 2010 +0300
@@ -46,7 +46,7 @@
{
CNT_ENTRY
mCurrentRequestIndex = setCurrentRequestAsync();
- mServices.setQuitable(requestInfo().isEmbedded());
+ mServices.setQuittable(requestInfo().isEmbedded());
mServices.multiFetch( title, action, *this );
CNT_EXIT
}
@@ -55,7 +55,7 @@
{
CNT_ENTRY
mCurrentRequestIndex = setCurrentRequestAsync();
- mServices.setQuitable(requestInfo().isEmbedded());
+ mServices.setQuittable(requestInfo().isEmbedded());
mServices.singleFetch( title, action, *this );
CNT_EXIT
}
@@ -63,9 +63,9 @@
void CntServiceProviderFetch::CompleteServiceAndCloseApp(const QVariant& retValue)
{
CNT_ENTRY
- connect(this, SIGNAL(returnValueDelivered()), qApp, SLOT(quit()));
if ( mCurrentRequestIndex != 0 )
{
+ connect(this, SIGNAL(returnValueDelivered()), qApp, SLOT(quit()));
const bool success = completeRequest(mCurrentRequestIndex, retValue);
if ( !success )
{
--- a/phonebookui/phonebookservices/src/cntserviceproviderold.cpp Wed Jul 21 11:37:51 2010 +0300
+++ b/phonebookui/phonebookservices/src/cntserviceproviderold.cpp Fri Jul 23 12:43:48 2010 +0300
@@ -49,7 +49,7 @@
CNT_ENTRY
// Ignore the filter parameter
mCurrentRequestIndex = setCurrentRequestAsync();
- mServices.setQuitable(requestInfo().isEmbedded());
+ mServices.setQuittable(requestInfo().isEmbedded());
mServices.multiFetch( title, action, *this );
CNT_EXIT
}
@@ -64,7 +64,7 @@
// Ignore the filter parameter
// Ignoring fourth argument, because it's not needed. DoFetch() by old contract is only for single-fetching.
mCurrentRequestIndex = setCurrentRequestAsync();
- mServices.setQuitable(requestInfo().isEmbedded());
+ mServices.setQuittable(requestInfo().isEmbedded());
mServices.singleFetch( title, action, *this );
CNT_EXIT
}
@@ -77,8 +77,8 @@
{
CNT_ENTRY
mCurrentRequestIndex = setCurrentRequestAsync();
- mServices.setQuitable(requestInfo().isEmbedded());
- mServices.editCreateNew( definitionName, value, *this );
+ mServices.setQuittable(requestInfo().isEmbedded());
+ mServices.editCreateNew( definitionName, value, *this, false ); // defaultForOnlineAccountIsImpp = false
CNT_EXIT
}
@@ -86,7 +86,7 @@
{
CNT_ENTRY
mCurrentRequestIndex = setCurrentRequestAsync();
- mServices.setQuitable(requestInfo().isEmbedded());
+ mServices.setQuittable(requestInfo().isEmbedded());
mServices.editCreateNewFromVCard( vCardFile, *this );
CNT_EXIT
}
@@ -99,8 +99,8 @@
{
CNT_ENTRY
mCurrentRequestIndex = setCurrentRequestAsync();
- mServices.setQuitable(requestInfo().isEmbedded());
- mServices.editUpdateExisting( definitionName, value, *this );
+ mServices.setQuittable(requestInfo().isEmbedded());
+ mServices.editUpdateExisting( definitionName, value, *this, false ); // defaultForOnlineAccountIsImpp = false
CNT_EXIT
}
@@ -112,7 +112,7 @@
{
CNT_ENTRY
mCurrentRequestIndex = setCurrentRequestAsync();
- mServices.setQuitable(requestInfo().isEmbedded());
+ mServices.setQuittable(requestInfo().isEmbedded());
mServices.launchContactCard( contactId, *this );
CNT_EXIT
}
@@ -124,7 +124,7 @@
{
CNT_ENTRY
mCurrentRequestIndex = setCurrentRequestAsync();
- mServices.setQuitable(requestInfo().isEmbedded());
+ mServices.setQuittable(requestInfo().isEmbedded());
mServices.launchTemporaryContactCard( definitionName, value, *this ); // definitionName = field type value = actual field value for prefilling editor
CNT_EXIT
}
@@ -136,6 +136,7 @@
connect(this, SIGNAL(returnValueDelivered()), qApp, SLOT(quit()));
if ( mCurrentRequestIndex != 0 )
{
+ CNT_LOG_ARGS("next, completing request.")
const bool success = completeRequest(mCurrentRequestIndex, retValue);
if ( !success )
{
--- a/phonebookui/phonebookservices/src/cntserviceproviderold2.cpp Wed Jul 21 11:37:51 2010 +0300
+++ b/phonebookui/phonebookservices/src/cntserviceproviderold2.cpp Fri Jul 23 12:43:48 2010 +0300
@@ -49,7 +49,7 @@
CNT_ENTRY
// Ignore the filter parameter
mCurrentRequestIndex = setCurrentRequestAsync();
- mServices.setQuitable(requestInfo().isEmbedded());
+ mServices.setQuittable(requestInfo().isEmbedded());
mServices.multiFetch( title, action, *this );
CNT_EXIT
}
@@ -64,7 +64,7 @@
// Ignore the filter parameter
// Ignoring fourth argument, because it's not needed. DoFetch() by old contract is only for single-fetching.
mCurrentRequestIndex = setCurrentRequestAsync();
- mServices.setQuitable(requestInfo().isEmbedded());
+ mServices.setQuittable(requestInfo().isEmbedded());
mServices.singleFetch( title, action, *this );
CNT_EXIT
}
@@ -77,15 +77,15 @@
{
CNT_ENTRY
mCurrentRequestIndex = setCurrentRequestAsync();
- mServices.setQuitable(requestInfo().isEmbedded());
- mServices.editCreateNew( definitionName, value, *this );
+ mServices.setQuittable(requestInfo().isEmbedded());
+ mServices.editCreateNew( definitionName, value, *this, false ); // defaultForOnlineAccountIsImpp = false
}
void CntServiceProviderOld2::editCreateNew(const QString &vCardFile)
{
CNT_ENTRY
mCurrentRequestIndex = setCurrentRequestAsync();
- mServices.setQuitable(requestInfo().isEmbedded());
+ mServices.setQuittable(requestInfo().isEmbedded());
mServices.editCreateNewFromVCard( vCardFile, *this );
CNT_EXIT
}
@@ -98,8 +98,8 @@
{
CNT_ENTRY
mCurrentRequestIndex = setCurrentRequestAsync();
- mServices.setQuitable(requestInfo().isEmbedded());
- mServices.editUpdateExisting( definitionName, value, *this );
+ mServices.setQuittable(requestInfo().isEmbedded());
+ mServices.editUpdateExisting( definitionName, value, *this, false ); // defaultForOnlineAccountIsImpp = false
CNT_EXIT
}
@@ -111,7 +111,7 @@
{
CNT_ENTRY
mCurrentRequestIndex = setCurrentRequestAsync();
- mServices.setQuitable(requestInfo().isEmbedded());
+ mServices.setQuittable(requestInfo().isEmbedded());
mServices.launchContactCard( contactId, *this );
CNT_EXIT
}
@@ -123,7 +123,7 @@
{
CNT_ENTRY
mCurrentRequestIndex = setCurrentRequestAsync();
- mServices.setQuitable(requestInfo().isEmbedded());
+ mServices.setQuittable(requestInfo().isEmbedded());
mServices.launchTemporaryContactCard( definitionName, value, *this ); // definitionName = field type value = actual field value for prefilling editor
CNT_EXIT
}
--- a/phonebookui/phonebookservices/src/cntserviceproviderviewing.cpp Wed Jul 21 11:37:51 2010 +0300
+++ b/phonebookui/phonebookservices/src/cntserviceproviderviewing.cpp Fri Jul 23 12:43:48 2010 +0300
@@ -46,7 +46,7 @@
{
CNT_ENTRY
mCurrentRequestIndex = setCurrentRequestAsync();
- mServices.setQuitable(requestInfo().isEmbedded());
+ mServices.setQuittable(requestInfo().isEmbedded());
mServices.launchContactCard( aContactId, *this );
CNT_EXIT
}
@@ -55,7 +55,7 @@
{
CNT_ENTRY
mCurrentRequestIndex = setCurrentRequestAsync();
- mServices.setQuitable(requestInfo().isEmbedded());
+ mServices.setQuittable(requestInfo().isEmbedded());
mServices.launchTemporaryContactCard( aFieldName, aFieldValue, *this );
CNT_EXIT
}
--- a/phonebookui/phonebookservices/src/cntservices.cpp Wed Jul 21 11:37:51 2010 +0300
+++ b/phonebookui/phonebookservices/src/cntservices.cpp Fri Jul 23 12:43:48 2010 +0300
@@ -19,8 +19,10 @@
#include "cntglobal.h"
#include "cntdebug.h"
#include <cntabstractviewmanager.h>
+#include "cntserviceviewmanager.h"
#include "cntimageutility.h"
#include "cntserviceviewparams.h"
+#include <cntservicescontact.h>
#include <hbview.h>
#include <hblistview.h>
@@ -37,7 +39,7 @@
CntServices::CntServices() :
mViewManager(NULL),
mCurrentProvider(NULL),
-mIsQuitable(true)
+mIsQuittable(true)
{
CNT_ENTRY
@@ -73,6 +75,8 @@
{
CNT_LOG
mViewManager = &aViewManager;
+ CntServiceViewManager* srvMng = static_cast<CntServiceViewManager*>(mViewManager);
+ connect(srvMng, SIGNAL(applicationClosed()), this, SLOT(terminateService()));
}
@@ -112,9 +116,16 @@
CNT_EXIT
}
+void CntServices::editCreateNew(const QString &definitionName, const QString &value,
+ CntAbstractServiceProvider& aServiceProvider, bool defaultForOnlineAccountIsImpp )
+{
+ CNT_ENTRY
+ editCreateNew( definitionName, value, QString(), aServiceProvider, defaultForOnlineAccountIsImpp);
+ CNT_EXIT
+}
-void CntServices::editCreateNew(const QString &definitionName, const QString &value,
- CntAbstractServiceProvider& aServiceProvider)
+void CntServices::editCreateNew(const QString &definitionName, const QString &value, const QString& subType,
+ CntAbstractServiceProvider& aServiceProvider, bool defaultForOnlineAccountIsImpp )
{
CNT_ENTRY
mCurrentProvider = &aServiceProvider;
@@ -122,25 +133,32 @@
QContact contact;
if (definitionName == QContactPhoneNumber::DefinitionName)
- {
+ {
QContactPhoneNumber phoneNumber;
phoneNumber.setNumber(value);
- phoneNumber.setSubTypes(QContactPhoneNumber::SubTypeMobile);
- contact.saveDetail(&phoneNumber);
+ if (!subType.isEmpty())
+ {
+ phoneNumber.setSubTypes(subType);
}
+ else
+ {
+ phoneNumber.setSubTypes(QContactPhoneNumber::SubTypeMobile); // Mobile is the default if subtype is not given.
+ }
+ contact.saveDetail(&phoneNumber);
+ }
else if (definitionName == QContactEmailAddress::DefinitionName)
- {
+ {
QContactEmailAddress email;
email.setEmailAddress(value);
+ // Email addresses can't have subtypes.
contact.saveDetail(&email);
- }
+ }
else if (definitionName == QContactOnlineAccount::DefinitionName)
- {
+ {
QContactOnlineAccount account;
- account.setAccountUri(value);
- account.setSubTypes(QContactOnlineAccount::SubTypeSipVoip);
+ fillOnlineAccount( account, value, subType, defaultForOnlineAccountIsImpp);
contact.saveDetail(&account);
- }
+ }
// Launch editor now
CntViewParameters params;
@@ -212,9 +230,16 @@
CNT_EXIT
}
+void CntServices::editUpdateExisting(const QString &definitionName, const QString &value,
+ CntAbstractServiceProvider& aServiceProvider, bool defaultForOnlineAccountIsImpp )
+{
+ CNT_ENTRY
+ editUpdateExisting( definitionName, value, QString(), aServiceProvider, defaultForOnlineAccountIsImpp );
+ CNT_EXIT
+}
-void CntServices::editUpdateExisting(const QString &definitionName, const QString &value,
- CntAbstractServiceProvider& aServiceProvider )
+void CntServices::editUpdateExisting(const QString &definitionName, const QString &value, const QString& subType,
+ CntAbstractServiceProvider& aServiceProvider, bool defaultForOnlineAccountIsImpp )
{
CNT_ENTRY
mCurrentProvider = &aServiceProvider;
@@ -225,20 +250,27 @@
{
QContactPhoneNumber phoneNumber;
phoneNumber.setNumber(value);
- phoneNumber.setSubTypes(QContactPhoneNumber::SubTypeMobile);
+ if (!subType.isEmpty())
+ {
+ phoneNumber.setSubTypes(subType);
+ }
+ else
+ {
+ phoneNumber.setSubTypes(QContactPhoneNumber::SubTypeMobile);
+ }
detail = phoneNumber;
}
else if (definitionName == QContactEmailAddress::DefinitionName)
{
QContactEmailAddress email;
email.setEmailAddress(value);
+ // Email addresses can't have subtypes.
detail = email;
}
else if (definitionName == QContactOnlineAccount::DefinitionName)
{
QContactOnlineAccount account;
- account.setAccountUri(value);
- account.setSubTypes(QContactOnlineAccount::SubTypeSipVoip);
+ fillOnlineAccount( account, value, subType, defaultForOnlineAccountIsImpp);
detail = account;
}
@@ -299,6 +331,10 @@
QContact contact;
QContactDetail detail;
+ QContactName name;
+ name.setFirstName(hbTrId("txt_phob_list_unknown"));
+ contact.saveDetail(&name);
+
if (definitionName == QContactPhoneNumber::DefinitionName)
{
QContactPhoneNumber phoneNumber;
@@ -337,6 +373,26 @@
}
+void CntServices::setQuittable(bool quittable)
+{
+ mIsQuittable = quittable;
+}
+
+void CntServices::quitApp()
+{
+ CNT_ENTRY
+
+ // Only embedded applications should be exited once a client
+ // disconnects. At the moments QtHighWay has unresolved issues
+ // when closing non-embedded applications. Error ou1cimx1#472852
+ // has more info
+ if ( mIsQuittable )
+ {
+ qApp->quit();
+ }
+ CNT_EXIT
+}
+
void CntServices::removeNotSupportedDetails(QContact& contact)
{
CNT_ENTRY
@@ -352,8 +408,6 @@
CNT_EXIT
}
-
-
void CntServices::removeNotSupportedFields(QContact& contact)
{
CNT_ENTRY
@@ -415,6 +469,41 @@
CNT_EXIT
}
+void CntServices::fillOnlineAccount( QContactOnlineAccount& account, const QString& value,
+ const QString& subType, bool defaultForOnlineAccountIsImpp )
+ {
+ // The value should normally consist of two parts:
+ // <service provider>:<user ID>
+ // for eg. "serviceprovider:jack@serviceprovider.com"
+ QStringList accountDetails = value.split(":");
+ if (accountDetails.count() == 1)
+ {
+ // For some reason it only had one part, so we're assuming it's the user ID.
+ account.setAccountUri(accountDetails.at(0));
+ }
+ else if (accountDetails.count() >= 2)
+ {
+ account.setServiceProvider(accountDetails.at(0));
+ account.setAccountUri(accountDetails.at(1)); // the user ID
+ }
+
+ if (!subType.isEmpty())
+ {
+ account.setSubTypes(subType);
+ }
+ else
+ {
+ if (defaultForOnlineAccountIsImpp)
+ {
+ account.setSubTypes( QContactOnlineAccount::SubTypeImpp );
+ }
+ else
+ {
+ account.setSubTypes( QContactOnlineAccount::SubTypeSipVoip );
+ }
+ }
+ }
+
// This method is inherited from CntAbstractServiceProvider
void CntServices::CompleteServiceAndCloseApp(const QVariant& retValue)
{
@@ -426,26 +515,18 @@
CNT_EXIT
}
-void CntServices::setQuitable(bool quitable)
-{
- mIsQuitable = quitable;
-}
-
-void CntServices::quitApp()
+void CntServices::terminateService()
{
CNT_ENTRY
-
- // Only embedded applications should be exited once a client
- // disconnects. At the moments QtHighWay has unresolved issues
- // when closing non-embedded applications. Error ou1cimx1#472852
- // has more info
- if ( mIsQuitable )
- {
- qApp->quit();
- }
-
+ if ( mCurrentProvider )
+ {
+ // Complete the service with KCntServicesTerminated return value
+ QVariant var(KCntServicesTerminated);
+ mCurrentProvider->CompleteServiceAndCloseApp( var );
+ }
CNT_EXIT
}
Q_IMPLEMENT_USER_METATYPE(CntServicesContact)
Q_IMPLEMENT_USER_METATYPE_NO_OPERATORS(CntServicesContactList)
+
--- a/phonebookui/phonebookservices/src/cntserviceviewmanager.cpp Wed Jul 21 11:37:51 2010 +0300
+++ b/phonebookui/phonebookservices/src/cntserviceviewmanager.cpp Fri Jul 23 12:43:48 2010 +0300
@@ -39,8 +39,9 @@
void CntServiceViewManager::closeApp()
{
- // quit happens when returnValueDelivered signal is returned
- // from service handler, see constructor.
+ // Quit happens when returnValueDelivered signal from XQServiceProver
+ // is caught from service handler.
+ emit applicationClosed();
}
// end of file
--- a/phonebookui/phonebookservices/src/main.cpp Wed Jul 21 11:37:51 2010 +0300
+++ b/phonebookui/phonebookservices/src/main.cpp Fri Jul 23 12:43:48 2010 +0300
@@ -16,9 +16,9 @@
*/
#include <hbapplication.h>
+#include <hbmainwindow.h>
#include <QTranslator>
#include <QLocale>
-#include "cntmainwindow.h"
#include "cntserviceproviderold.h"
#include "cntserviceproviderold2.h"
#include "cntserviceproviderfetch.h"
@@ -28,10 +28,13 @@
#include "cntservices.h"
#include "cntserviceviewmanager.h"
#include "cntviewnavigator.h"
+#include "cntdebug.h"
#include <cntviewparams.h>
int main(int argc, char **argv)
{
+ qInstallMsgHandler(MSG_HANDLER);
+
HbApplication a( argc, argv );
QTranslator translator;
@@ -40,10 +43,12 @@
translator.load(path + "contacts_" + lang);
a.installTranslator(&translator);
- CntMainWindow mainWindow(NULL, noView); // no parent & "noView" as default view
+ HbMainWindow mainWindow;
CntViewNavigator* navigator = new CntViewNavigator( &mainWindow );
navigator->addException( serviceEditView, noView );
+ navigator->addEffect( serviceContactCardView, historyView );
+ navigator->addEffect( historyView, serviceContactCardView );
// This object actually executes the services
CntServices* services = new CntServices();
--- a/phonebookui/phonebookservices/tsrc/qtpbkservicestestapp/testpbkservices.cpp Wed Jul 21 11:37:51 2010 +0300
+++ b/phonebookui/phonebookservices/tsrc/qtpbkservicestestapp/testpbkservices.cpp Fri Jul 23 12:43:48 2010 +0300
@@ -28,16 +28,17 @@
#include <hbview.h>
#include <QGraphicsLinearLayout>
#include <QDebug>
+#include <HbAction>
#include "cntdebug.h"
-testPbkServices::testPbkServices(HbMainWindow *aParent)
+testPbkServices::testPbkServices(HbMainWindow *aParent) :
+mRequest(NULL),
+mMainWindow(aParent),
+mPopup(NULL)
{
- mRequest=NULL;
- mMainWindow=aParent;
setParent(aParent);
-
}
testPbkServices::~testPbkServices()
@@ -484,26 +485,26 @@
listWidget->addItem( contactId );
}
- HbDialog *popup = new HbDialog();
- popup->setAttribute(Qt::WA_DeleteOnClose, true);
+ mPopup = new HbDialog();
+ mPopup->setAttribute(Qt::WA_DeleteOnClose, true);
// Set dismiss policy that determines what tap events will cause the popup
// to be dismissed
- popup->setDismissPolicy(HbDialog::NoDismiss);
+ mPopup->setDismissPolicy(HbDialog::NoDismiss);
+ mPopup->setModal(true);
// Set the label as heading widget
- popup->setHeadingWidget(new HbLabel(tr("Contact")));
+ mPopup->setHeadingWidget(new HbLabel(tr("Contact")));
// Set a list widget as content widget in the popup
- popup->setContentWidget(listWidget);
-
- // Sets the primary action and secondary action
- //popup.setPrimaryAction(new HbAction(tr("Ok"),&popup));
- //popup.setSecondaryAction(new HbAction(tr("Cancel"),&popup));
+ mPopup->setContentWidget(listWidget);
+
+ // Add an OK action to dismiss the popup
+ HbAction *okAction = new HbAction(tr("Ok"), mPopup);
+ mPopup->addAction(okAction);
// Launch popup asyncronously
- popup->setTimeout(15000);
- popup->open();
+ mPopup->open();
}
CNT_EXIT
}
--- a/phonebookui/phonebookservices/tsrc/qtpbkservicestestapp/testpbkservices.h Wed Jul 21 11:37:51 2010 +0300
+++ b/phonebookui/phonebookservices/tsrc/qtpbkservicestestapp/testpbkservices.h Fri Jul 23 12:43:48 2010 +0300
@@ -25,6 +25,8 @@
#include <xqappmgr.h>
class HbMainWindow;
+class HbAction;
+class HbDialog;
/**
* Launches phonebookservices highway services, for functional testing.
@@ -100,6 +102,7 @@
XQAiwRequest *mRequest;
HbMainWindow *mMainWindow;
+ HbDialog *mPopup;
};