--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/contacts_plat/contacts_ui_api/inc/cntabstractengine.h Thu Sep 02 20:16:15 2010 +0300
@@ -0,0 +1,44 @@
+/*
+* 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 CNTABSTRACTENGINE_H_
+#define CNTABSTRACTENGINE_H_
+
+#include <qcontactmanager.h>
+
+class CntAbstractViewManager;
+class CntThumbnailManager;
+class CntExtensionManager;
+
+QTM_USE_NAMESPACE
+
+/*!
+ * Contact application engine. Contains access to different shared
+ * classes.
+ */
+class CntAbstractEngine
+{
+public:
+ virtual ~CntAbstractEngine(){}
+
+ virtual QContactManager& contactManager( const QString& aType ) = 0;
+ virtual CntAbstractViewManager& viewManager() = 0;
+ virtual CntExtensionManager& extensionManager() = 0;
+ virtual CntThumbnailManager& thumbnailManager() = 0;
+};
+
+#endif /* CNTABSTRACTENGINE_H_ */
--- a/contacts_plat/contacts_ui_api/inc/cntabstractview.h Wed Aug 18 09:39:00 2010 +0300
+++ b/contacts_plat/contacts_ui_api/inc/cntabstractview.h Thu Sep 02 20:16:15 2010 +0300
@@ -19,6 +19,7 @@
#include <cntabstractviewmanager.h>
#include <cntviewparams.h>
+#include <cntabstractengine.h>
class HbView;
@@ -33,7 +34,7 @@
* View is activated after its added to main window and is
* ready to be drawn.
*/
- virtual void activate( CntAbstractViewManager* aMgr, const CntViewParameters aArgs ) = 0;
+ virtual void activate( const CntViewParameters aArgs ) = 0;
/**
* View is deactivated just before its removed from
@@ -57,5 +58,10 @@
* return the view id
*/
virtual int viewId() const = 0;
+
+ /*!
+ * set engine. This must be called right after C'tor.
+ */
+ virtual void setEngine( CntAbstractEngine& aEngine ) = 0;
};
#endif /* CNTABSTRACTVIEW_H_ */
--- a/contacts_plat/contacts_ui_api/inc/cntabstractviewmanager.h Wed Aug 18 09:39:00 2010 +0300
+++ b/contacts_plat/contacts_ui_api/inc/cntabstractviewmanager.h Thu Sep 02 20:16:15 2010 +0300
@@ -35,7 +35,5 @@
/* New API */
virtual void changeView( const CntViewParameters aArgs ) = 0;
virtual void back( const CntViewParameters aArgs, bool toRoot = false ) = 0;
-
- virtual QContactManager* contactManager( const QString& aType ) = 0;
};
#endif /* CNTABSTRACTVIEWMANAGER_H_ */
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/contacts_plat/contacts_ui_extensions_api/inc/cntinfoprovider.h Thu Sep 02 20:16:15 2010 +0300
@@ -0,0 +1,90 @@
+/*
+* Copyright (c) 2010 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: Interface for info provider plugins to class CntListModel.
+*
+*/
+
+#ifndef CNTINFOPROVIDER_H
+#define CNTINFOPROVIDER_H
+
+#include <QObject>
+#include <qcontact.h>
+
+QTM_USE_NAMESPACE
+
+/*
+ Info providers may provide up to three different types of info fields:
+ text, icon1 and icon2.
+ */
+enum ContactInfoField {
+ ContactInfoTextField = 0x01,
+ ContactInfoIcon1Field = 0x02,
+ ContactInfoIcon2Field = 0x04,
+ ContactInfoAllFields = ContactInfoTextField | ContactInfoIcon1Field | ContactInfoIcon2Field
+};
+Q_DECLARE_FLAGS(ContactInfoFields, ContactInfoField)
+Q_DECLARE_OPERATORS_FOR_FLAGS(ContactInfoFields)
+
+/*
+ Interface for info provider plugins. Info provider plugins provide the kind of
+ info that a listview with contacts wants. Examples includes phone number, image url
+ and online status (text and/or icon).
+ */
+class CntInfoProvider : public QObject
+{
+
+public:
+ /*
+ The unqiue name of the plugin.
+
+ /return the id of the plugin
+ */
+ virtual QString id() const = 0;
+
+ /*
+ Checks fields that the client can provide.
+
+ /return all the ContactInfoFields that this plugin can provide to clients
+ */
+ virtual ContactInfoFields supportedFields() const = 0;
+
+ /*
+ Requests info about a contact. The requested info fields are passed
+ back to the client via infoFieldReady() signals. Ideally this function
+ should not consume more than 50 ms of time. Info that takes longer to
+ fetch should use some asynchronous way of getting the data.
+
+ Info values are by default empty, so an empty value does not need not be
+ sent back in response to this request. However, if a value *changes* and
+ becomes empty, that will of course need to be signaled.
+
+ /param contact the contact for which info is requested
+ /param requestedInfo one or more of the flags in ContactInfoFields
+ */
+ virtual void requestInfo(const QContact& contact, ContactInfoFields requestedInfo) = 0;
+
+signals:
+ /*
+ The requested info fields are passed back to the client via infoFieldReady()
+ signals, one signal per field.
+
+ /param sender the provider that sends the signal
+ /param contactId the if of the contact that this info is about
+ /param field the field that is ready (text, icon1 or icon2)
+ /param value the value of the info field
+ */
+ void infoFieldReady(CntInfoProvider* sender, int contactId, ContactInfoField field, const QString& value);
+};
+
+#endif
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/contacts_plat/contacts_ui_extensions_api/inc/cntinfoproviderfactory.h Thu Sep 02 20:16:15 2010 +0300
@@ -0,0 +1,50 @@
+/*
+* Copyright (c) 2010 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: Factory for info provider plugins to class CntListModel.
+*
+*/
+
+#ifndef CNTINFOPROVIDERFACTORY_H
+#define CNTINFOPROVIDERFACTORY_H
+
+#include <QtPlugin>
+
+class CntInfoProvider;
+
+/*
+ Factory for info provider plugins.
+
+ Plugins must be exported to /resource/qt/plugins/contacts/infoproviders
+ */
+class CntInfoProviderFactory
+{
+public:
+ virtual ~CntInfoProviderFactory() {}
+
+ /*
+ CntInfoProvider implementation provided by this factory.
+
+ /return the info provider implementation, ownership is given to the caller
+ */
+ virtual CntInfoProvider* infoProvider() = 0;
+
+ virtual void* infoProviderFactoryExt( int /*aExtensionId*/ )
+ {
+ return NULL;
+ }
+};
+
+Q_DECLARE_INTERFACE(CntInfoProviderFactory, "com.nokia.contacts.infoproviderfactory/1.0")
+
+#endif
--- a/contacts_plat/contacts_ui_extensions_api/inc/cntuiactionextension.h Wed Aug 18 09:39:00 2010 +0300
+++ b/contacts_plat/contacts_ui_extensions_api/inc/cntuiactionextension.h Thu Sep 02 20:16:15 2010 +0300
@@ -37,7 +37,7 @@
*/
// Default Symbian database, use this as uri parameter for QContactManager::fromUri.
-const QString SYMBIAN_BACKEND = "qtcontacts:symbian:";
+const QString ACTION_EXT_SYMBIAN_BACKEND = "qtcontacts:symbian:";
// First line in UI item
// This tag is used to specify localized freetext(QString) description for action, eg. "Send message". This
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/contacts_plat/contacts_ui_extensions_api/inc/cntuicontactcardextension.h Thu Sep 02 20:16:15 2010 +0300
@@ -0,0 +1,115 @@
+/*
+ * 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 CNTUICONTACTCARDEXT_H
+#define CNTUICONTACTCARDEXT_H
+
+#include <QObject>
+#include <QIcon>
+#include <QString>
+#include <qcontact.h>
+#include <qcontactdetail.h>
+
+QTM_USE_NAMESPACE
+
+
+/**
+ * Represents one extension action.
+ */
+class CntUiContactCardExtAction
+{
+public:
+
+ /// First line of text on the button.
+ virtual QString firstTextLine() const = 0;
+
+ /// Second line of text on the button.
+ virtual QString secondTextLine() const = 0;
+
+ /// Large icon that appears on the left.
+ virtual const QIcon icon() const = 0;
+
+ /**
+ * The position of the action button is set based on detail type.
+ * If the detail is empty (dummy detail) then the button appears at the end.
+ */
+ virtual const QContactDetail& detailUsedForChoosingPosition() const = 0;
+
+protected:
+ virtual ~CntUiContactCardExtAction() {}
+};
+
+
+/**
+ * UI extension class for extending Contact Card and MyCard
+ */
+class CntUiContactCardExtension : public QObject
+{
+public:
+ CntUiContactCardExtension() {}
+
+ /**
+ * Prepare the data that will be queried by other methods.
+ * \param aContact The contact which is being displayed.
+ * \param aMyCard Tells whether the contact is my contact.
+ */
+ virtual void prepare( QContact& aContact, bool aMyCard ) = 0;
+
+ /**
+ * Gives the action count.
+ * The prepare() will be called before this.
+ */
+ virtual int actionCount() const = 0;
+
+ /**
+ * Gives an action.
+ * The prepare() will be called before this.
+ */
+ virtual const CntUiContactCardExtAction& actionAt( int aIndex ) const = 0;
+
+
+ /**
+ * Allows the plugin to handle the short pressing.
+ * \param aIndex The index of the action in the scope of this extension.
+ * Should be implemented synchronously.
+ */
+ virtual void handleShortPress( int aIndex ) = 0;
+
+// TODO Pending UX comments on this.
+// virtual void handleLongPress( int aIndex ) = 0;
+
+public:
+ /// For extending this interface later on without BC break.
+ virtual void* ContactCardExtensionExtension(
+ int /*aExtensionId*/ ) { return NULL; }
+
+signals:
+
+ /**
+ * Plugin should re-implement this signal and emit it
+ * once extension data changes.
+ * Note that an action should not disappear. It can change, but not disappear.
+ */
+ void contactCardExtensionDataChanged( QList<int> aChangedActionIndexes );
+
+protected:
+ // prevent deleting by client
+ virtual ~CntUiContactCardExtension() {}
+};
+
+#endif //CNTUICONTACTCARDEXT_H
+
--- a/contacts_plat/contacts_ui_extensions_api/inc/cntuiextensionfactory.h Wed Aug 18 09:39:00 2010 +0300
+++ b/contacts_plat/contacts_ui_extensions_api/inc/cntuiextensionfactory.h Thu Sep 02 20:16:15 2010 +0300
@@ -36,6 +36,7 @@
class CntUiSocialExtension;
class CntEditViewItemSupplier;
class CntViewSupplier;
+class CntUiContactCardExtension;
QTM_BEGIN_NAMESPACE
class QContact;
@@ -56,6 +57,12 @@
virtual ~CntUiExtensionFactory() {}
/**
+ * Gives access to an interface for extending Contact Card.
+ * @return Returns null if not supported. Ownership is not given.
+ */
+ virtual CntUiContactCardExtension* contactCardExtension() = 0;
+
+ /**
* Gives access to an interface for extending UI with new groups.
* @return Returns null if not supported. Ownership is not given.
*/
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/contacts_plat/contacts_ui_extensions_api/tsrc/contactcardplugin/contactcardextension.cpp Thu Sep 02 20:16:15 2010 +0300
@@ -0,0 +1,79 @@
+/*
+ * 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: Example implementation of contact card extension.
+ *
+ */
+
+#include "contactcardextension.h"
+#include <HbMessageBox>
+
+ContactCardExtension::ContactCardExtension()
+{
+}
+
+ContactCardExtension::~ContactCardExtension()
+{
+ delete mDetail;
+}
+
+void ContactCardExtension::prepare( QContact& /*aContact*/, bool /*aMyCard*/ )
+{
+// You should examine the contact here and decide what actions are to be offered.
+
+ mDetail = new QContactDetail();
+}
+
+int ContactCardExtension::actionCount() const
+{
+ return 1;
+}
+
+const CntUiContactCardExtAction& ContactCardExtension::actionAt( int /*aIndex*/ ) const
+{
+ return *this;
+}
+
+
+void ContactCardExtension::handleShortPress( int /*aActionId*/ )
+ {
+ HbMessageBox::information("Jumping");
+ }
+
+//====================================================
+//======= from CntUiContactCardExtAction =============
+
+
+QString ContactCardExtension::firstTextLine() const
+ {
+ return QString("Jump");
+ }
+
+QString ContactCardExtension::secondTextLine() const
+ {
+ return QString("over the fence");
+ }
+
+const QIcon ContactCardExtension::icon() const
+ {
+ return QIcon("c:/jump_icon.jpg");
+ }
+
+const QContactDetail& ContactCardExtension::detailUsedForChoosingPosition() const
+ {
+ // This is not a proper example.
+ return *mDetail;
+ }
+
+
+// end of file
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/contacts_plat/contacts_ui_extensions_api/tsrc/contactcardplugin/contactcardextension.h Thu Sep 02 20:16:15 2010 +0300
@@ -0,0 +1,75 @@
+/*
+ * 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: Example implementation of contact card extension.
+ *
+ */
+
+#ifndef CONTACTCARDEXTENSION_H
+#define CONTACTCARDEXTENSION_H
+
+#include <QObject>
+#include <QtGlobal>
+
+#include <cntuicontactcardextension.h>
+#include <qmobilityglobal.h>
+#include <qcontactmanager.h>
+//#include <qcontactaction.h>
+
+
+class QtMobility::QContactManager;
+
+
+/**
+ * Example implementation of contact card extension.
+ */
+class ContactCardExtension : public CntUiContactCardExtension, public CntUiContactCardExtAction
+{
+ Q_OBJECT
+public:
+ ContactCardExtension();
+ ~ContactCardExtension();
+
+public: // from CntUiContactCardExtension
+
+ void prepare( QContact& aContact, bool aMyCard );
+
+ int actionCount() const;
+
+ const CntUiContactCardExtAction& actionAt( int aIndex ) const;
+
+ /// synchronous
+ void handleShortPress( int aIndex );
+
+public: // from CntUiContactCardExtAction
+ // Note that it can be a different class that is made to inherit from this interface.
+
+ QString firstTextLine() const;
+
+ /// Second line of text on the button.
+ QString secondTextLine() const;
+
+ const QIcon icon() const;
+
+ /// Currently, the item must map to some detail. TODO Rethink this.
+ const QContactDetail& detailUsedForChoosingPosition() const;
+
+
+signals: // from CntUiContactCardExtension
+ void contactCardExtensionDataChanged();
+
+private: // data
+ QContactDetail* mDetail;
+};
+
+#endif // CONTACTCARDEXTENSION_H
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/contacts_plat/contacts_ui_extensions_api/tsrc/contactcardplugin/contactcardplugin.pro Thu Sep 02 20:16:15 2010 +0300
@@ -0,0 +1,52 @@
+#
+# 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:
+#
+#
+
+TEMPLATE = lib
+CONFIG += plugin hb
+TARGET = $$qtLibraryTarget(contactcardplugin)
+DEPENDPATH += .
+INCLUDEPATH += .
+
+# Input
+HEADERS += \
+ contactcardextension.h \
+ extensionfactory.h
+
+SOURCES += \
+ contactcardextension.cpp \
+ extensionfactory.cpp
+
+LIBS+= -lqtcontacts \
+ -lhbcore \
+symbian:
+ {
+ load(data_caging_paths)
+ TARGET.CAPABILITY = CAP_GENERAL_DLL
+ TARGET.EPOCALLOWDLLDATA = 1
+# TARGET.UID3 = 0x20027012
+ INCLUDEPATH += $$APP_LAYER_SYSTEMINCLUDE
+ target.path = /sys/bin
+ INSTALLS += target
+ symbianplugin.sources = $${TARGET}.dll
+ symbianplugin.path = $$QT_PLUGINS_BASE_DIR/contacts/extensions
+ DEPLOYMENT += symbianplugin
+
+}
+
+target.path += $$[QT_INSTALL_PLUGINS]/contacts/extensions
+INSTALLS += target
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/contacts_plat/contacts_ui_extensions_api/tsrc/contactcardplugin/extensionfactory.cpp Thu Sep 02 20:16:15 2010 +0300
@@ -0,0 +1,72 @@
+/*
+ * 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:
+ *
+ */
+
+//User include
+#include "extensionfactory.h"
+#include "contactcardextension.h"
+
+//System includes
+#include <Qtplugin>
+//#include <cntactionsupplier.h>
+//#include <cnteditviewitemsupplier.h>
+//#include <cntuigroupsupplier.h>
+//#include <cntviewsupplier.h>
+
+ExtensionFactory::ExtensionFactory() : mContactCardExtension(NULL)
+{
+}
+
+ExtensionFactory::~ExtensionFactory()
+{
+ delete mContactCardExtension;
+}
+
+CntUiContactCardExtension* ExtensionFactory::contactCardExtension()
+{
+ if (!mContactCardExtension)
+ {
+ mContactCardExtension = new ContactCardExtension();
+ }
+ return mContactCardExtension;
+}
+
+CntUiGroupSupplier* ExtensionFactory::groupSupplier()
+{
+ return NULL;
+}
+
+CntEditViewItemSupplier* ExtensionFactory::editViewItemSupplier(QContact &/*contact*/)
+{
+ return NULL;
+}
+
+CntViewSupplier* ExtensionFactory::viewSupplier()
+{
+ return NULL;
+}
+
+CntUiSocialExtension* ExtensionFactory::socialExtension()
+{
+ return NULL;
+}
+
+bool ExtensionFactory::hasService(int /*serviceId*/)
+{
+ return true;
+}
+
+Q_EXPORT_PLUGIN2(cntuiextensionexample,ExtensionFactory)
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/contacts_plat/contacts_ui_extensions_api/tsrc/contactcardplugin/extensionfactory.h Thu Sep 02 20:16:15 2010 +0300
@@ -0,0 +1,82 @@
+/*
+ * 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 EXTENSIONFACTORY_H
+#define EXTENSIONFACTORY_H
+
+//System includes
+#include <QObject>
+
+//User includes
+#include <cntuiextensionfactory.h>
+
+class ContactCardExtension;
+
+/**
+ * Factory class for plugin
+ */
+class ExtensionFactory : public QObject, public CntUiExtensionFactory
+{
+ Q_OBJECT
+ Q_INTERFACES(CntUiExtensionFactory)
+
+public:
+ /**
+ * Constructor
+ */
+ ExtensionFactory();
+
+ /**
+ * Desctructor
+ */
+ ~ExtensionFactory();
+
+public: // from CntUiExtensionFactory
+
+ /**
+ * Gives access to an interface for extending Contact Card.
+ * @return Returns null if not supported. Ownership is not given.
+ */
+ CntUiContactCardExtension* contactCardExtension();
+
+ /**
+ * Gives access to an interface for extending UI with new groups.
+ * @return Returns null if not supported. Ownership is not given.
+ */
+ CntUiGroupSupplier* groupSupplier();
+
+ /**
+ * Gives access to an interface for extending edit view list with new items for a given contact.
+ * @return Returns null if not supported. Ownership is not given.
+ */
+ CntEditViewItemSupplier* editViewItemSupplier(QContact &contact);
+
+ /**
+ * Gives access to an interface for creating new views.
+ * @return Returns null if not supported. Ownership is not given.
+ */
+ CntViewSupplier* viewSupplier();
+
+ CntUiSocialExtension* socialExtension();
+
+ bool hasService(int serviceId);
+
+private:
+ ContactCardExtension* mContactCardExtension;
+};
+
+#endif // EXTENSIONFACTORY_H
Binary file contacts_plat/contacts_ui_extensions_api/tsrc/contactcardplugin/jump_icon.JPG has changed
--- a/inc/cntdebug.h Wed Aug 18 09:39:00 2010 +0300
+++ b/inc/cntdebug.h Thu Sep 02 20:16:15 2010 +0300
@@ -23,7 +23,7 @@
#include <QtGlobal> // qDebug()
// #define TRACK_MEMORY_LEAKS
-// #define TRACES
+#define TRACES
// #define TRACE2FILE
/*!
--- a/layers.sysdef.xml Wed Aug 18 09:39:00 2010 +0300
+++ b/layers.sysdef.xml Thu Sep 02 20:16:15 2010 +0300
@@ -11,7 +11,6 @@
<unit unitID="contacts" bldFile="&layer_real_source_path;" name="contacts" mrp="" proFile="contacts.pro"/>
<unit unitID="phonebooksync" bldFile="&layer_real_source_path;/pimprotocols/phonebooksync/group" name="phonebooksync" mrp=""/>
<unit unitID="pbap" bldFile="&layer_real_source_path;/pimprotocols/pbap/group" name="pbap" mrp=""/>
- <unit unitID="mtpcontactdp" bldFile="&layer_real_source_path;/pimprotocols/mtpcontactdp/group" name="mtpcontactdp" mrp="" filter="!sf_build"/>
<unit unitID="contactwidgethsplugin" bldFile="&layer_real_source_path;/contactwidgethsplugin" name="contactwidgethsplugin" mrp="" proFile="contactwidgethsplugin.pro"/>
</module>
--- a/phonebookengines/bwins/cntlistmodelu.def Wed Aug 18 09:39:00 2010 +0300
+++ b/phonebookengines/bwins/cntlistmodelu.def Thu Sep 02 20:16:15 2010 +0300
@@ -1,42 +1,44 @@
EXPORTS
- ?refreshModel@CntListModel@@AAEXXZ @ 1 NONAME ; void CntListModel::refreshModel(void)
- ?updateContactIdsArray@CntListModel@@AAEXXZ @ 2 NONAME ; void CntListModel::updateContactIdsArray(void)
- ?qt_metacall@CntListModel@@UAEHW4Call@QMetaObject@@HPAPAX@Z @ 3 NONAME ; int CntListModel::qt_metacall(enum QMetaObject::Call, int, void * *)
- ?setFilter@CntListModel@@QAEXABVQContactFilter@QtMobility@@@Z @ 4 NONAME ; void CntListModel::setFilter(class QtMobility::QContactFilter const &)
- ?indexOfContact@CntListModel@@QBE?AVQModelIndex@@ABVQContact@QtMobility@@@Z @ 5 NONAME ; class QModelIndex CntListModel::indexOfContact(class QtMobility::QContact const &) const
- ?staticMetaObject@CntListModel@@2UQMetaObject@@B @ 6 NONAME ; struct QMetaObject const CntListModel::staticMetaObject
- ?rowId@CntListModel@@ABEHABI@Z @ 7 NONAME ; int CntListModel::rowId(unsigned int const &) const
- ?contact@CntListModel@@ABE?AVQContact@QtMobility@@H@Z @ 8 NONAME ; class QtMobility::QContact CntListModel::contact(int) const
- ?rowCount@CntListModel@@UBEHABVQModelIndex@@@Z @ 9 NONAME ; int CntListModel::rowCount(class QModelIndex const &) const
- ?trUtf8@CntListModel@@SA?AVQString@@PBD0H@Z @ 10 NONAME ; class QString CntListModel::trUtf8(char const *, char const *, int)
- ?doConstruct@CntListModel@@AAEHXZ @ 11 NONAME ; int CntListModel::doConstruct(void)
- ??0CntListModel@@QAE@PAVQContactManager@QtMobility@@ABVQContactFilter@2@_NPAVQObject@@@Z @ 12 NONAME ; CntListModel::CntListModel(class QtMobility::QContactManager *, class QtMobility::QContactFilter const &, bool, class QObject *)
- ?handleChanged@CntListModel@@AAEXABV?$QList@I@@@Z @ 13 NONAME ; void CntListModel::handleChanged(class QList<unsigned int> const &)
- ?myCardStatus@CntListModel@@QBE_NXZ @ 14 NONAME ; bool CntListModel::myCardStatus(void) const
- ?data@CntListModel@@UBE?AVQVariant@@ABVQModelIndex@@H@Z @ 15 NONAME ; class QVariant CntListModel::data(class QModelIndex const &, int) const
- ?initializeData@CntListModel@@AAEHXZ @ 16 NONAME ; int CntListModel::initializeData(void)
- ?dataForDisplayRole@CntListModel@@ABE?AVQVariant@@H@Z @ 17 NONAME ; class QVariant CntListModel::dataForDisplayRole(int) const
- ?setSortOrder@CntListModel@@AAEXXZ @ 18 NONAME ; void CntListModel::setSortOrder(void)
- ?qt_metacast@CntListModel@@UAEPAXPBD@Z @ 19 NONAME ; void * CntListModel::qt_metacast(char const *)
- ?contact@CntListModel@@QBE?AVQContact@QtMobility@@ABVQModelIndex@@@Z @ 20 NONAME ; class QtMobility::QContact CntListModel::contact(class QModelIndex const &) const
- ?handleContactInfoUpdated@CntListModel@@AAEXI@Z @ 21 NONAME ; void CntListModel::handleContactInfoUpdated(unsigned int)
- ?showMyCard@CntListModel@@QAEX_N@Z @ 22 NONAME ; void CntListModel::showMyCard(bool)
- ??_ECntListModel@@UAE@I@Z @ 23 NONAME ; CntListModel::~CntListModel(unsigned int)
- ?contactManager@CntListModel@@QBEAAVQContactManager@QtMobility@@XZ @ 24 NONAME ; class QtMobility::QContactManager & CntListModel::contactManager(void) const
- ?metaObject@CntListModel@@UBEPBUQMetaObject@@XZ @ 25 NONAME ; struct QMetaObject const * CntListModel::metaObject(void) const
- ?myCardId@CntListModel@@QBEIXZ @ 26 NONAME ; unsigned int CntListModel::myCardId(void) const
- ?validRowId@CntListModel@@ABE_NH@Z @ 27 NONAME ; bool CntListModel::validRowId(int) const
- ?handleRemoved@CntListModel@@AAEXABV?$QList@I@@@Z @ 28 NONAME ; void CntListModel::handleRemoved(class QList<unsigned int> const &)
- ?tr@CntListModel@@SA?AVQString@@PBD0@Z @ 29 NONAME ; class QString CntListModel::tr(char const *, char const *)
- ?getStaticMetaObject@CntListModel@@SAABUQMetaObject@@XZ @ 30 NONAME ; struct QMetaObject const & CntListModel::getStaticMetaObject(void)
- ?handleAdded@CntListModel@@AAEXABV?$QList@I@@@Z @ 31 NONAME ; void CntListModel::handleAdded(class QList<unsigned int> const &)
- ?trUtf8@CntListModel@@SA?AVQString@@PBD0@Z @ 32 NONAME ; class QString CntListModel::trUtf8(char const *, char const *)
- ??0CntListModel@@QAE@ABVQContactFilter@QtMobility@@_NPAVQObject@@@Z @ 33 NONAME ; CntListModel::CntListModel(class QtMobility::QContactFilter const &, bool, class QObject *)
- ??1CntListModel@@UAE@XZ @ 34 NONAME ; CntListModel::~CntListModel(void)
- ?tr@CntListModel@@SA?AVQString@@PBD0H@Z @ 35 NONAME ; class QString CntListModel::tr(char const *, char const *, int)
- ?handleMyCardChanged@CntListModel@@AAEXABI0@Z @ 36 NONAME ; void CntListModel::handleMyCardChanged(unsigned int const &, unsigned int const &)
- ?handleRemovedRelationship@CntListModel@@AAEXABV?$QList@I@@@Z @ 37 NONAME ; void CntListModel::handleRemovedRelationship(class QList<unsigned int> const &)
- ?handleAddedRelationship@CntListModel@@AAEXABV?$QList@I@@@Z @ 38 NONAME ; void CntListModel::handleAddedRelationship(class QList<unsigned int> const &)
- ?handleRowSettingChanged@CntListModel@@AAEXABVXQSettingsKey@@ABVQVariant@@@Z @ 39 NONAME ; void CntListModel::handleRowSettingChanged(class XQSettingsKey const &, class QVariant const &)
- ?updateRelationships@CntListModel@@AAEXXZ @ 40 NONAME ; void CntListModel::updateRelationships(void)
+ ?updateRelationships@CntListModel@@AAEXXZ @ 1 NONAME ; void CntListModel::updateRelationships(void)
+ ?handleRemovedRelationship@CntListModel@@AAEXABV?$QList@I@@@Z @ 2 NONAME ; void CntListModel::handleRemovedRelationship(class QList<unsigned int> const &)
+ ?refreshModel@CntListModel@@AAEXXZ @ 3 NONAME ; void CntListModel::refreshModel(void)
+ ?contact@CntListModel@@QBE?AVQContact@QtMobility@@ABVQModelIndex@@@Z @ 4 NONAME ; class QtMobility::QContact CntListModel::contact(class QModelIndex const &) const
+ ?updateContactIdsArray@CntListModel@@AAEXXZ @ 5 NONAME ; void CntListModel::updateContactIdsArray(void)
+ ?qt_metacall@CntListModel@@UAEHW4Call@QMetaObject@@HPAPAX@Z @ 6 NONAME ; int CntListModel::qt_metacall(enum QMetaObject::Call, int, void * *)
+ ?setFilter@CntListModel@@QAEXABVQContactFilter@QtMobility@@@Z @ 7 NONAME ; void CntListModel::setFilter(class QtMobility::QContactFilter const &)
+ ?indexOfContact@CntListModel@@QBE?AVQModelIndex@@ABVQContact@QtMobility@@@Z @ 8 NONAME ; class QModelIndex CntListModel::indexOfContact(class QtMobility::QContact const &) const
+ ?handleContactInfoUpdated@CntListModel@@AAEXI@Z @ 9 NONAME ; void CntListModel::handleContactInfoUpdated(unsigned int)
+ ?staticMetaObject@CntListModel@@2UQMetaObject@@B @ 10 NONAME ; struct QMetaObject const CntListModel::staticMetaObject
+ ?showMyCard@CntListModel@@QAEX_N@Z @ 11 NONAME ; void CntListModel::showMyCard(bool)
+ ?rowId@CntListModel@@ABEHABI@Z @ 12 NONAME ; int CntListModel::rowId(unsigned int const &) const
+ ?contact@CntListModel@@ABE?AVQContact@QtMobility@@H@Z @ 13 NONAME ; class QtMobility::QContact CntListModel::contact(int) const
+ ??_ECntListModel@@UAE@I@Z @ 14 NONAME ; CntListModel::~CntListModel(unsigned int)
+ ?handleAddedRelationship@CntListModel@@AAEXABV?$QList@I@@@Z @ 15 NONAME ; void CntListModel::handleAddedRelationship(class QList<unsigned int> const &)
+ ?contactManager@CntListModel@@QBEAAVQContactManager@QtMobility@@XZ @ 16 NONAME ; class QtMobility::QContactManager & CntListModel::contactManager(void) const
+ ?rowCount@CntListModel@@UBEHABVQModelIndex@@@Z @ 17 NONAME ; int CntListModel::rowCount(class QModelIndex const &) const
+ ?trUtf8@CntListModel@@SA?AVQString@@PBD0H@Z @ 18 NONAME ; class QString CntListModel::trUtf8(char const *, char const *, int)
+ ?metaObject@CntListModel@@UBEPBUQMetaObject@@XZ @ 19 NONAME ; struct QMetaObject const * CntListModel::metaObject(void) const
+ ?doConstruct@CntListModel@@AAEHXZ @ 20 NONAME ; int CntListModel::doConstruct(void)
+ ?myCardId@CntListModel@@QBEIXZ @ 21 NONAME ; unsigned int CntListModel::myCardId(void) const
+ ?contactId@CntListModel@@QBEIABVQModelIndex@@@Z @ 22 NONAME ; unsigned int CntListModel::contactId(class QModelIndex const &) const
+ ?validRowId@CntListModel@@ABE_NH@Z @ 23 NONAME ; bool CntListModel::validRowId(int) const
+ ??0CntListModel@@QAE@PAVQContactManager@QtMobility@@ABVQContactFilter@2@_NPAVQObject@@@Z @ 24 NONAME ; CntListModel::CntListModel(class QtMobility::QContactManager *, class QtMobility::QContactFilter const &, bool, class QObject *)
+ ?handleRemoved@CntListModel@@AAEXABV?$QList@I@@@Z @ 25 NONAME ; void CntListModel::handleRemoved(class QList<unsigned int> const &)
+ ?tr@CntListModel@@SA?AVQString@@PBD0@Z @ 26 NONAME ; class QString CntListModel::tr(char const *, char const *)
+ ?myCardStatus@CntListModel@@QBE_NXZ @ 27 NONAME ; bool CntListModel::myCardStatus(void) const
+ ?handleChanged@CntListModel@@AAEXABV?$QList@I@@@Z @ 28 NONAME ; void CntListModel::handleChanged(class QList<unsigned int> const &)
+ ?getStaticMetaObject@CntListModel@@SAABUQMetaObject@@XZ @ 29 NONAME ; struct QMetaObject const & CntListModel::getStaticMetaObject(void)
+ ?initializeData@CntListModel@@AAEHXZ @ 30 NONAME ; int CntListModel::initializeData(void)
+ ?data@CntListModel@@UBE?AVQVariant@@ABVQModelIndex@@H@Z @ 31 NONAME ; class QVariant CntListModel::data(class QModelIndex const &, int) const
+ ?handleRowSettingChanged@CntListModel@@AAEXABVXQSettingsKey@@ABVQVariant@@@Z @ 32 NONAME ; void CntListModel::handleRowSettingChanged(class XQSettingsKey const &, class QVariant const &)
+ ?handleAdded@CntListModel@@AAEXABV?$QList@I@@@Z @ 33 NONAME ; void CntListModel::handleAdded(class QList<unsigned int> const &)
+ ?trUtf8@CntListModel@@SA?AVQString@@PBD0@Z @ 34 NONAME ; class QString CntListModel::trUtf8(char const *, char const *)
+ ??1CntListModel@@UAE@XZ @ 35 NONAME ; CntListModel::~CntListModel(void)
+ ??0CntListModel@@QAE@ABVQContactFilter@QtMobility@@_NPAVQObject@@@Z @ 36 NONAME ; CntListModel::CntListModel(class QtMobility::QContactFilter const &, bool, class QObject *)
+ ?tr@CntListModel@@SA?AVQString@@PBD0H@Z @ 37 NONAME ; class QString CntListModel::tr(char const *, char const *, int)
+ ?dataForRole@CntListModel@@ABE?AVQVariant@@HH@Z @ 38 NONAME ; class QVariant CntListModel::dataForRole(int, int) const
+ ?handleMyCardChanged@CntListModel@@AAEXABI0@Z @ 39 NONAME ; void CntListModel::handleMyCardChanged(unsigned int const &, unsigned int const &)
+ ?setSortOrder@CntListModel@@AAEXXZ @ 40 NONAME ; void CntListModel::setSortOrder(void)
+ ?qt_metacast@CntListModel@@UAEPAXPBD@Z @ 41 NONAME ; void * CntListModel::qt_metacast(char const *)
+ ?indexOfContactId@CntListModel@@QBE?AVQModelIndex@@ABI@Z @ 42 NONAME ; class QModelIndex CntListModel::indexOfContactId(unsigned int const &) const
--- a/phonebookengines/bwins/cntmaptileserviceu.def Wed Aug 18 09:39:00 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,20 +0,0 @@
-EXPORTS
- ?qt_metacall@CntMapTileService@@UAEHW4Call@QMetaObject@@HPAPAX@Z @ 1 NONAME ; int CntMapTileService::qt_metacall(enum QMetaObject::Call, int, void * *)
- ??_ECntMapTileService@@UAE@I@Z @ 2 NONAME ; CntMapTileService::~CntMapTileService(unsigned int)
- ??0CntMapTileService@@QAE@XZ @ 3 NONAME ; CntMapTileService::CntMapTileService(void)
- ?tr@CntMapTileService@@SA?AVQString@@PBD0H@Z @ 4 NONAME ; class QString CntMapTileService::tr(char const *, char const *, int)
- ??1CntMapTileService@@UAE@XZ @ 5 NONAME ; CntMapTileService::~CntMapTileService(void)
- ?publishValue@CntMapTileService@@AAEXHW4ContactAddressType@1@H@Z @ 6 NONAME ; void CntMapTileService::publishValue(int, enum CntMapTileService::ContactAddressType, int)
- ?trUtf8@CntMapTileService@@SA?AVQString@@PBD0H@Z @ 7 NONAME ; class QString CntMapTileService::trUtf8(char const *, char const *, int)
- ?trUtf8@CntMapTileService@@SA?AVQString@@PBD0@Z @ 8 NONAME ; class QString CntMapTileService::trUtf8(char const *, char const *)
- ?qt_metacast@CntMapTileService@@UAEPAXPBD@Z @ 9 NONAME ; void * CntMapTileService::qt_metacast(char const *)
- ?getMapTileImage@CntMapTileService@@QAEHHW4ContactAddressType@1@AAVQString@@V?$QFlags@W4Orientation@Qt@@@@@Z @ 10 NONAME ; int CntMapTileService::getMapTileImage(int, enum CntMapTileService::ContactAddressType, class QString &, class QFlags<enum Qt::Orientation>)
- ?isLocationFeatureEnabled@CntMapTileService@@QAE_NXZ @ 11 NONAME ; bool CntMapTileService::isLocationFeatureEnabled(void)
- ?setMaptileStatus@CntMapTileService@@QAEXXZ @ 12 NONAME ; void CntMapTileService::setMaptileStatus(void)
- ?maptileFetchingStatusUpdate@CntMapTileService@@IAEXHHH@Z @ 13 NONAME ; void CntMapTileService::maptileFetchingStatusUpdate(int, int, int)
- ?tr@CntMapTileService@@SA?AVQString@@PBD0@Z @ 14 NONAME ; class QString CntMapTileService::tr(char const *, char const *)
- ?readEntryFromMaptileDataBase@CntMapTileService@@AAEHHW4ContactAddressType@1@AAVTLookupItem@@AAH@Z @ 15 NONAME ; int CntMapTileService::readEntryFromMaptileDataBase(int, enum CntMapTileService::ContactAddressType, class TLookupItem &, int &)
- ?getStaticMetaObject@CntMapTileService@@SAABUQMetaObject@@XZ @ 16 NONAME ; struct QMetaObject const & CntMapTileService::getStaticMetaObject(void)
- ?metaObject@CntMapTileService@@UBEPBUQMetaObject@@XZ @ 17 NONAME ; struct QMetaObject const * CntMapTileService::metaObject(void) const
- ?staticMetaObject@CntMapTileService@@2UQMetaObject@@B @ 18 NONAME ; struct QMetaObject const CntMapTileService::staticMetaObject
-
--- a/phonebookengines/bwins/cntsimutilityu.def Wed Aug 18 09:39:00 2010 +0300
+++ b/phonebookengines/bwins/cntsimutilityu.def Thu Sep 02 20:16:15 2010 +0300
@@ -15,16 +15,16 @@
?startGetAvailableStores@CntSimUtility@@QAE_NXZ @ 14 NONAME ; bool CntSimUtility::startGetAvailableStores(void)
?verifyPin2Code@CntSimUtility@@QAE_NXZ @ 15 NONAME ; bool CntSimUtility::verifyPin2Code(void)
?ParseServiceTable@CntSimUtility@@ABEXPAUAvailableStores@1@@Z @ 16 NONAME ; void CntSimUtility::ParseServiceTable(struct CntSimUtility::AvailableStores *) const
- ?qt_metacast@CntSimUtility@@UAEPAXPBD@Z @ 17 NONAME ; void * CntSimUtility::qt_metacast(char const *)
- ?simInfoReady@CntSimUtility@@IAEXAAUSimInfo@1@H@Z @ 18 NONAME ; void CntSimUtility::simInfoReady(struct CntSimUtility::SimInfo &, int)
- ?isFdnActive@CntSimUtility@@QAE_NXZ @ 19 NONAME ; bool CntSimUtility::isFdnActive(void)
- ?qt_metacall@CntSimUtility@@UAEHW4Call@QMetaObject@@HPAPAX@Z @ 20 NONAME ; int CntSimUtility::qt_metacall(enum QMetaObject::Call, int, void * *)
- ?trUtf8@CntSimUtility@@SA?AVQString@@PBD0H@Z @ 21 NONAME ; class QString CntSimUtility::trUtf8(char const *, char const *, int)
- ?trUtf8@CntSimUtility@@SA?AVQString@@PBD0@Z @ 22 NONAME ; class QString CntSimUtility::trUtf8(char const *, char const *)
- ?startGetSimInfo@CntSimUtility@@QAE_NXZ @ 23 NONAME ; bool CntSimUtility::startGetSimInfo(void)
- ?staticMetaObject@CntSimUtility@@2UQMetaObject@@B @ 24 NONAME ; struct QMetaObject const CntSimUtility::staticMetaObject
- ?RequestCompleted@CntSimUtility@@QAEXH@Z @ 25 NONAME ; void CntSimUtility::RequestCompleted(int)
- ??1CntSimUtility@@UAE@XZ @ 26 NONAME ; CntSimUtility::~CntSimUtility(void)
- ?getLastImportTime@CntSimUtility@@QAE?AVQDateTime@@AAH@Z @ 27 NONAME ; class QDateTime CntSimUtility::getLastImportTime(int &)
- ?setLastImportTime@CntSimUtility@@QAEXAAH@Z @ 28 NONAME ; void CntSimUtility::setLastImportTime(int &)
+ ?getLastImportTime@CntSimUtility@@QAE?AVQDateTime@@AAH@Z @ 17 NONAME ; class QDateTime CntSimUtility::getLastImportTime(int &)
+ ?qt_metacast@CntSimUtility@@UAEPAXPBD@Z @ 18 NONAME ; void * CntSimUtility::qt_metacast(char const *)
+ ?simInfoReady@CntSimUtility@@IAEXAAUSimInfo@1@H@Z @ 19 NONAME ; void CntSimUtility::simInfoReady(struct CntSimUtility::SimInfo &, int)
+ ?isFdnActive@CntSimUtility@@QAE_NXZ @ 20 NONAME ; bool CntSimUtility::isFdnActive(void)
+ ?qt_metacall@CntSimUtility@@UAEHW4Call@QMetaObject@@HPAPAX@Z @ 21 NONAME ; int CntSimUtility::qt_metacall(enum QMetaObject::Call, int, void * *)
+ ?trUtf8@CntSimUtility@@SA?AVQString@@PBD0H@Z @ 22 NONAME ; class QString CntSimUtility::trUtf8(char const *, char const *, int)
+ ?trUtf8@CntSimUtility@@SA?AVQString@@PBD0@Z @ 23 NONAME ; class QString CntSimUtility::trUtf8(char const *, char const *)
+ ?startGetSimInfo@CntSimUtility@@QAE_NXZ @ 24 NONAME ; bool CntSimUtility::startGetSimInfo(void)
+ ?setLastImportTime@CntSimUtility@@QAEXAAH@Z @ 25 NONAME ; void CntSimUtility::setLastImportTime(int &)
+ ?staticMetaObject@CntSimUtility@@2UQMetaObject@@B @ 26 NONAME ; struct QMetaObject const CntSimUtility::staticMetaObject
+ ?RequestCompleted@CntSimUtility@@QAEXH@Z @ 27 NONAME ; void CntSimUtility::RequestCompleted(int)
+ ??1CntSimUtility@@UAE@XZ @ 28 NONAME ; CntSimUtility::~CntSimUtility(void)
--- a/phonebookengines/cntactions/src/cntaction.cpp Wed Aug 18 09:39:00 2010 +0300
+++ b/phonebookengines/cntactions/src/cntaction.cpp Thu Sep 02 20:16:15 2010 +0300
@@ -157,23 +157,19 @@
return supported;
}
-//common code to perform a call, videocall and message action
+//common code to perform a call, videocall action
void CntAction::performNumberAction(const QString &interface, const QString &operation)
{
- QVariantList args;
QVariant retValue;
- // 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");
- XQServiceRequest snd(interface, operation, false);
+ // XQApplicationManager is not supported by PhoneUI to initiate calls,
+ // only old approarch using XQServiceRequest can be used.
+ XQServiceRequest snd(interface, operation); //sync request
//QContactType == TypeGroup
if (QContactType::TypeGroup == m_contact.type()) {
QContactPhoneNumber conferenceCall = m_contact.detail<QContactPhoneNumber>();
- args << conferenceCall.number() << m_contact.localId() << m_contact.displayLabel();
- // TODO remove once call action works
snd << conferenceCall.number() << m_contact.localId() << m_contact.displayLabel();
snd.send(retValue);
emitResult(snd.latestError(), retValue);
@@ -183,8 +179,6 @@
else if (m_detail.definitionName() == QContactPhoneNumber::DefinitionName) {
const QContactPhoneNumber &phoneNumber = static_cast<const QContactPhoneNumber &>(m_detail);
- args << phoneNumber.number() << m_contact.localId() << m_contact.displayLabel();
-
snd << phoneNumber.number() << m_contact.localId() << m_contact.displayLabel();
snd.send(retValue);
emitResult(snd.latestError(), retValue);
@@ -206,8 +200,6 @@
phoneNumber = static_cast<QContactPhoneNumber>(detail);
}
- args << phoneNumber.number() << m_contact.localId() << m_contact.displayLabel();
-
snd << phoneNumber.number() << m_contact.localId() << m_contact.displayLabel();
snd.send(retValue);
emitResult(snd.latestError(), retValue);
--- a/phonebookengines/cntactions/src/cntbrowseraction.cpp Wed Aug 18 09:39:00 2010 +0300
+++ b/phonebookengines/cntactions/src/cntbrowseraction.cpp Thu Sep 02 20:16:15 2010 +0300
@@ -19,6 +19,7 @@
#include <qcontacturl.h>
#include <qcontactfilters.h>
+#include <QDesktopServices>
//Action class
CntBrowserAction::CntBrowserAction() :
@@ -57,13 +58,23 @@
void CntBrowserAction::performAction()
{
- QVariant retValue;
- emitResult(GeneralError, retValue);
-
- /*
- QString service("com.nokia.services.telephony");
- QString type("dial(QString,int)");
-
- performNumberAction(service, type);
- */
+ if (m_detail.definitionName() == QContactUrl::DefinitionName)
+ {
+ const QContactUrl &contactUrl = static_cast<const QContactUrl &>(m_detail);
+
+ QString address = contactUrl.url();
+ if (!address.startsWith("http://"))
+ {
+ address.prepend("http://");
+ }
+
+ bool success = QDesktopServices::openUrl(QUrl(address));
+ QVariant retValue;
+ emitResult(success, retValue);
+ }
+ else
+ {
+ QVariant retValue;
+ emitResult(GeneralError, retValue);
+ }
}
--- a/phonebookengines/cntlistmodel/cntlistmodel.pro Wed Aug 18 09:39:00 2010 +0300
+++ b/phonebookengines/cntlistmodel/cntlistmodel.pro Thu Sep 02 20:16:15 2010 +0300
@@ -1,30 +1,18 @@
-#
# 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:
-#
-#
-
-
TEMPLATE = lib
TARGET = cntlistmodel
+DEFINES += dll \
+ BUILD_CNTLISTMODEL
-DEFINES += dll \
- BUILD_CNTLISTMODEL
-
MOC_DIR = moc
CONFIG += hb
@@ -37,46 +25,45 @@
INCLUDEPATH += inc
INCLUDEPATH += ../../inc
-
-INTERNAL_PUBLIC_HEADERS += \
- inc/cntlistmodelglobal.h \
- inc/cntlistmodel.h
+INTERNAL_PUBLIC_HEADERS += inc/cntlistmodelglobal.h \
+ inc/cntlistmodel.h
HEADERS += $$INTERNAL_PUBLIC_HEADERS \
- inc/cntlistmodel_p.h \
- inc/cntcache.h \
- inc/cntcache_p.h \
- inc/cntinfoprovider.h \
- inc/cntdefaultinfoprovider.h \
- inc/cntpresenceinfoprovider.h \
- ../../inc/cntdebug.h
+ inc/cntlistmodel_p.h \
+ inc/cntcache.h \
+ inc/cntcache_p.h \
+ inc/cntdefaultinfoprovider.h \
+ inc/cntpresenceinfoprovider.h \
+ inc/cntdisplaytextformatter.h \
+ ../../inc/cntdebug.h
SOURCES += src/cntlistmodel.cpp \
- src/cntcache.cpp \
- src/cntcache_p.cpp \
- src/cntdefaultinfoprovider.cpp \
- src/cntpresenceinfoprovider.cpp
-
+ src/cntcache.cpp \
+ src/cntcache_p.cpp \
+ src/cntdefaultinfoprovider.cpp \
+ src/cntpresenceinfoprovider.cpp \
+ src/cntdisplaytextformatter.cpp
+
LIBS += -lQtContacts \
- -lhbcore \
- -lthumbnailmanagerqt \
- -lpresencecacheqt \
- -lxqsettingsmanager
-
+ -lhbcore \
+ -lthumbnailmanagerqt \
+ -lpresencecacheqt \
+ -lxqsettingsmanager
+
deploy.path = /
headers.sources = $$INTERNAL_PUBLIC_HEADERS
-headers.path = /epoc32/include/app #change this to internal folder
+headers.path = /epoc32/include/app # change this to internal folder
DEPLOYMENT += exportheaders
# This is for new exporting system coming in garden
for(header, headers.sources):BLD_INF_RULES.prj_exports += "$$header $$deploy.path$$headers.path/$$basename(header)"
-defBlock = \
- "$${LITERAL_HASH}if defined(EABI)" \
- "DEFFILE ../eabi/cntlistmodel.def" \
+:BLD_INF_RULES.prj_exports += "../../contacts_plat/contacts_ui_extensions_api/inc/cntinfoproviderfactory.h APP_LAYER_PLATFORM_EXPORT_PATH(cntinfoproviderfactory.h)"
+:BLD_INF_RULES.prj_exports += "../../contacts_plat/contacts_ui_extensions_api/inc/cntinfoprovider.h APP_LAYER_PLATFORM_EXPORT_PATH(cntinfoprovider.h)"
+
+defBlock = "$${LITERAL_HASH}if defined(EABI)" \
+ "DEFFILE ../eabi/cntlistmodel.def" \
"$${LITERAL_HASH}else" \
- "DEFFILE ../bwins/cntlistmodel.def" \
- "$${LITERAL_HASH}endif"
+ "DEFFILE ../bwins/cntlistmodel.def" \
+ "$${LITERAL_HASH}endif"
MMP_RULES += defBlock
-
-
--- a/phonebookengines/cntlistmodel/inc/cntdefaultinfoprovider.h Wed Aug 18 09:39:00 2010 +0300
+++ b/phonebookengines/cntlistmodel/inc/cntdefaultinfoprovider.h Thu Sep 02 20:16:15 2010 +0300
@@ -20,7 +20,7 @@
#ifndef CNTDEFAULTPROVIDER_H
#define CNTDEFAULTPROVIDER_H
-#include "cntinfoprovider.h"
+#include <cntinfoprovider.h>
#include <qcontact.h>
QTM_USE_NAMESPACE
@@ -38,6 +38,9 @@
QString id() const { return "default"; };
ContactInfoFields supportedFields() const;
void requestInfo(const QContact& contact, ContactInfoFields requestedInfo);
+
+signals:
+ void infoFieldReady(CntInfoProvider* sender, int contactId, ContactInfoField field, const QString& value);
};
#endif
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/phonebookengines/cntlistmodel/inc/cntdisplaytextformatter.h Thu Sep 02 20:16:15 2010 +0300
@@ -0,0 +1,79 @@
+/*
+* 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 CNTDISPLAYTEXTFORMATTER_H_
+#define CNTDISPLAYTEXTFORMATTER_H_
+
+#include <QObject>
+#include <qcontactfilter.h>
+QTM_USE_NAMESPACE
+
+#define TAG_START "<span style=\"background-color:%1;color:%2\">"
+#define TAG_END "</span>"
+
+class CntDisplayTextFormatter
+{
+public:
+ virtual ~CntDisplayTextFormatter(){}
+ virtual QString formattedText( const QString aText, const QContactFilter& aCriteria ) = 0;
+};
+
+class CntDummyDisplayTextFormatter : public QObject, public CntDisplayTextFormatter
+{
+ Q_OBJECT
+public:
+ CntDummyDisplayTextFormatter(){}
+ ~CntDummyDisplayTextFormatter(){}
+
+ inline QString formattedText( const QString aText, const QContactFilter& aCriteria )
+ {
+ Q_UNUSED( aCriteria );
+ return aText;
+ }
+};
+
+class CntHTMLDisplayTextFormatter : public QObject, public CntDisplayTextFormatter
+{
+ Q_OBJECT
+
+public:
+ CntHTMLDisplayTextFormatter();
+ virtual ~CntHTMLDisplayTextFormatter();
+
+ /*!
+ * Format given text with applied filter. Not that only following filter is supported:
+ *
+ * QContactDetailFilter filter;
+ * filter.setDetailDefinitionName( QContactDisplayLabel::DefinitionName );
+ * filter.setMatchFlags( QContactDetailFilter::MatchStartsWith );
+ *
+ * \param aText Buffer where to format
+ * \param aCriteria Applied filter
+ */
+ QString formattedText( const QString aText, const QContactFilter& aCriteria );
+
+ /*!
+ * Insert tag to given text leaving given number
+ * of characters between start and end tag.
+ * By default highlight is inserted.
+ *
+ * \param aText Buffer where to insert tags
+ * \param aNumOfCharacters Number of characters to highlight
+ */
+ virtual void insertTag( QString& aText, int aNumOfCharacters );
+};
+#endif /* CNTDISPLAYTEXTFORMATTER_H_ */
--- a/phonebookengines/cntlistmodel/inc/cntinfoprovider.h Wed Aug 18 09:39:00 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,90 +0,0 @@
-/*
-* Copyright (c) 2010 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: Interface for info provider plugins to class CntListModel.
-*
-*/
-
-#ifndef CNTINFOPROVIDER_H
-#define CNTINFOPROVIDER_H
-
-#include <QObject>
-#include <qcontact.h>
-
-QTM_USE_NAMESPACE
-
-/*
- Info providers may provide up to three different types of info fields:
- text, icon1 and icon2.
- */
-enum ContactInfoField {
- ContactInfoTextField = 0x01,
- ContactInfoIcon1Field = 0x02,
- ContactInfoIcon2Field = 0x04,
- ContactInfoAllFields = ContactInfoTextField | ContactInfoIcon1Field | ContactInfoIcon2Field
-};
-Q_DECLARE_FLAGS(ContactInfoFields, ContactInfoField)
-Q_DECLARE_OPERATORS_FOR_FLAGS(ContactInfoFields)
-
-/*
- Interface for info provider plugins. Info provider plugins provide the kind of
- info that a listview with contacts wants. Examples includes phone number, image url
- and online status (text and/or icon).
- */
-class CntInfoProvider : public QObject
-{
- Q_OBJECT
-public:
- /*
- The unqiue name of the plugin.
-
- /return the id of the plugin
- */
- virtual QString id() const = 0;
-
- /*
- Checks fields that the client can provide.
-
- /return all the ContactInfoFields that this plugin can provide to clients
- */
- virtual ContactInfoFields supportedFields() const = 0;
-
- /*
- Requests info about a contact. The requested info fields are passed
- back to the client via infoFieldReady() signals. Ideally this function
- should not consume more than 50 ms of time. Info that takes longer to
- fetch should use some asynchronous way of getting the data.
-
- Info values are by default empty, so an empty value does not need not be
- sent back in response to this request. However, if a value *changes* and
- becomes empty, that will of course need to be signaled.
-
- /param contact the contact for which info is requested
- /param requestedInfo one or more of the flags in ContactInfoFields
- */
- virtual void requestInfo(const QContact& contact, ContactInfoFields requestedInfo) = 0;
-
-signals:
- /*
- The requested info fields are passed back to the client via infoFieldReady()
- signals, one signal per field.
-
- /param sender the provider that sends the signal
- /param contactId the if of the contact that this info is about
- /param field the field that is ready (text, icon1 or icon2)
- /param value the value of the info field
- */
- void infoFieldReady(CntInfoProvider* sender, int contactId, ContactInfoField field, const QString& value);
-};
-
-#endif
--- a/phonebookengines/cntlistmodel/inc/cntlistmodel.h Wed Aug 18 09:39:00 2010 +0300
+++ b/phonebookengines/cntlistmodel/inc/cntlistmodel.h Thu Sep 02 20:16:15 2010 +0300
@@ -30,6 +30,7 @@
class CntListModelData;
class XQSettingsKey;
+class CntDisplayTextFormatter;
/*!
* CntListModel is a list model view for contacts database
@@ -61,13 +62,15 @@
public:
QContact contact(const QModelIndex &index) const;
+ QContactLocalId contactId(const QModelIndex &index) const;
QModelIndex indexOfContact(const QContact &contact) const;
+ QModelIndex indexOfContactId(const QContactLocalId &contactId) const;
QContactManager& contactManager() const;
void setFilter(const QContactFilter& contactFilter = QContactFilter());
void showMyCard(bool enabled);
bool myCardStatus() const;
QContactLocalId myCardId() const;
-
+
private:
// Construction helpers
int doConstruct();
@@ -81,7 +84,7 @@
// Utility
bool validRowId(int row) const;
int rowId(const QContactLocalId &contactId) const;
- QVariant dataForDisplayRole(int row) const;
+ QVariant dataForRole(int row, int role) const;
void updateRelationships();
private slots:
--- a/phonebookengines/cntlistmodel/inc/cntlistmodel_p.h Wed Aug 18 09:39:00 2010 +0300
+++ b/phonebookengines/cntlistmodel/inc/cntlistmodel_p.h Thu Sep 02 20:16:15 2010 +0300
@@ -23,11 +23,12 @@
#include <qcontactmanager.h>
#include <qcontactfilter.h>
+#include <qcontactdetailfilter.h>
#include <qcontactsortorder.h>
#include <cntuids.h>
#include "cntcache.h"
#include <cntdebug.h>
-
+#include "cntdisplaytextformatter.h"
#include <xqsettingsmanager.h>
#include <xqsettingskey.h>
@@ -45,7 +46,8 @@
m_Settings(NULL),
m_NameListRowSettingkey(NULL),
m_currentRowSetting(0),
- m_groupId(-1)
+ m_groupId(-1),
+ m_Format( new CntDummyDisplayTextFormatter )
{
setFilter(contactFilter);
}
@@ -56,6 +58,7 @@
delete m_contactManager;
delete m_Settings;
delete m_NameListRowSettingkey;
+ delete m_Format;
}
void setFilter(const QContactFilter& contactFilter)
@@ -73,6 +76,28 @@
}
else {
m_groupId = -1;
+
+ // set proper text formatter for the display name.
+ if ( contactFilter.type() == QContactFilter::ContactDetailFilter )
+ {
+ delete m_Format;
+ m_Format = NULL;
+
+ QContactDetailFilter* detailFilter = static_cast<QContactDetailFilter*>( &m_filter );
+ QStringList filter = detailFilter->value().toStringList();
+
+ if ( detailFilter->detailDefinitionName() == QContactDisplayLabel::DefinitionName &&
+ detailFilter->matchFlags() & QContactFilter::MatchStartsWith &&
+ !filter.isEmpty() )
+ {
+ m_Format = new CntHTMLDisplayTextFormatter();
+ }
+ else
+ {
+ m_Format = new CntDummyDisplayTextFormatter();
+ }
+ }
+
}
CNT_LOG_ARGS(m_groupId)
@@ -96,6 +121,8 @@
XQSettingsKey *m_NameListRowSettingkey;
int m_currentRowSetting;
QContactLocalId m_groupId;
+
+ CntDisplayTextFormatter* m_Format;
};
#endif // QCONTACTMODELPRIVATE_H
--- a/phonebookengines/cntlistmodel/inc/cntpresenceinfoprovider.h Wed Aug 18 09:39:00 2010 +0300
+++ b/phonebookengines/cntlistmodel/inc/cntpresenceinfoprovider.h Thu Sep 02 20:16:15 2010 +0300
@@ -19,7 +19,7 @@
#ifndef CNTPRESENCEINFOPROVIDER_H
#define CNTPRESENCEINFOPROVIDER_H
-#include "cntinfoprovider.h"
+#include <cntinfoprovider.h>
#include <qcontact.h>
class PrcPresenceReader;
@@ -54,6 +54,9 @@
private:
QString parsePresence(const QList<PrcPresenceBuddyInfoQt*>& buddyList);
+
+signals:
+ void infoFieldReady(CntInfoProvider* sender, int contactId, ContactInfoField field, const QString& value);
private:
PrcPresenceReader* iReader; // owned
--- a/phonebookengines/cntlistmodel/src/cntcache.cpp Wed Aug 18 09:39:00 2010 +0300
+++ b/phonebookengines/cntlistmodel/src/cntcache.cpp Thu Sep 02 20:16:15 2010 +0300
@@ -278,7 +278,7 @@
}
}
else if (iconName.startsWith("qtg_", Qt::CaseInsensitive)) {
- CntIconCacheItem* iconItem = createIconCacheItem(iconName);
+ createIconCacheItem(iconName);
onNewIcon(iconName, HbIcon(iconName));
hasNewInfo = true;
}
@@ -555,8 +555,11 @@
oldestItem = i;
}
}
- mInfoCache.remove(oldestItem->contactId);
- delete oldestItem;
+
+ if (oldestItem) {
+ mInfoCache.remove(oldestItem->contactId);
+ delete oldestItem;
+ }
// cache maintenance: if the cache ids become too large,
// reduce all of them by MaxCacheOrderValue
--- a/phonebookengines/cntlistmodel/src/cntcache_p.cpp Wed Aug 18 09:39:00 2010 +0300
+++ b/phonebookengines/cntlistmodel/src/cntcache_p.cpp Thu Sep 02 20:16:15 2010 +0300
@@ -15,6 +15,9 @@
*
*/
+#include <QPluginLoader>
+#include <QDir>
+
#include <qtcontacts.h>
#include <qcontactmanager.h>
#include <hbapplication.h>
@@ -23,7 +26,8 @@
#include <QTimer>
#include "cntcache.h"
#include "cntcache_p.h"
-#include "cntinfoprovider.h"
+#include <cntinfoproviderfactory.h>
+#include <cntinfoprovider.h>
#include "cntdefaultinfoprovider.h"
#include "cntpresenceinfoprovider.h"
#include <cntdebug.h>
@@ -41,6 +45,8 @@
static const int NoIconRequest = -1;
// the id that states that there is no job with that key
static const int NoSuchJob = -1;
+
+const char *CNT_INFO_PROVIDER_EXTENSION_PLUGIN_DIRECTORY = "/resource/qt/plugins/contacts/infoproviders/";
// TODO: Provide a way (cenrep keys?) for UI to set which provider to use for
// what info field (and what info fields are indeed even in use).
@@ -60,15 +66,30 @@
// create static provider plugins
mDataProviders.insert(new CntDefaultInfoProvider(), ContactInfoAllFields);
mDataProviders.insert(new CntPresenceInfoProvider(), ContactInfoIcon2Field);
- // TODO: create more static provider plugins
- // TODO: load dynamic provider plugins using QPluginLoader
-
+ // load dynamic provider plugins
+ QDir pluginsDir(CNT_INFO_PROVIDER_EXTENSION_PLUGIN_DIRECTORY);
+ foreach (QString fileName, pluginsDir.entryList(QDir::Files))
+ {
+ // Create plugin loader
+ QPluginLoader pluginLoader(pluginsDir.absoluteFilePath(fileName));
+ if ( pluginLoader.load() )
+ {
+ CntInfoProviderFactory *factory = qobject_cast<CntInfoProviderFactory*>(pluginLoader.instance());
+
+ if (factory)
+ {
+ CntInfoProvider *provider = factory->infoProvider();
+ mDataProviders.insert(provider, provider->supportedFields());
+ }
+ }
+ }
+
// connect the providers
QMapIterator<CntInfoProvider*, ContactInfoFields> i(mDataProviders);
while (i.hasNext()) {
i.next();
- connect(qobject_cast<CntInfoProvider*>(i.key()),
+ connect(static_cast<CntInfoProvider*>(i.key()),
SIGNAL(infoFieldReady(CntInfoProvider*, int, ContactInfoField, const QString&)),
this,
SLOT(onInfoFieldReady(CntInfoProvider*, int, ContactInfoField, const QString&)));
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/phonebookengines/cntlistmodel/src/cntdisplaytextformatter.cpp Thu Sep 02 20:16:15 2010 +0300
@@ -0,0 +1,81 @@
+/*
+* 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 "cntdisplaytextformatter.h"
+#include <qcontactdetailfilter.h>
+#include <qcontactdisplaylabel.h>
+#include <hbcolorscheme.h>
+#include <cntdebug.h>
+#include <QStringList>
+
+CntHTMLDisplayTextFormatter::CntHTMLDisplayTextFormatter()
+{
+}
+
+CntHTMLDisplayTextFormatter::~CntHTMLDisplayTextFormatter()
+{
+}
+
+QString CntHTMLDisplayTextFormatter::formattedText( const QString aText, const QContactFilter& aCriteria )
+{
+ CNT_LOG_ARGS( "filter:" << aText )
+ if ( aCriteria.type() == QContactFilter::ContactDetailFilter )
+ {
+ const QContactDetailFilter& filter = static_cast<const QContactDetailFilter&>( aCriteria );
+ if ( filter.detailDefinitionName() == QContactDisplayLabel::DefinitionName &&
+ filter.matchFlags() & QContactFilter::MatchStartsWith )
+ {
+ QString formattedText;
+ // go through the words (e.g. Lastname, Firstname) and apply list of pattern to them.
+ foreach ( QString text, aText.split(QRegExp("\\s+"), QString::SkipEmptyParts) )
+ {
+ bool match( false );
+ // go through every search criteria word
+ foreach (QString pattern, filter.value().toStringList() )
+ {
+ if ( text.startsWith(pattern, Qt::CaseInsensitive) )
+ {
+ insertTag( text, pattern.length() );
+ formattedText.append( text );
+ match = true;
+ break; // break this inner foreach
+ }
+ }
+
+ // if no match found, original text is returned
+ if ( !match )
+ formattedText.append( text );
+
+ // put spaces back between words (split() looses them)
+ formattedText.append( " " );
+ }
+ return formattedText.trimmed();
+ }
+ }
+ return aText;
+}
+
+void CntHTMLDisplayTextFormatter::insertTag( QString& aText, int aChars )
+{
+ QColor highlight = HbColorScheme::color("qtc_lineedit_marker_normal");
+ QColor color = HbColorScheme::color("qtc_lineedit_selected");
+
+ QString start = QString(TAG_START).arg( highlight.name().toUpper() ).arg(color.name().toUpper());
+ aText.prepend( start );
+ aText.insert( start.length() + aChars, TAG_END );
+}
+// End of File
--- a/phonebookengines/cntlistmodel/src/cntlistmodel.cpp Wed Aug 18 09:39:00 2010 +0300
+++ b/phonebookengines/cntlistmodel/src/cntlistmodel.cpp Thu Sep 02 20:16:15 2010 +0300
@@ -74,10 +74,13 @@
m_defaultMyCardIcon = HbIcon("qtg_large_avatar_mycard");
d = new CntListModelData(contactFilter, showMyCard);
+
d->m_contactManager = manager;
d->m_cache = CntCache::instance();
+
connect(d->m_cache, SIGNAL(contactInfoUpdated(QContactLocalId)), this, SLOT(handleContactInfoUpdated(QContactLocalId)));
d->m_myCardId = d->m_contactManager->selfContactId();
+
if (doConstruct() != QContactManager::NoError) {
throw("exception");
}
@@ -120,7 +123,7 @@
}
if (role == Qt::DisplayRole) {
- return dataForDisplayRole(row);
+ return dataForRole(row, role);
}
else if (role == Hb::IndexFeedbackRole) {
if (row == 0 && (d->m_myCardId == d->m_contactIds[0] || dummyMyCardId == d->m_contactIds[0])) {
@@ -128,7 +131,7 @@
return QVariant();
}
else {
- return dataForDisplayRole(row).toStringList().at(0).toUpper();
+ return dataForRole(row, role).toStringList().at(0).toUpper();
}
}
else if (role == Qt::BackgroundRole) {
@@ -199,6 +202,25 @@
}
/*!
+ * Returns the id for the contact at the requested row.
+ *
+ * \param index Index for the sought contact entry in this model.
+ * \return The id for the contact, 0 if invalid index.
+ *
+ */
+QContactLocalId CntListModel::contactId(const QModelIndex &index) const
+{
+ CNT_ENTRY
+
+ if (!validRowId(index.row())) {
+ return 0;
+ }
+
+ CNT_EXIT
+ return d->m_contactIds[index.row()];
+}
+
+/*!
* Return an index that points to the row relating to the supplied contact.
* E.g. if the contact is at row 7, the index with the following properties
* is returned:
@@ -213,6 +235,20 @@
}
/*!
+ * Return an index that points to the row relating to the supplied contact id.
+ * E.g. if the contact with this id is at row 7, the index with the following
+ * properties is returned:
+ * index.row() == 7
+
+ * \param contactId The id of the contact for whose row an index is required
+ * \return a QModelIndex with the row set to match that of the contact id.
+ */
+QModelIndex CntListModel::indexOfContactId(const QContactLocalId &contactId) const
+{
+ return createIndex(rowId(contactId), 0);
+}
+
+/*!
* Return the contact manager used by this model.
*
* \return Reference to contact manager.
@@ -375,6 +411,7 @@
// Get current setting how to show an item in the name list and subscribe for changes
d->m_Settings = new XQSettingsManager;
+
d->m_NameListRowSettingkey = new XQSettingsKey(XQSettingsKey::TargetCentralRepository,
KCRCntSettings.iUid,
KCntNameListRowSetting);
@@ -383,6 +420,7 @@
connect(d->m_Settings, SIGNAL(valueChanged(const XQSettingsKey&, const QVariant&)), this, SLOT(handleRowSettingChanged(const XQSettingsKey&, const QVariant&)));
CNT_EXIT
+
return error;
}
@@ -482,7 +520,7 @@
* \param column The column of the item to return data about.
* \return QVariant The data for the specified index.
*/
-QVariant CntListModel::dataForDisplayRole(int row) const
+QVariant CntListModel::dataForRole(int row, int role) const
{
CNT_ENTRY
QStringList list;
@@ -512,7 +550,14 @@
infoText = d->m_currentContact.text();
}
- list << name;
+ if ( role == Qt::DisplayRole )
+ {
+ list << d->m_Format->formattedText(name, d->m_filter);
+ }
+ else
+ {
+ list << name;
+ }
if (!isNonEmptySelfContact) {
if (d->m_currentRowSetting == CntTwoRowsNameAndPhoneNumber) {
@@ -642,42 +687,32 @@
// invalidate cached contact
d->m_currentRow = -1;
-
- bool removeMyCard(false);
+
int myCardRow = -1;
if (contactIds.contains(d->m_myCardId)) {
- removeMyCard = true;
- myCardRow = rowId(d->m_myCardId);
+ myCardRow = rowId(d->m_myCardId);
d->m_myCardId = 0;
}
-
- int removeRowsCount=removeRows.count();
- // no of rows
- for(int j = 0; j < removeRows.count(); j++) {
- if (removeMyCard
- && removeRows.at(j) == myCardRow
- && d->m_showMyCard) {
- QModelIndex index = createIndex(0, 0);
- emit dataChanged(index, index);
- removeRowsCount--;
- }
- else {
+
+ // remove rows starting from the bottom
+ qSort(removeRows.begin(), removeRows.end(), qGreater<int>());
+ for (int j = 0; j < removeRows.count(); j++) {
+ if (removeRows.at(j) != myCardRow || !d->m_showMyCard) {
beginRemoveRows(QModelIndex(), removeRows.at(j), removeRows.at(j));
endRemoveRows();
}
}
- updateContactIdsArray();
-
- // check row count in new list
- // if there is a mismatch, probable late events. reset model
- QList<QContactLocalId> updatedIdList = d->m_contactIds;
- int rowsRemoved = idList.count() - updatedIdList.count();
- if (rowsRemoved != removeRowsCount) {
- beginResetModel();
- reset();
- endResetModel();
+
+ foreach (QContactLocalId id, contactIds) {
+ d->m_contactIds.removeOne(id);
}
-
+
+ if (myCardRow != -1 && d->m_showMyCard) {
+ d->m_contactIds.insert(0, dummyMyCardId);
+ QModelIndex index = createIndex(0, 0);
+ emit dataChanged(index, index);
+ }
+
CNT_EXIT
}
@@ -715,7 +750,7 @@
if (contactIds.contains(d->m_groupId)) {
foreach (QContactLocalId id, contactIds) {
- if (!d->m_contactIds.contains(id)) {
+ if (id != d->m_groupId && !d->m_contactIds.contains(id)) {
// at least one new contact id has been added to this group,
// so update the model
updateRelationships();
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/phonebookengines/cntlistmodel/tsrc/ut_cntlistmodel/inc/ut_cntdisplaytextformatter.h Thu Sep 02 20:16:15 2010 +0300
@@ -0,0 +1,34 @@
+/*
+* 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 <QtTest/QtTest>
+#include <QObject>
+#include <qtcontacts.h>
+
+QTM_BEGIN_NAMESPACE
+class QContactDetailFilter;
+QTM_END_NAMESPACE
+
+QTM_USE_NAMESPACE
+
+class TestCntDisplayTextFormatter : public QObject
+{
+ Q_OBJECT
+
+private slots:
+ void testFormatter();
+};
--- a/phonebookengines/cntlistmodel/tsrc/ut_cntlistmodel/runtest.cmd Wed Aug 18 09:39:00 2010 +0300
+++ b/phonebookengines/cntlistmodel/tsrc/ut_cntlistmodel/runtest.cmd Thu Sep 02 20:16:15 2010 +0300
@@ -1,3 +1,21 @@
+@echo off
+rem
+rem Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+rem All rights reserved.
+rem This component and the accompanying materials are made available
+rem under the terms of "Eclipse Public License v1.0"
+rem which accompanies this distribution, and is available
+rem at the URL "http://www.eclipse.org/legal/epl-v10.html".
+rem
+rem Initial Contributors:
+rem Nokia Corporation - initial contribution.
+rem
+rem Contributors:
+rem
+rem Description:
+rem
+@echo on
+
call del MON.sym
call del MON.dat
call del profile.txt
--- a/phonebookengines/cntlistmodel/tsrc/ut_cntlistmodel/src/main.cpp Wed Aug 18 09:39:00 2010 +0300
+++ b/phonebookengines/cntlistmodel/tsrc/ut_cntlistmodel/src/main.cpp Thu Sep 02 20:16:15 2010 +0300
@@ -21,6 +21,7 @@
#include "ut_cntcache.h"
#include "ut_cntpresenceinfoprovider.h"
#include "ut_cntdefaultinfoprovider.h"
+#include "ut_cntdisplaytextformatter.h"
#include <QtTest/QtTest>
@@ -43,6 +44,9 @@
TestRunner testRunner("ut_cntlistmodel");
+ TestCntDisplayTextFormatter ut_CntDisplayTextFormatter;
+ testRunner.runTests( ut_CntDisplayTextFormatter );
+
TestCntListModel ut_CntListModel;
testRunner.runTests(ut_CntListModel);
--- a/phonebookengines/cntlistmodel/tsrc/ut_cntlistmodel/src/ut_cntcache.cpp Wed Aug 18 09:39:00 2010 +0300
+++ b/phonebookengines/cntlistmodel/tsrc/ut_cntlistmodel/src/ut_cntcache.cpp Thu Sep 02 20:16:15 2010 +0300
@@ -66,7 +66,7 @@
QVERIFY(worker->mContactManager != NULL);
QVERIFY(worker->mThumbnailManager != NULL);
QVERIFY(!worker->mStarted);
- QVERIFY(!worker->mJobLoopRunning);
+ QVERIFY(!worker->mProcessingJobs);
QVERIFY(!worker->mPostponeJobs);
QVERIFY(worker->mDataProviders.count() >= 1);
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/phonebookengines/cntlistmodel/tsrc/ut_cntlistmodel/src/ut_cntdisplaytextformatter.cpp Thu Sep 02 20:16:15 2010 +0300
@@ -0,0 +1,47 @@
+/*
+* 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 "ut_cntdisplaytextformatter.h"
+#include "cntdisplaytextformatter.h"
+#include <hbcolorscheme.h>
+
+void TestCntDisplayTextFormatter::testFormatter()
+{
+ QColor color = HbColorScheme::color("qtc_lineedit_selected ");
+ QColor bg = HbColorScheme::color("qtc_lineedit_marker_normal");
+ QString foo = QString("<span style=\"background-color:%1;color:%2\">f</span>oo").arg(bg.name().toUpper()).arg(color.name().toUpper());
+
+ QContactDetailFilter filter;
+ filter.setDetailDefinitionName( QContactDisplayLabel::DefinitionName );
+ filter.setMatchFlags( QContactFilter::MatchStartsWith );
+ filter.setValue( "f" );
+
+ CntDisplayTextFormatter* format = new CntHTMLDisplayTextFormatter;
+ QString result = format->formattedText("foo", filter );
+ QVERIFY( foo == result );
+ QVERIFY( "" == format->formattedText("", filter) );
+ // invalid filter
+ QContactRelationshipFilter invalidFilter;
+ QVERIFY( "foo" == format->formattedText("foo", invalidFilter) );
+ QVERIFY( "" == format->formattedText("", invalidFilter) );
+
+ // dummy returns always the given text, dispite of the filter
+ CntDisplayTextFormatter* dummy = new CntDummyDisplayTextFormatter;
+ QVERIFY( "foo" == dummy->formattedText("foo", filter) );
+ QVERIFY( "foo" == dummy->formattedText("foo", invalidFilter) );
+ QVERIFY( "" == dummy->formattedText("", filter) );
+}
--- a/phonebookengines/cntlistmodel/tsrc/ut_cntlistmodel/src/ut_cntlistmodel.cpp Wed Aug 18 09:39:00 2010 +0300
+++ b/phonebookengines/cntlistmodel/tsrc/ut_cntlistmodel/src/ut_cntlistmodel.cpp Thu Sep 02 20:16:15 2010 +0300
@@ -364,10 +364,10 @@
QVERIFY(mManager->saveContact(&c));
int row = mCntModel->rowId(c.localId());
- QVariant var = mCntModel->dataForDisplayRole(row);
+ QVariant var = mCntModel->dataForRole(row, Qt::DisplayRole);
QVERIFY(var.type() == QVariant::StringList);
- var = mCntModel->dataForDisplayRole(0);
+ var = mCntModel->dataForRole(0, Qt::DisplayRole);
QVERIFY(var.type() == QVariant::StringList);
}
--- a/phonebookengines/cntlistmodel/tsrc/ut_cntlistmodel/ut_cntlistmodel.pro Wed Aug 18 09:39:00 2010 +0300
+++ b/phonebookengines/cntlistmodel/tsrc/ut_cntlistmodel/ut_cntlistmodel.pro Thu Sep 02 20:16:15 2010 +0300
@@ -42,14 +42,15 @@
inc/ut_cntcache.h \
inc/ut_cntpresenceinfoprovider.h \
inc/ut_cntdefaultinfoprovider.h \
+ inc/ut_cntdisplaytextformatter.h \
../../inc/cntlistmodelglobal.h \
../../inc/cntlistmodel.h \
../../inc/cntlistmodel_p.h \
../../inc/cntcache.h \
../../inc/cntcache_p.h \
- ../../inc/cntinfoprovider.h \
../../inc/cntdefaultinfoprovider.h \
../../inc/cntpresenceinfoprovider.h \
+ ../../inc/cntdisplaytextformatter.h \
../../../../inc/cntdebug.h
SOURCES += src/testrunner.cpp \
@@ -58,11 +59,13 @@
src/ut_cntcache.cpp \
src/ut_cntpresenceinfoprovider.cpp \
src/ut_cntdefaultinfoprovider.cpp \
+ src/ut_cntdisplaytextformatter.cpp \
../../src/cntlistmodel.cpp \
../../src/cntcache.cpp \
../../src/cntcache_p.cpp \
../../src/cntdefaultinfoprovider.cpp \
- ../../src/cntpresenceinfoprovider.cpp
+ ../../src/cntpresenceinfoprovider.cpp \
+ ../../src/cntdisplaytextformatter.cpp
BLD_INF_RULES.prj_exports += "image1.png /epoc32/winscw/c/data/images/"
BLD_INF_RULES.prj_exports += "image2.png /epoc32/winscw/c/data/images/"
--- a/phonebookengines/cntmaptileservice/cntmaptileservice.pro Wed Aug 18 09:39:00 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,86 +0,0 @@
-#
-# Copyright (c) 2010 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:
-#
-#
-
-
-TEMPLATE = lib
-TARGET = cntmaptileservice
-
-CONFIG += dll
-CONFIG += hb
-CONFIG += mobility
-MOBILITY = publishsubscribe
-
-DEPENDPATH += .
-INCLUDEPATH += .
-INCLUDEPATH += ../inc
-
-
-MOC_DIR = moc
-
-DEFINES += CNTMAPTILESERVICEDLL
-
-INTERNAL_PUBLIC_HEADERS += inc/cntmaptileservice.h
-INCLUDEPATH += $$APP_LAYER_SYSTEMINCLUDE
-# Input
-HEADERS += $$INTERNAL_PUBLIC_HEADERS \
- ./inc/cntmaptiledblookuptable.h
-
-
-SOURCES += ./src/cntmaptileservice.cpp ./src/cntmaptiledblookuptable.cpp
-
-symbian:
-{
-
- :BLD_INF_RULES.prj_exports += "conf/cntmaptileservice.confml APP_LAYER_CONFML(cntmaptileservice.confml)"
- :BLD_INF_RULES.prj_exports += "conf/cntmaptileservice_2002C3A8.crml APP_LAYER_CRML(cntmaptileservice_2002C3A8.crml)"
- :BLD_INF_RULES.prj_exports += "conf/2002C3A8.txt /epoc32/winscw/c/private/10202be9/2002C3A8.txt"
-
- TARGET.EPOCALLOWDLLDATA = 1
- TARGET.CAPABILITY = All -Tcb
- TARGET.UID3 = 0x2002C3A8
-
-
- LIBS += -lcntmodel \
- -ledbms \
- -lbafl \
- -lcentralrepository \
- -leuser \
- -lefsrv
-
- myCrml.sources = ./conf/cntmaptilepublisher.qcrml
- myCrml.path = c:/resource/qt/crml
- DEPLOYMENT += myCrml
-
-}
-
-deploy.path = /
-headers.sources = $$INTERNAL_PUBLIC_HEADERS
-headers.path = epoc32/include/app
-DEPLOYMENT += exportheaders
-
-# This is for new exporting system coming in garden
-for(header, headers.sources):BLD_INF_RULES.prj_exports += "$$header $$deploy.path$$headers.path/$$basename(header)"
-defBlock = \
- "$${LITERAL_HASH}if defined(EABI)" \
- "DEFFILE ../eabi/cntmaptileservice.def" \
- "$${LITERAL_HASH}else" \
- "DEFFILE ../bwins/cntmaptileservice.def" \
- "$${LITERAL_HASH}endif"
-MMP_RULES += defBlock
Binary file phonebookengines/cntmaptileservice/conf/2002C3A8.txt has changed
--- a/phonebookengines/cntmaptileservice/conf/cntmaptilepublisher.qcrml Wed Aug 18 09:39:00 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,4 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<repository target="RProperty" version="" uidName="repo" uidValue="0x20022EF9">
-<key ref="/cntmaptilepublisher/name" int="0x1"/>
-</repository>
\ No newline at end of file
Binary file phonebookengines/cntmaptileservice/conf/cntmaptileservice.confml has changed
Binary file phonebookengines/cntmaptileservice/conf/cntmaptileservice_2002C3A8.crml has changed
--- a/phonebookengines/cntmaptileservice/inc/cntmaptiledblookuptable.h Wed Aug 18 09:39:00 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,147 +0,0 @@
-/*
-* Copyright (c) 2010 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:
-* Retrieving maptile path from lookup db
-*
-*/
-
-#ifndef __MAPTILEDBLOOKUPTABLE_H__
-#define __MAPTILEDBLOOKUPTABLE_H__
-
-//Headers needed
-#include <f32file.h> //RFs
-#include <d32dbms.h> //RDbNamedDatabase,RDbView
-
-#include "cntmaptileservice.h"
-
-// maptile database column names
-_LIT( NCntColUid, "cntuid" );
-_LIT( NCntColFilePath, "filepath" );
-_LIT( NColSource, "source" );
-_LIT( NColMaptileStatus, "fetchingstatus" );
-
-// maptile lookup database name
-_LIT( KMapTileLookupDatabaseName, "mylocationsmaptilelookup.db" );
-
-// maptile database table name
-_LIT( KMapTileLookupTable, "cntmaptilelookuptable" );
-
-_LIT( KLookupDbPath, "c:\\mylocations\\" );
-
-// uid column number
-const TInt KColumncntUid = 1;
-// source type column number
-const TInt KColumnSource = 2;
-// maptile image path column number
-const TInt KColumnFilePath = 3;
-// maptile status column number
-const TInt KColumnMapTileFetchingStatus = 4;
-
-
-/**
- * Maptile database lookup entry
- */
-class TLookupItem
-{
-public:
- // Uid of the source entry
- TUint32 iUid;
-
- // Source type
- TUint32 iSource;
-
- // File Path
- TFileName iFilePath;
-
- //Map tile fetching status
- TUint32 iFetchingStatus;
-};
-
-/**
- * CLookupMapTileDatabase class.
- * This class handles all the operations related to maptile lookup database.
- *
- */
-class CLookupMapTileDatabase : public CBase
-{
-public:
-
- /**
- * This is a static function, which creates and returns an instance of this class.
- */
- static CLookupMapTileDatabase* NewL( const TDesC& aLookupTableName );
-
- /**
- * This is a static function, which creates and returns an instance of this class.
- * Pushes the created object to the cleanup stack.
- */
- static CLookupMapTileDatabase* NewLC( const TDesC& aLookupTableName );
-
- /**
- * Destructor
- */
- ~CLookupMapTileDatabase();
-
-public:
-
- /**
- * Finds an entry in the lookup table.
- * @param[in/out] aLookupItem The lookup item to be found in the database.
- * The source iUid is passed in the lookup item
- */
- void FindEntryL( TLookupItem& aLookupItem );
-
- /**
- * Finds number of address associated with an contact id.
- * @param[in] aId The contact id .
- * @return Number of address a contact has.
- */
- int FindNumberOfAddressL( int& aId );
-
-#ifdef CNTMAPTILESERVICE_UNIT_TEST
-public:
-#else
-private:
-#endif
- // default constructor
- CLookupMapTileDatabase();
-
- // Second phase constructor
- void ConstructL( const TDesC& aLookupTableName );
-
-
-#ifdef CNTMAPTILESERVICE_UNIT_TEST
-public:
-#else
-private:
-#endif
-
- // Handle to the items database
- RDbNamedDatabase iItemsDatabase;
-
- // handle to the file session
- RFs iFsSession;
-
- // holds the database file name
- TFileName iDbFileName;
-
- // holds the info about database existence.
- TBool iDatabaseExists;
-
-};
-
-#endif // __MAPTILEDBLOOKUPTABLE_H__`
-
-// End of file
-
--- a/phonebookengines/cntmaptileservice/inc/cntmaptileservice.h Wed Aug 18 09:39:00 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,183 +0,0 @@
-/*
-* Copyright (c) 2010 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:
-* Contact maptile service interface
-*
-*/
-
-#ifndef _CNTMAPTILESERVICE_H_
-#define _CNTMAPTILESERVICE_H_
-
-
-#include <QString>
-#include <QtGlobal>
-#include <QObject>
-#include <qmobilityglobal.h>
-
-QTM_BEGIN_NAMESPACE
-class QValueSpacePublisher;
-class QValueSpaceSubscriber;
-QTM_END_NAMESPACE
-
-QTM_USE_NAMESPACE
-
-#ifdef CNTMAPTILESERVICEDLL
-#define CNTMAPTILESERVICE_EXPORT Q_DECL_EXPORT
-#else
-#define CNTMAPTILESERVICE_EXPORT Q_DECL_IMPORT
-#endif
-
-//Forward declaration
-class TLookupItem;
-
-// CLASS DECLARATION
-
-/**
-* Maptile service class, provides interface to get map tile image associated with
-* contact. Also provides interface to check whether location feature is enabled or disabled.
-*
-* Note: Location feature can be enabled or disabled by modifying conf\cntmaptileservice.confml file.
-*/
-class CNTMAPTILESERVICE_EXPORT CntMapTileService : public QObject
-{
- Q_OBJECT
-public:
-
- /**
- * Maptile fetching status
- */
- enum MapTileStatus
- {
- /** Map tile fetching completed */
- MapTileFetchingCompleted = 0,
- /** Map tile fetching in progress */
- MapTileFetchingInProgress,
- /** Map tile fetching n/w error */
- MapTileFetchingNetworkError,
- /** Map tile fetching invalid address */
- MapTileFetchingInvalidAddress,
- /** Map tile fetching unknown erro */
- MapTileFetchingUnknownError
- };
-
-
- /**
- * Contact address types
- */
- enum ContactAddressType
- {
- /** Address Type Pref */
- AddressPreference,
- /** Address type Home */
- AddressHome,
- /** Address type Work */
- AddressWork
- };
-
-
- /**
- * Default Constructor
- */
- CntMapTileService();
-
- /**
- * Destructor
- */
- ~CntMapTileService();
-
- /**
- * Checks whether location feature enabled or disabled.
- *
- * @return Returns true or false based on location feature setting.
- */
- bool isLocationFeatureEnabled();
-
- /**
- * Gets a maptile image associated with a contact id. Returns a maptile
- * image path if it is available otherwise returns NULL.
- *
- * @param contactId Contact id
- * @param sourceType Source address type( Preferred, Home , Work address )
- * @param imagePath Maptile image path associated with the contact id
- * @param orientation Application current ui orientation.
- *
- * @return Returns the maptile fetching status.
- */
- int getMapTileImage( int Id,
- ContactAddressType sourceType,
- QString& imagePath,
- Qt::Orientations orientation = Qt::Vertical );
-
-public slots:
- /**
- * Receives maptile status information and emits the maptilFetchingStatusUpdate
- * signal.
- */
- void setMaptileStatus();
-
-signals:
- /**
- * Signal to update the maptile fetchings status to contact application.
- * @param id Contact id
- * @param addressType Source address type( Preferred, Home , Work address )
- * @param status Maptile status for the associated address
- */
- void maptileFetchingStatusUpdate( int id, int addressType, int status );
-
-
-#ifdef CNTMAPTILESERVICE_UNIT_TEST
-public:
-#else
-private:
-#endif
-
- /**
- * Publishes the contact address information to backend engine
- * @param id Contact id
- * @param sourceType Source address type( Preferred, Home , Work address )
- * @param addressCount Number of address associated with this contact
- */
- void publishValue( int id, ContactAddressType sourceType, int addressCount );
-
- /**
- * Reads the contact maptile information from maptile database.
- * @param id Contact id
- * @param sourceType Source address type( Preferred, Home , Work address )
- * @param aLookupItem Contains the maptile information of a contact entry.
- * @param aNoOfAddress Number of address associated with this contact.
- *
- * @return Returns zero if successful or error.
- */
- int readEntryFromMaptileDataBase( int id, ContactAddressType sourceType,
- TLookupItem& aLookupItem, int& aNoOfAddress );
-
-#ifdef CNTMAPTILESERVICE_UNIT_TEST
-public:
-#else
-private:
-#endif
-
- //The contact id for which maptile requested
- int mLastViewedContactId;
- //Maptile request publisher
- QValueSpacePublisher *mPublisher;
- //Maptile status request subscriber
- QValueSpaceSubscriber *mSubscriber;
- //Contact information stored as string
- QString mContactEntryInfo;
-
-};
-
-#endif //_CNTMAPTILESERVICE_H_
-
--- a/phonebookengines/cntmaptileservice/src/cntmaptiledblookuptable.cpp Wed Aug 18 09:39:00 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,225 +0,0 @@
-/*
-* Copyright (c) 2010 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:
-* Retrieving maptile path from lookup db implementation
-*
-*/
-
-#include <bautils.h>
-
-#include "cntmaptiledblookuptable.h"
-
-// select all from
-_LIT( KSelectAllFrom, "SELECT * FROM " );
-
-// string 'where'
-_LIT( KStringWhere, " WHERE " );
-
-// string ' = '
-_LIT( KStringEqual, " = " );
-
-// string 'And'
-_LIT( KStringAnd, " AND " );
-
-
-_LIT(KQueryByMaptileState,"SELECT * FROM cntmaptilelookuptable WHERE cntuid = %d AND ( fetchingstatus = %d OR fetchingstatus = %d )");
-// -----------------------------------------------------------------------------
-// CLookupMapTileDatabase::CLookupMapTileDatabase()
-// Default constructor.
-// -----------------------------------------------------------------------------
-//
-CLookupMapTileDatabase::CLookupMapTileDatabase()
-{
-}
-
-// -----------------------------------------------------------------------------
-// CLookupMapTileDatabase::~CLookupMapTileDatabase()
-// Destructor.
-// -----------------------------------------------------------------------------
-//
-CLookupMapTileDatabase::~CLookupMapTileDatabase()
-{
- // close the database
- iItemsDatabase.Close();
-
- // close the file session
- iFsSession.Close();
-}
-
-// -----------------------------------------------------------------------------
-// CLookupMapTileDatabase::~CLookupMapTileDatabase()
-// Creates an object of this class and pushes to cleanup stack.
-// -----------------------------------------------------------------------------
-//
-CLookupMapTileDatabase* CLookupMapTileDatabase::NewLC( const TDesC& aLookupTableName )
-{
- CLookupMapTileDatabase* self = new (ELeave) CLookupMapTileDatabase;
- CleanupStack::PushL(self);
- self->ConstructL( aLookupTableName );
- return self;
-}
-
-
-// -----------------------------------------------------------------------------
-// CLookupMapTileDatabase::NewL()
-// Creates an object of this class.
-// -----------------------------------------------------------------------------
-//
-CLookupMapTileDatabase* CLookupMapTileDatabase::NewL( const TDesC& aLookupTableName )
-{
- CLookupMapTileDatabase* self = CLookupMapTileDatabase::NewLC( aLookupTableName );
- CleanupStack::Pop( self );
- return self;
-}
-
-
-// -----------------------------------------------------------------------------
-// CLookupMapTileDatabase::ConstructL()
-// 2nd phase contructor.
-// -----------------------------------------------------------------------------
-//
-void CLookupMapTileDatabase::ConstructL( const TDesC& aLookupTableName )
-{
- User::LeaveIfError( iFsSession.Connect() );
-
- iDbFileName.Copy( KLookupDbPath );
- iDbFileName.Append( aLookupTableName );
-
- iDatabaseExists = EFalse;
-
- if( BaflUtils::FileExists( iFsSession, iDbFileName ) )
- {
- // database exists
- iDatabaseExists = ETrue;
- }
-}
-
-// -----------------------------------------------------------------------------
-// CLookupMapTileDatabase::FindNumberOfAddressL()
-// Finds the number of address associated with an contact.
-// -----------------------------------------------------------------------------
-//
-int CLookupMapTileDatabase::FindNumberOfAddressL( int& aId )
-{
- int count = 0;
-
- // Create a query to find the item.
- TFileName queryBuffer;
- queryBuffer.Format( KQueryByMaptileState,aId,
- CntMapTileService::MapTileFetchingInProgress,
- CntMapTileService::MapTileFetchingNetworkError );
-
- TInt ret = iItemsDatabase.Open( iFsSession, iDbFileName );
-
- if( ret != KErrNone )
- {
- //if already opened , close and open again
- iItemsDatabase.Close();
- User::LeaveIfError( iItemsDatabase.Open( iFsSession, iDbFileName ) );
- }
-
- User::LeaveIfError( iItemsDatabase.Begin() );
- // Create a view of the table with the above query.
- RDbView myView;
- myView.Prepare( iItemsDatabase, TDbQuery( queryBuffer ) );
- CleanupClosePushL( myView );
- myView.EvaluateAll();
- myView.FirstL();
-
-
- while (myView.AtRow())
- {
- count++;
- myView.NextL();
- }
-
- CleanupStack::PopAndDestroy( &myView ); // myView
-
- //Close the database
- iItemsDatabase.Close();
-
- return count;
-}
-
-// -----------------------------------------------------------------------------
-// CLookupMapTileDatabase::FindEntryL()
-// Finds an entry in the lookup table.
-// -----------------------------------------------------------------------------
-//
-void CLookupMapTileDatabase::FindEntryL( TLookupItem& aLookupItem )
-{
-
- // used to check whether entry available or not
- TBool entryAvailable = EFalse;
-
- if ( iDatabaseExists )
- {
- // Create a query to find the item.
- TFileName queryBuffer;
- queryBuffer.Copy( KSelectAllFrom );
- queryBuffer.Append( KMapTileLookupTable );
- queryBuffer.Append( KStringWhere );
- queryBuffer.Append( NCntColUid );
- queryBuffer.Append( KStringEqual );
- queryBuffer.AppendNum( aLookupItem.iUid );
- queryBuffer.Append( KStringAnd );
- queryBuffer.Append( NColSource );
- queryBuffer.Append( KStringEqual );
- queryBuffer.AppendNum( aLookupItem.iSource );
-
- TInt ret = iItemsDatabase.Open( iFsSession, iDbFileName );
-
- if( ret != KErrNone )
- {
- //if already opened , close and open again
- iItemsDatabase.Close();
- User::LeaveIfError( iItemsDatabase.Open( iFsSession, iDbFileName ) );
- }
- User::LeaveIfError( iItemsDatabase.Begin() );
-
- // Create a view of the table with the above query.
- RDbView myView;
- myView.Prepare( iItemsDatabase, TDbQuery( queryBuffer ) );
- CleanupClosePushL( myView );
- myView.EvaluateAll();
- myView.FirstL();
-
- if( myView.AtRow() )
- {
- // Item found. get the details.
- myView.GetL();
- if( aLookupItem.iUid == myView.ColUint( KColumncntUid ) )
- {
- aLookupItem.iFilePath.Copy( myView.ColDes16( KColumnFilePath ) );
- aLookupItem.iFetchingStatus = myView.ColUint( KColumnMapTileFetchingStatus );
- entryAvailable = ETrue;
- }
- }
-
- CleanupStack::PopAndDestroy( &myView ); // myView
-
- //Close the database
- iItemsDatabase.Close();
- }
-
- //No entry found
- if( !entryAvailable )
- {
- User::Leave( KErrNotFound );
- }
-}
-
-
-// End of file
-
--- a/phonebookengines/cntmaptileservice/src/cntmaptileservice.cpp Wed Aug 18 09:39:00 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,315 +0,0 @@
-/*
-* Copyright (c) 2010 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:
-* Maptile service implementation
-*
-*/
-
-
-#include <centralrepository.h>
-#include <locationservicedefines.h>
-#include <qvaluespacepublisher.h>
-#include <qvaluespacesubscriber.h>
-#include <qfile.h>
-#include "cntmaptileservice.h"
-#include "cntmaptiledblookuptable.h"
-
-// CONSTANTS
-// Maptile interface uid
-const TUid KUidMapTileInterface = { 0x2002C3A8 };
-// Central Repository Key IDs
-const TInt KEnableLocationFeature = 0x1;
-
-const char *CNT_MAPTILE_STATUS_RECEIVER = "/maptilestatuspublisher/name";
-const char *CNT_MAPTILE_STATUS_PUBLISHER = "/cntmaptilepublisher";
-
-const char* CNT_PORTRAIT_MAPTILE_IMAGE = "_Vertical";
-const char* CNT_LANDSCAPE_MAPTILE_IMAGE = "_Contact_Horizontal";
-
-// -----------------------------------------------------------------------------
-// CntMapTileService::CntMapTileService()
-// Default constructor
-// -----------------------------------------------------------------------------
-//
-CntMapTileService::CntMapTileService()
-{
- //publisher
- mPublisher = NULL;
-
- //subscriber
- mSubscriber = new QValueSpaceSubscriber( CNT_MAPTILE_STATUS_RECEIVER );
- //Connect for maptile status change key
- QObject::connect(mSubscriber, SIGNAL(contentsChanged()), this, SLOT(setMaptileStatus()));
-
-}
-
-
-// -----------------------------------------------------------------------------
-// CntMapTileService::~CntMapTileService()
-// Destructor
-// -----------------------------------------------------------------------------
-//
-CntMapTileService::~CntMapTileService()
-{
- if( mSubscriber )
- {
- delete mSubscriber;
- mSubscriber = NULL;
- }
-
- if( mPublisher )
- {
- delete mPublisher;
- mPublisher = NULL;
- }
-}
-// -----------------------------------------------------------------------------
-// CntMapTileService::isLocationFeatureEnabled()
-// Checks whether location feature is enabled or disabled
-// -----------------------------------------------------------------------------
-//
-bool CntMapTileService::isLocationFeatureEnabled()
-{
- //Create the centrep with uid 0x2002C3A8
- bool enableLocationFeature = false;
-
- CRepository* centralRepository = NULL;
-
- TRAPD( err, centralRepository = CRepository::NewL( KUidMapTileInterface ) );
-
- if ( KErrNone == err )
- {
- TInt repValue;
-
- //Get the Location feature flag
- TInt ret = centralRepository->Get( KEnableLocationFeature , repValue );
-
- if ( ret == KErrNone && repValue == 1 )
- {
- enableLocationFeature = true;
- }
-
- delete centralRepository;
- }
-
- return enableLocationFeature;
-
-}
-
-
-// -----------------------------------------------------------------------------
-// CntMapTileService::getMapTileImage()
-// Gets the maptile image path associated with a contact.
-// -----------------------------------------------------------------------------
-//
-int CntMapTileService::getMapTileImage(
- int contactId ,
- ContactAddressType sourceType,
- QString& imagePath,
- Qt::Orientations orientation )
-{
-
- TLookupItem lookupItem;
-
- int addressCount = 0;
- int maptileStatus = MapTileFetchingUnknownError;
-
- //Read the entry from maptile database
- int error = readEntryFromMaptileDataBase( contactId, sourceType, lookupItem, addressCount );
-
- //if entry available returns the file path otherwise NULL.
- if ( KErrNone == error )
- {
- maptileStatus = lookupItem.iFetchingStatus;
-
- if( maptileStatus == MapTileFetchingCompleted )
- {
- //Get the image path
- QString imageFile((QChar*)lookupItem.iFilePath.Ptr(),
- lookupItem.iFilePath.Length());
- if( orientation == Qt::Vertical )
- {
- imageFile.append( CNT_PORTRAIT_MAPTILE_IMAGE );
- }
- else
- {
- imageFile.append( CNT_LANDSCAPE_MAPTILE_IMAGE );
- }
- imagePath = imageFile;
-
- //Check if File exists
- if ( !QFile::exists( imagePath ) )
- {
- imagePath.clear();
- maptileStatus = MapTileFetchingUnknownError;
- }
- }
- else if( maptileStatus == MapTileFetchingNetworkError ||
- maptileStatus == MapTileFetchingInProgress )
- {
- //Publish the contact id for maptile processing
- publishValue( contactId, sourceType, addressCount );
- }
-
- }
- else if ( KErrNotFound == error )
- {
- //If entry is not found , it will be a newly added entry.
- publishValue( contactId, sourceType, addressCount );
- maptileStatus = MapTileFetchingInProgress;
- }
-
- //Return the maptile status
- return maptileStatus;
-}
-
-
-// -----------------------------------------------------------------------------
-// CntMapTileService::setMaptileStatus()
-// Emits the maptile status changed event to contact application
-// -----------------------------------------------------------------------------
-//
-void CntMapTileService::setMaptileStatus()
-{
- QString imagePath;
- ContactAddressType addressType = AddressPreference;
-
- QStringList subPath = mSubscriber->subPaths();
- QVariant value = mSubscriber->value(subPath.at(0));
-
- //Subscriber Protocol : [contactid-addresstype-maptilestatus]
- QStringList text = value.toString().split("-");
- int id = text.at(0).toInt();
- int status = text.at(2).toInt();
-
- switch( text.at(1).toInt() )
- {
- case ESourceContactsPref:
- addressType = AddressPreference;
- break;
- case ESourceContactsWork:
- addressType = AddressWork;
- break;
- case ESourceContactsHome:
- addressType = AddressHome;
- break;
- default:
- break;
- }
-
- //Emit the maptile status signal
- int type = addressType;
- if( mLastViewedContactId == id )
- {
- emit maptileFetchingStatusUpdate( mLastViewedContactId, type , status );
- }
-}
-
-
-// -----------------------------------------------------------------------------
-// CntMapTileService::publishValue()
-// Publish the the contact id and address for which maptile to be processed.
-// -----------------------------------------------------------------------------
-//
-void CntMapTileService::publishValue( int id, ContactAddressType sourceType, int addressCount )
-{
-
- mLastViewedContactId = id;
- int addressType = ESourceInvalid;
-
- switch( sourceType )
- {
- case AddressPreference:
- addressType = ESourceContactsPref;
- break;
- case AddressWork:
- addressType = ESourceContactsWork;
- break;
- case AddressHome:
- addressType = ESourceContactsHome;
- break;
- }
-
- if ( !mPublisher )
- {
- /* Constructs a QValueSpacePublisher that publishes values under path /mypublisher*/
- mPublisher = new QValueSpacePublisher( CNT_MAPTILE_STATUS_PUBLISHER, this);
- }
-
- /* Publisher protocol [appid-addresstype-count] */
- mContactEntryInfo.clear();
- mContactEntryInfo.append( QVariant(id).toString());
- mContactEntryInfo.append( QChar('-') );
- mContactEntryInfo.append( QVariant(addressType).toString());
- mContactEntryInfo.append( QChar('-') );
- mContactEntryInfo.append( QVariant(addressCount).toString() );
-
- mPublisher->setValue("name", mContactEntryInfo.toAscii() );
- mPublisher->sync();
-
-}
-
-// -----------------------------------------------------------------------------
-// CntMapTileService::readEntryFromMaptileDataBase()
-// Read the entry from maptile database
-// -----------------------------------------------------------------------------
-//
-int CntMapTileService::readEntryFromMaptileDataBase(
- int id, ContactAddressType sourceType, TLookupItem& aLookupItem, int& aNoOfAddress )
-{
-
- //Maptile database instance
- CLookupMapTileDatabase* mapTileDatabase = NULL;
-
- TRAPD( err, mapTileDatabase = CLookupMapTileDatabase::NewL(
- KMapTileLookupDatabaseName ) );
-
- if ( KErrNone == err )
- {
- int appId = id;
- TRAP( err, aNoOfAddress = mapTileDatabase->FindNumberOfAddressL(appId) );
-
- if( err != KErrNone )
- {
- aNoOfAddress = 0;
- }
-
- aLookupItem.iUid = id;
- switch( sourceType )
- {
- case AddressPreference:
- aLookupItem.iSource = ESourceContactsPref;
- break;
- case AddressWork:
- aLookupItem.iSource = ESourceContactsWork;
- break;
- case AddressHome:
- aLookupItem.iSource = ESourceContactsHome;
- break;
- default:
- break;
- }
-
- TRAP( err , mapTileDatabase->FindEntryL( aLookupItem ) );
-
- //delet the database instance
- delete mapTileDatabase;
-
- }
-
- return err;
-}
-
-// End of file
-
Binary file phonebookengines/cntmaptileservice/tsrc/ut_cntmaptileservice/data/homeaddressmap.png has changed
Binary file phonebookengines/cntmaptileservice/tsrc/ut_cntmaptileservice/data/preferredaddressmap.png has changed
Binary file phonebookengines/cntmaptileservice/tsrc/ut_cntmaptileservice/data/workaddressmap.png has changed
--- a/phonebookengines/cntmaptileservice/tsrc/ut_cntmaptileservice/inc/testrunner.h Wed Aug 18 09:39:00 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,67 +0,0 @@
-/*
-* Copyright (c) 2010 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 TESTRUNNER_H
-#define TESTRUNNER_H
-
-#include <QXmlDefaultHandler>
-
-
-class TestRunner : public QXmlDefaultHandler
-{
-public: // Constructors and destructor
- TestRunner(const QString& name);
- ~TestRunner();
-
-public: // New functions
-
- int runTests(QObject& testObject);
- void printResults();
-
-protected: // From QXmlContentHandler
- bool startElement(
- const QString& namespaceURI,
- const QString& localName,
- const QString& qName,
- const QXmlAttributes& atts);
-
- bool endElement(
- const QString& namespaceURI,
- const QString& localName,
- const QString& qName);
-
- bool characters(const QString& ch);
-
-private: // New functions
-
- void parse(const QString& fileName);
-
-private: // Data
- QStringList mTestRunParams;
- QString mHomeDir;
- int mTestCount;
- QStringList mErrors;
- bool mParsingIncidentElement;
- bool mParsingDescriptionElement;
- bool mCurrentTestFailed;
- QString mCurrentTestName;
- QString mCurrentTestFile;
- int mCurrentTestFailureLine;
-};
-
-
-#endif // TESTRUNNER_H
--- a/phonebookengines/cntmaptileservice/tsrc/ut_cntmaptileservice/inc/ut_cntmaptileservice.h Wed Aug 18 09:39:00 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,48 +0,0 @@
-/*
-* Copyright (c) 2010 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 <QtTest/QtTest>
-#include <QtGui>
-#include <QString>
-#include <qtcontacts.h>
-#include <qcontactmanager.h>
-
-#include "cntmaptileservice.h"
-
-//Maptile test interface class
-class T_MaptileServiceTest: public QObject
-{
- Q_OBJECT
-
-private slots:
- void init();
- void cleanup();
-
-private slots:
-
- void checkLocationFeature();
- void getPreferredAddressMapTilePath();
- void getWorkAddressMapTilePath();
- void getHomeAddressMapTilePath();
- void checkInvalidContactId();
- void publishForMaptileFetching();
- void readInvalidContactInfotmation();
-
-private:
- CntMapTileService* maptileService;
-};
-// End of File
--- a/phonebookengines/cntmaptileservice/tsrc/ut_cntmaptileservice/src/main.cpp Wed Aug 18 09:39:00 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,47 +0,0 @@
-/*
-* Copyright (c) 2010 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 <QtTest/QtTest>
-
-#include "testrunner.h"
-#include "ut_cntmaptileservice.h"
-
-int main(int argc, char *argv[])
-{
- bool promptOnExit(true);
- for (int i=0; i<argc; i++) {
- if (QString(argv[i]) == "-noprompt")
- promptOnExit = false;
- }
- // printf("Running tests...\n");
-
- QApplication app(argc, argv);
-
- TestRunner testRunner("ut_maptilefetcher");
-
- T_MaptileServiceTest maptileService;
- testRunner.runTests( maptileService );
-
- testRunner.printResults();
-
- if (promptOnExit) {
- // printf("Press any key...\n");
- getchar();
- }
- return 0;
-}
-
--- a/phonebookengines/cntmaptileservice/tsrc/ut_cntmaptileservice/src/testrunner.cpp Wed Aug 18 09:39:00 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,176 +0,0 @@
-/*
-* Copyright (c) 2010 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 "testrunner.h"
-#include <QtTest/QtTest>
-#include <QDir>
-#include <stdio.h>
-
-const char testFunctionElement[] = "TestFunction";
-const char incidentElement[] = "Incident";
-const char descriptionElement[] = "Description";
-const char nameAttr[] = "name";
-const char typeAttr[] = "type";
-const char fileAttr[] = "file";
-const char lineAttr[] = "line";
-const char attrValueFail[] = "fail";
-
-
-TestRunner::TestRunner(const QString& name)
-: mTestCount(0),
- mParsingIncidentElement(false),
- mParsingDescriptionElement(false),
- mCurrentTestFailed(false),
- mCurrentTestFailureLine(0)
-{
- mTestRunParams.append(name);
- mTestRunParams.append("-xml");
- mTestRunParams.append("-o");
- mHomeDir = QDir::homePath();
- mTestRunParams.append(QString()); // Initial result file name
-
- if (!mHomeDir.endsWith(QString::fromAscii("/")))
- mHomeDir += QString::fromAscii("/");
-}
-
-TestRunner::~TestRunner()
-{
-}
-
-int TestRunner::runTests(QObject& testObject)
-{
- QString className(testObject.metaObject()->className());
- printf("Running tests for %s ... ", className.toUtf8().data());
- QString resultFileName = mHomeDir + className + ".xml";
- mTestRunParams.replace(mTestRunParams.count()-1,resultFileName);
- int errorsBefore = mErrors.count();
- int error = QTest::qExec(&testObject, mTestRunParams);
- parse(resultFileName);
- printf("Failures: %d\n",mErrors.count()-errorsBefore);
- fflush(stdout);
- return error;
-}
-
-void TestRunner::printResults()
-{
- printf("\nTests executed: %d\n",mTestCount);
- if (mErrors.count() > 0) {
- printf("Failures (%d):\n", mErrors.count());
- foreach(QString error, mErrors) {
- printf("\n%s", error.toUtf8().data());
- }
- printf("\n");
- } else {
- printf("All passed.\n\n");
- }
- fflush(stdout);
-
- //To write in file
- QFile file("C:\\CntMaptileServiceResult.txt");
- if(file.open(QIODevice::WriteOnly))
- {
- QTextStream ts( &file );
- ts << "Tests executed: " << mTestCount << "\n";
- if (mErrors.count() > 0)
- {
- ts <<"Failures : " << mErrors.count() << "\n";
- foreach(QString error, mErrors)
- {
- ts << error.toUtf8().data();
- }
- ts << "\n";
- }
- else
- {
- ts<< "All passed.\n\n";
- }
-
- ts << endl;
- file.close();
- }
-}
-
-void TestRunner::parse(const QString& fileName)
-{
- QFile file(fileName);
- QXmlInputSource inputSource(&file);
- QXmlSimpleReader reader;
- reader.setContentHandler(this);
- reader.parse(inputSource);
-}
-
-bool TestRunner::startElement(
- const QString& /*namespaceURI*/,
- const QString& /*localName*/,
- const QString& qName,
- const QXmlAttributes& atts)
-{
- if (qName == QString::fromAscii(testFunctionElement)) {
- mTestCount++;
- mCurrentTestName = atts.value(QString::fromAscii(nameAttr));
- return true;
- }
- if (qName == QString::fromAscii(incidentElement)) {
- mParsingIncidentElement = true;
- if (atts.value(QString::fromAscii(typeAttr)) == QString::fromAscii(attrValueFail)) {
- mCurrentTestFailed = true;
- mCurrentTestFile = atts.value(QString::fromAscii(fileAttr));
- mCurrentTestFailureLine = atts.value(QString::fromAscii(lineAttr)).toInt();
- }
- return true;
- }
- mParsingDescriptionElement =
- (qName == QString::fromAscii(descriptionElement));
- return true;
-}
-
-bool TestRunner::endElement(
- const QString& /*namespaceURI*/,
- const QString& /*localName*/,
- const QString& qName)
-{
- if (qName == QString::fromAscii(incidentElement)) {
- mParsingIncidentElement = false;
- mCurrentTestFailed = false;
- return true;
- }
- if (qName == QString::fromAscii(descriptionElement)) {
- mParsingDescriptionElement = false;
- }
- return true;
-}
-
-bool TestRunner::characters(const QString& ch)
-{
- if (mParsingIncidentElement &&
- mParsingDescriptionElement &&
- mCurrentTestFailed) {
- QByteArray testResult = mCurrentTestName.toAscii() + " failed:\n";
- testResult += "File: ";
- testResult += mCurrentTestFile.toAscii();
- testResult += "\n";
- testResult += "Line: ";
- testResult += QByteArray::number(mCurrentTestFailureLine);
- testResult += "\n";
- testResult += "Reason: ";
- testResult += ch.toAscii();
- testResult += "\n";
- mErrors.append(QString::fromAscii(testResult.data()));
- }
- return true;
-}
-
--- a/phonebookengines/cntmaptileservice/tsrc/ut_cntmaptileservice/src/ut_cntmaptileservice.cpp Wed Aug 18 09:39:00 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,287 +0,0 @@
-/*
-* Copyright (c) 2010 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 <qvaluespacepublisher.h>
-#include <qvaluespacesubscriber.h>
-
-#include "cntmaptiledblookuptable.h"
-#include "ut_cntmaptileservice.h"
-
-//Maximum maptile processing time
-const int KMapTileFetchTime = 60000;
-
-QTM_USE_NAMESPACE
-
-
-void T_MaptileServiceTest::init()
-{
- maptileService = new CntMapTileService;
-}
-
-void T_MaptileServiceTest::cleanup()
-{
- delete maptileService;
-}
-
-//Checks whether location feature enabled or disabled
-void T_MaptileServiceTest::checkLocationFeature()
-{
- QVERIFY( maptileService->isLocationFeatureEnabled() == 1 );
-}
-
-//Checks the maptile path retrieval for preferred address
-void T_MaptileServiceTest::getPreferredAddressMapTilePath()
-{
-
- QContact* contact = new QContact();
-
- //Add contact name
- QContactName* name = new QContactName();
- name->setFirstName("Raj");
- contact->saveDetail( name );
-
- //Add address
- QContactAddress* address = new QContactAddress();
- address->setPostOfficeBox("87640");
- address->setStreet("Torstrasse");
- address->setPostcode("12345");
- address->setLocality("Berlin");
- address->setCountry("Germany");
- contact->saveDetail(address);
-
- //Save the contact
- QContactManager* contactManager = NULL;
- contactManager = new QContactManager("symbian");
- contactManager->saveContact( contact );
-
- //Wait till maptile operation complete
- QTest::qWait( KMapTileFetchTime );
-
-
- //Get the saved id
- QContactId savedId = contact->id();
- TUint32 contactId = savedId.localId();
- QString string;
-
- //Get the maptile
- int error = maptileService->getMapTileImage(
- contactId, CntMapTileService::AddressPreference, string );
-
- //Construct the QPimap from reference bitmap
- QImage referenceBitmap( "c:\\maptiletest\\preferredaddressmap.png" );
-
- //Construct the QPixmap from new retrieved bitmap
- QImage retrievedBitmap( string );
-
-
- //delete the contact
- contactManager->removeContact( contactId );
-
- delete contact;
- delete name;
- delete address;
- delete contactManager;
-
-}
-
-//Checks the maptile path retrieval for work address
-void T_MaptileServiceTest::getWorkAddressMapTilePath()
-{
- QContact* contact = new QContact();
- //Set name
- QContactName* name = new QContactName();
- name->setFirstName("Mike");
- contact->saveDetail(name);
-
- //Set address
- QContactAddress* address = new QContactAddress();
- address->setPostOfficeBox("2345");
- address->setPostcode("29834");
- address->setStreet("Domlur");
- address->setLocality("Bangalore");
- address->setCountry("India");
- address->setContexts(QContactDetail::ContextWork);
- contact->saveDetail(address);
-
- //Save the contact
- QContactManager* contactManager = NULL;
- contactManager = new QContactManager("symbian");
- contactManager->saveContact( contact );
-
- //Wait till maptile operation complete
- QTest::qWait( KMapTileFetchTime );
-
-
- //Get the saved id
- QContactId savedId = contact->id();
- TUint32 contactId = savedId.localId();
- QString string;
-
- //Get the maptile
- int error = maptileService->getMapTileImage(
- contactId, CntMapTileService::AddressWork, string );
-
- //Construct the QPimap from already stored bitmap
- QImage referenceBitmap( "c:\\maptiletest\\workaddressmap.png" );
-
- //Construct the QPixmap from new retrieved bitmap
- QImage retrievedBitmap( string );
-
- //check results are same
- QVERIFY( retrievedBitmap == referenceBitmap );
-
-
- contactManager->removeContact( contactId );
-
- delete contact;
- delete name;
- delete address;
- delete contactManager;
-}
-
-//Checks the maptile path retrieval for home address
-void T_MaptileServiceTest::getHomeAddressMapTilePath()
-{
- QContact* contact = new QContact();
-
- QContactName* name = new QContactName();
- name->setFirstName("first");
- contact->saveDetail(name);
-
- QContactAddress* address = new QContactAddress();
- address->setContexts(QContactDetail::ContextHome);
- address->setPostOfficeBox("81282");
- address->setStreet("Keilalahdentie");
- address->setPostcode("67890");
- address->setLocality("Espoo");
- address->setCountry("Finland");
- contact->saveDetail(address);
-
- //Save the contact
- QContactManager* contactManager = NULL;
- contactManager = new QContactManager("symbian");
- contactManager->saveContact( contact );
-
- //Wait till maptile operation complete
- QTest::qWait( KMapTileFetchTime );
-
- //Get the saved id
- QContactId savedId = contact->id();
- TUint32 contactId = savedId.localId();
- QString string;
-
- //Get the maptile
- int error = maptileService->getMapTileImage(
- contactId, CntMapTileService::AddressHome, string );
-
- //Construct the QPimap from already stored bitmap
- QImage referenceBitmap( "c:\\maptiletest\\homeaddressmap.png" );
-
- //Construct the QPixmap from new retrieved bitmap
- QImage retrievedBitmap( string );
-
- //comapre the bitmaps
- QVERIFY( retrievedBitmap == referenceBitmap );
-
-
- contactManager->removeContact( contactId );
-
- delete contact;
- delete name;
- delete address;
- delete contactManager;
-}
-
-//Checks the maptile path retrieval returns NULL for invalid address
-void T_MaptileServiceTest::checkInvalidContactId()
-{
-
- QContact* contact = new QContact();
-
- QContactName* name = new QContactName();
- name->setFirstName("first");
- contact->saveDetail(name);
-
- //Add some invalid address
- QContactAddress* address = new QContactAddress();
- address->setPostOfficeBox("11111");
- address->setStreet("htrtfdsk");
- address->setPostcode("98989");
- address->setLocality("ghwdxnkwnn");
- address->setCountry("Fbsjwskws");
- contact->saveDetail(address);
-
- //Save the contact
- QContactManager* contactManager = NULL;
- contactManager = new QContactManager("symbian");
- contactManager->saveContact( contact );
-
- //Wait till maptile operation complete
- QTest::qWait( KMapTileFetchTime );
-
-
- //Get the saved id
- QContactId savedId = contact->id();
- TUint32 contactId = savedId.localId();
- QString string;
-
- //Get the maptile
- int error = maptileService->getMapTileImage(
- contactId, CntMapTileService::AddressPreference, string );
-
- contactManager->removeContact( contactId );
-
- //Maptile path should be NULL for invalid address
- QVERIFY( string.isEmpty() );
-
- delete contact;
- delete name;
- delete address;
- delete contactManager;
-}
-
-void T_MaptileServiceTest::publishForMaptileFetching()
-{
- int addressCount = 1;
- int contactId = 10;
-
- maptileService->publishValue( contactId, CntMapTileService::AddressPreference, addressCount );
- QVERIFY( maptileService->mContactEntryInfo == QString("10-3-1"));
-
- maptileService->publishValue( contactId, CntMapTileService::AddressHome, addressCount );
- QVERIFY( maptileService->mContactEntryInfo == QString("10-4-1"));
-
- maptileService->publishValue( contactId, CntMapTileService::AddressWork, addressCount );
- QVERIFY( maptileService->mContactEntryInfo == QString("10-5-1"));
-}
-
-void T_MaptileServiceTest::readInvalidContactInfotmation()
-{
- int contactId = -1;
- TLookupItem lookupItem;
- int numberOfaddress = 0;
-
- int error = maptileService->readEntryFromMaptileDataBase(
- contactId,
- CntMapTileService::AddressPreference,
- lookupItem,
- numberOfaddress );
- QVERIFY( error == KErrNotFound );
-
-
-}
-
-
--- a/phonebookengines/cntmaptileservice/tsrc/ut_cntmaptileservice/ut_cntmaptileservice.pro Wed Aug 18 09:39:00 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,73 +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:
-#
-
-TEMPLATE = app
-QT += testlib sql xml
-
-CONFIG += hb
-CONFIG += mobility
-MOBILITY = publishsubscribe
-
-DEFINES += QT_NO_DEBUG_OUTPUT
-DEFINES += QT_NO_WARNING_OUTPUT
-DEFINES += CNTMAPTILESERVICEDLL
-DEFINES += CNTMAPTILESERVICE_UNIT_TEST
-
-INCLUDEPATH += inc
-INCLUDEPATH += ../inc
-INCLUDEPATH += ../../inc
-INCLUDEPATH += $$APP_LAYER_SYSTEMINCLUDE
-
-symbian:
-{
- :BLD_INF_RULES.prj_exports += "../../../cntmaptileservice/conf/cntmaptileservice.confml APP_LAYER_CONFML(cntmaptileservice.confml)"
- :BLD_INF_RULES.prj_exports += "../../../cntmaptileservice/conf/cntmaptileservice_2002C3A8.crml APP_LAYER_CRML(cntmaptileservice_2002C3A8.crml)"
- :BLD_INF_RULES.prj_exports += "../../../cntmaptileservice/conf/2002C3A8.txt /epoc32/winscw/c/private/10202be9/2002C3A8.txt"
-
- :BLD_INF_RULES.prj_exports += "data/preferredaddressmap.png /epoc32/winscw/c/maptiletest/preferredaddressmap.png"
- :BLD_INF_RULES.prj_exports += "data/workaddressmap.png /epoc32/winscw/c/maptiletest/workaddressmap.png"
- :BLD_INF_RULES.prj_exports += "data/homeaddressmap.png /epoc32/winscw/c/maptiletest/homeaddressmap.png"
-}
-
-SOURCES += src/testrunner.cpp
-SOURCES += src/main.cpp
-SOURCES += src/ut_cntmaptileservice.cpp
-
-SOURCES += ../../src/cntmaptileservice.cpp
-SOURCES += ../../src/cntmaptiledblookuptable.cpp
-
-# Input
-HEADERS += inc/testrunner.h
-HEADERS += inc/ut_cntmaptileservice.h
-
-HEADERS += ../../inc/cntmaptileservice.h
-HEADERS += ../../inc/cntmaptiledblookuptable.h
-
-
-LIBS += -lQtContacts \
- -lcntmodel \
- -ledbms \
- -lbafl \
- -lcentralrepository \
- -leuser
-
-myCrml.sources = ../../../cntmaptileservice/conf/cntmaptilepublisher.qcrml
- myCrml.path = c:/resource/qt/crml
- DEPLOYMENT += myCrml
-
-
-TARGET.CAPABILITY = ALL -TCB
-
--- a/phonebookengines/eabi/cntlistmodelu.def Wed Aug 18 09:39:00 2010 +0300
+++ b/phonebookengines/eabi/cntlistmodelu.def Thu Sep 02 20:16:15 2010 +0300
@@ -12,32 +12,34 @@
_ZN12CntListModel16staticMetaObjectE @ 11 NONAME DATA 16
_ZN12CntListModel19getStaticMetaObjectEv @ 12 NONAME
_ZN12CntListModel19handleMyCardChangedERKjS1_ @ 13 NONAME
- _ZN12CntListModel21updateContactIdsArrayEv @ 14 NONAME
- _ZN12CntListModel24handleContactInfoUpdatedEj @ 15 NONAME
- _ZN12CntListModel9setFilterERKN10QtMobility14QContactFilterE @ 16 NONAME
- _ZN12CntListModelC1EPN10QtMobility15QContactManagerERKNS0_14QContactFilterEbP7QObject @ 17 NONAME
- _ZN12CntListModelC1ERKN10QtMobility14QContactFilterEbP7QObject @ 18 NONAME
- _ZN12CntListModelC2EPN10QtMobility15QContactManagerERKNS0_14QContactFilterEbP7QObject @ 19 NONAME
- _ZN12CntListModelC2ERKN10QtMobility14QContactFilterEbP7QObject @ 20 NONAME
- _ZN12CntListModelD0Ev @ 21 NONAME
- _ZN12CntListModelD1Ev @ 22 NONAME
- _ZN12CntListModelD2Ev @ 23 NONAME
- _ZNK12CntListModel10metaObjectEv @ 24 NONAME
- _ZNK12CntListModel10validRowIdEi @ 25 NONAME
- _ZNK12CntListModel12myCardStatusEv @ 26 NONAME
- _ZNK12CntListModel14contactManagerEv @ 27 NONAME
- _ZNK12CntListModel14indexOfContactERKN10QtMobility8QContactE @ 28 NONAME
- _ZNK12CntListModel18dataForDisplayRoleEi @ 29 NONAME
- _ZNK12CntListModel4dataERK11QModelIndexi @ 30 NONAME
- _ZNK12CntListModel5rowIdERKj @ 31 NONAME
- _ZNK12CntListModel7contactERK11QModelIndex @ 32 NONAME
- _ZNK12CntListModel7contactEi @ 33 NONAME
- _ZNK12CntListModel8myCardIdEv @ 34 NONAME
- _ZNK12CntListModel8rowCountERK11QModelIndex @ 35 NONAME
- _ZTI12CntListModel @ 36 NONAME
- _ZTV12CntListModel @ 37 NONAME
- _ZN12CntListModel19updateRelationshipsEv @ 38 NONAME
- _ZN12CntListModel23handleAddedRelationshipERK5QListIjE @ 39 NONAME
- _ZN12CntListModel23handleRowSettingChangedERK13XQSettingsKeyRK8QVariant @ 40 NONAME
- _ZN12CntListModel25handleRemovedRelationshipERK5QListIjE @ 41 NONAME
+ _ZN12CntListModel19updateRelationshipsEv @ 14 NONAME
+ _ZN12CntListModel21updateContactIdsArrayEv @ 15 NONAME
+ _ZN12CntListModel23handleAddedRelationshipERK5QListIjE @ 16 NONAME
+ _ZN12CntListModel23handleRowSettingChangedERK13XQSettingsKeyRK8QVariant @ 17 NONAME
+ _ZN12CntListModel24handleContactInfoUpdatedEj @ 18 NONAME
+ _ZN12CntListModel25handleRemovedRelationshipERK5QListIjE @ 19 NONAME
+ _ZN12CntListModel9setFilterERKN10QtMobility14QContactFilterE @ 20 NONAME
+ _ZN12CntListModelC1EPN10QtMobility15QContactManagerERKNS0_14QContactFilterEbP7QObject @ 21 NONAME
+ _ZN12CntListModelC1ERKN10QtMobility14QContactFilterEbP7QObject @ 22 NONAME
+ _ZN12CntListModelC2EPN10QtMobility15QContactManagerERKNS0_14QContactFilterEbP7QObject @ 23 NONAME
+ _ZN12CntListModelC2ERKN10QtMobility14QContactFilterEbP7QObject @ 24 NONAME
+ _ZN12CntListModelD0Ev @ 25 NONAME
+ _ZN12CntListModelD1Ev @ 26 NONAME
+ _ZN12CntListModelD2Ev @ 27 NONAME
+ _ZNK12CntListModel10metaObjectEv @ 28 NONAME
+ _ZNK12CntListModel10validRowIdEi @ 29 NONAME
+ _ZNK12CntListModel11dataForRoleEii @ 30 NONAME
+ _ZNK12CntListModel12myCardStatusEv @ 31 NONAME
+ _ZNK12CntListModel14contactManagerEv @ 32 NONAME
+ _ZNK12CntListModel14indexOfContactERKN10QtMobility8QContactE @ 33 NONAME
+ _ZNK12CntListModel4dataERK11QModelIndexi @ 34 NONAME
+ _ZNK12CntListModel5rowIdERKj @ 35 NONAME
+ _ZNK12CntListModel7contactERK11QModelIndex @ 36 NONAME
+ _ZNK12CntListModel7contactEi @ 37 NONAME
+ _ZNK12CntListModel8myCardIdEv @ 38 NONAME
+ _ZNK12CntListModel8rowCountERK11QModelIndex @ 39 NONAME
+ _ZNK12CntListModel9contactIdERK11QModelIndex @ 40 NONAME
+ _ZTI12CntListModel @ 41 NONAME
+ _ZTV12CntListModel @ 42 NONAME
+ _ZNK12CntListModel16indexOfContactIdERKj @ 43 NONAME
--- a/phonebookengines/eabi/cntmaptileserviceu.def Wed Aug 18 09:39:00 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,20 +0,0 @@
-EXPORTS
- _ZN17CntMapTileService11qt_metacallEN11QMetaObject4CallEiPPv @ 1 NONAME
- _ZN17CntMapTileService11qt_metacastEPKc @ 2 NONAME
- _ZN17CntMapTileService12publishValueEiNS_18ContactAddressTypeEi @ 3 NONAME
- _ZN17CntMapTileService15getMapTileImageEiNS_18ContactAddressTypeER7QString6QFlagsIN2Qt11OrientationEE @ 4 NONAME
- _ZN17CntMapTileService16setMaptileStatusEv @ 5 NONAME
- _ZN17CntMapTileService16staticMetaObjectE @ 6 NONAME DATA 16
- _ZN17CntMapTileService19getStaticMetaObjectEv @ 7 NONAME
- _ZN17CntMapTileService24isLocationFeatureEnabledEv @ 8 NONAME
- _ZN17CntMapTileService27maptileFetchingStatusUpdateEiii @ 9 NONAME
- _ZN17CntMapTileService28readEntryFromMaptileDataBaseEiNS_18ContactAddressTypeER11TLookupItemRi @ 10 NONAME
- _ZN17CntMapTileServiceC1Ev @ 11 NONAME
- _ZN17CntMapTileServiceC2Ev @ 12 NONAME
- _ZN17CntMapTileServiceD0Ev @ 13 NONAME
- _ZN17CntMapTileServiceD1Ev @ 14 NONAME
- _ZN17CntMapTileServiceD2Ev @ 15 NONAME
- _ZNK17CntMapTileService10metaObjectEv @ 16 NONAME
- _ZTI17CntMapTileService @ 17 NONAME
- _ZTV17CntMapTileService @ 18 NONAME
-
--- a/phonebookengines/phonebookengines.pro Wed Aug 18 09:39:00 2010 +0300
+++ b/phonebookengines/phonebookengines.pro Thu Sep 02 20:16:15 2010 +0300
@@ -26,7 +26,6 @@
SUBDIRS += cntsortplugin
SUBDIRS += cntlistmodel
SUBDIRS += cntactions
-SUBDIRS += cntmaptileservice
SUBDIRS += cntsimutility
SUBDIRS += cntimageutility
--- a/phonebookengines_old/contactsmodel/inc/cntdef_internal.hrh Wed Aug 18 09:39:00 2010 +0300
+++ b/phonebookengines_old/contactsmodel/inc/cntdef_internal.hrh Thu Sep 02 20:16:15 2010 +0300
@@ -47,4 +47,4 @@
/** @internalComponent */
#define KIntFieldFlagFilterable4 0x100
-#endif //__CNTDEF_INTERNAL_HRH__
\ No newline at end of file
+#endif //__CNTDEF_INTERNAL_HRH__
--- a/phonebookui/bwins/pbkcommonuiu.def Wed Aug 18 09:39:00 2010 +0300
+++ b/phonebookui/bwins/pbkcommonuiu.def Thu Sep 02 20:16:15 2010 +0300
@@ -1,173 +1,177 @@
EXPORTS
?trUtf8@CntDefaultViewManager@@SA?AVQString@@PBD0@Z @ 1 NONAME ; class QString CntDefaultViewManager::trUtf8(char const *, char const *)
- ?setViewNavigator@CntDefaultViewManager@@QAEXPAVCntViewNavigator@@@Z @ 2 NONAME ; void CntDefaultViewManager::setViewNavigator(class CntViewNavigator *)
- ?tr@CntActionPopup@@SA?AVQString@@PBD0@Z @ 3 NONAME ; class QString CntActionPopup::tr(char const *, char const *)
- ?currentViewId@CntDefaultViewManager@@QAEHXZ @ 4 NONAME ; int CntDefaultViewManager::currentViewId(void)
- ?cleanup@CntDefaultViewManager@@AAEXXZ @ 5 NONAME ; void CntDefaultViewManager::cleanup(void)
- ??0CntDefaultViewFactory@@QAE@XZ @ 6 NONAME ; CntDefaultViewFactory::CntDefaultViewFactory(void)
+ ?activate@CntBaseSelectionView@@UAEXV?$QMap@HVQVariant@@@@@Z @ 2 NONAME ; void CntBaseSelectionView::activate(class QMap<int, class QVariant>)
+ ?setViewNavigator@CntDefaultViewManager@@QAEXPAVCntViewNavigator@@@Z @ 3 NONAME ; void CntDefaultViewManager::setViewNavigator(class CntViewNavigator *)
+ ?tr@CntActionPopup@@SA?AVQString@@PBD0@Z @ 4 NONAME ; class QString CntActionPopup::tr(char const *, char const *)
+ ?currentViewId@CntDefaultViewManager@@QAEHXZ @ 5 NONAME ; int CntDefaultViewManager::currentViewId(void)
+ ?cleanup@CntDefaultViewManager@@AAEXXZ @ 6 NONAME ; void CntDefaultViewManager::cleanup(void)
??1CntMainWindow@@UAE@XZ @ 7 NONAME ; CntMainWindow::~CntMainWindow(void)
?viewActivated@CntContactCardView@@IAEXPAVCntAbstractViewManager@@V?$QMap@HVQVariant@@@@@Z @ 8 NONAME ; void CntContactCardView::viewActivated(class CntAbstractViewManager *, class QMap<int, class QVariant>)
?view@CntEditView@@UBEPAVHbView@@XZ @ 9 NONAME ; class HbView * CntEditView::view(void) const
?qt_metacall@CntBaseSelectionView@@UAEHW4Call@QMetaObject@@HPAPAX@Z @ 10 NONAME ; int CntBaseSelectionView::qt_metacall(enum QMetaObject::Call, int, void * *)
- ?tr@CntMainWindow@@SA?AVQString@@PBD0@Z @ 11 NONAME ; class QString CntMainWindow::tr(char const *, char const *)
- ?staticMetaObject@CntBaseSelectionView@@2UQMetaObject@@B @ 12 NONAME ; struct QMetaObject const CntBaseSelectionView::staticMetaObject
- ?d_func@CntEditView@@AAEPAVCntEditViewPrivate@@XZ @ 13 NONAME ; class CntEditViewPrivate * CntEditView::d_func(void)
- ?changesDiscarded@CntEditView@@IAEXXZ @ 14 NONAME ; void CntEditView::changesDiscarded(void)
- ??_ECntDefaultViewManager@@UAE@I@Z @ 15 NONAME ; CntDefaultViewManager::~CntDefaultViewManager(unsigned int)
- ??_ECntBaseSelectionView@@UAE@I@Z @ 16 NONAME ; CntBaseSelectionView::~CntBaseSelectionView(unsigned int)
- ?view@CntBaseSelectionView@@UBEPAVHbView@@XZ @ 17 NONAME ; class HbView * CntBaseSelectionView::view(void) const
- ??1CntDefaultViewFactory@@UAE@XZ @ 18 NONAME ; CntDefaultViewFactory::~CntDefaultViewFactory(void)
- ??_ECntDefaultViewFactory@@UAE@I@Z @ 19 NONAME ; CntDefaultViewFactory::~CntDefaultViewFactory(unsigned int)
- ?trUtf8@CntDefaultViewManager@@SA?AVQString@@PBD0H@Z @ 20 NONAME ; class QString CntDefaultViewManager::trUtf8(char const *, char const *, int)
- ?qt_metacast@CntActionPopup@@UAEPAXPBD@Z @ 21 NONAME ; void * CntActionPopup::qt_metacast(char const *)
- ?deleteOldView@CntDefaultViewManager@@AAEXXZ @ 22 NONAME ; void CntDefaultViewManager::deleteOldView(void)
- ?trUtf8@CntMainWindow@@SA?AVQString@@PBD0H@Z @ 23 NONAME ; class QString CntMainWindow::trUtf8(char const *, char const *, int)
- ?trUtf8@CntEditView@@SA?AVQString@@PBD0H@Z @ 24 NONAME ; class QString CntEditView::trUtf8(char const *, char const *, int)
- ??1CntEditView@@UAE@XZ @ 25 NONAME ; CntEditView::~CntEditView(void)
- ?qt_metacast@CntBaseSelectionView@@UAEPAXPBD@Z @ 26 NONAME ; void * CntBaseSelectionView::qt_metacast(char const *)
- ?metaObject@CntBaseSelectionView@@UBEPBUQMetaObject@@XZ @ 27 NONAME ; struct QMetaObject const * CntBaseSelectionView::metaObject(void) const
- ?back@CntDefaultViewManager@@UAEXV?$QMap@HVQVariant@@@@_N@Z @ 28 NONAME ; void CntDefaultViewManager::back(class QMap<int, class QVariant>, bool)
- ??0CntKeyGrabber@@QAE@PAVHbMainWindow@@PAVQObject@@@Z @ 29 NONAME ; CntKeyGrabber::CntKeyGrabber(class HbMainWindow *, class QObject *)
- ?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@CntKeyGrabber@@SA?AVQString@@PBD0H@Z @ 33 NONAME ; class QString CntKeyGrabber::tr(char const *, char const *, int)
- ?tr@CntDefaultViewManager@@SA?AVQString@@PBD0H@Z @ 34 NONAME ; class QString CntDefaultViewManager::tr(char const *, char const *, int)
- ?viewId@CntEditView@@UBEHXZ @ 35 NONAME ; int CntEditView::viewId(void) const
- ?qt_metacast@CntContactCardView@@UAEPAXPBD@Z @ 36 NONAME ; void * CntContactCardView::qt_metacast(char const *)
- ?activate@CntEditView@@UAEXPAVCntAbstractViewManager@@V?$QMap@HVQVariant@@@@@Z @ 37 NONAME ; void CntEditView::activate(class CntAbstractViewManager *, class QMap<int, class QVariant>)
- ?viewClosed@CntBaseSelectionView@@IAEXXZ @ 38 NONAME ; void CntBaseSelectionView::viewClosed(void)
- ??1CntKeyGrabber@@UAE@XZ @ 39 NONAME ; CntKeyGrabber::~CntKeyGrabber(void)
- ?showActionPopup@CntActionPopup@@QAE_NVQString@@@Z @ 40 NONAME ; bool CntActionPopup::showActionPopup(class QString)
- ?trUtf8@CntActionPopup@@SA?AVQString@@PBD0@Z @ 41 NONAME ; class QString CntActionPopup::trUtf8(char const *, char const *)
- ?tr@CntBaseSelectionView@@SA?AVQString@@PBD0H@Z @ 42 NONAME ; class QString CntBaseSelectionView::tr(char const *, char const *, int)
- ?metaObject@CntContactCardView@@UBEPBUQMetaObject@@XZ @ 43 NONAME ; struct QMetaObject const * CntContactCardView::metaObject(void) const
- ??0CntViewNavigator@@QAE@PAVQObject@@@Z @ 44 NONAME ; CntViewNavigator::CntViewNavigator(class QObject *)
- ?d_func@CntContactCardView@@ABEPBVCntContactCardViewPrivate@@XZ @ 45 NONAME ; class CntContactCardViewPrivate const * CntContactCardView::d_func(void) const
- ?trUtf8@CntBaseSelectionView@@SA?AVQString@@PBD0H@Z @ 46 NONAME ; class QString CntBaseSelectionView::trUtf8(char const *, char const *, int)
- ?getStaticMetaObject@CntBaseSelectionView@@SAABUQMetaObject@@XZ @ 47 NONAME ; struct QMetaObject const & CntBaseSelectionView::getStaticMetaObject(void)
- ??0CntDefaultViewManager@@QAE@PAVHbMainWindow@@@Z @ 48 NONAME ; CntDefaultViewManager::CntDefaultViewManager(class HbMainWindow *)
- ?actionPopupCancelPressed@CntActionPopup@@IAEXXZ @ 49 NONAME ; void CntActionPopup::actionPopupCancelPressed(void)
- ?getStaticMetaObject@CntActionPopup@@SAABUQMetaObject@@XZ @ 50 NONAME ; struct QMetaObject const & CntActionPopup::getStaticMetaObject(void)
- ?next@CntViewNavigator@@QAEXABHAAV?$QFlags@W4ViewSwitchFlag@Hb@@@@@Z @ 51 NONAME ; void CntViewNavigator::next(int const &, class QFlags<enum Hb::ViewSwitchFlag> &)
- ?createView@CntDefaultViewFactory@@UAEPAVCntAbstractView@@H@Z @ 52 NONAME ; class CntAbstractView * CntDefaultViewFactory::createView(int)
- ?qt_metacast@CntEditView@@UAEPAXPBD@Z @ 53 NONAME ; void * CntEditView::qt_metacast(char const *)
- ??0CntContactCardView@@QAE@_N@Z @ 54 NONAME ; CntContactCardView::CntContactCardView(bool)
- ?contactRemoved@CntEditView@@IAEX_N@Z @ 55 NONAME ; void CntEditView::contactRemoved(bool)
- ?d_func@CntActionPopup@@ABEPBVCntActionPopupPrivate@@XZ @ 56 NONAME ; class CntActionPopupPrivate const * CntActionPopup::d_func(void) const
- ?trUtf8@CntContactCardView@@SA?AVQString@@PBD0@Z @ 57 NONAME ; class QString CntContactCardView::trUtf8(char const *, char const *)
- ?metaObject@CntActionPopup@@UBEPBUQMetaObject@@XZ @ 58 NONAME ; struct QMetaObject const * CntActionPopup::metaObject(void) const
- ?staticMetaObject@CntDefaultViewManager@@2UQMetaObject@@B @ 59 NONAME ; struct QMetaObject const CntDefaultViewManager::staticMetaObject
- ?removeException@CntViewNavigator@@QAEXABH@Z @ 60 NONAME ; void CntViewNavigator::removeException(int const &)
- ?trUtf8@CntViewNavigator@@SA?AVQString@@PBD0@Z @ 61 NONAME ; class QString CntViewNavigator::trUtf8(char const *, char const *)
- ?getStaticMetaObject@CntKeyGrabber@@SAABUQMetaObject@@XZ @ 62 NONAME ; struct QMetaObject const & CntKeyGrabber::getStaticMetaObject(void)
- ?metaObject@CntMainWindow@@UBEPBUQMetaObject@@XZ @ 63 NONAME ; struct QMetaObject const * CntMainWindow::metaObject(void) const
- ??_ECntMainWindow@@UAE@I@Z @ 64 NONAME ; CntMainWindow::~CntMainWindow(unsigned int)
- ?metaObject@CntDefaultViewManager@@UBEPBUQMetaObject@@XZ @ 65 NONAME ; struct QMetaObject const * CntDefaultViewManager::metaObject(void) const
- ?changeView@CntDefaultViewManager@@UAEXV?$QMap@HVQVariant@@@@@Z @ 66 NONAME ; void CntDefaultViewManager::changeView(class QMap<int, class QVariant>)
- ??_ECntContactCardView@@UAE@I@Z @ 67 NONAME ; CntContactCardView::~CntContactCardView(unsigned int)
- ?staticMetaObject@CntViewNavigator@@2UQMetaObject@@B @ 68 NONAME ; struct QMetaObject const CntViewNavigator::staticMetaObject
- ?qt_metacall@CntContactCardView@@UAEHW4Call@QMetaObject@@HPAPAX@Z @ 69 NONAME ; int CntContactCardView::qt_metacall(enum QMetaObject::Call, int, void * *)
- ?qt_metacall@CntMainWindow@@UAEHW4Call@QMetaObject@@HPAPAX@Z @ 70 NONAME ; int CntMainWindow::qt_metacall(enum QMetaObject::Call, int, void * *)
- ?trUtf8@CntMainWindow@@SA?AVQString@@PBD0@Z @ 71 NONAME ; class QString CntMainWindow::trUtf8(char const *, char const *)
- ?trUtf8@CntKeyGrabber@@SA?AVQString@@PBD0H@Z @ 72 NONAME ; class QString CntKeyGrabber::trUtf8(char const *, char const *, int)
- ?staticMetaObject@CntMainWindow@@2UQMetaObject@@B @ 73 NONAME ; struct QMetaObject const CntMainWindow::staticMetaObject
- ?isDefault@CntContactCardView@@UBE_NXZ @ 74 NONAME ; bool CntContactCardView::isDefault(void) const
- ??1CntContactCardView@@UAE@XZ @ 75 NONAME ; CntContactCardView::~CntContactCardView(void)
- ?qt_metacall@CntActionPopup@@UAEHW4Call@QMetaObject@@HPAPAX@Z @ 76 NONAME ; int CntActionPopup::qt_metacall(enum QMetaObject::Call, int, void * *)
- ??0CntBaseSelectionView@@QAE@XZ @ 77 NONAME ; CntBaseSelectionView::CntBaseSelectionView(void)
- ?tr@CntKeyGrabber@@SA?AVQString@@PBD0@Z @ 78 NONAME ; class QString CntKeyGrabber::tr(char const *, char const *)
- ??0CntMainWindow@@QAE@PAVQWidget@@H@Z @ 79 NONAME ; CntMainWindow::CntMainWindow(class QWidget *, int)
- ??1CntActionPopup@@UAE@XZ @ 80 NONAME ; CntActionPopup::~CntActionPopup(void)
- ?viewId@CntContactCardView@@UBEHXZ @ 81 NONAME ; int CntContactCardView::viewId(void) const
- ?removeEffect@CntViewNavigator@@QAEXABH@Z @ 82 NONAME ; void CntViewNavigator::removeEffect(int const &)
- ?getStaticMetaObject@CntContactCardView@@SAABUQMetaObject@@XZ @ 83 NONAME ; struct QMetaObject const & CntContactCardView::getStaticMetaObject(void)
- ?activate@CntContactCardView@@UAEXPAVCntAbstractViewManager@@V?$QMap@HVQVariant@@@@@Z @ 84 NONAME ; void CntContactCardView::activate(class CntAbstractViewManager *, class QMap<int, class QVariant>)
- ?staticMetaObject@CntActionPopup@@2UQMetaObject@@B @ 85 NONAME ; struct QMetaObject const CntActionPopup::staticMetaObject
- ?staticMetaObject@CntEditView@@2UQMetaObject@@B @ 86 NONAME ; struct QMetaObject const CntEditView::staticMetaObject
- ?staticMetaObject@CntKeyGrabber@@2UQMetaObject@@B @ 87 NONAME ; struct QMetaObject const CntKeyGrabber::staticMetaObject
- ?viewOpened@CntBaseSelectionView@@IAEXPAVCntAbstractViewManager@@V?$QMap@HVQVariant@@@@@Z @ 88 NONAME ; void CntBaseSelectionView::viewOpened(class CntAbstractViewManager *, class QMap<int, class QVariant>)
- ?isDefault@CntEditView@@UBE_NXZ @ 89 NONAME ; bool CntEditView::isDefault(void) const
- ?qt_metacall@CntKeyGrabber@@UAEHW4Call@QMetaObject@@HPAPAX@Z @ 90 NONAME ; int CntKeyGrabber::qt_metacall(enum QMetaObject::Call, int, void * *)
- ??_ECntViewNavigator@@UAE@I@Z @ 91 NONAME ; CntViewNavigator::~CntViewNavigator(unsigned int)
- ?trUtf8@CntContactCardView@@SA?AVQString@@PBD0H@Z @ 92 NONAME ; class QString CntContactCardView::trUtf8(char const *, char const *, int)
- ?metaObject@CntKeyGrabber@@UBEPBUQMetaObject@@XZ @ 93 NONAME ; struct QMetaObject const * CntKeyGrabber::metaObject(void) const
- ?addException@CntViewNavigator@@QAEXABH0@Z @ 94 NONAME ; void CntViewNavigator::addException(int const &, int const &)
- ?closeApp@CntDefaultViewManager@@MAEXXZ @ 95 NONAME ; void CntDefaultViewManager::closeApp(void)
- ??_ECntKeyGrabber@@UAE@I@Z @ 96 NONAME ; CntKeyGrabber::~CntKeyGrabber(unsigned int)
- ?deactivate@CntBaseSelectionView@@UAEXXZ @ 97 NONAME ; void CntBaseSelectionView::deactivate(void)
- ?d_func@CntEditView@@ABEPBVCntEditViewPrivate@@XZ @ 98 NONAME ; class CntEditViewPrivate const * CntEditView::d_func(void) const
- ?setViewFactory@CntDefaultViewManager@@QAEXPAVCntAbstractViewFactory@@@Z @ 99 NONAME ; void CntDefaultViewManager::setViewFactory(class CntAbstractViewFactory *)
- ?getStaticMetaObject@CntViewNavigator@@SAABUQMetaObject@@XZ @ 100 NONAME ; struct QMetaObject const & CntViewNavigator::getStaticMetaObject(void)
- ?tr@CntViewNavigator@@SA?AVQString@@PBD0@Z @ 101 NONAME ; class QString CntViewNavigator::tr(char const *, char const *)
- ?trUtf8@CntActionPopup@@SA?AVQString@@PBD0H@Z @ 102 NONAME ; class QString CntActionPopup::trUtf8(char const *, char const *, int)
- ?tr@CntViewNavigator@@SA?AVQString@@PBD0H@Z @ 103 NONAME ; class QString CntViewNavigator::tr(char const *, char const *, int)
- ?tr@CntActionPopup@@SA?AVQString@@PBD0H@Z @ 104 NONAME ; class QString CntActionPopup::tr(char const *, char const *, int)
- ?qt_metacast@CntDefaultViewManager@@UAEPAXPBD@Z @ 105 NONAME ; void * CntDefaultViewManager::qt_metacast(char const *)
- ?qt_metacall@CntDefaultViewManager@@UAEHW4Call@QMetaObject@@HPAPAX@Z @ 106 NONAME ; int CntDefaultViewManager::qt_metacall(enum QMetaObject::Call, int, void * *)
- ??0CntEditView@@QAE@XZ @ 107 NONAME ; CntEditView::CntEditView(void)
- ?qt_metacast@CntViewNavigator@@UAEPAXPBD@Z @ 108 NONAME ; void * CntViewNavigator::qt_metacast(char const *)
- ?view@CntContactCardView@@UBEPAVHbView@@XZ @ 109 NONAME ; class HbView * CntContactCardView::view(void) const
- ?addToContacts@CntContactCardView@@IAEXXZ @ 110 NONAME ; void CntContactCardView::addToContacts(void)
- ?tr@CntContactCardView@@SA?AVQString@@PBD0H@Z @ 111 NONAME ; class QString CntContactCardView::tr(char const *, char const *, int)
- ?addRoot@CntViewNavigator@@QAEXABH@Z @ 112 NONAME ; void CntViewNavigator::addRoot(int const &)
- ?tr@CntContactCardView@@SA?AVQString@@PBD0@Z @ 113 NONAME ; class QString CntContactCardView::tr(char const *, char const *)
- ?tr@CntEditView@@SA?AVQString@@PBD0@Z @ 114 NONAME ; class QString CntEditView::tr(char const *, char const *)
- ?d_func@CntContactCardView@@AAEPAVCntContactCardViewPrivate@@XZ @ 115 NONAME ; class CntContactCardViewPrivate * CntContactCardView::d_func(void)
- ?metaObject@CntViewNavigator@@UBEPBUQMetaObject@@XZ @ 116 NONAME ; struct QMetaObject const * CntViewNavigator::metaObject(void) const
- ?staticMetaObject@CntContactCardView@@2UQMetaObject@@B @ 117 NONAME ; struct QMetaObject const CntContactCardView::staticMetaObject
- ?tr@CntBaseSelectionView@@SA?AVQString@@PBD0@Z @ 118 NONAME ; class QString CntBaseSelectionView::tr(char const *, char const *)
- ?trUtf8@CntBaseSelectionView@@SA?AVQString@@PBD0@Z @ 119 NONAME ; class QString CntBaseSelectionView::trUtf8(char const *, char const *)
- ?trUtf8@CntKeyGrabber@@SA?AVQString@@PBD0@Z @ 120 NONAME ; class QString CntKeyGrabber::trUtf8(char const *, char const *)
- ?switchView@CntDefaultViewManager@@AAEXV?$QMap@HVQVariant@@@@V?$QFlags@W4ViewSwitchFlag@Hb@@@@@Z @ 121 NONAME ; void CntDefaultViewManager::switchView(class QMap<int, class QVariant>, class QFlags<enum Hb::ViewSwitchFlag>)
- ?deactivate@CntEditView@@UAEXXZ @ 122 NONAME ; void CntEditView::deactivate(void)
- ?contactManager@CntDefaultViewManager@@UAEPAVQContactManager@QtMobility@@ABVQString@@@Z @ 123 NONAME ; class QtMobility::QContactManager * CntDefaultViewManager::contactManager(class QString const &)
- ?addEffect@CntViewNavigator@@QAEXABH0@Z @ 124 NONAME ; void CntViewNavigator::addEffect(int const &, int const &)
- ??_ECntActionPopup@@UAE@I@Z @ 125 NONAME ; CntActionPopup::~CntActionPopup(unsigned int)
- ?d_func@CntActionPopup@@AAEPAVCntActionPopupPrivate@@XZ @ 126 NONAME ; class CntActionPopupPrivate * CntActionPopup::d_func(void)
- ?metaObject@CntEditView@@UBEPBUQMetaObject@@XZ @ 127 NONAME ; struct QMetaObject const * CntEditView::metaObject(void) const
- ?contactUpdated@CntEditView@@IAEXH@Z @ 128 NONAME ; void CntEditView::contactUpdated(int)
- ??1CntDefaultViewManager@@UAE@XZ @ 129 NONAME ; CntDefaultViewManager::~CntDefaultViewManager(void)
- ?deactivate@CntContactCardView@@UAEXXZ @ 130 NONAME ; void CntContactCardView::deactivate(void)
- ?getStaticMetaObject@CntDefaultViewManager@@SAABUQMetaObject@@XZ @ 131 NONAME ; struct QMetaObject const & CntDefaultViewManager::getStaticMetaObject(void)
- ?trUtf8@CntViewNavigator@@SA?AVQString@@PBD0H@Z @ 132 NONAME ; class QString CntViewNavigator::trUtf8(char const *, char const *, int)
- ?qt_metacall@CntEditView@@UAEHW4Call@QMetaObject@@HPAPAX@Z @ 133 NONAME ; int CntEditView::qt_metacall(enum QMetaObject::Call, int, void * *)
- ?tr@CntEditView@@SA?AVQString@@PBD0H@Z @ 134 NONAME ; class QString CntEditView::tr(char const *, char const *, int)
- ?getStaticMetaObject@CntEditView@@SAABUQMetaObject@@XZ @ 135 NONAME ; struct QMetaObject const & CntEditView::getStaticMetaObject(void)
- ?trUtf8@CntEditView@@SA?AVQString@@PBD0@Z @ 136 NONAME ; class QString CntEditView::trUtf8(char const *, char const *)
- ??1CntViewNavigator@@UAE@XZ @ 137 NONAME ; CntViewNavigator::~CntViewNavigator(void)
- ?qt_metacast@CntMainWindow@@UAEPAXPBD@Z @ 138 NONAME ; void * CntMainWindow::qt_metacast(char const *)
- ?isDefault@CntBaseSelectionView@@UBE_NXZ @ 139 NONAME ; bool CntBaseSelectionView::isDefault(void) const
- ?back@CntViewNavigator@@QAEABHAAV?$QFlags@W4ViewSwitchFlag@Hb@@@@_N@Z @ 140 NONAME ; int const & CntViewNavigator::back(class QFlags<enum Hb::ViewSwitchFlag> &, bool)
- ??1CntBaseSelectionView@@UAE@XZ @ 141 NONAME ; CntBaseSelectionView::~CntBaseSelectionView(void)
- ?tr@CntMainWindow@@SA?AVQString@@PBD0H@Z @ 142 NONAME ; class QString CntMainWindow::tr(char const *, char const *, int)
- ?createPluginView@CntDefaultViewFactory@@AAEPAVCntAbstractView@@H@Z @ 143 NONAME ; class CntAbstractView * CntDefaultViewFactory::createPluginView(int)
- ??_ECntEditView@@UAE@I@Z @ 144 NONAME ; CntEditView::~CntEditView(unsigned int)
- ??0CntActionPopup@@QAE@PAVQContact@QtMobility@@@Z @ 145 NONAME ; CntActionPopup::CntActionPopup(class QtMobility::QContact *)
- ?executeContactAction@CntActionPopup@@IAEXAAVQContact@QtMobility@@VQContactDetail@3@VQString@@@Z @ 146 NONAME ; void CntActionPopup::executeContactAction(class QtMobility::QContact &, class QtMobility::QContactDetail, class QString)
- ?getStaticMetaObject@CntMainWindow@@SAABUQMetaObject@@XZ @ 147 NONAME ; struct QMetaObject const & CntMainWindow::getStaticMetaObject(void)
- ?eventFilter@CntKeyGrabber@@MAE_NPAVQObject@@PAVQEvent@@@Z @ 148 NONAME ; bool CntKeyGrabber::eventFilter(class QObject *, class QEvent *)
- ?qt_metacast@CntKeyGrabber@@UAEPAXPBD@Z @ 149 NONAME ; void * CntKeyGrabber::qt_metacast(char const *)
- ?tr@CntDefaultViewManager@@SA?AVQString@@PBD0@Z @ 150 NONAME ; class QString CntDefaultViewManager::tr(char const *, char const *)
- ?removeCurrentView@CntDefaultViewManager@@AAEXXZ @ 151 NONAME ; void CntDefaultViewManager::removeCurrentView(void)
- ?trUtf8@CntGroupMemberView@@SA?AVQString@@PBD0H@Z @ 152 NONAME ; class QString CntGroupMemberView::trUtf8(char const *, char const *, int)
- ?d_func@CntGroupMemberView@@AAEPAVCntGroupMemberViewPrivate@@XZ @ 153 NONAME ; class CntGroupMemberViewPrivate * CntGroupMemberView::d_func(void)
- ?view@CntGroupMemberView@@UBEPAVHbView@@XZ @ 154 NONAME ; class HbView * CntGroupMemberView::view(void) const
- ?staticMetaObject@CntGroupMemberView@@2UQMetaObject@@B @ 155 NONAME ; struct QMetaObject const CntGroupMemberView::staticMetaObject
- ??1CntGroupMemberView@@UAE@XZ @ 156 NONAME ; CntGroupMemberView::~CntGroupMemberView(void)
- ?tr@CntGroupMemberView@@SA?AVQString@@PBD0H@Z @ 157 NONAME ; class QString CntGroupMemberView::tr(char const *, char const *, int)
- ?activate@CntGroupMemberView@@UAEXPAVCntAbstractViewManager@@V?$QMap@HVQVariant@@@@@Z @ 158 NONAME ; void CntGroupMemberView::activate(class CntAbstractViewManager *, class QMap<int, class QVariant>)
- ??_ECntGroupMemberView@@UAE@I@Z @ 159 NONAME ; CntGroupMemberView::~CntGroupMemberView(unsigned int)
- ?viewId@CntGroupMemberView@@UBEHXZ @ 160 NONAME ; int CntGroupMemberView::viewId(void) const
- ?isDefault@CntGroupMemberView@@UBE_NXZ @ 161 NONAME ; bool CntGroupMemberView::isDefault(void) const
- ?qt_metacast@CntGroupMemberView@@UAEPAXPBD@Z @ 162 NONAME ; void * CntGroupMemberView::qt_metacast(char const *)
- ?trUtf8@CntGroupMemberView@@SA?AVQString@@PBD0@Z @ 163 NONAME ; class QString CntGroupMemberView::trUtf8(char const *, char const *)
- ?d_func@CntGroupMemberView@@ABEPBVCntGroupMemberViewPrivate@@XZ @ 164 NONAME ; class CntGroupMemberViewPrivate const * CntGroupMemberView::d_func(void) const
- ?getStaticMetaObject@CntGroupMemberView@@SAABUQMetaObject@@XZ @ 165 NONAME ; struct QMetaObject const & CntGroupMemberView::getStaticMetaObject(void)
- ??0CntGroupMemberView@@QAE@XZ @ 166 NONAME ; CntGroupMemberView::CntGroupMemberView(void)
- ?deactivate@CntGroupMemberView@@UAEXXZ @ 167 NONAME ; void CntGroupMemberView::deactivate(void)
- ?qt_metacall@CntGroupMemberView@@UAEHW4Call@QMetaObject@@HPAPAX@Z @ 168 NONAME ; int CntGroupMemberView::qt_metacall(enum QMetaObject::Call, int, void * *)
- ?metaObject@CntGroupMemberView@@UBEPBUQMetaObject@@XZ @ 169 NONAME ; struct QMetaObject const * CntGroupMemberView::metaObject(void) const
- ?tr@CntGroupMemberView@@SA?AVQString@@PBD0@Z @ 170 NONAME ; class QString CntGroupMemberView::tr(char const *, char const *)
- ?backPressed@CntGroupMemberView@@IAEXXZ @ 171 NONAME ; void CntGroupMemberView::backPressed(void)
+ ?trUtf8@CntGroupMemberView@@SA?AVQString@@PBD0H@Z @ 11 NONAME ; class QString CntGroupMemberView::trUtf8(char const *, char const *, int)
+ ?d_func@CntGroupMemberView@@AAEPAVCntGroupMemberViewPrivate@@XZ @ 12 NONAME ; class CntGroupMemberViewPrivate * CntGroupMemberView::d_func(void)
+ ?tr@CntMainWindow@@SA?AVQString@@PBD0@Z @ 13 NONAME ; class QString CntMainWindow::tr(char const *, char const *)
+ ?staticMetaObject@CntBaseSelectionView@@2UQMetaObject@@B @ 14 NONAME ; struct QMetaObject const CntBaseSelectionView::staticMetaObject
+ ?d_func@CntEditView@@AAEPAVCntEditViewPrivate@@XZ @ 15 NONAME ; class CntEditViewPrivate * CntEditView::d_func(void)
+ ?changesDiscarded@CntEditView@@IAEXXZ @ 16 NONAME ; void CntEditView::changesDiscarded(void)
+ ?view@CntGroupMemberView@@UBEPAVHbView@@XZ @ 17 NONAME ; class HbView * CntGroupMemberView::view(void) const
+ ??_ECntDefaultViewManager@@UAE@I@Z @ 18 NONAME ; CntDefaultViewManager::~CntDefaultViewManager(unsigned int)
+ ??_ECntBaseSelectionView@@UAE@I@Z @ 19 NONAME ; CntBaseSelectionView::~CntBaseSelectionView(unsigned int)
+ ?view@CntBaseSelectionView@@UBEPAVHbView@@XZ @ 20 NONAME ; class HbView * CntBaseSelectionView::view(void) const
+ ??1CntDefaultViewFactory@@UAE@XZ @ 21 NONAME ; CntDefaultViewFactory::~CntDefaultViewFactory(void)
+ ??_ECntDefaultViewFactory@@UAE@I@Z @ 22 NONAME ; CntDefaultViewFactory::~CntDefaultViewFactory(unsigned int)
+ ?trUtf8@CntDefaultViewManager@@SA?AVQString@@PBD0H@Z @ 23 NONAME ; class QString CntDefaultViewManager::trUtf8(char const *, char const *, int)
+ ?staticMetaObject@CntGroupMemberView@@2UQMetaObject@@B @ 24 NONAME ; struct QMetaObject const CntGroupMemberView::staticMetaObject
+ ?qt_metacast@CntActionPopup@@UAEPAXPBD@Z @ 25 NONAME ; void * CntActionPopup::qt_metacast(char const *)
+ ?deleteOldView@CntDefaultViewManager@@AAEXXZ @ 26 NONAME ; void CntDefaultViewManager::deleteOldView(void)
+ ?trUtf8@CntMainWindow@@SA?AVQString@@PBD0H@Z @ 27 NONAME ; class QString CntMainWindow::trUtf8(char const *, char const *, int)
+ ?trUtf8@CntEditView@@SA?AVQString@@PBD0H@Z @ 28 NONAME ; class QString CntEditView::trUtf8(char const *, char const *, int)
+ ??1CntEditView@@UAE@XZ @ 29 NONAME ; CntEditView::~CntEditView(void)
+ ?qt_metacast@CntBaseSelectionView@@UAEPAXPBD@Z @ 30 NONAME ; void * CntBaseSelectionView::qt_metacast(char const *)
+ ?metaObject@CntBaseSelectionView@@UBEPBUQMetaObject@@XZ @ 31 NONAME ; struct QMetaObject const * CntBaseSelectionView::metaObject(void) const
+ ?engine@CntDefaultViewManager@@QAEAAVCntAbstractEngine@@XZ @ 32 NONAME ; class CntAbstractEngine & CntDefaultViewManager::engine(void)
+ ?back@CntDefaultViewManager@@UAEXV?$QMap@HVQVariant@@@@_N@Z @ 33 NONAME ; void CntDefaultViewManager::back(class QMap<int, class QVariant>, bool)
+ ??0CntKeyGrabber@@QAE@PAVHbMainWindow@@PAVQObject@@@Z @ 34 NONAME ; CntKeyGrabber::CntKeyGrabber(class HbMainWindow *, class QObject *)
+ ?qt_metacall@CntViewNavigator@@UAEHW4Call@QMetaObject@@HPAPAX@Z @ 35 NONAME ; int CntViewNavigator::qt_metacall(enum QMetaObject::Call, int, void * *)
+ ?activate@CntContactCardView@@UAEXV?$QMap@HVQVariant@@@@@Z @ 36 NONAME ; void CntContactCardView::activate(class QMap<int, class QVariant>)
+ ?tr@CntKeyGrabber@@SA?AVQString@@PBD0H@Z @ 37 NONAME ; class QString CntKeyGrabber::tr(char const *, char const *, int)
+ ?tr@CntDefaultViewManager@@SA?AVQString@@PBD0H@Z @ 38 NONAME ; class QString CntDefaultViewManager::tr(char const *, char const *, int)
+ ?viewId@CntEditView@@UBEHXZ @ 39 NONAME ; int CntEditView::viewId(void) const
+ ??1CntGroupMemberView@@UAE@XZ @ 40 NONAME ; CntGroupMemberView::~CntGroupMemberView(void)
+ ?tr@CntGroupMemberView@@SA?AVQString@@PBD0H@Z @ 41 NONAME ; class QString CntGroupMemberView::tr(char const *, char const *, int)
+ ?qt_metacast@CntContactCardView@@UAEPAXPBD@Z @ 42 NONAME ; void * CntContactCardView::qt_metacast(char const *)
+ ?viewClosed@CntBaseSelectionView@@IAEXXZ @ 43 NONAME ; void CntBaseSelectionView::viewClosed(void)
+ ??1CntKeyGrabber@@UAE@XZ @ 44 NONAME ; CntKeyGrabber::~CntKeyGrabber(void)
+ ?showActionPopup@CntActionPopup@@QAE_NVQString@@@Z @ 45 NONAME ; bool CntActionPopup::showActionPopup(class QString)
+ ?trUtf8@CntActionPopup@@SA?AVQString@@PBD0@Z @ 46 NONAME ; class QString CntActionPopup::trUtf8(char const *, char const *)
+ ?tr@CntBaseSelectionView@@SA?AVQString@@PBD0H@Z @ 47 NONAME ; class QString CntBaseSelectionView::tr(char const *, char const *, int)
+ ?metaObject@CntContactCardView@@UBEPBUQMetaObject@@XZ @ 48 NONAME ; struct QMetaObject const * CntContactCardView::metaObject(void) const
+ ??0CntViewNavigator@@QAE@PAVQObject@@@Z @ 49 NONAME ; CntViewNavigator::CntViewNavigator(class QObject *)
+ ?d_func@CntContactCardView@@ABEPBVCntContactCardViewPrivate@@XZ @ 50 NONAME ; class CntContactCardViewPrivate const * CntContactCardView::d_func(void) const
+ ?trUtf8@CntBaseSelectionView@@SA?AVQString@@PBD0H@Z @ 51 NONAME ; class QString CntBaseSelectionView::trUtf8(char const *, char const *, int)
+ ?getStaticMetaObject@CntBaseSelectionView@@SAABUQMetaObject@@XZ @ 52 NONAME ; struct QMetaObject const & CntBaseSelectionView::getStaticMetaObject(void)
+ ??0CntDefaultViewManager@@QAE@PAVHbMainWindow@@@Z @ 53 NONAME ; CntDefaultViewManager::CntDefaultViewManager(class HbMainWindow *)
+ ??_ECntGroupMemberView@@UAE@I@Z @ 54 NONAME ; CntGroupMemberView::~CntGroupMemberView(unsigned int)
+ ?actionPopupCancelPressed@CntActionPopup@@IAEXXZ @ 55 NONAME ; void CntActionPopup::actionPopupCancelPressed(void)
+ ?getStaticMetaObject@CntActionPopup@@SAABUQMetaObject@@XZ @ 56 NONAME ; struct QMetaObject const & CntActionPopup::getStaticMetaObject(void)
+ ?next@CntViewNavigator@@QAEXABHAAV?$QFlags@W4ViewSwitchFlag@Hb@@@@@Z @ 57 NONAME ; void CntViewNavigator::next(int const &, class QFlags<enum Hb::ViewSwitchFlag> &)
+ ?createView@CntDefaultViewFactory@@UAEPAVCntAbstractView@@H@Z @ 58 NONAME ; class CntAbstractView * CntDefaultViewFactory::createView(int)
+ ?viewId@CntGroupMemberView@@UBEHXZ @ 59 NONAME ; int CntGroupMemberView::viewId(void) const
+ ?qt_metacast@CntEditView@@UAEPAXPBD@Z @ 60 NONAME ; void * CntEditView::qt_metacast(char const *)
+ ??0CntContactCardView@@QAE@_N@Z @ 61 NONAME ; CntContactCardView::CntContactCardView(bool)
+ ?contactRemoved@CntEditView@@IAEX_N@Z @ 62 NONAME ; void CntEditView::contactRemoved(bool)
+ ?d_func@CntActionPopup@@ABEPBVCntActionPopupPrivate@@XZ @ 63 NONAME ; class CntActionPopupPrivate const * CntActionPopup::d_func(void) const
+ ?trUtf8@CntContactCardView@@SA?AVQString@@PBD0@Z @ 64 NONAME ; class QString CntContactCardView::trUtf8(char const *, char const *)
+ ?metaObject@CntActionPopup@@UBEPBUQMetaObject@@XZ @ 65 NONAME ; struct QMetaObject const * CntActionPopup::metaObject(void) const
+ ?staticMetaObject@CntDefaultViewManager@@2UQMetaObject@@B @ 66 NONAME ; struct QMetaObject const CntDefaultViewManager::staticMetaObject
+ ?removeException@CntViewNavigator@@QAEXABH@Z @ 67 NONAME ; void CntViewNavigator::removeException(int const &)
+ ?trUtf8@CntViewNavigator@@SA?AVQString@@PBD0@Z @ 68 NONAME ; class QString CntViewNavigator::trUtf8(char const *, char const *)
+ ?isDefault@CntGroupMemberView@@UBE_NXZ @ 69 NONAME ; bool CntGroupMemberView::isDefault(void) const
+ ?getStaticMetaObject@CntKeyGrabber@@SAABUQMetaObject@@XZ @ 70 NONAME ; struct QMetaObject const & CntKeyGrabber::getStaticMetaObject(void)
+ ?metaObject@CntMainWindow@@UBEPBUQMetaObject@@XZ @ 71 NONAME ; struct QMetaObject const * CntMainWindow::metaObject(void) const
+ ??_ECntMainWindow@@UAE@I@Z @ 72 NONAME ; CntMainWindow::~CntMainWindow(unsigned int)
+ ?metaObject@CntDefaultViewManager@@UBEPBUQMetaObject@@XZ @ 73 NONAME ; struct QMetaObject const * CntDefaultViewManager::metaObject(void) const
+ ?changeView@CntDefaultViewManager@@UAEXV?$QMap@HVQVariant@@@@@Z @ 74 NONAME ; void CntDefaultViewManager::changeView(class QMap<int, class QVariant>)
+ ?qt_metacast@CntGroupMemberView@@UAEPAXPBD@Z @ 75 NONAME ; void * CntGroupMemberView::qt_metacast(char const *)
+ ??_ECntContactCardView@@UAE@I@Z @ 76 NONAME ; CntContactCardView::~CntContactCardView(unsigned int)
+ ?staticMetaObject@CntViewNavigator@@2UQMetaObject@@B @ 77 NONAME ; struct QMetaObject const CntViewNavigator::staticMetaObject
+ ?activate@CntEditView@@UAEXV?$QMap@HVQVariant@@@@@Z @ 78 NONAME ; void CntEditView::activate(class QMap<int, class QVariant>)
+ ?qt_metacall@CntContactCardView@@UAEHW4Call@QMetaObject@@HPAPAX@Z @ 79 NONAME ; int CntContactCardView::qt_metacall(enum QMetaObject::Call, int, void * *)
+ ?qt_metacall@CntMainWindow@@UAEHW4Call@QMetaObject@@HPAPAX@Z @ 80 NONAME ; int CntMainWindow::qt_metacall(enum QMetaObject::Call, int, void * *)
+ ?trUtf8@CntMainWindow@@SA?AVQString@@PBD0@Z @ 81 NONAME ; class QString CntMainWindow::trUtf8(char const *, char const *)
+ ?trUtf8@CntKeyGrabber@@SA?AVQString@@PBD0H@Z @ 82 NONAME ; class QString CntKeyGrabber::trUtf8(char const *, char const *, int)
+ ?staticMetaObject@CntMainWindow@@2UQMetaObject@@B @ 83 NONAME ; struct QMetaObject const CntMainWindow::staticMetaObject
+ ?isDefault@CntContactCardView@@UBE_NXZ @ 84 NONAME ; bool CntContactCardView::isDefault(void) const
+ ??1CntContactCardView@@UAE@XZ @ 85 NONAME ; CntContactCardView::~CntContactCardView(void)
+ ?trUtf8@CntGroupMemberView@@SA?AVQString@@PBD0@Z @ 86 NONAME ; class QString CntGroupMemberView::trUtf8(char const *, char const *)
+ ?qt_metacall@CntActionPopup@@UAEHW4Call@QMetaObject@@HPAPAX@Z @ 87 NONAME ; int CntActionPopup::qt_metacall(enum QMetaObject::Call, int, void * *)
+ ??0CntBaseSelectionView@@QAE@XZ @ 88 NONAME ; CntBaseSelectionView::CntBaseSelectionView(void)
+ ?tr@CntKeyGrabber@@SA?AVQString@@PBD0@Z @ 89 NONAME ; class QString CntKeyGrabber::tr(char const *, char const *)
+ ??0CntMainWindow@@QAE@PAVQWidget@@H@Z @ 90 NONAME ; CntMainWindow::CntMainWindow(class QWidget *, int)
+ ?setEngine@CntGroupMemberView@@UAEXAAVCntAbstractEngine@@@Z @ 91 NONAME ; void CntGroupMemberView::setEngine(class CntAbstractEngine &)
+ ??1CntActionPopup@@UAE@XZ @ 92 NONAME ; CntActionPopup::~CntActionPopup(void)
+ ?viewId@CntContactCardView@@UBEHXZ @ 93 NONAME ; int CntContactCardView::viewId(void) const
+ ?removeEffect@CntViewNavigator@@QAEXABH@Z @ 94 NONAME ; void CntViewNavigator::removeEffect(int const &)
+ ?getStaticMetaObject@CntContactCardView@@SAABUQMetaObject@@XZ @ 95 NONAME ; struct QMetaObject const & CntContactCardView::getStaticMetaObject(void)
+ ?staticMetaObject@CntActionPopup@@2UQMetaObject@@B @ 96 NONAME ; struct QMetaObject const CntActionPopup::staticMetaObject
+ ?staticMetaObject@CntEditView@@2UQMetaObject@@B @ 97 NONAME ; struct QMetaObject const CntEditView::staticMetaObject
+ ?staticMetaObject@CntKeyGrabber@@2UQMetaObject@@B @ 98 NONAME ; struct QMetaObject const CntKeyGrabber::staticMetaObject
+ ?viewOpened@CntBaseSelectionView@@IAEXPAVCntAbstractViewManager@@V?$QMap@HVQVariant@@@@@Z @ 99 NONAME ; void CntBaseSelectionView::viewOpened(class CntAbstractViewManager *, class QMap<int, class QVariant>)
+ ??0CntDefaultViewFactory@@QAE@AAVCntExtensionManager@@@Z @ 100 NONAME ; CntDefaultViewFactory::CntDefaultViewFactory(class CntExtensionManager &)
+ ?setEngine@CntEditView@@UAEXAAVCntAbstractEngine@@@Z @ 101 NONAME ; void CntEditView::setEngine(class CntAbstractEngine &)
+ ?backPressed@CntContactCardView@@IAEXH@Z @ 102 NONAME ; void CntContactCardView::backPressed(int)
+ ?isDefault@CntEditView@@UBE_NXZ @ 103 NONAME ; bool CntEditView::isDefault(void) const
+ ?qt_metacall@CntKeyGrabber@@UAEHW4Call@QMetaObject@@HPAPAX@Z @ 104 NONAME ; int CntKeyGrabber::qt_metacall(enum QMetaObject::Call, int, void * *)
+ ??_ECntViewNavigator@@UAE@I@Z @ 105 NONAME ; CntViewNavigator::~CntViewNavigator(unsigned int)
+ ?d_func@CntGroupMemberView@@ABEPBVCntGroupMemberViewPrivate@@XZ @ 106 NONAME ; class CntGroupMemberViewPrivate const * CntGroupMemberView::d_func(void) const
+ ?trUtf8@CntContactCardView@@SA?AVQString@@PBD0H@Z @ 107 NONAME ; class QString CntContactCardView::trUtf8(char const *, char const *, int)
+ ?metaObject@CntKeyGrabber@@UBEPBUQMetaObject@@XZ @ 108 NONAME ; struct QMetaObject const * CntKeyGrabber::metaObject(void) const
+ ?addException@CntViewNavigator@@QAEXABH0@Z @ 109 NONAME ; void CntViewNavigator::addException(int const &, int const &)
+ ?getStaticMetaObject@CntGroupMemberView@@SAABUQMetaObject@@XZ @ 110 NONAME ; struct QMetaObject const & CntGroupMemberView::getStaticMetaObject(void)
+ ?closeApp@CntDefaultViewManager@@MAEXXZ @ 111 NONAME ; void CntDefaultViewManager::closeApp(void)
+ ??0CntGroupMemberView@@QAE@XZ @ 112 NONAME ; CntGroupMemberView::CntGroupMemberView(void)
+ ?deactivate@CntGroupMemberView@@UAEXXZ @ 113 NONAME ; void CntGroupMemberView::deactivate(void)
+ ??_ECntKeyGrabber@@UAE@I@Z @ 114 NONAME ; CntKeyGrabber::~CntKeyGrabber(unsigned int)
+ ?deactivate@CntBaseSelectionView@@UAEXXZ @ 115 NONAME ; void CntBaseSelectionView::deactivate(void)
+ ?d_func@CntEditView@@ABEPBVCntEditViewPrivate@@XZ @ 116 NONAME ; class CntEditViewPrivate const * CntEditView::d_func(void) const
+ ?setViewFactory@CntDefaultViewManager@@QAEXPAVCntAbstractViewFactory@@@Z @ 117 NONAME ; void CntDefaultViewManager::setViewFactory(class CntAbstractViewFactory *)
+ ?trUtf8@CntActionPopup@@SA?AVQString@@PBD0H@Z @ 118 NONAME ; class QString CntActionPopup::trUtf8(char const *, char const *, int)
+ ?tr@CntViewNavigator@@SA?AVQString@@PBD0@Z @ 119 NONAME ; class QString CntViewNavigator::tr(char const *, char const *)
+ ?getStaticMetaObject@CntViewNavigator@@SAABUQMetaObject@@XZ @ 120 NONAME ; struct QMetaObject const & CntViewNavigator::getStaticMetaObject(void)
+ ?tr@CntViewNavigator@@SA?AVQString@@PBD0H@Z @ 121 NONAME ; class QString CntViewNavigator::tr(char const *, char const *, int)
+ ?tr@CntActionPopup@@SA?AVQString@@PBD0H@Z @ 122 NONAME ; class QString CntActionPopup::tr(char const *, char const *, int)
+ ?qt_metacall@CntGroupMemberView@@UAEHW4Call@QMetaObject@@HPAPAX@Z @ 123 NONAME ; int CntGroupMemberView::qt_metacall(enum QMetaObject::Call, int, void * *)
+ ?metaObject@CntGroupMemberView@@UBEPBUQMetaObject@@XZ @ 124 NONAME ; struct QMetaObject const * CntGroupMemberView::metaObject(void) const
+ ?qt_metacast@CntDefaultViewManager@@UAEPAXPBD@Z @ 125 NONAME ; void * CntDefaultViewManager::qt_metacast(char const *)
+ ?qt_metacall@CntDefaultViewManager@@UAEHW4Call@QMetaObject@@HPAPAX@Z @ 126 NONAME ; int CntDefaultViewManager::qt_metacall(enum QMetaObject::Call, int, void * *)
+ ??0CntEditView@@QAE@XZ @ 127 NONAME ; CntEditView::CntEditView(void)
+ ?qt_metacast@CntViewNavigator@@UAEPAXPBD@Z @ 128 NONAME ; void * CntViewNavigator::qt_metacast(char const *)
+ ?view@CntContactCardView@@UBEPAVHbView@@XZ @ 129 NONAME ; class HbView * CntContactCardView::view(void) const
+ ?addToContacts@CntContactCardView@@IAEXXZ @ 130 NONAME ; void CntContactCardView::addToContacts(void)
+ ?setEngine@CntBaseSelectionView@@UAEXAAVCntAbstractEngine@@@Z @ 131 NONAME ; void CntBaseSelectionView::setEngine(class CntAbstractEngine &)
+ ?tr@CntContactCardView@@SA?AVQString@@PBD0H@Z @ 132 NONAME ; class QString CntContactCardView::tr(char const *, char const *, int)
+ ?addRoot@CntViewNavigator@@QAEXABH@Z @ 133 NONAME ; void CntViewNavigator::addRoot(int const &)
+ ?tr@CntContactCardView@@SA?AVQString@@PBD0@Z @ 134 NONAME ; class QString CntContactCardView::tr(char const *, char const *)
+ ?tr@CntEditView@@SA?AVQString@@PBD0@Z @ 135 NONAME ; class QString CntEditView::tr(char const *, char const *)
+ ?d_func@CntContactCardView@@AAEPAVCntContactCardViewPrivate@@XZ @ 136 NONAME ; class CntContactCardViewPrivate * CntContactCardView::d_func(void)
+ ?metaObject@CntViewNavigator@@UBEPBUQMetaObject@@XZ @ 137 NONAME ; struct QMetaObject const * CntViewNavigator::metaObject(void) const
+ ?activate@CntGroupMemberView@@UAEXV?$QMap@HVQVariant@@@@@Z @ 138 NONAME ; void CntGroupMemberView::activate(class QMap<int, class QVariant>)
+ ?staticMetaObject@CntContactCardView@@2UQMetaObject@@B @ 139 NONAME ; struct QMetaObject const CntContactCardView::staticMetaObject
+ ?trUtf8@CntBaseSelectionView@@SA?AVQString@@PBD0@Z @ 140 NONAME ; class QString CntBaseSelectionView::trUtf8(char const *, char const *)
+ ?tr@CntBaseSelectionView@@SA?AVQString@@PBD0@Z @ 141 NONAME ; class QString CntBaseSelectionView::tr(char const *, char const *)
+ ?trUtf8@CntKeyGrabber@@SA?AVQString@@PBD0@Z @ 142 NONAME ; class QString CntKeyGrabber::trUtf8(char const *, char const *)
+ ?switchView@CntDefaultViewManager@@AAEXV?$QMap@HVQVariant@@@@V?$QFlags@W4ViewSwitchFlag@Hb@@@@@Z @ 143 NONAME ; void CntDefaultViewManager::switchView(class QMap<int, class QVariant>, class QFlags<enum Hb::ViewSwitchFlag>)
+ ?deactivate@CntEditView@@UAEXXZ @ 144 NONAME ; void CntEditView::deactivate(void)
+ ?addEffect@CntViewNavigator@@QAEXABH0@Z @ 145 NONAME ; void CntViewNavigator::addEffect(int const &, int const &)
+ ??_ECntActionPopup@@UAE@I@Z @ 146 NONAME ; CntActionPopup::~CntActionPopup(unsigned int)
+ ?d_func@CntActionPopup@@AAEPAVCntActionPopupPrivate@@XZ @ 147 NONAME ; class CntActionPopupPrivate * CntActionPopup::d_func(void)
+ ?metaObject@CntEditView@@UBEPBUQMetaObject@@XZ @ 148 NONAME ; struct QMetaObject const * CntEditView::metaObject(void) const
+ ?contactUpdated@CntEditView@@IAEXH@Z @ 149 NONAME ; void CntEditView::contactUpdated(int)
+ ??1CntDefaultViewManager@@UAE@XZ @ 150 NONAME ; CntDefaultViewManager::~CntDefaultViewManager(void)
+ ?deactivate@CntContactCardView@@UAEXXZ @ 151 NONAME ; void CntContactCardView::deactivate(void)
+ ?tr@CntGroupMemberView@@SA?AVQString@@PBD0@Z @ 152 NONAME ; class QString CntGroupMemberView::tr(char const *, char const *)
+ ?getStaticMetaObject@CntDefaultViewManager@@SAABUQMetaObject@@XZ @ 153 NONAME ; struct QMetaObject const & CntDefaultViewManager::getStaticMetaObject(void)
+ ?trUtf8@CntViewNavigator@@SA?AVQString@@PBD0H@Z @ 154 NONAME ; class QString CntViewNavigator::trUtf8(char const *, char const *, int)
+ ?tr@CntEditView@@SA?AVQString@@PBD0H@Z @ 155 NONAME ; class QString CntEditView::tr(char const *, char const *, int)
+ ?qt_metacall@CntEditView@@UAEHW4Call@QMetaObject@@HPAPAX@Z @ 156 NONAME ; int CntEditView::qt_metacall(enum QMetaObject::Call, int, void * *)
+ ?getStaticMetaObject@CntEditView@@SAABUQMetaObject@@XZ @ 157 NONAME ; struct QMetaObject const & CntEditView::getStaticMetaObject(void)
+ ?trUtf8@CntEditView@@SA?AVQString@@PBD0@Z @ 158 NONAME ; class QString CntEditView::trUtf8(char const *, char const *)
+ ??1CntViewNavigator@@UAE@XZ @ 159 NONAME ; CntViewNavigator::~CntViewNavigator(void)
+ ?qt_metacast@CntMainWindow@@UAEPAXPBD@Z @ 160 NONAME ; void * CntMainWindow::qt_metacast(char const *)
+ ?isDefault@CntBaseSelectionView@@UBE_NXZ @ 161 NONAME ; bool CntBaseSelectionView::isDefault(void) const
+ ?back@CntViewNavigator@@QAEABHAAV?$QFlags@W4ViewSwitchFlag@Hb@@@@_N@Z @ 162 NONAME ; int const & CntViewNavigator::back(class QFlags<enum Hb::ViewSwitchFlag> &, bool)
+ ?setEngine@CntContactCardView@@UAEXAAVCntAbstractEngine@@@Z @ 163 NONAME ; void CntContactCardView::setEngine(class CntAbstractEngine &)
+ ??1CntBaseSelectionView@@UAE@XZ @ 164 NONAME ; CntBaseSelectionView::~CntBaseSelectionView(void)
+ ?tr@CntMainWindow@@SA?AVQString@@PBD0H@Z @ 165 NONAME ; class QString CntMainWindow::tr(char const *, char const *, int)
+ ?createPluginView@CntDefaultViewFactory@@AAEPAVCntAbstractView@@H@Z @ 166 NONAME ; class CntAbstractView * CntDefaultViewFactory::createPluginView(int)
+ ??_ECntEditView@@UAE@I@Z @ 167 NONAME ; CntEditView::~CntEditView(unsigned int)
+ ??0CntActionPopup@@QAE@PAVQContact@QtMobility@@@Z @ 168 NONAME ; CntActionPopup::CntActionPopup(class QtMobility::QContact *)
+ ?backPressed@CntGroupMemberView@@IAEXXZ @ 169 NONAME ; void CntGroupMemberView::backPressed(void)
+ ?executeContactAction@CntActionPopup@@IAEXAAVQContact@QtMobility@@VQContactDetail@3@VQString@@@Z @ 170 NONAME ; void CntActionPopup::executeContactAction(class QtMobility::QContact &, class QtMobility::QContactDetail, class QString)
+ ?getStaticMetaObject@CntMainWindow@@SAABUQMetaObject@@XZ @ 171 NONAME ; struct QMetaObject const & CntMainWindow::getStaticMetaObject(void)
+ ?eventFilter@CntKeyGrabber@@MAE_NPAVQObject@@PAVQEvent@@@Z @ 172 NONAME ; bool CntKeyGrabber::eventFilter(class QObject *, class QEvent *)
+ ?qt_metacast@CntKeyGrabber@@UAEPAXPBD@Z @ 173 NONAME ; void * CntKeyGrabber::qt_metacast(char const *)
+ ?tr@CntDefaultViewManager@@SA?AVQString@@PBD0@Z @ 174 NONAME ; class QString CntDefaultViewManager::tr(char const *, char const *)
+ ?removeCurrentView@CntDefaultViewManager@@AAEXXZ @ 175 NONAME ; void CntDefaultViewManager::removeCurrentView(void)
--- a/phonebookui/cnthistorymodel/src/cnthistorymodel_p.cpp Wed Aug 18 09:39:00 2010 +0300
+++ b/phonebookui/cnthistorymodel/src/cnthistorymodel_p.cpp Thu Sep 02 20:16:15 2010 +0300
@@ -524,7 +524,7 @@
HItemPointer item = m_logsMap.value( i );
// Found item in the logs map
- if ( !item.isNull() ) {
+ if ( !item.isNull() && event ) {
int index = m_List.indexOf( item );
readLogEvent( event, *item );
indices.append( index );
--- a/phonebookui/eabi/pbkcommonuiu.def Wed Aug 18 09:39:00 2010 +0300
+++ b/phonebookui/eabi/pbkcommonuiu.def Thu Sep 02 20:16:15 2010 +0300
@@ -7,196 +7,201 @@
_ZN11CntEditView16changesDiscardedEv @ 6 NONAME
_ZN11CntEditView16staticMetaObjectE @ 7 NONAME DATA 16
_ZN11CntEditView19getStaticMetaObjectEv @ 8 NONAME
- _ZN11CntEditView8activateEP22CntAbstractViewManager4QMapIi8QVariantE @ 9 NONAME
- _ZN11CntEditViewC1Ev @ 10 NONAME
- _ZN11CntEditViewC2Ev @ 11 NONAME
- _ZN11CntEditViewD0Ev @ 12 NONAME
- _ZN11CntEditViewD1Ev @ 13 NONAME
- _ZN11CntEditViewD2Ev @ 14 NONAME
- _ZN13CntKeyGrabber11eventFilterEP7QObjectP6QEvent @ 15 NONAME
- _ZN13CntKeyGrabber11qt_metacallEN11QMetaObject4CallEiPPv @ 16 NONAME
- _ZN13CntKeyGrabber11qt_metacastEPKc @ 17 NONAME
- _ZN13CntKeyGrabber16staticMetaObjectE @ 18 NONAME DATA 16
- _ZN13CntKeyGrabber19getStaticMetaObjectEv @ 19 NONAME
- _ZN13CntKeyGrabberC1EP12HbMainWindowP7QObject @ 20 NONAME
- _ZN13CntKeyGrabberC2EP12HbMainWindowP7QObject @ 21 NONAME
- _ZN13CntKeyGrabberD0Ev @ 22 NONAME
- _ZN13CntKeyGrabberD1Ev @ 23 NONAME
- _ZN13CntKeyGrabberD2Ev @ 24 NONAME
- _ZN13CntMainWindow11qt_metacallEN11QMetaObject4CallEiPPv @ 25 NONAME
- _ZN13CntMainWindow11qt_metacastEPKc @ 26 NONAME
- _ZN13CntMainWindow16staticMetaObjectE @ 27 NONAME DATA 16
- _ZN13CntMainWindow19getStaticMetaObjectEv @ 28 NONAME
- _ZN13CntMainWindowC1EP7QWidgeti @ 29 NONAME
- _ZN13CntMainWindowC2EP7QWidgeti @ 30 NONAME
- _ZN13CntMainWindowD0Ev @ 31 NONAME
- _ZN13CntMainWindowD1Ev @ 32 NONAME
- _ZN13CntMainWindowD2Ev @ 33 NONAME
- _ZN14CntActionPopup11qt_metacallEN11QMetaObject4CallEiPPv @ 34 NONAME
- _ZN14CntActionPopup11qt_metacastEPKc @ 35 NONAME
- _ZN14CntActionPopup15showActionPopupE7QString @ 36 NONAME
- _ZN14CntActionPopup16staticMetaObjectE @ 37 NONAME DATA 16
- _ZN14CntActionPopup19getStaticMetaObjectEv @ 38 NONAME
- _ZN14CntActionPopup20executeContactActionERN10QtMobility8QContactENS0_14QContactDetailE7QString @ 39 NONAME
- _ZN14CntActionPopup24actionPopupCancelPressedEv @ 40 NONAME
- _ZN14CntActionPopupC1EPN10QtMobility8QContactE @ 41 NONAME
- _ZN14CntActionPopupC2EPN10QtMobility8QContactE @ 42 NONAME
- _ZN14CntActionPopupD0Ev @ 43 NONAME
- _ZN14CntActionPopupD1Ev @ 44 NONAME
- _ZN14CntActionPopupD2Ev @ 45 NONAME
- _ZN16CntViewNavigator11qt_metacallEN11QMetaObject4CallEiPPv @ 46 NONAME
- _ZN16CntViewNavigator11qt_metacastEPKc @ 47 NONAME
- _ZN16CntViewNavigator12addExceptionERKiS1_ @ 48 NONAME
- _ZN16CntViewNavigator12removeEffectERKi @ 49 NONAME
- _ZN16CntViewNavigator15removeExceptionERKi @ 50 NONAME
- _ZN16CntViewNavigator16staticMetaObjectE @ 51 NONAME DATA 16
- _ZN16CntViewNavigator19getStaticMetaObjectEv @ 52 NONAME
- _ZN16CntViewNavigator4backER6QFlagsIN2Hb14ViewSwitchFlagEEb @ 53 NONAME
- _ZN16CntViewNavigator4nextERKiR6QFlagsIN2Hb14ViewSwitchFlagEE @ 54 NONAME
- _ZN16CntViewNavigator7addRootERKi @ 55 NONAME
- _ZN16CntViewNavigator9addEffectERKiS1_ @ 56 NONAME
- _ZN16CntViewNavigatorC1EP7QObject @ 57 NONAME
- _ZN16CntViewNavigatorC2EP7QObject @ 58 NONAME
- _ZN16CntViewNavigatorD0Ev @ 59 NONAME
- _ZN16CntViewNavigatorD1Ev @ 60 NONAME
- _ZN16CntViewNavigatorD2Ev @ 61 NONAME
- _ZN18CntContactCardView10deactivateEv @ 62 NONAME
- _ZN18CntContactCardView11backPressedEv @ 63 NONAME
- _ZN18CntContactCardView11qt_metacallEN11QMetaObject4CallEiPPv @ 64 NONAME
- _ZN18CntContactCardView11qt_metacastEPKc @ 65 NONAME
- _ZN18CntContactCardView13addToContactsEv @ 66 NONAME
- _ZN18CntContactCardView13viewActivatedEP22CntAbstractViewManager4QMapIi8QVariantE @ 67 NONAME
- _ZN18CntContactCardView16staticMetaObjectE @ 68 NONAME DATA 16
- _ZN18CntContactCardView19getStaticMetaObjectEv @ 69 NONAME
- _ZN18CntContactCardView8activateEP22CntAbstractViewManager4QMapIi8QVariantE @ 70 NONAME
- _ZN18CntContactCardViewC1Eb @ 71 NONAME
- _ZN18CntContactCardViewC2Eb @ 72 NONAME
- _ZN18CntContactCardViewD0Ev @ 73 NONAME
- _ZN18CntContactCardViewD1Ev @ 74 NONAME
- _ZN18CntContactCardViewD2Ev @ 75 NONAME
- _ZN20CntBaseSelectionView10deactivateEv @ 76 NONAME
- _ZN20CntBaseSelectionView10viewClosedEv @ 77 NONAME
- _ZN20CntBaseSelectionView10viewOpenedEP22CntAbstractViewManager4QMapIi8QVariantE @ 78 NONAME
- _ZN20CntBaseSelectionView11qt_metacallEN11QMetaObject4CallEiPPv @ 79 NONAME
- _ZN20CntBaseSelectionView11qt_metacastEPKc @ 80 NONAME
- _ZN20CntBaseSelectionView16staticMetaObjectE @ 81 NONAME DATA 16
- _ZN20CntBaseSelectionView19getStaticMetaObjectEv @ 82 NONAME
- _ZN20CntBaseSelectionView8activateEP22CntAbstractViewManager4QMapIi8QVariantE @ 83 NONAME
- _ZN20CntBaseSelectionViewC2Ev @ 84 NONAME
- _ZN20CntBaseSelectionViewD0Ev @ 85 NONAME
- _ZN20CntBaseSelectionViewD1Ev @ 86 NONAME
- _ZN20CntBaseSelectionViewD2Ev @ 87 NONAME
- _ZN21CntDefaultViewFactory10createViewEi @ 88 NONAME
- _ZN21CntDefaultViewFactory16createPluginViewEi @ 89 NONAME
- _ZN21CntDefaultViewFactoryC1Ev @ 90 NONAME
- _ZN21CntDefaultViewFactoryC2Ev @ 91 NONAME
- _ZN21CntDefaultViewFactoryD0Ev @ 92 NONAME
- _ZN21CntDefaultViewFactoryD1Ev @ 93 NONAME
- _ZN21CntDefaultViewFactoryD2Ev @ 94 NONAME
- _ZN21CntDefaultViewManager10changeViewE4QMapIi8QVariantE @ 95 NONAME
- _ZN21CntDefaultViewManager10switchViewE4QMapIi8QVariantE6QFlagsIN2Hb14ViewSwitchFlagEE @ 96 NONAME
- _ZN21CntDefaultViewManager11qt_metacallEN11QMetaObject4CallEiPPv @ 97 NONAME
- _ZN21CntDefaultViewManager11qt_metacastEPKc @ 98 NONAME
- _ZN21CntDefaultViewManager13currentViewIdEv @ 99 NONAME
- _ZN21CntDefaultViewManager13deleteOldViewEv @ 100 NONAME
- _ZN21CntDefaultViewManager14contactManagerERK7QString @ 101 NONAME
- _ZN21CntDefaultViewManager14setViewFactoryEP22CntAbstractViewFactory @ 102 NONAME
- _ZN21CntDefaultViewManager16setViewNavigatorEP16CntViewNavigator @ 103 NONAME
- _ZN21CntDefaultViewManager16staticMetaObjectE @ 104 NONAME DATA 16
- _ZN21CntDefaultViewManager17removeCurrentViewEv @ 105 NONAME
- _ZN21CntDefaultViewManager19getStaticMetaObjectEv @ 106 NONAME
- _ZN21CntDefaultViewManager4backE4QMapIi8QVariantEb @ 107 NONAME
- _ZN21CntDefaultViewManager7cleanupEv @ 108 NONAME
- _ZN21CntDefaultViewManager8closeAppEv @ 109 NONAME
- _ZN21CntDefaultViewManagerC1EP12HbMainWindow @ 110 NONAME
- _ZN21CntDefaultViewManagerC2EP12HbMainWindow @ 111 NONAME
- _ZN21CntDefaultViewManagerD0Ev @ 112 NONAME
- _ZN21CntDefaultViewManagerD1Ev @ 113 NONAME
- _ZN21CntDefaultViewManagerD2Ev @ 114 NONAME
- _ZNK11CntEditView10metaObjectEv @ 115 NONAME
- _ZNK11CntEditView4viewEv @ 116 NONAME
- _ZNK11CntEditView6viewIdEv @ 117 NONAME
- _ZNK11CntEditView9isDefaultEv @ 118 NONAME
- _ZNK13CntKeyGrabber10metaObjectEv @ 119 NONAME
- _ZNK13CntMainWindow10metaObjectEv @ 120 NONAME
- _ZNK14CntActionPopup10metaObjectEv @ 121 NONAME
- _ZNK16CntViewNavigator10metaObjectEv @ 122 NONAME
- _ZNK18CntContactCardView10metaObjectEv @ 123 NONAME
- _ZNK18CntContactCardView4viewEv @ 124 NONAME
- _ZNK18CntContactCardView6viewIdEv @ 125 NONAME
- _ZNK18CntContactCardView9isDefaultEv @ 126 NONAME
- _ZNK20CntBaseSelectionView10metaObjectEv @ 127 NONAME
- _ZNK20CntBaseSelectionView4viewEv @ 128 NONAME
- _ZNK20CntBaseSelectionView9isDefaultEv @ 129 NONAME
- _ZNK21CntDefaultViewManager10metaObjectEv @ 130 NONAME
- _ZTI11CntEditView @ 131 NONAME
- _ZTI13CntKeyGrabber @ 132 NONAME
- _ZTI13CntMainWindow @ 133 NONAME
- _ZTI14CntActionPopup @ 134 NONAME
- _ZTI16CntViewNavigator @ 135 NONAME
- _ZTI18CntContactCardView @ 136 NONAME
- _ZTI20CntBaseSelectionView @ 137 NONAME
- _ZTI21CntDefaultViewFactory @ 138 NONAME
- _ZTI21CntDefaultViewManager @ 139 NONAME
- _ZTV11CntEditView @ 140 NONAME
- _ZTV13CntKeyGrabber @ 141 NONAME
- _ZTV13CntMainWindow @ 142 NONAME
- _ZTV14CntActionPopup @ 143 NONAME
- _ZTV16CntViewNavigator @ 144 NONAME
- _ZTV18CntContactCardView @ 145 NONAME
- _ZTV20CntBaseSelectionView @ 146 NONAME
- _ZTV21CntDefaultViewFactory @ 147 NONAME
- _ZTV21CntDefaultViewManager @ 148 NONAME
- _ZThn8_N11CntEditView10deactivateEv @ 149 NONAME
- _ZThn8_N11CntEditView8activateEP22CntAbstractViewManager4QMapIi8QVariantE @ 150 NONAME
- _ZThn8_N11CntEditViewD0Ev @ 151 NONAME
- _ZThn8_N11CntEditViewD1Ev @ 152 NONAME
- _ZThn8_N13CntMainWindowD0Ev @ 153 NONAME
- _ZThn8_N13CntMainWindowD1Ev @ 154 NONAME
- _ZThn8_N18CntContactCardView10deactivateEv @ 155 NONAME
- _ZThn8_N18CntContactCardView8activateEP22CntAbstractViewManager4QMapIi8QVariantE @ 156 NONAME
- _ZThn8_N18CntContactCardViewD0Ev @ 157 NONAME
- _ZThn8_N18CntContactCardViewD1Ev @ 158 NONAME
- _ZThn8_N20CntBaseSelectionView10deactivateEv @ 159 NONAME
- _ZThn8_N20CntBaseSelectionView8activateEP22CntAbstractViewManager4QMapIi8QVariantE @ 160 NONAME
- _ZThn8_N20CntBaseSelectionViewD0Ev @ 161 NONAME
- _ZThn8_N20CntBaseSelectionViewD1Ev @ 162 NONAME
- _ZThn8_N21CntDefaultViewManager10changeViewE4QMapIi8QVariantE @ 163 NONAME
- _ZThn8_N21CntDefaultViewManager14contactManagerERK7QString @ 164 NONAME
- _ZThn8_N21CntDefaultViewManager4backE4QMapIi8QVariantEb @ 165 NONAME
- _ZThn8_N21CntDefaultViewManagerD0Ev @ 166 NONAME
- _ZThn8_N21CntDefaultViewManagerD1Ev @ 167 NONAME
- _ZThn8_NK11CntEditView4viewEv @ 168 NONAME
- _ZThn8_NK11CntEditView6viewIdEv @ 169 NONAME
- _ZThn8_NK11CntEditView9isDefaultEv @ 170 NONAME
- _ZThn8_NK18CntContactCardView4viewEv @ 171 NONAME
- _ZThn8_NK18CntContactCardView6viewIdEv @ 172 NONAME
- _ZThn8_NK18CntContactCardView9isDefaultEv @ 173 NONAME
- _ZThn8_NK20CntBaseSelectionView4viewEv @ 174 NONAME
- _ZThn8_NK20CntBaseSelectionView9isDefaultEv @ 175 NONAME
- _ZN18CntGroupMemberView10deactivateEv @ 176 NONAME
- _ZN18CntGroupMemberView11backPressedEv @ 177 NONAME
- _ZN18CntGroupMemberView11qt_metacallEN11QMetaObject4CallEiPPv @ 178 NONAME
- _ZN18CntGroupMemberView11qt_metacastEPKc @ 179 NONAME
- _ZN18CntGroupMemberView16staticMetaObjectE @ 180 NONAME DATA 16
- _ZN18CntGroupMemberView19getStaticMetaObjectEv @ 181 NONAME
- _ZN18CntGroupMemberView8activateEP22CntAbstractViewManager4QMapIi8QVariantE @ 182 NONAME
- _ZN18CntGroupMemberViewC1Ev @ 183 NONAME
- _ZN18CntGroupMemberViewC2Ev @ 184 NONAME
- _ZN18CntGroupMemberViewD0Ev @ 185 NONAME
- _ZN18CntGroupMemberViewD1Ev @ 186 NONAME
- _ZN18CntGroupMemberViewD2Ev @ 187 NONAME
- _ZNK18CntGroupMemberView10metaObjectEv @ 188 NONAME
- _ZNK18CntGroupMemberView4viewEv @ 189 NONAME
- _ZNK18CntGroupMemberView6viewIdEv @ 190 NONAME
- _ZNK18CntGroupMemberView9isDefaultEv @ 191 NONAME
- _ZTI18CntGroupMemberView @ 192 NONAME
- _ZTV18CntGroupMemberView @ 193 NONAME
- _ZThn8_N18CntGroupMemberView10deactivateEv @ 194 NONAME
- _ZThn8_N18CntGroupMemberView8activateEP22CntAbstractViewManager4QMapIi8QVariantE @ 195 NONAME
- _ZThn8_N18CntGroupMemberViewD0Ev @ 196 NONAME
- _ZThn8_N18CntGroupMemberViewD1Ev @ 197 NONAME
- _ZThn8_NK18CntGroupMemberView4viewEv @ 198 NONAME
- _ZThn8_NK18CntGroupMemberView6viewIdEv @ 199 NONAME
- _ZThn8_NK18CntGroupMemberView9isDefaultEv @ 200 NONAME
+ _ZN11CntEditView8activateE4QMapIi8QVariantE @ 9 NONAME
+ _ZN11CntEditView9setEngineER17CntAbstractEngine @ 10 NONAME
+ _ZN11CntEditViewC1Ev @ 11 NONAME
+ _ZN11CntEditViewC2Ev @ 12 NONAME
+ _ZN11CntEditViewD0Ev @ 13 NONAME
+ _ZN11CntEditViewD1Ev @ 14 NONAME
+ _ZN11CntEditViewD2Ev @ 15 NONAME
+ _ZN13CntKeyGrabber11eventFilterEP7QObjectP6QEvent @ 16 NONAME
+ _ZN13CntKeyGrabber11qt_metacallEN11QMetaObject4CallEiPPv @ 17 NONAME
+ _ZN13CntKeyGrabber11qt_metacastEPKc @ 18 NONAME
+ _ZN13CntKeyGrabber16staticMetaObjectE @ 19 NONAME DATA 16
+ _ZN13CntKeyGrabber19getStaticMetaObjectEv @ 20 NONAME
+ _ZN13CntKeyGrabberC1EP12HbMainWindowP7QObject @ 21 NONAME
+ _ZN13CntKeyGrabberC2EP12HbMainWindowP7QObject @ 22 NONAME
+ _ZN13CntKeyGrabberD0Ev @ 23 NONAME
+ _ZN13CntKeyGrabberD1Ev @ 24 NONAME
+ _ZN13CntKeyGrabberD2Ev @ 25 NONAME
+ _ZN13CntMainWindow11qt_metacallEN11QMetaObject4CallEiPPv @ 26 NONAME
+ _ZN13CntMainWindow11qt_metacastEPKc @ 27 NONAME
+ _ZN13CntMainWindow16staticMetaObjectE @ 28 NONAME DATA 16
+ _ZN13CntMainWindow19getStaticMetaObjectEv @ 29 NONAME
+ _ZN13CntMainWindowC1EP7QWidgeti @ 30 NONAME
+ _ZN13CntMainWindowC2EP7QWidgeti @ 31 NONAME
+ _ZN13CntMainWindowD0Ev @ 32 NONAME
+ _ZN13CntMainWindowD1Ev @ 33 NONAME
+ _ZN13CntMainWindowD2Ev @ 34 NONAME
+ _ZN14CntActionPopup11qt_metacallEN11QMetaObject4CallEiPPv @ 35 NONAME
+ _ZN14CntActionPopup11qt_metacastEPKc @ 36 NONAME
+ _ZN14CntActionPopup15showActionPopupE7QString @ 37 NONAME
+ _ZN14CntActionPopup16staticMetaObjectE @ 38 NONAME DATA 16
+ _ZN14CntActionPopup19getStaticMetaObjectEv @ 39 NONAME
+ _ZN14CntActionPopup20executeContactActionERN10QtMobility8QContactENS0_14QContactDetailE7QString @ 40 NONAME
+ _ZN14CntActionPopup24actionPopupCancelPressedEv @ 41 NONAME
+ _ZN14CntActionPopupC1EPN10QtMobility8QContactE @ 42 NONAME
+ _ZN14CntActionPopupC2EPN10QtMobility8QContactE @ 43 NONAME
+ _ZN14CntActionPopupD0Ev @ 44 NONAME
+ _ZN14CntActionPopupD1Ev @ 45 NONAME
+ _ZN14CntActionPopupD2Ev @ 46 NONAME
+ _ZN16CntViewNavigator11qt_metacallEN11QMetaObject4CallEiPPv @ 47 NONAME
+ _ZN16CntViewNavigator11qt_metacastEPKc @ 48 NONAME
+ _ZN16CntViewNavigator12addExceptionERKiS1_ @ 49 NONAME
+ _ZN16CntViewNavigator12removeEffectERKi @ 50 NONAME
+ _ZN16CntViewNavigator15removeExceptionERKi @ 51 NONAME
+ _ZN16CntViewNavigator16staticMetaObjectE @ 52 NONAME DATA 16
+ _ZN16CntViewNavigator19getStaticMetaObjectEv @ 53 NONAME
+ _ZN16CntViewNavigator4backER6QFlagsIN2Hb14ViewSwitchFlagEEb @ 54 NONAME
+ _ZN16CntViewNavigator4nextERKiR6QFlagsIN2Hb14ViewSwitchFlagEE @ 55 NONAME
+ _ZN16CntViewNavigator7addRootERKi @ 56 NONAME
+ _ZN16CntViewNavigator9addEffectERKiS1_ @ 57 NONAME
+ _ZN16CntViewNavigatorC1EP7QObject @ 58 NONAME
+ _ZN16CntViewNavigatorC2EP7QObject @ 59 NONAME
+ _ZN16CntViewNavigatorD0Ev @ 60 NONAME
+ _ZN16CntViewNavigatorD1Ev @ 61 NONAME
+ _ZN16CntViewNavigatorD2Ev @ 62 NONAME
+ _ZN18CntContactCardView10deactivateEv @ 63 NONAME
+ _ZN18CntContactCardView11backPressedEi @ 64 NONAME
+ _ZN18CntContactCardView11qt_metacallEN11QMetaObject4CallEiPPv @ 65 NONAME
+ _ZN18CntContactCardView11qt_metacastEPKc @ 66 NONAME
+ _ZN18CntContactCardView13addToContactsEv @ 67 NONAME
+ _ZN18CntContactCardView13viewActivatedEP22CntAbstractViewManager4QMapIi8QVariantE @ 68 NONAME
+ _ZN18CntContactCardView16staticMetaObjectE @ 69 NONAME DATA 16
+ _ZN18CntContactCardView19getStaticMetaObjectEv @ 70 NONAME
+ _ZN18CntContactCardView8activateE4QMapIi8QVariantE @ 71 NONAME
+ _ZN18CntContactCardView9setEngineER17CntAbstractEngine @ 72 NONAME
+ _ZN18CntContactCardViewC1Eb @ 73 NONAME
+ _ZN18CntContactCardViewC2Eb @ 74 NONAME
+ _ZN18CntContactCardViewD0Ev @ 75 NONAME
+ _ZN18CntContactCardViewD1Ev @ 76 NONAME
+ _ZN18CntContactCardViewD2Ev @ 77 NONAME
+ _ZN18CntGroupMemberView10deactivateEv @ 78 NONAME
+ _ZN18CntGroupMemberView11backPressedEv @ 79 NONAME
+ _ZN18CntGroupMemberView11qt_metacallEN11QMetaObject4CallEiPPv @ 80 NONAME
+ _ZN18CntGroupMemberView11qt_metacastEPKc @ 81 NONAME
+ _ZN18CntGroupMemberView16staticMetaObjectE @ 82 NONAME DATA 16
+ _ZN18CntGroupMemberView19getStaticMetaObjectEv @ 83 NONAME
+ _ZN18CntGroupMemberView8activateE4QMapIi8QVariantE @ 84 NONAME
+ _ZN18CntGroupMemberView9setEngineER17CntAbstractEngine @ 85 NONAME
+ _ZN18CntGroupMemberViewC1Ev @ 86 NONAME
+ _ZN18CntGroupMemberViewC2Ev @ 87 NONAME
+ _ZN18CntGroupMemberViewD0Ev @ 88 NONAME
+ _ZN18CntGroupMemberViewD1Ev @ 89 NONAME
+ _ZN18CntGroupMemberViewD2Ev @ 90 NONAME
+ _ZN20CntBaseSelectionView10deactivateEv @ 91 NONAME
+ _ZN20CntBaseSelectionView10viewClosedEv @ 92 NONAME
+ _ZN20CntBaseSelectionView10viewOpenedEP22CntAbstractViewManager4QMapIi8QVariantE @ 93 NONAME
+ _ZN20CntBaseSelectionView11qt_metacallEN11QMetaObject4CallEiPPv @ 94 NONAME
+ _ZN20CntBaseSelectionView11qt_metacastEPKc @ 95 NONAME
+ _ZN20CntBaseSelectionView16staticMetaObjectE @ 96 NONAME DATA 16
+ _ZN20CntBaseSelectionView19getStaticMetaObjectEv @ 97 NONAME
+ _ZN20CntBaseSelectionView8activateE4QMapIi8QVariantE @ 98 NONAME
+ _ZN20CntBaseSelectionViewC2Ev @ 99 NONAME
+ _ZN20CntBaseSelectionViewD0Ev @ 100 NONAME
+ _ZN20CntBaseSelectionViewD1Ev @ 101 NONAME
+ _ZN20CntBaseSelectionViewD2Ev @ 102 NONAME
+ _ZN21CntDefaultViewFactory10createViewEi @ 103 NONAME
+ _ZN21CntDefaultViewFactory16createPluginViewEi @ 104 NONAME
+ _ZN21CntDefaultViewFactoryC1ER19CntExtensionManager @ 105 NONAME
+ _ZN21CntDefaultViewFactoryC2ER19CntExtensionManager @ 106 NONAME
+ _ZN21CntDefaultViewFactoryD0Ev @ 107 NONAME
+ _ZN21CntDefaultViewFactoryD1Ev @ 108 NONAME
+ _ZN21CntDefaultViewFactoryD2Ev @ 109 NONAME
+ _ZN21CntDefaultViewManager10changeViewE4QMapIi8QVariantE @ 110 NONAME
+ _ZN21CntDefaultViewManager10switchViewE4QMapIi8QVariantE6QFlagsIN2Hb14ViewSwitchFlagEE @ 111 NONAME
+ _ZN21CntDefaultViewManager11qt_metacallEN11QMetaObject4CallEiPPv @ 112 NONAME
+ _ZN21CntDefaultViewManager11qt_metacastEPKc @ 113 NONAME
+ _ZN21CntDefaultViewManager13currentViewIdEv @ 114 NONAME
+ _ZN21CntDefaultViewManager13deleteOldViewEv @ 115 NONAME
+ _ZN21CntDefaultViewManager14setViewFactoryEP22CntAbstractViewFactory @ 116 NONAME
+ _ZN21CntDefaultViewManager16setViewNavigatorEP16CntViewNavigator @ 117 NONAME
+ _ZN21CntDefaultViewManager16staticMetaObjectE @ 118 NONAME DATA 16
+ _ZN21CntDefaultViewManager17removeCurrentViewEv @ 119 NONAME
+ _ZN21CntDefaultViewManager19getStaticMetaObjectEv @ 120 NONAME
+ _ZN21CntDefaultViewManager4backE4QMapIi8QVariantEb @ 121 NONAME
+ _ZN21CntDefaultViewManager6engineEv @ 122 NONAME
+ _ZN21CntDefaultViewManager7cleanupEv @ 123 NONAME
+ _ZN21CntDefaultViewManager8closeAppEv @ 124 NONAME
+ _ZN21CntDefaultViewManagerC1EP12HbMainWindow @ 125 NONAME
+ _ZN21CntDefaultViewManagerC2EP12HbMainWindow @ 126 NONAME
+ _ZN21CntDefaultViewManagerD0Ev @ 127 NONAME
+ _ZN21CntDefaultViewManagerD1Ev @ 128 NONAME
+ _ZN21CntDefaultViewManagerD2Ev @ 129 NONAME
+ _ZNK11CntEditView10metaObjectEv @ 130 NONAME
+ _ZNK11CntEditView4viewEv @ 131 NONAME
+ _ZNK11CntEditView6viewIdEv @ 132 NONAME
+ _ZNK11CntEditView9isDefaultEv @ 133 NONAME
+ _ZNK13CntKeyGrabber10metaObjectEv @ 134 NONAME
+ _ZNK13CntMainWindow10metaObjectEv @ 135 NONAME
+ _ZNK14CntActionPopup10metaObjectEv @ 136 NONAME
+ _ZNK16CntViewNavigator10metaObjectEv @ 137 NONAME
+ _ZNK18CntContactCardView10metaObjectEv @ 138 NONAME
+ _ZNK18CntContactCardView4viewEv @ 139 NONAME
+ _ZNK18CntContactCardView6viewIdEv @ 140 NONAME
+ _ZNK18CntContactCardView9isDefaultEv @ 141 NONAME
+ _ZNK18CntGroupMemberView10metaObjectEv @ 142 NONAME
+ _ZNK18CntGroupMemberView4viewEv @ 143 NONAME
+ _ZNK18CntGroupMemberView6viewIdEv @ 144 NONAME
+ _ZNK18CntGroupMemberView9isDefaultEv @ 145 NONAME
+ _ZNK20CntBaseSelectionView10metaObjectEv @ 146 NONAME
+ _ZNK20CntBaseSelectionView4viewEv @ 147 NONAME
+ _ZNK20CntBaseSelectionView9isDefaultEv @ 148 NONAME
+ _ZNK21CntDefaultViewManager10metaObjectEv @ 149 NONAME
+ _ZTI11CntEditView @ 150 NONAME
+ _ZTI13CntKeyGrabber @ 151 NONAME
+ _ZTI13CntMainWindow @ 152 NONAME
+ _ZTI14CntActionPopup @ 153 NONAME
+ _ZTI16CntViewNavigator @ 154 NONAME
+ _ZTI18CntContactCardView @ 155 NONAME
+ _ZTI18CntGroupMemberView @ 156 NONAME
+ _ZTI20CntBaseSelectionView @ 157 NONAME
+ _ZTI21CntDefaultViewFactory @ 158 NONAME
+ _ZTI21CntDefaultViewManager @ 159 NONAME
+ _ZTV11CntEditView @ 160 NONAME
+ _ZTV13CntKeyGrabber @ 161 NONAME
+ _ZTV13CntMainWindow @ 162 NONAME
+ _ZTV14CntActionPopup @ 163 NONAME
+ _ZTV16CntViewNavigator @ 164 NONAME
+ _ZTV18CntContactCardView @ 165 NONAME
+ _ZTV18CntGroupMemberView @ 166 NONAME
+ _ZTV20CntBaseSelectionView @ 167 NONAME
+ _ZTV21CntDefaultViewFactory @ 168 NONAME
+ _ZTV21CntDefaultViewManager @ 169 NONAME
+ _ZThn8_N11CntEditView10deactivateEv @ 170 NONAME
+ _ZThn8_N11CntEditView8activateE4QMapIi8QVariantE @ 171 NONAME
+ _ZThn8_N11CntEditView9setEngineER17CntAbstractEngine @ 172 NONAME
+ _ZThn8_N11CntEditViewD0Ev @ 173 NONAME
+ _ZThn8_N11CntEditViewD1Ev @ 174 NONAME
+ _ZThn8_N13CntMainWindowD0Ev @ 175 NONAME
+ _ZThn8_N13CntMainWindowD1Ev @ 176 NONAME
+ _ZThn8_N18CntContactCardView10deactivateEv @ 177 NONAME
+ _ZThn8_N18CntContactCardView8activateE4QMapIi8QVariantE @ 178 NONAME
+ _ZThn8_N18CntContactCardView9setEngineER17CntAbstractEngine @ 179 NONAME
+ _ZThn8_N18CntContactCardViewD0Ev @ 180 NONAME
+ _ZThn8_N18CntContactCardViewD1Ev @ 181 NONAME
+ _ZThn8_N18CntGroupMemberView10deactivateEv @ 182 NONAME
+ _ZThn8_N18CntGroupMemberView8activateE4QMapIi8QVariantE @ 183 NONAME
+ _ZThn8_N18CntGroupMemberView9setEngineER17CntAbstractEngine @ 184 NONAME
+ _ZThn8_N18CntGroupMemberViewD0Ev @ 185 NONAME
+ _ZThn8_N18CntGroupMemberViewD1Ev @ 186 NONAME
+ _ZThn8_N20CntBaseSelectionView10deactivateEv @ 187 NONAME
+ _ZThn8_N20CntBaseSelectionView8activateE4QMapIi8QVariantE @ 188 NONAME
+ _ZThn8_N20CntBaseSelectionViewD0Ev @ 189 NONAME
+ _ZThn8_N20CntBaseSelectionViewD1Ev @ 190 NONAME
+ _ZThn8_N21CntDefaultViewManager10changeViewE4QMapIi8QVariantE @ 191 NONAME
+ _ZThn8_N21CntDefaultViewManager4backE4QMapIi8QVariantEb @ 192 NONAME
+ _ZThn8_N21CntDefaultViewManagerD0Ev @ 193 NONAME
+ _ZThn8_N21CntDefaultViewManagerD1Ev @ 194 NONAME
+ _ZThn8_NK11CntEditView4viewEv @ 195 NONAME
+ _ZThn8_NK11CntEditView6viewIdEv @ 196 NONAME
+ _ZThn8_NK11CntEditView9isDefaultEv @ 197 NONAME
+ _ZThn8_NK18CntContactCardView4viewEv @ 198 NONAME
+ _ZThn8_NK18CntContactCardView6viewIdEv @ 199 NONAME
+ _ZThn8_NK18CntContactCardView9isDefaultEv @ 200 NONAME
+ _ZThn8_NK18CntGroupMemberView4viewEv @ 201 NONAME
+ _ZThn8_NK18CntGroupMemberView6viewIdEv @ 202 NONAME
+ _ZThn8_NK18CntGroupMemberView9isDefaultEv @ 203 NONAME
+ _ZThn8_NK20CntBaseSelectionView4viewEv @ 204 NONAME
+ _ZThn8_NK20CntBaseSelectionView9isDefaultEv @ 205 NONAME
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/phonebookui/pbkcommonui/engine_inc/cntdefaultengine.h Thu Sep 02 20:16:15 2010 +0300
@@ -0,0 +1,45 @@
+/*
+* 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 CNTDEFAULTENGINE_H_
+#define CNTDEFAULTENGINE_H_
+
+#include <QObject>
+#include <QList>
+#include <cntabstractengine.h>
+
+class CntDefaultEngine : public QObject, public CntAbstractEngine
+{
+ Q_OBJECT
+public:
+ CntDefaultEngine( CntAbstractViewManager& aManager );
+ ~CntDefaultEngine();
+
+public:
+ QContactManager& contactManager( const QString& aType );
+ CntAbstractViewManager& viewManager();
+ CntExtensionManager& extensionManager();
+ CntThumbnailManager& thumbnailManager();
+
+private:
+ QList<QContactManager*> mBackends;
+ CntAbstractViewManager& mViewManager;
+ CntExtensionManager* mExtManager;
+ CntThumbnailManager* mThumbnail;
+};
+
+#endif /* CNTDEFAULTENGINE_H_ */
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/phonebookui/pbkcommonui/engine_inc/cntthumbnailmanager.h Thu Sep 02 20:16:15 2010 +0300
@@ -0,0 +1,48 @@
+/*
+* 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 CNTTHUMBNAILMANAGER_H_
+#define CNTTHUMBNAILMANAGER_H_
+
+#include <QObject>
+#include <QMap>
+#include <thumbnailmanager_qt.h>
+/*!
+ * Wrapper class for ThumbnailManager. Reason for this class is to share
+ * thumbnail manager instances for performance reasons.
+ *
+ * When a thumbnail is requested, class checks that if there is a manager already
+ * for the requested size.
+ */
+class CntThumbnailManager : public QObject
+{
+ Q_OBJECT
+
+public:
+ CntThumbnailManager();
+ ~CntThumbnailManager();
+
+ int getThumbnail( ThumbnailManager::ThumbnailSize aSize, const QString& aFile );
+ void cancelRequest( int aRequestId );
+
+signals:
+ void thumbnailReady( QPixmap , void* , int , int );
+
+private:
+ QMap<int, ThumbnailManager*> mManagers;
+};
+#endif /* CNTTHUMBNAILMANAGER_H_ */
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/phonebookui/pbkcommonui/engine_src/cntdefaultengine.cpp Thu Sep 02 20:16:15 2010 +0300
@@ -0,0 +1,85 @@
+/*
+* 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 <cntabstractviewmanager.h>
+#include "cntdefaultengine.h"
+#include "cntextensionmanager.h"
+#include "cntthumbnailmanager.h"
+#include "cntdebug.h"
+
+CntDefaultEngine::CntDefaultEngine( CntAbstractViewManager& aManager ) :
+mViewManager( aManager ),
+mExtManager( NULL ),
+mThumbnail( NULL )
+{
+}
+
+CntDefaultEngine::~CntDefaultEngine()
+{
+ qDeleteAll(mBackends);
+ mBackends.clear();
+
+ delete mExtManager;
+ delete mThumbnail;
+}
+
+QContactManager& CntDefaultEngine::contactManager( const QString& aType )
+{
+ CNT_ENTRY
+
+ foreach ( QContactManager* mgr, mBackends )
+ {
+ QString uri = mgr->managerUri();
+ if ( aType.compare(uri, Qt::CaseInsensitive) == 0 )
+ {
+ return *mgr;
+ }
+ }
+
+ QContactManager* manager = QContactManager::fromUri( aType );
+
+ if ( manager )
+ {
+ mBackends.append( manager );
+ }
+
+ CNT_EXIT
+ return *manager;
+}
+
+CntAbstractViewManager& CntDefaultEngine::viewManager()
+{
+ return mViewManager;
+}
+
+CntExtensionManager& CntDefaultEngine::extensionManager()
+{
+ if ( !mExtManager )
+ mExtManager = new CntExtensionManager();
+
+ return *mExtManager;
+}
+
+CntThumbnailManager& CntDefaultEngine::thumbnailManager()
+{
+ if ( !mThumbnail )
+ mThumbnail = new CntThumbnailManager();
+
+ return *mThumbnail;
+}
+
+// End of File
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/phonebookui/pbkcommonui/engine_src/cntthumbnailmanager.cpp Thu Sep 02 20:16:15 2010 +0300
@@ -0,0 +1,56 @@
+/*
+* 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 "cntthumbnailmanager.h"
+
+CntThumbnailManager::CntThumbnailManager()
+{
+
+}
+
+CntThumbnailManager::~CntThumbnailManager()
+{
+ qDeleteAll( mManagers.values() );
+ mManagers.clear();
+}
+
+int CntThumbnailManager::getThumbnail( ThumbnailManager::ThumbnailSize aSize, const QString& aFile )
+{
+ if ( !mManagers.contains( aSize ) )
+ {
+ ThumbnailManager* thumbnailManager = new ThumbnailManager(this);
+ thumbnailManager->setMode(ThumbnailManager::Default);
+ thumbnailManager->setQualityPreference(ThumbnailManager::OptimizeForQuality);
+ thumbnailManager->setThumbnailSize( aSize );
+ connect( thumbnailManager, SIGNAL(thumbnailReady(QPixmap,void*,int,int)),
+ this, SIGNAL(thumbnailReady(QPixmap,void*,int,int)) );
+
+ mManagers.insert( aSize, thumbnailManager );
+ }
+
+ ThumbnailManager* manager = mManagers.value( aSize );
+ return manager->getThumbnail( aFile );
+}
+
+void CntThumbnailManager::cancelRequest( int aRequestId )
+{
+ foreach ( ThumbnailManager* mgr, mManagers.values() )
+ {
+ if ( mgr->cancelRequest(aRequestId) )
+ break;
+ }
+}
+// End of File
--- a/phonebookui/pbkcommonui/inc/cntabstractviewfactory.h Wed Aug 18 09:39:00 2010 +0300
+++ b/phonebookui/pbkcommonui/inc/cntabstractviewfactory.h Thu Sep 02 20:16:15 2010 +0300
@@ -40,7 +40,7 @@
{
public:
- CntDefaultViewFactory();
+ CntDefaultViewFactory( CntExtensionManager& aExtManager );
~CntDefaultViewFactory();
public:
@@ -50,6 +50,6 @@
CntAbstractView* createPluginView( int aId );
private:
- CntExtensionManager *mExtensionManager;
+ CntExtensionManager& mExtensionManager;
};
#endif /* CNTABSTRACTVIEWFACTORY_H_ */
--- a/phonebookui/pbkcommonui/inc/cntaddressmodel.h Wed Aug 18 09:39:00 2010 +0300
+++ b/phonebookui/pbkcommonui/inc/cntaddressmodel.h Thu Sep 02 20:16:15 2010 +0300
@@ -22,7 +22,7 @@
#include <hbdataformmodelitem.h>
#include <qtcontacts.h>
#include "cntglobal.h"
-#include <cntmaptileservice.h>
+#include <maptileservice.h>
QTM_BEGIN_NAMESPACE
class QContact;
@@ -52,7 +52,7 @@
protected:
bool mIsLocationPickerEnabled;
- CntMapTileService* mMaptileInterface;
+ MapTileService* mMaptileInterface;
friend class T_AddressEditorTest;
};
--- a/phonebookui/pbkcommonui/inc/cntaddressviewitem.h Wed Aug 18 09:39:00 2010 +0300
+++ b/phonebookui/pbkcommonui/inc/cntaddressviewitem.h Thu Sep 02 20:16:15 2010 +0300
@@ -23,6 +23,8 @@
class HbWidget;
class HbAbstractViewItem;
+class XQApplicationManager;
+class XQAiwRequest;
class CntAddressViewItem : public /*CntDetailViewItem*/ HbDataFormViewItem
{
@@ -34,6 +36,7 @@
private slots:
void launchLocationPicker();
+ void handleLocationChange(const QVariant& aValue );
public:
HbAbstractViewItem* createItem();
@@ -42,8 +45,9 @@
bool canSetModelIndex( const QModelIndex &index ) const;
private:
- void handleLocationChange(const QVariant& aValue );
-
+ XQApplicationManager *mAppManager;
+ XQAiwRequest* mRequest;
+ bool mRequestPending;
friend class T_AddressEditorTest;
};
--- a/phonebookui/pbkcommonui/inc/cntbaseselectionview.h Wed Aug 18 09:39:00 2010 +0300
+++ b/phonebookui/pbkcommonui/inc/cntbaseselectionview.h Thu Sep 02 20:16:15 2010 +0300
@@ -26,8 +26,8 @@
class HbView;
class HbDocumentLoader;
class HbAction;
+class CntListModel;
-class CntListModel;
class QTPBK_EXPORT CntBaseSelectionView : public QObject, public CntAbstractView
{
@@ -42,13 +42,14 @@
void viewClosed();
public:
- void activate( CntAbstractViewManager* aMgr, const CntViewParameters aArgs );
+ void activate( const CntViewParameters aArgs );
void deactivate();
bool isDefault() const;
HbView* view() const;
+ void setEngine( CntAbstractEngine& aEngine ){ mEngine = &aEngine; }
virtual int viewId() const = 0;
-
+
protected:
HbDocumentLoader* mDocument;
HbListView* mListView;
@@ -56,7 +57,7 @@
HbAction* mSoftkey;
CntAbstractViewManager* mMgr;
CntListModel* mListModel;
-
+ CntAbstractEngine* mEngine;
};
#endif /* CNTBASESELECTIONVIEW_H */
--- a/phonebookui/pbkcommonui/inc/cntcollectionlistmodel.h Wed Aug 18 09:39:00 2010 +0300
+++ b/phonebookui/pbkcommonui/inc/cntcollectionlistmodel.h Thu Sep 02 20:16:15 2010 +0300
@@ -31,10 +31,7 @@
class CntExtensionManager;
class CntExtensionGroupCallback;
-
-QTM_BEGIN_NAMESPACE
-class QContactManager;
-QTM_END_NAMESPACE
+class CntAbstractEngine;
QTM_USE_NAMESPACE
@@ -43,7 +40,7 @@
Q_OBJECT
public:
- CntCollectionListModel(QContactManager *manager, CntExtensionManager &extensionManager, QObject *parent = 0);
+ CntCollectionListModel(CntAbstractEngine* aEngine, QObject *parent = 0);
~CntCollectionListModel();
public:
--- a/phonebookui/pbkcommonui/inc/cntcollectionlistmodel_p.h Wed Aug 18 09:39:00 2010 +0300
+++ b/phonebookui/pbkcommonui/inc/cntcollectionlistmodel_p.h Thu Sep 02 20:16:15 2010 +0300
@@ -28,7 +28,7 @@
class CntExtensionManager;
class CntUiGroupSupplier;
-class ThumbnailManager;
+class CntThumbnailManager;
QTM_BEGIN_NAMESPACE
class QContactManager;
@@ -100,7 +100,7 @@
QMap<int,int> mIconRequests;
- ThumbnailManager *mThumbnailManager;
+ CntThumbnailManager *mThumbnailManager;
};
#endif // CNTCOLLECTIONLISTMODELPRIVATE_H
--- a/phonebookui/pbkcommonui/inc/cntcollectionview.h Wed Aug 18 09:39:00 2010 +0300
+++ b/phonebookui/pbkcommonui/inc/cntcollectionview.h Thu Sep 02 20:16:15 2010 +0300
@@ -32,7 +32,6 @@
class QModelIndex;
class QActionGroup;
class HbAbstractViewItem;
-class CntExtensionManager;
QTM_USE_NAMESPACE
@@ -42,15 +41,16 @@
friend class TestCntCollectionView;
public:
- CntCollectionView(CntExtensionManager &extensionManager);
+ CntCollectionView();
~CntCollectionView();
public: // From CntAbstractView
- void activate( CntAbstractViewManager* aMgr, const CntViewParameters aArgs );
+ void activate( const CntViewParameters aArgs );
void deactivate();
bool isDefault() const { return false; }
HbView* view() const { return mView; }
int viewId() const { return collectionView; }
+ inline void setEngine( CntAbstractEngine& aEngine ){mEngine = &aEngine;}
public: // From CntExtensionGroupCallback
void openView(CntViewParameters& viewParams);
@@ -83,7 +83,7 @@
private:
- CntExtensionManager& mExtensionManager;
+ CntExtensionManager* mExtensionManager;
HbView* mView; // own
HbAction* mSoftkey; // owned by view
CntAbstractViewManager* mViewManager;
@@ -100,6 +100,7 @@
QSet<QContactLocalId> mSelectedContactsSet;
QActionGroup* mActionGroup;
+ CntAbstractEngine* mEngine;
};
#endif // CNTCOLLECTIONVIEW_H
--- a/phonebookui/pbkcommonui/inc/cntcontactcarddatacontainer.h Wed Aug 18 09:39:00 2010 +0300
+++ b/phonebookui/pbkcommonui/inc/cntcontactcarddatacontainer.h Thu Sep 02 20:16:15 2010 +0300
@@ -20,23 +20,30 @@
#include <QSharedData>
#include <qtcontacts.h>
-#include <cntmaptileservice.h>
+
#include "cntstringmapper.h"
class CntContactCardDataItem;
+class MapTileService;
+class CntExtensionManager;
class CntContactCardDataContainer: public QObject
{
Q_OBJECT
public:
- CntContactCardDataContainer(QContact* contact, QObject *parent = 0, bool myCard = false,
- CntMapTileService* maptile = NULL, Qt::Orientations orientation = Qt::Vertical );
+ CntContactCardDataContainer(
+ MapTileService* maptile,
+ CntExtensionManager& aExtensionManager,
+ Qt::Orientations orientation = Qt::Vertical,
+ QObject *parent = 0);
virtual ~CntContactCardDataContainer();
public:
CntContactCardDataItem* dataItem(int index) const;
int itemCount() const;
+ void setContactData(QContact* contact, bool aMyCard = false);
+ void clearContactData();
#ifdef PBK_UNIT_TEST
public:
@@ -44,6 +51,7 @@
private:
#endif
void initializeActionsData(bool myCard);
+ void initialiseExtensionActions(bool aMyCard);
void initializeGroupData();
void initializeDetailsData();
QList<QContactDetail> actionDetails(const QString &actionName, const QContact &contact);
@@ -62,8 +70,9 @@
int mSeparatorIndex;
CntStringMapper mStringMapper;
bool mLocationFeatureEnabled;
- CntMapTileService* mMaptileInterface;
+ MapTileService* mMaptileInterface;
Qt::Orientations mOrientation;
+ CntExtensionManager* mExtensionManager;
};
#endif /* CNTCOMMLAUNCHERLISTMODEL_H_ */
--- a/phonebookui/pbkcommonui/inc/cntcontactcarddataitem.h Wed Aug 18 09:39:00 2010 +0300
+++ b/phonebookui/pbkcommonui/inc/cntcontactcarddataitem.h Thu Sep 02 20:16:15 2010 +0300
@@ -23,6 +23,8 @@
#include <qtcontacts.h>
#include <hbicon.h>
+class CntUiContactCardExtension;
+
QTM_USE_NAMESPACE
class CntContactCardDataItem: public QObject
@@ -33,6 +35,8 @@
enum CntContactCardPosition
{
+
+// Communication methods >>>>>
EInternalServices = 0,
ECallMobile = 100,
ECallMobileSendMessage,
@@ -77,6 +81,8 @@
ELastActionWork,
EExternalServices = 250,
ESeparator = 300,
+// <<<<< Communication methods end here.
+
EInternetTelephone,
EInternetTelephoneHome,
EInternetTelephoneWork,
@@ -109,6 +115,7 @@
void setContactDetail(QContactDetail aDetail);
void setActionDescriptor(const QContactActionDescriptor& aActionDescriptor);
void setLongPressText(const QString& aLongPressText);
+ void setContactCardExtensionAndActionIndex( CntUiContactCardExtension& aExtension, int aIndex );
public:
QString titleText() const { return mTitle; }
@@ -121,6 +128,11 @@
bool isFocusable() const { return mIsFocusable; }
QContactActionDescriptor actionDescriptor() const { return mActionDescriptor; }
QString longPressText() const { return mLongPressText; }
+
+ /// Can return NULL which means this item is not from an extension.
+ CntUiContactCardExtension* contactCardExtension() const {return mExtension;}
+ int contactCardExtensionActionIndex() const {return mExtensionActionIndex;}
+
int position() const { return mPosition; }
private:
@@ -134,6 +146,8 @@
Qt::TextElideMode mValueTextElideMode;
bool mIsFocusable;
QString mLongPressText;
+ CntUiContactCardExtension* mExtension;
+ int mExtensionActionIndex;
public:
int mPosition;
--- a/phonebookui/pbkcommonui/inc/cntcontactcardview.h Wed Aug 18 09:39:00 2010 +0300
+++ b/phonebookui/pbkcommonui/inc/cntcontactcardview.h Thu Sep 02 20:16:15 2010 +0300
@@ -24,7 +24,6 @@
class HbView;
class CntContactCardViewPrivate;
-class CntAbstractViewManager;
QTM_BEGIN_NAMESPACE
class QContact;
@@ -42,18 +41,19 @@
~CntContactCardView();
signals:
- void backPressed();
+ void backPressed(int value); // value is return value for services (from cntservicescontact.h)
void viewActivated(CntAbstractViewManager* aMgr, const CntViewParameters aArgs);
void addToContacts();
public: // From CntAbstractView
- void activate(CntAbstractViewManager* aMgr, const CntViewParameters aArgs);
+ void activate(const CntViewParameters aArgs);
void deactivate();
HbView* view() const;
bool isDefault() const;
int viewId() const;
+ void setEngine( CntAbstractEngine& aEngine );
private:
CntContactCardViewPrivate* const d_ptr;
Q_DECLARE_PRIVATE_D(d_ptr, CntContactCardView)
--- a/phonebookui/pbkcommonui/inc/cntcontactcardview_p.h Wed Aug 18 09:39:00 2010 +0300
+++ b/phonebookui/pbkcommonui/inc/cntcontactcardview_p.h Thu Sep 02 20:16:15 2010 +0300
@@ -24,7 +24,7 @@
#include <QKeyEvent>
#include <QGraphicsSceneResizeEvent>
#include "cntglobal.h"
-#include <cntmaptileservice.h>
+#include <maptileservice.h>
class HbView;
class HbScrollArea;
@@ -33,7 +33,7 @@
class HbIcon;
class QGraphicsWidget;
class QGraphicsLinearLayout;
-class ThumbnailManager;
+class CntThumbnailManager;
class CntContactCardDataContainer;
class CntContactCardHeadingItem;
class CntContactCardDetailItem;
@@ -47,6 +47,8 @@
class HbSelectionDialog;
class CntPresenceListener;
class HbLabel;
+class CntSaveManager;
+class QTimer;
QTM_BEGIN_NAMESPACE
class QContact;
@@ -81,8 +83,12 @@
public:
CntContactCardViewPrivate(bool isTemporary);
virtual ~CntContactCardViewPrivate();
-
+
+#ifdef PBK_UNIT_TEST
+public:
+#else
protected:
+#endif
bool eventFilter(QObject *obj, QEvent *event);
public slots:
@@ -116,6 +122,7 @@
void executeAction(QContact& aContact, const QContactDetail& aDetail, const QString& aAction);
void sendKeyCancelSlot();
void contactDeletedFromOtherSource(const QList<QContactLocalId>& contactIds);
+ void contactUpdatedFromOtherSource(const QList<QContactLocalId>& contactIds);
#ifdef PBK_UNIT_TEST
public slots:
@@ -134,14 +141,14 @@
public:
CntContactCardView* q_ptr;
- void activate(CntAbstractViewManager* aMgr, const CntViewParameters aArgs);
+ void activate(const CntViewParameters aArgs);
void deactivate();
CntDocumentLoader* document();
QContactManager* contactManager();
signals:
void preferredUpdated();
- void backPressed();
+ void backPressed(int value);
void viewActivated(CntAbstractViewManager* aMgr, const CntViewParameters aArgs);
void addToContacts();
@@ -153,47 +160,43 @@
void connectAction(QString actionName, const char* slot);
void executeAction(QContact& aContact, const QContactDetail& aDetail, const QString& aAction, CntContactCardDetailItem* aItem);
void executeDynamicAction(QContact& aContact, QContactDetail aDetail, QContactActionDescriptor aActionDescriptor);
+ bool sendKeyPressed();
+ void populateHeadingItem();
+ void populateListItems();
- bool sendKeyPressed();
-#ifdef PBK_UNIT_TEST
public:
-#else
-private:
-#endif
- CntAbstractViewManager* mViewManager;
+ CntAbstractViewManager* mViewManager; // not own
HbView* mView;
HbScrollArea *mScrollArea;
- QGraphicsWidget *mContainerWidget;
QGraphicsLinearLayout *mContainerLayout;
QContact *mContact;
- QGraphicsWidget *mDetailsWidget;
CntContactCardDataContainer *mDataContainer;
CntContactCardHeadingItem *mHeadingItem;
- ThumbnailManager *mThumbnailManager;
+ CntThumbnailManager *mThumbnailManager;
QContactAvatar *mAvatar;
- bool mIsHandlingMenu;
QMap<QString, CntContactCardDetailItem*> mPreferredItems;
+
/// maps a QContactOnlineAccount (for example "sip:sip@sip.com") to a detail item
QMap<QString, CntContactCardDetailItem*> mPresenceItems;
- int mFavoriteGroupId;
CntDocumentLoader *mLoader;
- QContactAction *mContactAction;
HbAction *mBackKey;
CntImageLabel *mImageLabel;
- XQServiceRequest *mHighwayService;
HbIcon *mVCardIcon;
CntViewParameters mArgs;
ShareUi *mShareUi;
bool mAcceptSendKey;
- QStandardItemModel* mSendKeyListModel;
- HbSelectionDialog* mSendKeyPopup;
CntPresenceListener* mPresenceListener; // own
- CntMapTileService *mMaptile;
- QTimer *mProgressTimer;
+ MapTileService *mMaptile; //own
QList <CntContactCardMapTileDetail*> mAddressList;
QMap <int, HbLabel*> mMaptileLabelList;
bool mIsTemporary;
bool mIsExecutingAction;
+ QMap<QString, bool> mInitiialPrecenceData;
+ QContactLocalId mMyCardId;
+ CntSaveManager* mSaveManager; // own
+ CntAbstractEngine* mEngine;
+ QTimer* mProgressTimer; // own
+ QList<CntContactCardDetailItem*> mDetailPtrs;
};
#endif // CNTCOMMLAUNCHERVIEW_H
--- a/phonebookui/pbkcommonui/inc/cntdefaultviewmanager.h Wed Aug 18 09:39:00 2010 +0300
+++ b/phonebookui/pbkcommonui/inc/cntdefaultviewmanager.h Thu Sep 02 20:16:15 2010 +0300
@@ -26,6 +26,7 @@
class CntAbstractView;
class CntViewNavigator;
class CntSimUtility;
+class CntAbstractEngine;
QTM_BEGIN_NAMESPACE
class QContactManager;
@@ -45,11 +46,12 @@
void setViewFactory( CntAbstractViewFactory* aFactory );
void setViewNavigator( CntViewNavigator* aNavigator );
+ CntAbstractEngine& engine();
+
public: // From CntAbstractViewManager
void changeView( const CntViewParameters aArgs );
void back( const CntViewParameters aArgs, bool toRoot = false );
- QContactManager* contactManager( const QString& aType );
-
+
public:
int currentViewId();
@@ -76,7 +78,7 @@
HbMainWindow* mMainWindow;
CntSimUtility* mSimUtility;
-
+ CntAbstractEngine* mEngine;
friend class T_CntDefaultViewManager;
};
#endif /* CNTDEFAULTVIEWMANAGER_H_ */
--- a/phonebookui/pbkcommonui/inc/cntdetaileditor.h Wed Aug 18 09:39:00 2010 +0300
+++ b/phonebookui/pbkcommonui/inc/cntdetaileditor.h Thu Sep 02 20:16:15 2010 +0300
@@ -22,7 +22,7 @@
#include <hbabstractviewitem.h>
#include <hbgroupbox.h>
#include "cntdetaileditormodel.h"
-#include "cntabstractview.h"
+#include <cntabstractview.h>
#include <qtcontacts.h>
@@ -61,13 +61,14 @@
public:
// Documentation inherited from CntAbstractView.
- void activate( CntAbstractViewManager* aMgr, const CntViewParameters aArgs );
+ void activate( const CntViewParameters aArgs );
void deactivate();
bool isDefault() const;
HbView* view() const;
int viewId() const;
+ inline void setEngine( CntAbstractEngine& aEngine ){ mEngine = &aEngine; }
private:
HbDocumentLoader* document();
@@ -85,7 +86,7 @@
HbAction *mCancel;
CntViewParameters mArgs;
CntSaveManager *mSaveManager; // own
-
+ CntAbstractEngine* mEngine; // not own
friend class TestCntDetailEditor;
};
#endif /* CNTDETAILEDITOR_H_ */
--- a/phonebookui/pbkcommonui/inc/cntdetailorderinghelper.h Wed Aug 18 09:39:00 2010 +0300
+++ b/phonebookui/pbkcommonui/inc/cntdetailorderinghelper.h Thu Sep 02 20:16:15 2010 +0300
@@ -68,11 +68,19 @@
EUrlWork
};
+ enum CntAddressPosition
+ {
+ EAddress = 0,
+ EAddressHome,
+ EAddressWork
+ };
+
public:
static QList<QContactPhoneNumber> getOrderedSupportedPhoneNumbers( const QContact& contact );
static QList<QContactOnlineAccount> getOrderedSupportedOnlineAccounts( const QContact& contact );
static QList<QContactEmailAddress> getOrderedEmailAccounts( const QContact& contact );
static QList<QContactUrl> getOrderedUrls( const QContact& contact );
+ static QList<QContactAddress> getOrderedAddresses( const QContact& contact );
};
#endif /* CNTPHONENUMBERHELPER_H */
--- a/phonebookui/pbkcommonui/inc/cnteditview.h Wed Aug 18 09:39:00 2010 +0300
+++ b/phonebookui/pbkcommonui/inc/cnteditview.h Thu Sep 02 20:16:15 2010 +0300
@@ -23,7 +23,6 @@
#include "cntglobal.h"
class CntEditViewPrivate;
-class CntAbstractViewManager;
class HbView;
class QTPBK_EXPORT CntEditView : public QObject, public CntAbstractView
@@ -41,11 +40,13 @@
public:
- void activate( CntAbstractViewManager* aMgr, const CntViewParameters aArgs );
+ void activate( const CntViewParameters aArgs );
void deactivate();
bool isDefault() const;
HbView* view() const;
int viewId() const;
+
+ void setEngine( CntAbstractEngine& aEngine );
private:
CntEditViewPrivate* const d_ptr;
--- a/phonebookui/pbkcommonui/inc/cnteditview_p.h Wed Aug 18 09:39:00 2010 +0300
+++ b/phonebookui/pbkcommonui/inc/cnteditview_p.h Thu Sep 02 20:16:15 2010 +0300
@@ -33,7 +33,7 @@
class CntEditViewItem;
class CntImageLabel;
-class ThumbnailManager;
+class CntThumbnailManager;
class QModelIndex;
class HbDocumentLoader;
class HbAbstractViewItem;
@@ -44,6 +44,7 @@
class HbMenu;
class XQAiwRequest;
class CntSaveManager;
+class CntAbstractEngine;
QTM_BEGIN_NAMESPACE
class QContact;
@@ -60,7 +61,7 @@
CntEditViewPrivate();
~CntEditViewPrivate();
- void activate( CntAbstractViewManager* aMgr, const CntViewParameters aArgs );
+ void activate( const CntViewParameters aArgs );
void deactivate();
public: // From CntEditViewItemCallback
@@ -110,9 +111,10 @@
CntImageLabel *mImageLabel;
CntViewParameters mArgs;
HbDocumentLoader* mDocument;
- ThumbnailManager* mThumbnailManager;
+ CntThumbnailManager* mThumbnailManager;
QContact* mContact; // own
CntAbstractViewManager* mMgr; // not owned
+ CntAbstractEngine* mEngine; // now owned
bool mIsMyCard;
HbAction* mSoftkey;
--- a/phonebookui/pbkcommonui/inc/cnteditviewlistmodel.h Wed Aug 18 09:39:00 2010 +0300
+++ b/phonebookui/pbkcommonui/inc/cnteditviewlistmodel.h Thu Sep 02 20:16:15 2010 +0300
@@ -71,7 +71,7 @@
{
Q_OBJECT
public:
- CntEditViewListModel( QContact& aContact ); // ownership not transferred
+ CntEditViewListModel( QContact& aContact, CntExtensionManager& aExtensions ); // ownership not transferred
~CntEditViewListModel();
public: // From QAbstractListModel
@@ -99,7 +99,7 @@
private:
QList<CntEditViewItem*> mItemList;
- CntExtensionManager* mManager;
+ CntExtensionManager& mManager;
CntEditViewItemBuilder* mBuilder;
CntEditViewItem* mSeparator;
QContact& mContact;
--- a/phonebookui/pbkcommonui/inc/cntfavoritesmemberview.h Wed Aug 18 09:39:00 2010 +0300
+++ b/phonebookui/pbkcommonui/inc/cntfavoritesmemberview.h Thu Sep 02 20:16:15 2010 +0300
@@ -23,13 +23,11 @@
#include <QSet>
class CntListModel;
-class CntAbstractViewManager;
class HbView;
class HbAction;
class HbListView;
class HbAbstractViewItem;
class QModelIndex;
-class CntFetchContacts;
QTM_BEGIN_NAMESPACE
class QContact;
@@ -40,11 +38,13 @@
Q_OBJECT
public: // From CntAbstractView
- void activate( CntAbstractViewManager* aMgr, const CntViewParameters aArgs );
+ void activate( const CntViewParameters aArgs );
void deactivate();
bool isDefault() const { return false; }
HbView* view() const { return mView; }
int viewId() const { return favoritesMemberView; }
+ inline void setEngine( CntAbstractEngine& aEngine ){ mEngine = &aEngine; }
+
void createModel();
public:
@@ -85,9 +85,9 @@
CntAbstractViewManager* mViewManager;
HbDocumentLoader mDocumentLoader;
HbView* mView; // own
- CntFetchContacts* mFetchView;
QSet<QContactLocalId> mOriginalGroupMembers;
HbAction* mSoftkey; // owned by view
+ CntAbstractEngine* mEngine;
};
#endif /* CNTFAVORITESMEMBERVIEW_H */
--- a/phonebookui/pbkcommonui/inc/cntfavoritesview.h Wed Aug 18 09:39:00 2010 +0300
+++ b/phonebookui/pbkcommonui/inc/cntfavoritesview.h Thu Sep 02 20:16:15 2010 +0300
@@ -43,12 +43,13 @@
~CntFavoritesView();
public: // From CntAbstractView
- void activate( CntAbstractViewManager* aMgr, const CntViewParameters aArgs );
+ void activate( const CntViewParameters aArgs );
void deactivate();
bool isDefault() const { return false; }
HbView* view() const { return mView; }
int viewId() const { return collectionFavoritesView; }
-
+ inline void setEngine( CntAbstractEngine& aEngine ){ mEngine = &aEngine; }
+
private slots:
void showPreviousView();
void openSelectionPopup();
@@ -68,6 +69,7 @@
HbAction* mSoftkey;
CntAbstractViewManager* mViewManager;
HbDocumentLoader mDocumentLoader;
+ CntAbstractEngine* mEngine;
};
#endif // CNTFAVORITESVIEW_H
--- a/phonebookui/pbkcommonui/inc/cntfetchcontactpopup.h Wed Aug 18 09:39:00 2010 +0300
+++ b/phonebookui/pbkcommonui/inc/cntfetchcontactpopup.h Thu Sep 02 20:16:15 2010 +0300
@@ -24,7 +24,6 @@
class HbDialog;
class HbListView;
-class HbTextItem;
class HbLabel;
class HbAction;
class HbSearchPanel;
@@ -75,6 +74,7 @@
void selectAll( int aState );
void dialogDismissed( HbAction* aAction );
void loadLayout( Qt::Orientation aOrientation );
+ void orientationChanged( Qt::Orientation aOrientation );
void handleKeypadOpen();
void handleKeypadClosed();
void closePopup();
@@ -89,7 +89,7 @@
HbDialog* mPopup; // own
HbListView* mListView; // own
- HbTextItem* mEmptyView; // own
+ HbLabel* mEmptyView; // own
HbLabel* mHeading; // own
HbAction* mPrimaryAction; // own
HbSearchPanel* mSearch; //own
@@ -99,6 +99,7 @@
QItemSelectionModel* mSelectionModel; // own
CntDocumentLoader* mDoc; // own
QString mTitle;
+ QList<QContactLocalId> mIds;
};
#endif /* CNTFETCHCONTACTPOPUP_H_ */
--- a/phonebookui/pbkcommonui/inc/cntgroupactionsview.h Wed Aug 18 09:39:00 2010 +0300
+++ b/phonebookui/pbkcommonui/inc/cntgroupactionsview.h Thu Sep 02 20:16:15 2010 +0300
@@ -20,9 +20,8 @@
#include <hbdocumentloader.h>
-#include "cntabstractview.h"
+#include <cntabstractview.h>
-class CntAbstractViewManager;
class HbView;
class HbIcon;
class HbAction;
@@ -32,7 +31,6 @@
class QStandardItemModel;
class CntActionLauncher;
-
QTM_BEGIN_NAMESPACE
class QContact;
class QContactAction;
@@ -45,11 +43,12 @@
Q_OBJECT
public: // From CntAbstractView
- void activate( CntAbstractViewManager* aMgr, const CntViewParameters aArgs );
+ void activate( const CntViewParameters aArgs );
void deactivate();
bool isDefault() const { return false; }
HbView* view() const { return mView; }
int viewId() const { return groupActionsView; }
+ inline void setEngine( CntAbstractEngine& aEngine ){ mEngine = &aEngine; }
protected:
bool eventFilter(QObject *obj, QEvent *event);
@@ -99,6 +98,8 @@
QStringList mEmailActionParams;
QVariantMap mMessageActionParams;
bool mIsExecutingAction;
+
+ CntAbstractEngine* mEngine;
};
#endif // CNTGROUPACTIONSVIEW_H
--- a/phonebookui/pbkcommonui/inc/cntgroupdeletepopup.h Wed Aug 18 09:39:00 2010 +0300
+++ b/phonebookui/pbkcommonui/inc/cntgroupdeletepopup.h Thu Sep 02 20:16:15 2010 +0300
@@ -25,6 +25,7 @@
#include "cntgroupdeletepopupmodel.h"
class HbListView;
+class CntAbstractEngine;
QTM_BEGIN_NAMESPACE
class QContactManager;
@@ -38,7 +39,7 @@
friend class TestCntGroupDeletePopup;
public:
- CntGroupDeletePopup(QContactManager *manager, QGraphicsItem *parent = 0);
+ CntGroupDeletePopup(CntAbstractEngine *aEngine, QGraphicsItem *parent = 0);
~CntGroupDeletePopup();
void populateListOfGroup();
--- a/phonebookui/pbkcommonui/inc/cntgroupdeletepopupmodel.h Wed Aug 18 09:39:00 2010 +0300
+++ b/phonebookui/pbkcommonui/inc/cntgroupdeletepopupmodel.h Thu Sep 02 20:16:15 2010 +0300
@@ -22,8 +22,8 @@
#include <QAbstractListModel>
#include <qmobilityglobal.h>
-class ThumbnailManager;
-
+class CntThumbnailManager;
+class CntAbstractEngine;
QTM_BEGIN_NAMESPACE
class QContactManager;
class QContact;
@@ -39,7 +39,7 @@
public:
QContactManager *mContactManager;
- ThumbnailManager *mThumbnailManager;
+ CntThumbnailManager *mThumbnailManager;
QList<QVariantList> mDataList;
QMap<int,int> mIconRequests;
};
@@ -49,7 +49,7 @@
Q_OBJECT
public:
- CntGroupDeletePopupModel(QContactManager *manager, QObject *parent = 0);
+ CntGroupDeletePopupModel(CntAbstractEngine *aEngine, QObject *parent = 0);
~CntGroupDeletePopupModel();
public:
--- a/phonebookui/pbkcommonui/inc/cntgroupmemberview.h Wed Aug 18 09:39:00 2010 +0300
+++ b/phonebookui/pbkcommonui/inc/cntgroupmemberview.h Thu Sep 02 20:16:15 2010 +0300
@@ -24,6 +24,7 @@
class CntGroupMemberViewPrivate;
class HbView;
+class CntAbstractEngine;
class QTPBK_EXPORT CntGroupMemberView : public QObject, public CntAbstractView
{
@@ -34,16 +35,18 @@
~CntGroupMemberView();
public: // From CntAbstractView
- void activate( CntAbstractViewManager* aMgr, const CntViewParameters aArgs );
+ void activate( const CntViewParameters aArgs );
void deactivate();
bool isDefault() const;
HbView* view() const;
int viewId() const;
-
+ void setEngine( CntAbstractEngine& aEngine );
+
signals:
void backPressed();
private:
+ friend class TestCntGroupMemberView;
CntGroupMemberViewPrivate* const d_ptr;
Q_DECLARE_PRIVATE_D(d_ptr, CntGroupMemberView)
Q_DISABLE_COPY(CntGroupMemberView)
--- a/phonebookui/pbkcommonui/inc/cntgroupmemberview_p.h Wed Aug 18 09:39:00 2010 +0300
+++ b/phonebookui/pbkcommonui/inc/cntgroupmemberview_p.h Thu Sep 02 20:16:15 2010 +0300
@@ -28,13 +28,11 @@
#include <cntabstractview.h>
class CntListModel;
-class CntAbstractViewManager;
class CntContactCardHeadingItem;
class HbView;
class HbAction;
class HbListView;
class HbAbstractViewItem;
-class ThumbnailManager;
class QModelIndex;
class CntImageLabel;
class HbDocumentLoader;
@@ -53,7 +51,7 @@
CntGroupMemberViewPrivate();
~CntGroupMemberViewPrivate();
- void activate( CntAbstractViewManager* aMgr, const CntViewParameters aArgs );
+ void activate( const CntViewParameters aArgs );
void deactivate();
public:
@@ -93,6 +91,8 @@
Q_DECLARE_PUBLIC(CntGroupMemberView)
friend class TestCntGroupMemberView;
+public:
+ CntAbstractEngine* mEngine;
private:
QContact* mGroupContact; // own
CntAbstractViewManager* mViewManager;
@@ -100,7 +100,7 @@
HbView* mView; // own
HbAction* mSoftkey; // owned by view
CntContactCardHeadingItem* mHeadingItem; // owned by layout
- ThumbnailManager* mThumbnailManager; // own
+ CntThumbnailManager* mThumbnailManager; // own
HbAction* mManageAction; // owned by view
HbAction* mDeleteAction; // owned by view
HbAction* mShowActionsAction; // owned by view
--- a/phonebookui/pbkcommonui/inc/cnthistoryview.h Wed Aug 18 09:39:00 2010 +0300
+++ b/phonebookui/pbkcommonui/inc/cnthistoryview.h Thu Sep 02 20:16:15 2010 +0300
@@ -43,12 +43,13 @@
public: // From CntAbstractView
CntHistoryView();
~CntHistoryView();
- void activate( CntAbstractViewManager* aMgr, const CntViewParameters aArgs );
+ void activate( const CntViewParameters aArgs );
void deactivate();
bool isDefault() const{ return false; }
HbView* view() const { return mView; }
int viewId() const { return historyView; }
-
+ inline void setEngine( CntAbstractEngine& aEngine ){ mEngine = &aEngine; }
+
public slots:
void updateScrollingPosition();
void clearHistory();
@@ -79,6 +80,7 @@
HbAction* mClearHistory; // not own
CntViewParameters mArgs;
XQAiwRequest* mRequest;
+ CntAbstractEngine* mEngine;
};
#endif // CNTHISTORYVIEW_H
--- a/phonebookui/pbkcommonui/inc/cntimageeditorview.h Wed Aug 18 09:39:00 2010 +0300
+++ b/phonebookui/pbkcommonui/inc/cntimageeditorview.h Thu Sep 02 20:16:15 2010 +0300
@@ -27,7 +27,6 @@
class CntImageLabel;
class HbListView;
class XQAiwRequest;
-class ThumbnailManager;
class HbAction;
class QStandardItemModel;
class QModelIndex;
@@ -49,12 +48,12 @@
~CntImageEditorView();
public: // From CntAbstractView
- void activate( CntAbstractViewManager* aMgr, const CntViewParameters aArgs );
+ void activate( const CntViewParameters aArgs );
void deactivate();
bool isDefault() const { return false; }
HbView* view() const { return mView; }
int viewId() const { return imageEditorView; }
-
+ inline void setEngine( CntAbstractEngine& aEngine ){ mEngine = &aEngine; }
#ifdef PBK_UNIT_TEST
public:
#else
@@ -89,7 +88,7 @@
CntImageLabel *mImageLabel; // owned by layout
XQAiwRequest *mRequest; // own
XQApplicationManager mAppManager;
- ThumbnailManager *mThumbnailManager; // own
+ CntThumbnailManager *mThumbnailManager; // own
HbView *mView; // own
HbAction *mSoftkey; // owned by view
HbAction *mRemoveImage; // own
@@ -100,6 +99,7 @@
CntSaveManager *mSaveManager; // own
CntViewParameters mArgs;
+ CntAbstractEngine* mEngine;
};
#endif // CNTIMAGEEDITORVIEW_H
--- a/phonebookui/pbkcommonui/inc/cntimportsview.h Wed Aug 18 09:39:00 2010 +0300
+++ b/phonebookui/pbkcommonui/inc/cntimportsview.h Thu Sep 02 20:16:15 2010 +0300
@@ -22,14 +22,12 @@
#include <hbpushbutton.h>
#include <hblistview.h>
-//#include "cntabstractview.h"
#include "cntactionmenubuilder.h"
#include <hbdocumentloader.h>
#include "cntsimutility.h"
#include <cntabstractview.h>
-class CntAbstractViewManager;
class HbView;
class HbAction;
class QStandardItemModel;
@@ -60,11 +58,13 @@
~CntImportsView();
public: // From CntAbstractView
- void activate( CntAbstractViewManager* aMgr, const CntViewParameters aArgs );
+ void activate( const CntViewParameters aArgs );
void deactivate();
bool isDefault() const { return false; }
HbView* view() const { return mView; }
int viewId() const { return importsView; }
+ inline void setEngine( CntAbstractEngine& aEngine ){ mEngine = &aEngine; }
+
void simInfoErrorMessage(int infoError);
bool startSimImport();
void fetchSDNContacts();
@@ -119,6 +119,8 @@
bool mSimError;
bool mWaitingForAdnCache;
bool mImportInProgress;
+
+ CntAbstractEngine* mEngine;
};
#endif /* CNTIMPORTSVIEW_H_ */
--- a/phonebookui/pbkcommonui/inc/cntmycardview.h Wed Aug 18 09:39:00 2010 +0300
+++ b/phonebookui/pbkcommonui/inc/cntmycardview.h Thu Sep 02 20:16:15 2010 +0300
@@ -23,7 +23,6 @@
#include <hbdocumentloader.h>
#include <cntabstractview.h>
-class CntAbstractViewManager;
class HbView;
class HbAction;
@@ -43,12 +42,13 @@
~CntMyCardView();
public: // From CntAbstractView
- void activate( CntAbstractViewManager* aMgr, const CntViewParameters aArgs );
+ void activate( const CntViewParameters aArgs );
void deactivate();
inline bool isDefault() const { return false; }
inline HbView* view() const { return mView; }
inline int viewId() const { return myCardView; }
+ inline void setEngine( CntAbstractEngine& aEngine ){ mEngine = &aEngine; }
private slots:
void showPreviousView();
@@ -67,7 +67,7 @@
HbDocumentLoader mDocumentLoader;
HbView* mView; // own
HbAction* mSoftkey;
-
+ CntAbstractEngine* mEngine;
friend class TestCntMyCardView;
};
--- a/phonebookui/pbkcommonui/inc/cntnameeditormodel.h Wed Aug 18 09:39:00 2010 +0300
+++ b/phonebookui/pbkcommonui/inc/cntnameeditormodel.h Thu Sep 02 20:16:15 2010 +0300
@@ -39,6 +39,7 @@
void saveContactDetails();
QContactDetail detail() const;
+
private:
QContactName iName;
QContactNickname iNick;
--- a/phonebookui/pbkcommonui/inc/cntnamesview.h Wed Aug 18 09:39:00 2010 +0300
+++ b/phonebookui/pbkcommonui/inc/cntnamesview.h Thu Sep 02 20:16:15 2010 +0300
@@ -23,24 +23,25 @@
class HbView;
class CntNamesViewPrivate;
-class CntExtensionManager;
class CntNamesView : public QObject, public CntAbstractView
{
Q_OBJECT
public:
- CntNamesView(CntExtensionManager &extensionManager);
+ CntNamesView();
~CntNamesView();
public: // From CntAbstractView
- void activate( CntAbstractViewManager* aMgr, const CntViewParameters aArgs );
+ void activate( const CntViewParameters aArgs );
void deactivate();
HbView* view() const;
bool isDefault() const;
int viewId() const;
+ void setEngine( CntAbstractEngine& aEngine );
+
private:
CntNamesViewPrivate* const d_ptr;
Q_DECLARE_PRIVATE_D(d_ptr, CntNamesView)
--- a/phonebookui/pbkcommonui/inc/cntnamesview_p.h Wed Aug 18 09:39:00 2010 +0300
+++ b/phonebookui/pbkcommonui/inc/cntnamesview_p.h Thu Sep 02 20:16:15 2010 +0300
@@ -31,7 +31,6 @@
class HbView;
class HbListView;
-class HbGroupBox;
class HbLabel;
class HbDocumentLoader;
class HbSearchPanel;
@@ -46,7 +45,7 @@
Q_DECLARE_PUBLIC(CntNamesView)
public:
- CntNamesViewPrivate(CntExtensionManager &extensionManager);
+ CntNamesViewPrivate();
virtual ~CntNamesViewPrivate();
public slots:
@@ -84,9 +83,9 @@
public:
bool isFinderVisible();
- void activate( CntAbstractViewManager* aMgr, const CntViewParameters aArgs );
+ void activate( const CntViewParameters aArgs );
void deactivate();
-
+ void setEngine( CntAbstractEngine& aEngine ){ mEngine = &aEngine; }
private:
void changeDeleteActionStatus();
void focusLineEdit();
@@ -100,13 +99,11 @@
HbDocumentLoader *document();
private:
- CntExtensionManager& mExtensionManager;
CntAbstractViewManager* mViewManager;
CntListModel* mListModel;
HbView* mView;
HbListView* mListView;
HbLabel* mEmptyList;
- HbGroupBox* mBanner;
HbSearchPanel* mSearchPanel;
HbDocumentLoader* mLoader;
HbShrinkingVkbHost* mVirtualKeyboard;
@@ -122,6 +119,7 @@
QActionGroup* mActionGroup;
HbMenu* mMenu;
bool mFilterChanged;
+ CntAbstractEngine* mEngine;
};
#endif /* CNTABSTRACTLISTVIEW_H_ */
--- a/phonebookui/pbkcommonui/inc/cntpresencelistener.h Wed Aug 18 09:39:00 2010 +0300
+++ b/phonebookui/pbkcommonui/inc/cntpresencelistener.h Thu Sep 02 20:16:15 2010 +0300
@@ -43,10 +43,10 @@
Q_OBJECT
public:
- CntPresenceListener(const QContact& contact, QObject* parent = NULL);
+ CntPresenceListener(QObject* parent = NULL);
~CntPresenceListener();
- QMap<QString, bool> initialPresences(bool &combinedOnlineStatus);
+ QMap<QString, bool> initialPresences(const QContact& contact, bool &combinedOnlineStatus);
private slots:
void handlePresenceUpdate(bool aSuccess, PrcPresenceBuddyInfoQt* aPresenceBuddyInfo);
@@ -63,9 +63,6 @@
private:
PrcPresenceReader* mReader; // own
QStringList mAccountList;
-
- const QContact& mContact;
-
};
#endif // CNTPRESENCELISTENER_H
--- a/phonebookui/pbkcommonui/inc/cntsettingsview.h Wed Aug 18 09:39:00 2010 +0300
+++ b/phonebookui/pbkcommonui/inc/cntsettingsview.h Thu Sep 02 20:16:15 2010 +0300
@@ -38,12 +38,13 @@
~CntSettingsView();
protected: // From CntAbstractView
- void activate( CntAbstractViewManager* aMgr, const CntViewParameters aArgs );
+ void activate( const CntViewParameters aArgs );
void deactivate();
bool isDefault() const;
HbView* view() const;
int viewId() const;
-
+ inline void setEngine( CntAbstractEngine& aEngine ){ mEngine = &aEngine; }
+
private slots:
void back();
@@ -60,7 +61,7 @@
CntViewParameters mArgs;
CntSettingsModel* mModel;
-
+ CntAbstractEngine* mEngine;
friend class TestCntSettings;
};
#endif
--- a/phonebookui/pbkcommonui/pbkcommonui.pro Wed Aug 18 09:39:00 2010 +0300
+++ b/phonebookui/pbkcommonui/pbkcommonui.pro Thu Sep 02 20:16:15 2010 +0300
@@ -49,6 +49,7 @@
:BLD_INF_RULES.prj_exports += "../../contacts_plat/contacts_ui_api/inc/cntviewparams.h APP_LAYER_PLATFORM_EXPORT_PATH(cntviewparams.h)"
:BLD_INF_RULES.prj_exports += "../../contacts_plat/contacts_ui_api/inc/cntabstractview.h APP_LAYER_PLATFORM_EXPORT_PATH(cntabstractview.h)"
:BLD_INF_RULES.prj_exports += "../../contacts_plat/contacts_ui_api/inc/cntabstractviewmanager.h APP_LAYER_PLATFORM_EXPORT_PATH(cntabstractviewmanager.h)"
+ :BLD_INF_RULES.prj_exports += "../../contacts_plat/contacts_ui_api/inc/cntabstractengine.h APP_LAYER_PLATFORM_EXPORT_PATH(cntabstractengine.h)"
:BLD_INF_RULES.prj_exports += "../../contacts_plat/contacts_ui_api/inc/cntuids.h APP_LAYER_PLATFORM_EXPORT_PATH(cntuids.h)"
:BLD_INF_RULES.prj_exports += "../../contacts_plat/contacts_ui_extensions_api/inc/cntuiextensionfactory.h APP_LAYER_PLATFORM_EXPORT_PATH(cntuiextensionfactory.h)"
@@ -61,6 +62,7 @@
:BLD_INF_RULES.prj_exports += "../../contacts_plat/contacts_ui_extensions_api/inc/cnteditviewitem.h APP_LAYER_PLATFORM_EXPORT_PATH(cnteditviewitem.h)"
:BLD_INF_RULES.prj_exports += "../../contacts_plat/contacts_ui_extensions_api/inc/cntuiactionextension.h APP_LAYER_PLATFORM_EXPORT_PATH(cntuiactionextension.h)"
:BLD_INF_RULES.prj_exports += "../../contacts_plat/contacts_ui_extensions_api/inc/cnteditviewitemcallback.h APP_LAYER_PLATFORM_EXPORT_PATH(cnteditviewitemcallback.h)"
+ :BLD_INF_RULES.prj_exports += "../../contacts_plat/contacts_ui_extensions_api/inc/cntuicontactcardextension.h APP_LAYER_PLATFORM_EXPORT_PATH(cntuicontactcardextension.h)"
}
# Input
@@ -141,7 +143,9 @@
inc/cntactionpopup_p.h \
inc/cntactionpopup.h \
inc/cntsavemanager.h \
- inc/cntkeygrabber.h
+ inc/cntkeygrabber.h \
+ engine_inc/cntdefaultengine.h \
+ engine_inc/cntthumbnailmanager.h
SOURCES += \
@@ -217,7 +221,9 @@
src/cntactionpopup_p.cpp \
src/cntactionpopup.cpp \
src/cntsavemanager.cpp \
- src/cntkeygrabber.cpp
+ src/cntkeygrabber.cpp \
+ engine_src/cntthumbnailmanager.cpp \
+ engine_src/cntdefaultengine.cpp
DOCML += resources/contacts_contactcard.docml \
resources/contacts_ev.docml \
@@ -245,7 +251,7 @@
-lcntlistmodel \
-lthumbnailmanagerqt \
-lcnthistorymodel \
- -lcntmaptileservice \
+ -lmaptileservice \
-lqtversit \
-lcntimageutility \
-lcntsimutility \
--- a/phonebookui/pbkcommonui/resources/contacts_contactcard.docml Wed Aug 18 09:39:00 2010 +0300
+++ b/phonebookui/pbkcommonui/resources/contacts_contactcard.docml Thu Sep 02 20:16:15 2010 +0300
@@ -52,13 +52,13 @@
<fontspec name="fontSpec" role="Secondary" textheight="23.45"/>
</widget>
<widget name="maptilePreferenceWidget" type="HbLabel">
- <contentsmargins bottom="var(hb-param-margin-gene-bottom)" left="var(hb-param-margin-gene-left)" right="var(hb-param-margin-gene-right)" top="0un"/>
+ <contentsmargins left="var(hb-param-margin-gene-left)" top="0un"/>
</widget>
<widget name="maptileHomeWidget" type="HbLabel">
- <contentsmargins bottom="var(hb-param-margin-gene-bottom)" left="var(hb-param-margin-gene-left)" right="var(hb-param-margin-gene-right)" top="0un"/>
+ <contentsmargins left="var(hb-param-margin-gene-left)" top="0un"/>
</widget>
<widget name="maptileWorkWidget" type="HbLabel">
- <contentsmargins bottom="var(hb-param-margin-gene-bottom)" left="var(hb-param-margin-gene-left)" right="var(hb-param-margin-gene-right)" top="0un"/>
+ <contentsmargins left="var(hb-param-margin-gene-left)" top="0un"/>
</widget>
</widget>
<widget name="viewToolbar" role="HbView:toolBar" type="HbToolBar">
--- a/phonebookui/pbkcommonui/resources/contacts_fetchdialog.docml Wed Aug 18 09:39:00 2010 +0300
+++ b/phonebookui/pbkcommonui/resources/contacts_fetchdialog.docml Thu Sep 02 20:16:15 2010 +0300
@@ -6,7 +6,7 @@
</widget>
<widget name="container" role="HbDialog:contentWidget" type="HbWidget">
<widget name="markAll" type="CntFetchMarkAll">
- <bool name="visible" value="TRUE"/>
+ <bool name="visible" value="FALSE"/>
</widget>
<widget name="emptyLabel" type="HbLabel">
<fontspec name="fontSpec" role="Primary"/>
@@ -45,12 +45,6 @@
<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>
@@ -70,13 +64,10 @@
<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"/>
@@ -96,9 +87,6 @@
<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">
@@ -121,7 +109,6 @@
<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>
@@ -141,14 +128,10 @@
<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"/>
@@ -168,12 +151,13 @@
<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 name="container" role="HbDialog:contentWidget" type="HbWidget">
+ <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>
</widget>
</section>
--- a/phonebookui/pbkcommonui/resources/contacts_namelist.docml Wed Aug 18 09:39:00 2010 +0300
+++ b/phonebookui/pbkcommonui/resources/contacts_namelist.docml Thu Sep 02 20:16:15 2010 +0300
@@ -29,11 +29,6 @@
<widget name="view" type="HbView">
<widget name="content" role="HbView:widget" type="HbWidget">
- <widget name="banner" type="HbGroupBox">
- <string locid="txt_phob_subtitle_find_all_contacts" name="heading"/>
- <bool name="collapsable" value="FALSE"/>
- <bool name="visible" value="FALSE"/>
- </widget>
<widget name="emptyLabel" type="HbLabel">
<fontspec name="fontSpec" role="Primary"/>
<string name="alignment" value="AlignCenter"/>
@@ -71,9 +66,6 @@
<section name="no_find">
<widget name="view" type="HbView">
<widget name="content" role="HbView:widget" type="HbWidget">
- <widget name="banner" type="HbGroupBox">
- <bool name="visible" value="FALSE"/>
- </widget>
<widget name="emptyLabel" type="HbLabel">
<bool name="visible" value="FALSE"/>
</widget>
@@ -96,9 +88,6 @@
<section name="find_list">
<widget name="view" type="HbView">
<widget name="content" role="HbView:widget" type="HbWidget">
- <widget name="banner" type="HbGroupBox">
- <bool name="visible" value="TRUE"/>
- </widget>
<widget name="emptyLabel" type="HbLabel">
<bool name="visible" value="FALSE"/>
</widget>
@@ -110,7 +99,6 @@
</widget>
<layout orientation="Vertical" spacing="0un" type="linear">
<contentsmargins bottom="0un" left="0un" right="0un" top="0un"/>
- <linearitem itemname="banner"/>
<linearitem itemname="listView"/>
<linearitem itemname="searchPanel"/>
</layout>
@@ -123,9 +111,6 @@
<section name="find_empty">
<widget name="view" type="HbView">
<widget name="content" role="HbView:widget" type="HbWidget">
- <widget name="banner" type="HbGroupBox">
- <bool name="visible" value="TRUE"/>
- </widget>
<widget name="emptyLabel" type="HbLabel">
<bool name="visible" value="TRUE"/>
</widget>
@@ -137,7 +122,6 @@
</widget>
<layout orientation="Vertical" spacing="0un" type="linear">
<contentsmargins bottom="0un" left="0un" right="0un" top="0un"/>
- <linearitem itemname="banner"/>
<linearitem itemname="emptyLabel"/>
<linearitem itemname="searchPanel"/>
</layout>
--- a/phonebookui/pbkcommonui/resources/pbkcommonui.qrc Wed Aug 18 09:39:00 2010 +0300
+++ b/phonebookui/pbkcommonui/resources/pbkcommonui.qrc Thu Sep 02 20:16:15 2010 +0300
@@ -24,9 +24,8 @@
<file alias="cnteditviewlistitem.css">style/cnteditviewlistitem.css</file>
<file alias="cnteditviewheadingitem.css">style/cnteditviewheadingitem.css</file>
<file alias="cnteditviewheadingitem_color.css">style/cnteditviewheadingitem_color.css</file>
- <file alias="cnteditviewheadingitem.widgetml">style/cnteditviewheadingitem.widgetml</file>
- <file alias="cnteditviewdetailitem_color.css">style/cnteditviewdetailitem_color.css</file>
- <file alias="cntcontactcarddetailitem.widgetml">style/cntcontactcarddetailitem.widgetml</file>
+ <file alias="cnteditviewheadingitem.widgetml">style/cnteditviewheadingitem.widgetml</file>
+ <file alias="cntcontactcarddetailitem.widgetml">style/cntcontactcarddetailitem.widgetml</file>
<file alias="cntcontactcarddetailitem.css">style/cntcontactcarddetailitem.css</file>
<file alias="cntcontactcarddetailitem_color.css">style/cntcontactcarddetailitem_color.css</file>
<file alias="cntcontactcardheadingitem.widgetml">style/cntcontactcardheadingitem.widgetml</file>
@@ -41,5 +40,6 @@
<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>
+ <file alias="fetchdialog.css">temp/fetchdialog.css</file>
</qresource>
</RCC>
--- a/phonebookui/pbkcommonui/resources/style/cnteditviewdetailitem.css Wed Aug 18 09:39:00 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,48 +0,0 @@
-CntEditViewDetailItem[icon][text][valueText]{
- layout:customLayout;
-}
-
-CntEditViewDetailItem[icon][text][!valueText]{
- layout:customLayoutNoValueText;
-}
-
-CntEditViewDetailItem[!icon][text][valueText]{
- layout:customLayoutNoIcon;
-}
-
-CntEditViewDetailItem::icon{
- fixed-width:var(hb-param-graphic-size-primary-small);
- fixed-height:var(hb-param-graphic-size-primary-small);
-}
-
-CntEditViewDetailItem::text{
- text-height:var(hb-param-text-height-secondary);
- font-variant:secondary;
- text-align:left;
-}
-
-CntEditViewDetailItem[icon][text][!valueText]::text{
- text-height:var(hb-param-text-height-primary);
- font-variant:primary;
- text-align:left;
-}
-
-CntEditViewDetailItem::valueText{
- text-height:var(hb-param-text-height-primary);
- font-variant:primary;
- text-align:left;
-}
-
-CntEditViewDetailItem::background{
- left:0.0un;
- right:0.0un;
- top:0.0un;
- bottom:0.0un;
-}
-
-CntEditViewDetailItem::highlight{
- left: 0.0un;
- right: 0.0un;
- top: 0.0un;
- bottom: 0.0un;
-}
--- a/phonebookui/pbkcommonui/resources/style/cnteditviewdetailitem.widgetml Wed Aug 18 09:39:00 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,68 +0,0 @@
-<hbwidget version="0.1" type="cnteditviewdetailitem">
-
- <layout name="customLayout" type="mesh">
- <meshitem src="icon" srcEdge="LEFT" dst="" dstEdge="LEFT" spacing="-var(hb-param-margin-gene-left)" />
- <meshitem src="icon" srcEdge="CENTERV" dst="text" dstEdge="CENTERV" />
-
- <meshitem src="text" srcEdge="LEFT" dst="icon" dstEdge="RIGHT" spacing="-var(hb-param-margin-gene-middle-horizontal)" />
- <meshitem src="text" srcEdge="TOP" dst="" dstEdge="TOP" spacing="-var(hb-param-margin-gene-top)" />
- <meshitem src="text" srcEdge="RIGHT" dst="" dstEdge="RIGHT" spacing="var(hb-param-margin-gene-right)" />
-
- <meshitem src="valueText" srcEdge="TOP" dst="text" dstEdge="BOTTOM" spacing="-var(hb-param-margin-gene-middle-vertical)" />
- <meshitem src="valueText" srcEdge="LEFT" dst="text" dstEdge="LEFT" />
- <meshitem src="valueText" srcEdge="BOTTOM" dst="" dstEdge="BOTTOM" spacing="var(hb-param-margin-gene-bottom)" />
- <meshitem src="valueText" srcEdge="RIGHT" dst="" dstEdge="RIGHT" spacing="var(hb-param-margin-gene-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" />
-
- <meshitem src="highlight" srcEdge="LEFT" dst="" dstEdge="LEFT" />
- <meshitem src="highlight" srcEdge="RIGHT" dst="" dstEdge="RIGHT" />
- <meshitem src="highlight" srcEdge="TOP" dst="" dstEdge="TOP" />
- <meshitem src="highlight" srcEdge="BOTTOM" dst="" dstEdge="BOTTOM" />
- </layout>
-
- <layout name="customLayoutNoValueText" type="mesh">
- <meshitem src="icon" srcEdge="LEFT" dst="" dstEdge="LEFT" spacing="-var(hb-param-margin-gene-left)" />
- <meshitem src="icon" srcEdge="CENTERV" dst="text" dstEdge="CENTERV" />
-
- <meshitem src="text" srcEdge="LEFT" dst="icon" dstEdge="RIGHT" spacing="-var(hb-param-margin-gene-middle-horizontal)" />
- <meshitem src="text" srcEdge="TOP" dst="" dstEdge="TOP" spacing="-var(hb-param-margin-gene-top)" />
- <meshitem src="text" srcEdge="RIGHT" dst="" dstEdge="RIGHT" spacing="var(hb-param-margin-gene-right)" />
- <meshitem src="text" srcEdge="BOTTOM" dst="" dstEdge="BOTTOM" spacing="var(hb-param-margin-gene-bottom)" />
-
- <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" />
-
- <meshitem src="highlight" srcEdge="LEFT" dst="" dstEdge="LEFT" />
- <meshitem src="highlight" srcEdge="RIGHT" dst="" dstEdge="RIGHT" />
- <meshitem src="highlight" srcEdge="TOP" dst="" dstEdge="TOP" />
- <meshitem src="highlight" srcEdge="BOTTOM" dst="" dstEdge="BOTTOM" />
- </layout>
-
- <layout name="customLayoutNoIcon" type="mesh">
- <meshitem src="text" srcEdge="LEFT" dst="" dstEdge="LEFT" spacing="-var(hb-param-margin-gene-left)" />
- <meshitem src="text" srcEdge="TOP" dst="" dstEdge="TOP" spacing="-var(hb-param-margin-gene-top)" />
- <meshitem src="text" srcEdge="RIGHT" dst="" dstEdge="RIGHT" spacing="var(hb-param-margin-gene-right)" />
-
- <meshitem src="valueText" srcEdge="TOP" dst="text" dstEdge="BOTTOM" spacing="-var(hb-param-margin-gene-middle-vertical)" />
- <meshitem src="valueText" srcEdge="LEFT" dst="text" dstEdge="LEFT" />
- <meshitem src="valueText" srcEdge="BOTTOM" dst="" dstEdge="BOTTOM" spacing="var(hb-param-margin-gene-bottom)" />
- <meshitem src="valueText" srcEdge="RIGHT" dst="" dstEdge="RIGHT" spacing="var(hb-param-margin-gene-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" />
-
- <meshitem src="highlight" srcEdge="LEFT" dst="" dstEdge="LEFT" />
- <meshitem src="highlight" srcEdge="RIGHT" dst="" dstEdge="RIGHT" />
- <meshitem src="highlight" srcEdge="TOP" dst="" dstEdge="TOP" />
- <meshitem src="highlight" srcEdge="BOTTOM" dst="" dstEdge="BOTTOM" />
- </layout>
-
-</hbwidget>
--- a/phonebookui/pbkcommonui/resources/style/cnteditviewdetailitem_color.css Wed Aug 18 09:39:00 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,7 +0,0 @@
-CntEditViewDetailItem::text{
- color: var(foreground);
-}
-
-CntEditViewDetailItem::valueText{
- color: var(foreground);
-}
--- a/phonebookui/pbkcommonui/resources/style/cnteditviewlistitem.css Wed Aug 18 09:39:00 2010 +0300
+++ b/phonebookui/pbkcommonui/resources/style/cnteditviewlistitem.css Thu Sep 02 20:16:15 2010 +0300
@@ -1,15 +1,3 @@
-HbListViewItem[layoutName="editviewlist"][modelItemType="StandardItem"]{
- layout:custom-1;
-}
-
-HbListViewItem[layoutName="editviewlist"][modelItemType="StandardItem"][!text-2]{
- layout:custom-2;
-}
-
-HbListViewItem[layoutName="editviewlist"][modelItemType="StandardItem"][!icon-1]{
- layout:custom-3;
-}
-
HbListViewItem[layoutName="editviewlist"][modelItemType="SeparatorItem"]{
layout:custom-separator-1;
}
@@ -17,10 +5,15 @@
HbListViewItem::text-1[layoutName="editviewlist"][modelItemType="SeparatorItem"]{
text-height: var(hb-param-text-height-secondary);
font-variant: secondary;
+ pref-width:-1;
text-align: left;
+ size-policy-horizontal: ignored;
+ text-line-count-min:1;
+ text-line-count-max:1;
+ text-wrap-mode:no-wrap;
}
-HbListViewItem::icon-1[layoutName="editviewlist"]{
+HbListViewItem::icon-1[layoutName="editviewlist"][modelItemType="StandardItem"]{
fixed-width:var(hb-param-graphic-size-primary-small);
fixed-height:var(hb-param-graphic-size-primary-small);
}
@@ -28,17 +21,32 @@
HbListViewItem::text-1[layoutName="editviewlist"][modelItemType="StandardItem"]{
text-height:var(hb-param-text-height-secondary);
font-variant:secondary;
- text-align:left;
+ pref-width:-1;
+ text-align: left;
+ size-policy-horizontal: ignored;
+ text-line-count-min:1;
+ text-line-count-max:1;
+ text-wrap-mode:no-wrap;
}
HbListViewItem::text-1[layoutName="editviewlist"][modelItemType="StandardItem"][!text-2]{
text-height:var(hb-param-text-height-primary);
font-variant:primary;
- text-align:left;
+ pref-width:-1;
+ text-align: left;
+ size-policy-horizontal: ignored;
+ text-line-count-min:1;
+ text-line-count-max:1;
+ text-wrap-mode:no-wrap;
}
-HbListViewItem::text-2[layoutName="editviewlist"]{
+HbListViewItem::text-2[layoutName="editviewlist"][modelItemType="StandardItem"]{
text-height:var(hb-param-text-height-primary);
font-variant:primary;
- text-align:left;
+ pref-width:-1;
+ text-align: left top;
+ size-policy-horizontal: ignored;
+ text-line-count-min:1;
+ text-line-count-max:1;
+ text-wrap-mode:no-wrap;
}
--- a/phonebookui/pbkcommonui/resources/style/cnteditviewlistitem.hblistviewitem.widgetml Wed Aug 18 09:39:00 2010 +0300
+++ b/phonebookui/pbkcommonui/resources/style/cnteditviewlistitem.hblistviewitem.widgetml Thu Sep 02 20:16:15 2010 +0300
@@ -1,84 +1,10 @@
<hbwidget version="0.1" type="HbListViewItem">
- <layout name="custom-1" type="mesh">
- <meshitem src="icon-1" srcEdge="LEFT" dst="" dstEdge="LEFT" spacing="-var(hb-param-margin-gene-left)" />
- <meshitem src="icon-1" srcEdge="CENTERV" dst="text-1" dstEdge="CENTERV" />
-
- <meshitem src="text-1" srcEdge="LEFT" dst="icon-1" dstEdge="RIGHT" spacing="-var(hb-param-margin-gene-middle-horizontal)" />
- <meshitem src="text-1" srcEdge="TOP" dst="" dstEdge="TOP" spacing="-var(hb-param-margin-gene-top)"/>
- <meshitem src="text-1" srcEdge="RIGHT" dst="" dstEdge="RIGHT" spacing="var(hb-param-margin-gene-right)" />
- <meshitem src="text-1" srcEdge="BOTTOM" dst="text-2" dstEdge="TOP" spacing="var(hb-param-margin-gene-middle-vertical)" />
-
- <meshitem src="text-2" srcEdge="LEFT" dst="text-1" dstEdge="LEFT" />
- <meshitem src="text-2" srcEdge="RIGHT" dst="text-1" dstEdge="RIGHT" />
- <meshitem src="text-2" srcEdge="BOTTOM" dst="" dstEdge="BOTTOM" spacing="var(hb-param-margin-gene-bottom)" />
-
- <meshitem src="background" srcEdge="LEFT" dst="" dstEdge="LEFT" />
- <meshitem src="background" srcEdge="TOP" dst="" dstEdge="TOP" />
- <meshitem src="background" srcEdge="RIGHT" dst="" dstEdge="RIGHT" />
- <meshitem src="background" srcEdge="BOTTOM" dst="" dstEdge="BOTTOM" />
-
- <meshitem src="frame" srcEdge="LEFT" dst="" dstEdge="LEFT" />
- <meshitem src="frame" srcEdge="TOP" dst="" dstEdge="TOP" />
- <meshitem src="frame" srcEdge="RIGHT" dst="" dstEdge="RIGHT" />
- <meshitem src="frame" srcEdge="BOTTOM" dst="" dstEdge="BOTTOM" />
- </layout>
-
- <layout name="custom-2" type="mesh">
- <meshitem src="icon-1" srcEdge="LEFT" dst="" dstEdge="LEFT" spacing="-var(hb-param-margin-gene-left)" />
- <meshitem src="icon-1" srcEdge="CENTERV" dst="text-1" dstEdge="CENTERV" />
-
- <meshitem src="text-1" srcEdge="LEFT" dst="icon-1" dstEdge="RIGHT" spacing="-var(hb-param-margin-gene-middle-horizontal)" />
- <meshitem src="text-1" srcEdge="TOP" dst="" dstEdge="TOP" spacing="-var(hb-param-margin-gene-top)"/>
- <meshitem src="text-1" srcEdge="RIGHT" dst="" dstEdge="RIGHT" spacing="var(hb-param-margin-gene-right)" />
- <meshitem src="text-1" srcEdge="BOTTOM" dst="" dstEdge="BOTTOM" spacing="var(hb-param-margin-gene-bottom)" />
-
- <meshitem src="background" srcEdge="LEFT" dst="" dstEdge="LEFT" />
- <meshitem src="background" srcEdge="TOP" dst="" dstEdge="TOP" />
- <meshitem src="background" srcEdge="RIGHT" dst="" dstEdge="RIGHT" />
- <meshitem src="background" srcEdge="BOTTOM" dst="" dstEdge="BOTTOM" />
-
- <meshitem src="frame" srcEdge="LEFT" dst="" dstEdge="LEFT" />
- <meshitem src="frame" srcEdge="TOP" dst="" dstEdge="TOP" />
- <meshitem src="frame" srcEdge="RIGHT" dst="" dstEdge="RIGHT" />
- <meshitem src="frame" srcEdge="BOTTOM" dst="" dstEdge="BOTTOM" />
- </layout>
-
- <layout name="custom-3" type="mesh">
- <meshitem src="text-1" srcEdge="LEFT" dst="" dstEdge="LEFT" spacing="-var(hb-param-margin-gene-left)" />
- <meshitem src="text-1" srcEdge="TOP" dst="" dstEdge="TOP" spacing="-var(hb-param-margin-gene-top)"/>
- <meshitem src="text-1" srcEdge="RIGHT" dst="" dstEdge="RIGHT" spacing="var(hb-param-margin-gene-right)" />
- <meshitem src="text-1" srcEdge="BOTTOM" dst="text-2" dstEdge="TOP" spacing="var(hb-param-margin-gene-middle-vertical)" />
-
- <meshitem src="text-2" srcEdge="LEFT" dst="text-1" dstEdge="LEFT" />
- <meshitem src="text-2" srcEdge="RIGHT" dst="text-1" dstEdge="RIGHT" />
- <meshitem src="text-2" srcEdge="BOTTOM" dst="" dstEdge="BOTTOM" spacing="var(hb-param-margin-gene-bottom)" />
-
- <meshitem src="background" srcEdge="LEFT" dst="" dstEdge="LEFT" />
- <meshitem src="background" srcEdge="TOP" dst="" dstEdge="TOP" />
- <meshitem src="background" srcEdge="RIGHT" dst="" dstEdge="RIGHT" />
- <meshitem src="background" srcEdge="BOTTOM" dst="" dstEdge="BOTTOM" />
-
- <meshitem src="frame" srcEdge="LEFT" dst="" dstEdge="LEFT" />
- <meshitem src="frame" srcEdge="TOP" dst="" dstEdge="TOP" />
- <meshitem src="frame" srcEdge="RIGHT" dst="" dstEdge="RIGHT" />
- <meshitem src="frame" srcEdge="BOTTOM" dst="" dstEdge="BOTTOM" />
- </layout>
<layout name="custom-separator-1" type="mesh">
<meshitem src="text-1" srcEdge="LEFT" dst="" dstEdge="LEFT" spacing="-var(hb-param-margin-gene-left)"/>
<meshitem src="text-1" srcEdge="TOP" dst="" dstEdge="TOP" spacing="-var(hb-param-margin-gene-middle-vertical)"/>
<meshitem src="text-1" srcEdge="RIGHT" dst="" dstEdge="RIGHT" spacing="var(hb-param-margin-gene-right)" />
<meshitem src="text-1" srcEdge="BOTTOM" dst="" dstEdge="BOTTOM" spacing="var(hb-param-margin-gene-middle-vertical)" />
-
- <meshitem src="background" srcEdge="LEFT" dst="" dstEdge="LEFT" />
- <meshitem src="background" srcEdge="TOP" dst="" dstEdge="TOP" />
- <meshitem src="background" srcEdge="RIGHT" dst="" dstEdge="RIGHT" />
- <meshitem src="background" srcEdge="BOTTOM" dst="" dstEdge="BOTTOM" />
-
- <meshitem src="frame" srcEdge="LEFT" dst="" dstEdge="LEFT" />
- <meshitem src="frame" srcEdge="TOP" dst="" dstEdge="TOP" />
- <meshitem src="frame" srcEdge="RIGHT" dst="" dstEdge="RIGHT" />
- <meshitem src="frame" srcEdge="BOTTOM" dst="" dstEdge="BOTTOM" />
</layout>
</hbwidget>
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/phonebookui/pbkcommonui/resources/temp/fetchdialog.css Thu Sep 02 20:16:15 2010 +0300
@@ -0,0 +1,9 @@
+HbDialog#dialog:portrait {
+ pref-width: expr(var(hb-param-screen-width) - 2* var(hb-param-margin-gene-screen));
+ pref-height: expr(var(hb-param-screen-height) - 2* var(hb-param-margin-gene-screen));
+}
+
+HbDialog#dialog:landscape {
+ pref-width: expr(var(hb-param-screen-width) - 2* var(hb-param-margin-gene-screen));
+ pref-height: expr(var(hb-param-screen-height) - 2* var(hb-param-margin-gene-screen));
+}
\ No newline at end of file
--- a/phonebookui/pbkcommonui/src/cntaddressmodel.cpp Wed Aug 18 09:39:00 2010 +0300
+++ b/phonebookui/pbkcommonui/src/cntaddressmodel.cpp Thu Sep 02 20:16:15 2010 +0300
@@ -18,7 +18,7 @@
#include "cntaddressmodel.h"
#include "cntdetailmodelitem.h"
#include "cntdetailconst.h"
-#include <cntmaptileservice.h>
+#include <maptileservice.h>
CntAddressModel::CntAddressModel( QContact* aContact ):
CntDetailEditorModel( aContact ),
@@ -27,7 +27,7 @@
mAddressWork(NULL),
mIsLocationPickerEnabled( false )
{
- mMaptileInterface = new CntMapTileService;
+ mMaptileInterface = new MapTileService;
HbDataFormModelItem* address = appendDataFormGroup(hbTrId("txt_phob_formlabel_address"), invisibleRootItem());
HbDataFormModelItem* addressHome = appendDataFormGroup(hbTrId("txt_phob_formlabel_address_home"), invisibleRootItem());
HbDataFormModelItem* addressWork = appendDataFormGroup(hbTrId("txt_phob_formlabel_address_work"), invisibleRootItem());
@@ -91,7 +91,7 @@
void CntAddressModel::createAddressItems( HbDataFormModelItem* aGroup, QContactAddress* aAddress )
{
//Show the location picker button only if location feature enabled
- if( mMaptileInterface->isLocationFeatureEnabled() )
+ if( mMaptileInterface->isLocationFeatureEnabled(MapTileService::AppTypeContacts) )
{
// custom item for map button
HbDataFormModelItem* mapButton = new HbDataFormModelItem( HbDataFormModelItem::CustomItemBase );
@@ -190,7 +190,7 @@
bool CntAddressModel::saveAddressItems( HbDataFormModelItem* aGroup, QContactAddress* aAddress )
{
int offset = 0;
- if( mMaptileInterface->isLocationFeatureEnabled() )
+ if( mMaptileInterface->isLocationFeatureEnabled(MapTileService::AppTypeContacts) )
{
offset = 1;
}
--- a/phonebookui/pbkcommonui/src/cntaddressviewitem.cpp Wed Aug 18 09:39:00 2010 +0300
+++ b/phonebookui/pbkcommonui/src/cntaddressviewitem.cpp Thu Sep 02 20:16:15 2010 +0300
@@ -35,12 +35,25 @@
#include <xqappmgr.h>
CntAddressViewItem::CntAddressViewItem(QGraphicsItem* aParent) :
/*CntDetailViewItem(aParent),*/
- HbDataFormViewItem(aParent)
+ HbDataFormViewItem(aParent),
+ mAppManager(NULL),
+ mRequest(NULL),
+ mRequestPending(false)
{
}
CntAddressViewItem::~CntAddressViewItem()
{
+ if(mAppManager)
+ {
+ delete mAppManager;
+ mAppManager = NULL;
+ }
+ if(mRequest)
+ {
+ delete mRequest;
+ mRequest = NULL;
+ }
}
HbAbstractViewItem* CntAddressViewItem::createItem()
@@ -92,29 +105,33 @@
void CntAddressViewItem::launchLocationPicker()
{
- XQApplicationManager *appManager = new XQApplicationManager();
- XQAiwRequest* request = appManager->create("com.nokia.symbian", "ILocationPick", "pick()", true);
- if( request )
+ if( !mAppManager )
{
- QVariant retValue;
- if( request->send( retValue ) )
- {
- handleLocationChange( retValue );
- }
-
- delete request;
+ mAppManager = new XQApplicationManager();
+ }
+ if(!mRequest)
+ {
+ mRequest = mAppManager->create("com.nokia.symbian", "ILocationPick", "pick()", true);
+ mRequest->setSynchronous(false);
+ connect(mRequest, SIGNAL(requestOk(const QVariant&)), this, SLOT(handleLocationChange(const QVariant&)));
}
- delete appManager;
+ if(!mRequestPending)
+ {
+ if( mRequest->send() )
+ {
+ mRequestPending = true;
+ }
+ }
}
void CntAddressViewItem::handleLocationChange(const QVariant& aValue)
{
+ mRequestPending = false;
QLocationPickerItem selectedLocation = aValue.value<QLocationPickerItem>();
if( selectedLocation.mIsValid )
{
HbDataForm* form = static_cast<HbDataForm*>(itemView());
HbDataFormModel* model = static_cast<HbDataFormModel*>(form->model());
- HbDataFormModelItem* item = model->itemFromIndex( modelIndex() );
QModelIndex nextIndex = modelIndex().sibling( modelIndex().row() + 1 , modelIndex().column() );
HbDataFormModelItem* street = model->itemFromIndex( nextIndex );
--- a/phonebookui/pbkcommonui/src/cntbaseselectionview.cpp Wed Aug 18 09:39:00 2010 +0300
+++ b/phonebookui/pbkcommonui/src/cntbaseselectionview.cpp Thu Sep 02 20:16:15 2010 +0300
@@ -19,6 +19,7 @@
#include <hbview.h>
#include <hblistview.h>
+#include <hblistviewitem.h>
#include <hbindexfeedback.h>
#include <hbscrollbar.h>
#include <hbdocumentloader.h>
@@ -47,6 +48,8 @@
mListView->verticalScrollBar()->setInteractive(true);
mListView->setUniformItemSizes(true);
+ HbListViewItem* prototype = mListView->listItemPrototype();
+
HbIndexFeedback *indexFeedback = new HbIndexFeedback(mView);
indexFeedback->setIndexFeedbackPolicy(HbIndexFeedback::IndexFeedbackSingleCharacter);
indexFeedback->setItemView(mListView);
@@ -60,26 +63,19 @@
delete mDocument;
}
-void CntBaseSelectionView::activate( CntAbstractViewManager* aMgr, const CntViewParameters aArgs )
+void CntBaseSelectionView::activate( const CntViewParameters aArgs )
{
- mMgr = aMgr;
+ mMgr = &mEngine->viewManager();
if ( mView->navigationAction() != mSoftkey)
mView->setNavigationAction(mSoftkey);
- HbMainWindow* window = mView->mainWindow();
- if ( window )
- {
- //connect(window, SIGNAL(orientationChanged(Qt::Orientation)), this, SLOT(setOrientation(Qt::Orientation)));
- //setOrientation(window->orientation());
- }
-
QContactDetailFilter filter;
filter.setDetailDefinitionName(QContactType::DefinitionName, QContactType::FieldType);
QString typeContact = QContactType::TypeContact;
filter.setValue(typeContact);
- mListModel = new CntListModel(mMgr->contactManager(SYMBIAN_BACKEND), filter);
+ mListModel = new CntListModel( &mEngine->contactManager(SYMBIAN_BACKEND), filter);
mListModel->showMyCard( false );
mListView->setModel( mListModel );
--- a/phonebookui/pbkcommonui/src/cntcollectionlistmodel.cpp Wed Aug 18 09:39:00 2010 +0300
+++ b/phonebookui/pbkcommonui/src/cntcollectionlistmodel.cpp Thu Sep 02 20:16:15 2010 +0300
@@ -20,8 +20,10 @@
#include "cntcollectionlistmodelworker.h"
#include "cntextensionmanager.h"
#include "cntfavourite.h"
+#include "cntthumbnailmanager.h"
#include "cntdebug.h"
+#include <cntabstractengine.h>
#include <cntuiextensionfactory.h>
#include <cntuigroupsupplier.h>
#include <cntuids.h>
@@ -31,18 +33,17 @@
#include <hbglobal.h>
#include <hbicon.h>
-#include <thumbnailmanager_qt.h>
-
/*!
Constructor
*/
-CntCollectionListModel::CntCollectionListModel(QContactManager *manager, CntExtensionManager &extensionManager, QObject *parent)
+CntCollectionListModel::CntCollectionListModel(CntAbstractEngine* aEngine, QObject *parent)
: QAbstractListModel(parent)
{
CNT_ENTRY
- d = new CntCollectionListModelData(extensionManager);
- d->mContactManager = manager;
+ d = new CntCollectionListModelData( aEngine->extensionManager() );
+ d->mContactManager = &aEngine->contactManager( SYMBIAN_BACKEND );
+ d->mThumbnailManager = &aEngine->thumbnailManager();
XQSettingsKey nameOrderKey(XQSettingsKey::TargetCentralRepository,
KCRCntSettings.iUid,
@@ -52,12 +53,8 @@
QString noFavs = hbTrId("txt_phob_dblist_favorites_val_no_favorites_selecte");
QString noMembers = hbTrId("txt_phob_dblist_val_no_members_selected");
mThread = new CntCollectionListModelWorker(unnamed, noFavs, noMembers, order);
+
connect(mThread, SIGNAL(fetchDone(int, const QString&, int)), this, SLOT(informationUpdated(int, const QString&, int)));
-
- d->mThumbnailManager = new ThumbnailManager(this);
- d->mThumbnailManager->setMode(ThumbnailManager::Default);
- d->mThumbnailManager->setQualityPreference(ThumbnailManager::OptimizeForPerformance);
- d->mThumbnailManager->setThumbnailSize(ThumbnailManager::ThumbnailSmall);
connect(d->mThumbnailManager, SIGNAL(thumbnailReady(QPixmap, void *, int, int)),
this, SLOT(onIconReady(QPixmap, void *, int, int)));
@@ -266,7 +263,7 @@
{
if (details.at(k).imageUrl().isValid())
{
- int id = d->mThumbnailManager->getThumbnail(details.at(k).imageUrl().toString());
+ int id = d->mThumbnailManager->getThumbnail(ThumbnailManager::ThumbnailSmall, details.at(k).imageUrl().toString());
d->mIconRequests.insert(id, groupContactIds.at(i));
break;
}
@@ -503,7 +500,7 @@
{
if (details.at(k).imageUrl().isValid())
{
- int id = d->mThumbnailManager->getThumbnail(details.at(k).imageUrl().toString());
+ int id = d->mThumbnailManager->getThumbnail(ThumbnailManager::ThumbnailSmall, details.at(k).imageUrl().toString());
d->mIconRequests.insert(id, groupContactIds.at(i));
break;
}
--- a/phonebookui/pbkcommonui/src/cntcollectionview.cpp Wed Aug 18 09:39:00 2010 +0300
+++ b/phonebookui/pbkcommonui/src/cntcollectionview.cpp Thu Sep 02 20:16:15 2010 +0300
@@ -24,7 +24,6 @@
#include "cntfavourite.h"
#include "cntdetailconst.h"
#include "cntdebug.h"
-
#include <cntuiextensionfactory.h>
#include <cntuigroupsupplier.h>
#include <hblabel.h>
@@ -50,8 +49,7 @@
/*!
*/
-CntCollectionView::CntCollectionView(CntExtensionManager &extensionManager) :
- mExtensionManager(extensionManager),
+CntCollectionView::CntCollectionView() :
mView(NULL),
mSoftkey(NULL),
mViewManager(NULL),
@@ -119,7 +117,7 @@
/*!
Called when activating the view
*/
-void CntCollectionView::activate( CntAbstractViewManager* aMgr, const CntViewParameters aArgs )
+void CntCollectionView::activate( const CntViewParameters aArgs )
{
CNT_ENTRY
@@ -128,8 +126,9 @@
if (mView->navigationAction() != mSoftkey)
mView->setNavigationAction(mSoftkey);
- mViewManager = aMgr;
-
+ mViewManager = &mEngine->viewManager();
+ mExtensionManager = &mEngine->extensionManager();
+
// disable delete group(s) button if only favorites group is present
QContactDetailFilter groupFilter;
groupFilter.setDetailDefinitionName(QContactType::DefinitionName, QContactType::FieldType);
@@ -156,7 +155,7 @@
mListView->listItemPrototype()->setGraphicsSize(HbListViewItem::LargeIcon);
mListView->listItemPrototype()->setStretchingStyle(HbListViewItem::StretchLandscape);
- mModel = new CntCollectionListModel(getContactManager(), mExtensionManager, this);
+ mModel = new CntCollectionListModel( mEngine, this);
mListView->setModel(mModel);
CNT_EXIT
@@ -210,7 +209,7 @@
else
{
int id = index.data(Qt::UserRole).toInt();
- int favoriteGrpId = CntFavourite::favouriteGroupId(mViewManager->contactManager(SYMBIAN_BACKEND));
+ int favoriteGrpId = CntFavourite::favouriteGroupId(getContactManager());
if (id == favoriteGrpId )
{
@@ -266,7 +265,7 @@
int id = item->modelIndex().data(Qt::UserRole).toInt();
QVariant data( id );
- int favoriteGrpId = CntFavourite::favouriteGroupId(mViewManager->contactManager(SYMBIAN_BACKEND));
+ int favoriteGrpId = CntFavourite::favouriteGroupId(getContactManager());
HbMenu *menu = new HbMenu();
menu->setAttribute(Qt::WA_DeleteOnClose);
@@ -344,10 +343,6 @@
mHandledContact->saveDetail(&groupName);
getContactManager()->saveContact(mHandledContact);
- QContactDetailFilter filter;
- QList<QContactLocalId> contactsList = getContactManager()->contactIds(filter);
- QSet<QContactLocalId> contactsSet = contactsList.toSet();
-
// Select some contact(s) to add to the group
QString groupNameCreated = mHandledContact->displayLabel();
if (groupNameCreated.isEmpty())
@@ -355,15 +350,32 @@
groupNameCreated = hbTrId("txt_phob_list_unnamed");
}
- 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();
+ // if no contacts are present, then dont call the fetch popup
+ QContactDetailFilter gFilter;
+ gFilter.setDetailDefinitionName(QContactType::DefinitionName, QContactType::FieldType);
+ gFilter.setValue(QLatin1String(QContactType::TypeContact));
+
+ QList<QContactLocalId> contactIds = getContactManager()->contactIds(gFilter);
+ if (contactIds.isEmpty())
+ {
+ mModel->addGroup(mHandledContact->localId());
+ mDeleteGroupsAction->setEnabled(true);
+
+ notifyNewGroup();
+ }
+ else
+ {
+ CntFetchContactPopup* popup = CntFetchContactPopup::createMultiSelectionPopup(
+ HbParameterLengthLimiter(hbTrId("txt_phob_title_members_of_1_group")).arg(groupNameCreated),
+ hbTrId("txt_common_button_save"),
+ mEngine->contactManager(SYMBIAN_BACKEND));
+ connect( popup, SIGNAL(fetchReady(QSet<QContactLocalId>)), this, SLOT(handleNewGroupMembers(QSet<QContactLocalId>)) );
+ connect( popup, SIGNAL(fetchCancelled()), this, SLOT(handleCancelGroupMembers()) );
+
+ QSet<QContactLocalId> ids;
+ popup->setSelectedContacts(ids);
+ popup->showPopup();
+ }
}
}
@@ -424,7 +436,7 @@
delete mModel;
mModel = NULL;
- mModel = new CntCollectionListModel(getContactManager(), mExtensionManager, this);
+ mModel = new CntCollectionListModel(mEngine, this);
mListView->setModel(mModel);
}
@@ -470,7 +482,7 @@
void CntCollectionView::deleteGroups()
{
// save the group here
- CntGroupDeletePopup *groupDeletePopup = new CntGroupDeletePopup(getContactManager());
+ CntGroupDeletePopup *groupDeletePopup = new CntGroupDeletePopup( mEngine );
groupDeletePopup->populateListOfGroup();
groupDeletePopup->open(this, SLOT(handleDeleteGroups(HbAction*)));
@@ -503,26 +515,34 @@
QContactManager* CntCollectionView::getContactManager()
{
- if (!mViewManager) return NULL;
-
- return mViewManager->contactManager(SYMBIAN_BACKEND);
+ if (!mEngine) {
+ return NULL;
+ }
+ return &mEngine->contactManager( SYMBIAN_BACKEND );
}
-void CntCollectionView::saveNewGroup(QContact* aContact)
+void CntCollectionView::saveNewGroup(QContact* aGroup)
{
- if (!aContact) return;
+ if (!aGroup) {
+ return;
+ }
// Save the relationship from the selection model of the member selection list
- QList<QContactLocalId> selectedList = mSelectedContactsSet.toList();
- for (int i = 0; i < selectedList.size(); i++ ) {
- QContact contact = getContactManager()->contact(selectedList.at(i));
+ QList<QContactRelationship> relationships;
+ foreach (QContactLocalId localId, mSelectedContactsSet)
+ {
QContactRelationship relationship;
+ QContactId id;
+ id.setLocalId(localId);
relationship.setRelationshipType(QContactRelationship::HasMember);
- relationship.setFirst(aContact->id());
- relationship.setSecond(contact.id());
+ relationship.setFirst(aGroup->id());
+ relationship.setSecond(id);
+ relationships.append(relationship);
+ }
- // Save relationship
- getContactManager()->saveRelationship(&relationship);
+ // Save relationships
+ if (!relationships.isEmpty()) {
+ getContactManager()->saveRelationships(&relationships, NULL);
}
}
--- a/phonebookui/pbkcommonui/src/cntcompanyeditormodel.cpp Wed Aug 18 09:39:00 2010 +0300
+++ b/phonebookui/pbkcommonui/src/cntcompanyeditormodel.cpp Thu Sep 02 20:16:15 2010 +0300
@@ -75,7 +75,7 @@
{
mCompany.setName( name );
mCompany.setTitle( title );
- mCompany.setDepartment( department.split(", ") );
+ mCompany.setDepartment( department.split(", ", QString::SkipEmptyParts) );
mCompany.setAssistantName( assistant );
mContact->saveDetail( &mCompany );
}
--- a/phonebookui/pbkcommonui/src/cntcontactcarddatacontainer.cpp Wed Aug 18 09:39:00 2010 +0300
+++ b/phonebookui/pbkcommonui/src/cntcontactcarddatacontainer.cpp Thu Sep 02 20:16:15 2010 +0300
@@ -18,19 +18,22 @@
#include "cntcontactcarddatacontainer.h"
#include "cntcontactcarddataitem.h"
#include "cntdetailorderinghelper.h"
-#include <cntmaptileservice.h> //For fetching maptile
-#include "cntuiactionextension.h"
+#include <maptileservice.h> //For fetching maptile
+#include <cntuiactionextension.h>
+#include <cntuiextensionfactory.h>
+#include <cntuicontactcardextension.h>
#include <QPainter>
#include <QList>
#include <qtcontacts.h>
#include <hbicon.h>
-#include <cntviewparams.h>
+#include <hbnumbergrouping.h>
#include <QLocale>
#include <QDir>
+#include <cntviewparams.h>
#include "cntstringmapper.h"
-#include <hbnumbergrouping.h>
+#include "cntextensionmanager.h"
/*!
Compare function for CntContactCardDataItem
@@ -46,25 +49,37 @@
/*!
Constructor
*/
-CntContactCardDataContainer::CntContactCardDataContainer(
- QContact* contact, QObject *parent, bool myCard, CntMapTileService* maptile, Qt::Orientations orientation ) :
- mContact(contact),
- mSeparatorIndex(-1),
- mLocationFeatureEnabled(false),
- mMaptileInterface(maptile),
- mOrientation( orientation )
+CntContactCardDataContainer::CntContactCardDataContainer(
+ MapTileService* maptile,
+ CntExtensionManager& aExtensionManager,
+ Qt::Orientations orientation,
+ QObject *parent) :
+ mContact(NULL),
+ mSeparatorIndex(-1),
+ mLocationFeatureEnabled(false),
+ mMaptileInterface(maptile),
+ mOrientation( orientation ),
+ mExtensionManager( &aExtensionManager )
{
- Q_UNUSED(parent);
+ Q_UNUSED(parent);
+}
+
+void CntContactCardDataContainer::setContactData(QContact* contact, bool aMyCard)
+{
+ clearContactData();
+ mContact = contact;
+ mSeparatorIndex = -1;
if (contact->type() == QContactType::TypeGroup)
{
initializeGroupData();
}
else
{
- initializeActionsData(myCard);
+ initializeActionsData(aMyCard);
+ initialiseExtensionActions(aMyCard);
initializeDetailsData();
sortDataItems();
- }
+ }
}
/*!
@@ -72,10 +87,13 @@
*/
CntContactCardDataContainer::~CntContactCardDataContainer()
{
- while (!mDataItemList.isEmpty())
- {
- delete mDataItemList.takeFirst();
- }
+ clearContactData();
+}
+
+void CntContactCardDataContainer::clearContactData()
+{
+ qDeleteAll(mDataItemList);
+ mDataItemList.clear();
}
/*!
@@ -308,6 +326,43 @@
}
}
+void CntContactCardDataContainer::initialiseExtensionActions(bool /*aMyCard*/)
+{
+ // There can be several plugins that supply buttons.
+ for( int n = 0; n < mExtensionManager->pluginCount(); ++n )
+ {
+ CntUiExtensionFactory& factory = *mExtensionManager->pluginAt( n );
+ CntUiContactCardExtension* ext = factory.contactCardExtension();
+ if ( ext )
+ {
+ ext->prepare( *mContact, false ); // aMyCard = false
+ const int actionCount = ext->actionCount();
+ for( int x = 0; x < actionCount; ++x )
+ {
+ const CntUiContactCardExtAction& action = ext->actionAt( x );
+
+ const QContactDetail& detail = action.detailUsedForChoosingPosition();
+ QString context = detail.contexts().isEmpty() ? QString() : detail.contexts().first();
+ int position = getPosition(
+ detail.definitionName(),
+ context,
+ true); // dynamicAction = true
+
+ CntContactCardDataItem* dataItem = new CntContactCardDataItem(
+ action.firstTextLine(),
+ position,
+ true); // aIsFocusable = true
+ dataItem->setContactCardExtensionAndActionIndex( *ext, x );
+ dataItem->setValueText(action.secondTextLine());
+ dataItem->setIcon( action.icon());
+ dataItem->setContactDetail( action.detailUsedForChoosingPosition() );
+ //TODO: dataItem->setLongPressText();
+ mDataItemList.append(dataItem);
+ }
+ }
+ }
+}
+
/*!
Initialize group details which includes actions.
*/
@@ -387,16 +442,16 @@
//address
QString contextHome(QContactAddress::ContextHome.operator QString());
QString contextWork(QContactAddress::ContextWork.operator QString());
- CntMapTileService::ContactAddressType sourceAddressType;
+ MapTileService::AddressType sourceAddressType;
if( mMaptileInterface )
{
- mLocationFeatureEnabled = mMaptileInterface->isLocationFeatureEnabled() ;
+ mLocationFeatureEnabled = mMaptileInterface->isLocationFeatureEnabled(MapTileService::AppTypeContacts) ;
}
QList<QContactAddress> addressDetails = mContact->details<QContactAddress>();
for (int i = 0; i < addressDetails.count(); i++)
{
- sourceAddressType = CntMapTileService::AddressPreference;
+ sourceAddressType = MapTileService::AddressPreference;
QVariantList addressList;
//no action
int position = CntContactCardDataItem::EOther;
@@ -410,13 +465,13 @@
{
if ( addressDetails[i].contexts().at(0) == contextHome )
{
- sourceAddressType = CntMapTileService::AddressHome;
+ sourceAddressType = MapTileService::AddressHome;
title = hbTrId("txt_phob_formlabel_address_home");
position = CntContactCardDataItem::EAddressHome;
}
else if (addressDetails[i].contexts().at(0) == contextWork)
{
- sourceAddressType = CntMapTileService::AddressWork;
+ sourceAddressType = MapTileService::AddressWork;
title = hbTrId("txt_phob_formlabel_address_work");
position = CntContactCardDataItem::EAddressWork;
}
@@ -446,28 +501,28 @@
int status = mMaptileInterface->getMapTileImage(
contactId, sourceAddressType, imageFile, mOrientation );
- if( status == CntMapTileService::MapTileFetchingInProgress || status ==
- CntMapTileService::MapTileFetchingNetworkError )
+ if( status == MapTileService::MapTileFetchingInProgress || status ==
+ MapTileService::MapTileFetchingNetworkError )
{
//Load the progress indicator icon
QString iconName("qtg_anim_small_loading_1");
HbIcon inProgressIcon(iconName);
dataItem->setSecondaryIcon( inProgressIcon );
}
- else if( status == CntMapTileService::MapTileFetchingUnknownError ||
- status == CntMapTileService::MapTileFetchingInvalidAddress )
+ else if( status == MapTileService::MapTileFetchingUnknownError ||
+ status == MapTileService::MapTileFetchingInvalidAddress )
{
//Load the search stop icon
QString iconName("qtg_mono_search_stop");
HbIcon stopIcon(iconName);
dataItem->setSecondaryIcon( stopIcon );
}
- else if( status == CntMapTileService::MapTileFetchingCompleted )
+ else if( status == MapTileService::MapTileFetchingCompleted )
{
maptileAvailable = true;
}
}
- dataItem->setValueText(address.join(" "));
+ dataItem->setValueText(address.join(", "));
dataItem->setContactDetail(addressDetails[i]);
addSeparator(itemCount());
mDataItemList.append(dataItem);
@@ -501,7 +556,7 @@
companyList.append(organizationDetails[i].department());
if (companyList.count()>0)
{
- dataItem->setValueText(companyList.join(" ").trimmed());
+ dataItem->setValueText(companyList.join(", ").trimmed());
dataItem->setContactDetail(organizationDetails[i]);
addSeparator(itemCount());
mDataItemList.append(dataItem);
@@ -578,7 +633,8 @@
{
if (!familyDetails[i].spouse().isEmpty())
{
- CntContactCardDataItem* dataSpouseItem = new CntContactCardDataItem(hbTrId("txt_phob_formlabel_spouse"), CntContactCardDataItem::EChildren, false);
+ CntContactCardDataItem* dataSpouseItem = new CntContactCardDataItem(hbTrId("txt_phob_formlabel_spouse"),
+ CntContactCardDataItem::ESpouse, false);
dataSpouseItem->setValueText(familyDetails[i].spouse());
dataSpouseItem->setContactDetail(familyDetails[i]);
addSeparator(itemCount());
@@ -587,7 +643,8 @@
if (!familyDetails[i].children().isEmpty())
{
- CntContactCardDataItem* dataChildrenItem = new CntContactCardDataItem(hbTrId("txt_phob_formlabel_children"), CntContactCardDataItem::ESpouse, false);
+ CntContactCardDataItem* dataChildrenItem = new CntContactCardDataItem(hbTrId("txt_phob_formlabel_children"),
+ CntContactCardDataItem::EChildren, false);
dataChildrenItem->setValueText(familyDetails[i].children().join(", "));
dataChildrenItem->setContactDetail(familyDetails[i]);
addSeparator(itemCount());
--- a/phonebookui/pbkcommonui/src/cntcontactcarddataitem.cpp Wed Aug 18 09:39:00 2010 +0300
+++ b/phonebookui/pbkcommonui/src/cntcontactcarddataitem.cpp Thu Sep 02 20:16:15 2010 +0300
@@ -26,6 +26,8 @@
mActionDescriptor(QContactActionDescriptor()),
mValueTextElideMode(Qt::ElideRight),
mIsFocusable(aIsFocusable),
+ mExtension(NULL),
+ mExtensionActionIndex(0),
mPosition(aPosition)
{
@@ -41,7 +43,9 @@
mTitle = aTitle;
}
-void CntContactCardDataItem::setValueText(const QString& aValueText, Qt::TextElideMode aValueTextElideMode)
+void CntContactCardDataItem::setValueText(
+ const QString& aValueText,
+ Qt::TextElideMode aValueTextElideMode)
{
mValueText = aValueText;
mValueTextElideMode = aValueTextElideMode;
@@ -76,3 +80,10 @@
{
mLongPressText = aLongPressText;
}
+
+void CntContactCardDataItem::setContactCardExtensionAndActionIndex( CntUiContactCardExtension& aExtension, int aIndex )
+{
+ mExtension = &aExtension;
+ mExtensionActionIndex = aIndex;
+}
+
--- a/phonebookui/pbkcommonui/src/cntcontactcardheadingitem.cpp Wed Aug 18 09:39:00 2010 +0300
+++ b/phonebookui/pbkcommonui/src/cntcontactcardheadingitem.cpp Thu Sep 02 20:16:15 2010 +0300
@@ -346,11 +346,18 @@
{
QContactOrganization org = contact->detail<QContactOrganization>();
QStringList companyList;
- companyList << org.title() << org.name() << org.department();
- tinyMarqueeText = companyList.join(" ").trimmed();
+
+ if (!org.title().isEmpty())
+ companyList << org.title();
+ if (!org.name().isEmpty())
+ companyList << org.name();
+ if (!org.department().isEmpty())
+ companyList << org.department().join(", ").trimmed();
+ tinyMarqueeText = companyList.join(", ").trimmed();
}
recreatePrimitives();
+ repolish();
}
QString CntContactCardHeadingItem::createNameText(const QContactName name)
--- a/phonebookui/pbkcommonui/src/cntcontactcardview.cpp Wed Aug 18 09:39:00 2010 +0300
+++ b/phonebookui/pbkcommonui/src/cntcontactcardview.cpp Thu Sep 02 20:16:15 2010 +0300
@@ -17,13 +17,11 @@
#include "cntcontactcardview.h"
#include "cntcontactcardview_p.h"
-
#include <hbview.h>
CntContactCardView::CntContactCardView(bool isTemporary) : d_ptr(new CntContactCardViewPrivate(isTemporary))
{
- Q_D(CntContactCardView);
- connect(d_ptr, SIGNAL(backPressed()), this, SIGNAL(backPressed()));
+ connect(d_ptr, SIGNAL(backPressed(int)), this, SIGNAL(backPressed(int)));
connect(d_ptr, SIGNAL(viewActivated(CntAbstractViewManager*, const CntViewParameters)),
this, SIGNAL(viewActivated(CntAbstractViewManager*, const CntViewParameters)));
connect(d_ptr, SIGNAL(addToContacts()), this, SIGNAL(addToContacts()));
@@ -38,10 +36,10 @@
delete d;
}
-void CntContactCardView::activate(CntAbstractViewManager* aMgr, const CntViewParameters aArgs)
+void CntContactCardView::activate(const CntViewParameters aArgs)
{
Q_D(CntContactCardView);
- d->activate( aMgr, aArgs );
+ d->activate( aArgs );
}
void CntContactCardView::deactivate()
@@ -66,4 +64,10 @@
return contactCardView;
}
+void CntContactCardView::setEngine( CntAbstractEngine& aEngine )
+{
+ Q_D( CntContactCardView );
+ d->mEngine = &aEngine;
+}
+
// end of file
--- a/phonebookui/pbkcommonui/src/cntcontactcardview_p.cpp Wed Aug 18 09:39:00 2010 +0300
+++ b/phonebookui/pbkcommonui/src/cntcontactcardview_p.cpp Thu Sep 02 20:16:15 2010 +0300
@@ -15,6 +15,7 @@
*/
#include "cntcontactcardview_p.h"
+#include "cntthumbnailmanager.h"
#include <QGraphicsLinearLayout>
#include <QGraphicsSceneResizeEvent>
@@ -24,6 +25,7 @@
#include <QKeyEvent>
#include <QDir>
+#include <cntservicescontact.h>
#include <qtcontacts.h>
#include <hbscrollarea.h>
#include <hblabel.h>
@@ -41,18 +43,18 @@
#include <hblistview.h>
#include <hblistviewitem.h>
#include <shareui.h>
-#include <thumbnailmanager_qt.h>
-#include <cntmaptileservice.h> //For maptile processing
+#include <maptileservice.h> //For maptile processing
#include <qversitcontactexporter.h>
#include <qversitwriter.h>
#include <xqservicerequest.h>
#include <QTimer> //Progress indication icon
+#include <QApplication>
#include <cntdebug.h>
#include "cntcontactcarddatacontainer.h"
-#include "cntcontactcarddetailitem.h"
#include "cntcontactcardheadingitem.h"
#include "cntcontactcarddataitem.h"
+#include "cntcontactcarddetailitem.h"
#include "cntcontactcardcontextmenu.h"
#include "cntmainwindow.h"
#include "cntstringmapper.h"
@@ -64,6 +66,9 @@
#include "cntpresencelistener.h"
#include "cntactionpopup.h"
#include "cntvcarddetailhandler.h"
+#include "cntsavemanager.h"
+#include <cntabstractengine.h>
+#include <cntuicontactcardextension.h>
#define CNT_MAPTILE_PROGRESS_TIMER 100 //100 msec
#define CNT_UNKNOWN_MAPTILE_STATUS -1
@@ -76,30 +81,20 @@
\a viewManager is the parent that creates this view. \a parent is a pointer to parent QGraphicsItem (by default this is 0)
*/
CntContactCardViewPrivate::CntContactCardViewPrivate(bool isTemporary) :
- QObject(),
- mScrollArea(NULL),
- mContainerWidget(NULL),
+ QObject(),
mContainerLayout(NULL),
mContact(NULL),
- mDetailsWidget(NULL),
mDataContainer(NULL),
- mHeadingItem(NULL),
- mThumbnailManager(NULL),
mAvatar(NULL),
- mFavoriteGroupId(-1),
mLoader(NULL),
- mContactAction(NULL),
- mBackKey(NULL),
- mImageLabel(NULL),
mVCardIcon(NULL),
mShareUi(NULL),
mAcceptSendKey(true),
- mSendKeyListModel(NULL),
mPresenceListener(NULL),
- mMaptile(NULL),
- mProgressTimer(NULL),
mIsTemporary(isTemporary),
- mIsExecutingAction(false)
+ mIsExecutingAction(false),
+ mMyCardId(0),
+ mSaveManager(NULL)
{
bool ok;
document()->load(CNT_CONTACTCARDVIEW_XML, &ok);
@@ -110,14 +105,6 @@
mView = static_cast<HbView*>(document()->findWidget("view"));
- mThumbnailManager = new ThumbnailManager(this);
- mThumbnailManager->setMode(ThumbnailManager::Default);
- mThumbnailManager->setQualityPreference(ThumbnailManager::OptimizeForQuality);
- mThumbnailManager->setThumbnailSize(ThumbnailManager::ThumbnailLarge);
-
- connect(mThumbnailManager, SIGNAL(thumbnailReady(QPixmap, void*, int, int)),
- this, SLOT(thumbnailReady(QPixmap, void*, int, int)));
-
//back button
mBackKey = new HbAction(Hb::BackNaviAction, mView);
mView->setNavigationAction(mBackKey);
@@ -125,15 +112,28 @@
mProgressTimer = new QTimer(this);
mProgressTimer->setSingleShot(true);
- connect(mProgressTimer, SIGNAL(timeout()),this, SLOT(updateSpinningIndicator()));
+ connect(mProgressTimer, SIGNAL(timeout()),this, SLOT(updateSpinningIndicator()));
- mMaptile = new CntMapTileService;
- if( mMaptile->isLocationFeatureEnabled() )
+ mMaptile = new MapTileService;
+ if( mMaptile->isLocationFeatureEnabled(MapTileService::AppTypeContacts) )
{
//Connect for maptile status evenet
QObject::connect( mMaptile, SIGNAL(maptileFetchingStatusUpdate(int,
int,int)),this,SLOT(mapTileStatusReceived(int,int,int)));
}
+
+ mScrollArea = static_cast<HbScrollArea*>(document()->findWidget(QString("scrollArea")));
+ mHeadingItem = static_cast<CntContactCardHeadingItem*>(document()->findWidget(QString("cnt_contactcard_heading")));
+ mImageLabel = static_cast<CntImageLabel*>(document()->findWidget("cnt_contactcard_image"));
+
+ // presence listener
+ mPresenceListener = new CntPresenceListener();
+ connect(mPresenceListener, SIGNAL(fullPresenceUpdated(bool)), mHeadingItem, SLOT(setOnlineStatus(bool)));
+ connect(mPresenceListener, SIGNAL(accountPresenceUpdated(const QString&, bool)),
+ this, SLOT(updateItemPresence(const QString&, bool)));
+
+
+ mSaveManager = new CntSaveManager();
}
/*!
@@ -141,10 +141,25 @@
*/
CntContactCardViewPrivate::~CntContactCardViewPrivate()
{
+ // Clear the container to avoid double deletion
+ if (mContainerLayout != NULL)
+ {
+ int count = mContainerLayout->count();
+ for (int i=0; i<count; i++)
+ {
+ // do not delete items. They will be deleted automatically
+ mContainerLayout->removeAt(i);
+ }
+ }
+
+ // Delete all the detail pointers if any
+ qDeleteAll(mDetailPtrs);
+ mDetailPtrs.clear();
+
mView->deleteLater();
delete mContact;
- mContact = 0;
+ mContact = NULL;
delete mDataContainer;
mDataContainer = NULL;
@@ -167,18 +182,12 @@
mShareUi = NULL;
}
- delete mSendKeyListModel;
- mSendKeyListModel = NULL;
-
delete mPresenceListener;
mPresenceListener = NULL;
delete mMaptile;
mMaptile = NULL;
-
- delete mProgressTimer;
- mProgressTimer = NULL;
-
+
//delete maptile label memory
for ( int index = 0; index < mMaptileLabelList.count(); index++ )
{
@@ -188,6 +197,9 @@
mMaptileLabelList[index] = NULL ;
}
}
+
+ delete mSaveManager;
+ mSaveManager = NULL;
}
/*!
@@ -195,15 +207,23 @@
*/
void CntContactCardViewPrivate::showPreviousView()
{
- emit backPressed();
-
+ int returnValue = KCntServicesReturnValueContactNotModified;
//save the contact if avatar has been changed.
QContact contact = contactManager()->contact(mContact->localId());
if ( contact != *mContact && contactManager()->error() == QContactManager::NoError)
{
- contactManager()->saveContact(mContact);
+ disconnect(contactManager(), SIGNAL(contactsRemoved(const QList<QContactLocalId>&)),
+ this, SLOT(contactDeletedFromOtherSource(const QList<QContactLocalId>&)));
+ CntSaveManager::CntSaveResult result = mSaveManager->saveContact(mContact, contactManager());
+
+ if (result != CntSaveManager::ENothingDone)
+ returnValue = KCntServicesReturnValueContactSaved;
+ else
+ returnValue = KCntServicesReturnValueContactNotModified;
}
+ emit backPressed(returnValue);
+
mViewManager->back( mArgs );
}
@@ -218,12 +238,16 @@
/*
Activates a default view and setup name label texts
*/
-void CntContactCardViewPrivate::activate(CntAbstractViewManager* aMgr, const CntViewParameters aArgs)
+void CntContactCardViewPrivate::activate(const CntViewParameters aArgs)
{
CNT_ENTRY
-
- mViewManager = aMgr;
mArgs = aArgs;
+
+ mViewManager = &mEngine->viewManager();
+ mThumbnailManager = &mEngine->thumbnailManager();
+ connect(mThumbnailManager, SIGNAL(thumbnailReady(QPixmap, void*, int, int)),
+ this, SLOT(thumbnailReady(QPixmap, void*, int, int)));
+
HbMainWindow* window = mView->mainWindow();
if (window)
@@ -233,11 +257,19 @@
setOrientation(window->orientation());
}
+
+ qApp->installEventFilter(this);
QContact contact = aArgs.value(ESelectedContact).value<QContact>();
mContact = new QContact( contact );
+
//my card
- bool myCard = mContact->localId() == contactManager()->selfContactId();
+ mMyCardId = contactManager()->selfContactId();
+
+ populateHeadingItem();
+ populateListItems();
+
+ bool myCard = mContact->localId() == mMyCardId;
if (myCard)
{
mView->menu()->clearActions();
@@ -253,206 +285,7 @@
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"));
- QGraphicsLinearLayout* l = static_cast<QGraphicsLinearLayout*>(c->layout());
- mHeadingItem = static_cast<CntContactCardHeadingItem*>(document()->findWidget(QString("cnt_contactcard_heading")));
- mHeadingItem->setDetails(mContact);
-
- 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);
- connect(mPresenceListener, SIGNAL(fullPresenceUpdated(bool)), mHeadingItem, SLOT(setOnlineStatus(bool)));
- connect(mPresenceListener, SIGNAL(accountPresenceUpdated(const QString&, bool)),
- this, SLOT(updateItemPresence(const QString&, bool)));
- bool online;
- QMap<QString, bool> presences = mPresenceListener->initialPresences(online);
- mHeadingItem->setOnlineStatus(online);
-
-
-
- // avatar
- QList<QContactAvatar> details = mContact->details<QContactAvatar>();
- for (int i = 0;i < details.count();i++)
- {
- if (details.at(i).imageUrl().isValid())
- {
- mAvatar = new QContactAvatar(details.at(i));
- mThumbnailManager->getThumbnail(mAvatar->imageUrl().toString());
- break;
- }
- }
-
- // data
- mDataContainer = new CntContactCardDataContainer(
- mContact, NULL, myCard, mMaptile, mView->mainWindow()->orientation() );
-
- // scroll area + container widget
- mScrollArea = static_cast<HbScrollArea*>(document()->findWidget(QString("scrollArea")));
- mScrollArea->setScrollDirections(Qt::Vertical);
- mContainerWidget = new QGraphicsWidget(mScrollArea);
- mScrollArea->setContentWidget(mContainerWidget);
-
- mContainerLayout = new QGraphicsLinearLayout(Qt::Vertical);
- mContainerLayout->setContentsMargins(0, 0, 0, 0);
- mContainerLayout->setSpacing(0);
- mContainerLayout->setSizePolicy(QSizePolicy::MinimumExpanding, QSizePolicy::MinimumExpanding);
-
- mContainerWidget->setLayout(mContainerLayout);
-
- for (int index = 0; index < mDataContainer->itemCount(); index++)
- {
- CntContactCardDataItem* dataItem = mDataContainer->dataItem(index);
- int pos = dataItem->position();
-
- // communication methods
- if (pos < CntContactCardDataItem::ESeparator && dataItem->isFocusable())
- {
- CntContactCardDetailItem* item = new CntContactCardDetailItem(index, mContainerWidget);
-
- connect(item, SIGNAL(clicked()), this, SLOT(onItemActivated()));
-
- 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"));
- mPreferredItems.insert(dataItem->action(), item);
- }
-
- if (dataItem->detail().definitionName() == QContactOnlineAccount::DefinitionName)
- {
- for (int i = 0;i < presences.keys().count();i++)
- {
- QString fullAccount = presences.keys().at(i);
- QContactOnlineAccount account = dataItem->detail();
- QString currentFullAccount = account.serviceProvider() + ':' + account.accountUri();
- if (fullAccount == currentFullAccount)
- {
- if (presences.values().at(i))
- {
- dataItem->setSecondaryIcon(HbIcon("qtg_small_online"));
- }
- mPresenceItems.insert(fullAccount, item);
- break;
- }
- }
- }
-
- item->setDetails(dataItem);
- mContainerLayout->addItem(item);
- }
-
- // separator
- else if (pos == CntContactCardDataItem::ESeparator)
- {
- HbFrameItem* frameItem = new HbFrameItem(QString("qtg_fr_list_separator"), HbFrameDrawer::NinePieces);
- HbLabel* label = static_cast<HbLabel*>(document()->findWidget(QString("separator")));
- label->setPlainText(dataItem->titleText());
- label->setBackgroundItem(frameItem);
- mContainerLayout->addItem(label);
- }
-
- // details
- else
- {
- //map support (image only)
- if (pos >= CntContactCardDataItem::EAddress && pos <= CntContactCardDataItem::EAddressWork && !dataItem->icon().isNull())
- {
- int addressType = CntMapTileService::AddressPreference;
-
- if( pos == CntContactCardDataItem::EAddressHome )
- {
- addressType = CntMapTileService::AddressHome;
- }
- else if( pos == CntContactCardDataItem::EAddressWork )
- {
- addressType = CntMapTileService::AddressWork;
- }
-
- HbLabel* maptileLabel = loadMaptileLabel( addressType );
- setMaptileLabel( maptileLabel, dataItem->icon() );
- mContainerLayout->addItem( maptileLabel );
- mMaptileLabelList.insert( addressType, maptileLabel );
- }
- //other details
- else
- {
- CntContactCardDetailItem* item = new CntContactCardDetailItem(index, mContainerWidget, false);
- //To check whether maptile status icon is set with the address
- if( ( dataItem->titleText() == hbTrId("txt_phob_formlabel_address") ||
- dataItem->titleText() == hbTrId("txt_phob_formlabel_address_home")||
- dataItem->titleText() == hbTrId("txt_phob_formlabel_address_work") ) &&
- dataItem->secondaryIcon().iconName() == QString(CNT_MAPTILE_INPROGRESS_ICON) )
-
- {
- //Information for displaying maptile fetching progress bar.
- //Memory will be deleted from the queue.
- CntContactCardMapTileDetail* detail = new CntContactCardMapTileDetail;
- if( detail )
- {
- detail->mContactId = mContact->localId();
-
- if( dataItem->titleText() == hbTrId("txt_phob_formlabel_address") )
- {
- detail->mAddressType = CntMapTileService::AddressPreference;
- }
- else if ( dataItem->titleText() == hbTrId("txt_phob_formlabel_address_home") )
- {
- detail->mAddressType = CntMapTileService::AddressHome;
- }
- else if( dataItem->titleText() == hbTrId("txt_phob_formlabel_address_work") )
- {
- detail->mAddressType = CntMapTileService::AddressWork;
- }
-
- detail->mProgressCount = 0;
- detail->mDetailItem = item;
- detail->maptileStatus = CNT_UNKNOWN_MAPTILE_STATUS;
- mAddressList.append( detail );
- }
-
- //Update the spinning indicator
- updateSpinningIndicator();
-
- }
- item->setDetails(dataItem);
- mContainerLayout->addItem(item);
- }
- }
- }
-
- if (!myCard)
- {
- bool setAsFavorite( false );
- QContactLocalId favouriteGroupId = CntFavourite::favouriteGroupId( contactManager() );
- if( favouriteGroupId != 0 )
- {
- setAsFavorite = CntFavourite::isMemberOfFavouriteGroup( contactManager(), mContact );
- mHeadingItem->setFavoriteStatus( setAsFavorite ); // if contact is part of favourites group
- }
- 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);
@@ -479,6 +312,237 @@
CNT_EXIT
}
+void CntContactCardViewPrivate::populateHeadingItem()
+{
+ Q_ASSERT(mHeadingItem != NULL && mContact != NULL);
+
+ mHeadingItem->setDetails(mContact);
+
+ bool myCard = mContact->localId() == mMyCardId;
+
+ if (!mIsTemporary)
+ {
+ connect(mHeadingItem, SIGNAL(passLongPressed(const QPointF&)), this, SLOT(drawMenu(const QPointF&)), Qt::UniqueConnection);
+ connect(mHeadingItem, SIGNAL(passShortPressed(const QPointF&)), this, SLOT(doChangeImage()), Qt::UniqueConnection);
+ connect(mImageLabel, SIGNAL(iconClicked()), this, SLOT(doChangeImage()), Qt::UniqueConnection);
+ connect(mImageLabel, SIGNAL(iconLongPressed(const QPointF&)), this, SLOT(drawMenu(const QPointF&)), Qt::UniqueConnection);
+ }
+ else
+ {
+ mHeadingItem->ungrabGesture(Qt::TapGesture);
+ mImageLabel->ungrabGesture(Qt::TapGesture);
+ }
+
+
+ bool online;
+ mInitiialPrecenceData = mPresenceListener->initialPresences(*mContact, online);
+ mHeadingItem->setOnlineStatus(online);
+
+ if (!myCard)
+ {
+ bool setAsFavorite( false );
+ setAsFavorite = CntFavourite::isMemberOfFavouriteGroup( contactManager(), mContact );
+ mHeadingItem->setFavoriteStatus( setAsFavorite ); // if contact is part of favourites group
+ static_cast<HbAction *>(document()->findObject("cnt:setasfavorite"))->setVisible( !setAsFavorite );
+ static_cast<HbAction *>(document()->findObject("cnt:removefromfavorite"))->setVisible( setAsFavorite );
+ }
+
+ // avatar
+ QList<QContactAvatar> details = mContact->details<QContactAvatar>();
+ for (int i = 0;i < details.count();i++)
+ {
+ if (details.at(i).imageUrl().isValid())
+ {
+ if (!mAvatar)
+ {
+ mAvatar = new QContactAvatar(details.at(i));
+ mThumbnailManager->getThumbnail(ThumbnailManager::ThumbnailLarge, mAvatar->imageUrl().toString());
+ }
+ else if (*mAvatar != details.at(i))
+ {
+ delete mAvatar;
+ mAvatar = new QContactAvatar(details.at(i));
+ mThumbnailManager->getThumbnail(ThumbnailManager::ThumbnailLarge, mAvatar->imageUrl().toString());
+ }
+ break;
+ }
+ }
+
+}
+
+void CntContactCardViewPrivate::populateListItems()
+{
+ Q_ASSERT(mContact != NULL && mScrollArea != NULL);
+
+ // data container
+ if (!mDataContainer) {
+ mDataContainer = new CntContactCardDataContainer(
+ mMaptile,
+ mEngine->extensionManager(),
+ mView->mainWindow()->orientation() );
+ }
+
+ // fill the data container with contact details
+ mDataContainer->setContactData(mContact);
+
+ // scroll area + container widget
+ QGraphicsWidget* containerWidget = mScrollArea->contentWidget();
+ if (!containerWidget)
+ {
+ // initialize
+ mScrollArea->setScrollDirections(Qt::Vertical);
+
+ containerWidget = new QGraphicsWidget();
+ mScrollArea->setContentWidget(containerWidget); // takes ownership.
+
+ mContainerLayout = new QGraphicsLinearLayout(Qt::Vertical);
+ mContainerLayout->setContentsMargins(0, 0, 0, 0);
+ mContainerLayout->setSpacing(0);
+ mContainerLayout->setSizePolicy(QSizePolicy::MinimumExpanding, QSizePolicy::MinimumExpanding);
+
+ containerWidget->setLayout(mContainerLayout); // takes ownership.
+ } else {
+ // Already initialized
+ Q_ASSERT(mContainerLayout != NULL);
+
+ // Clear the container
+ int count = mContainerLayout->count();
+ for (int i=0; i<count; i++)
+ {
+ // do not delete items. They will be deleted automatically
+ mContainerLayout->removeAt(i);
+ }
+ }
+
+ // Delete all the detail pointers if any
+ qDeleteAll(mDetailPtrs);
+ mDetailPtrs.clear();
+ for(int index = 0; index < mDataContainer->itemCount(); index++)
+ {
+ CntContactCardDataItem* dataItem = mDataContainer->dataItem(index);
+ int pos = dataItem->position();
+
+ // communication methods
+ if (pos < CntContactCardDataItem::ESeparator && dataItem->isFocusable())
+ {
+ CntContactCardDetailItem* item = new CntContactCardDetailItem(index, containerWidget);
+ mDetailPtrs.append(item);
+
+ connect(item, SIGNAL(clicked()), this, SLOT(onItemActivated()));
+
+ 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"));
+ mPreferredItems.insert(dataItem->action(), item);
+ }
+
+ if (dataItem->detail().definitionName() == QContactOnlineAccount::DefinitionName)
+ {
+ for (int i = 0;i < mInitiialPrecenceData.keys().count();i++)
+ {
+ QString fullAccount = mInitiialPrecenceData.keys().at(i);
+ QContactOnlineAccount account = dataItem->detail();
+ QString currentFullAccount = account.serviceProvider() + ':' + account.accountUri();
+ if (fullAccount == currentFullAccount)
+ {
+ if (mInitiialPrecenceData.values().at(i))
+ {
+ dataItem->setSecondaryIcon(HbIcon("qtg_small_online"));
+ }
+ mPresenceItems.insert(fullAccount, item);
+ break;
+ }
+ }
+ }
+
+ item->setDetails(dataItem);
+ mContainerLayout->addItem(item);
+ }
+
+ // separator
+ else if (pos == CntContactCardDataItem::ESeparator)
+ {
+ HbFrameItem* frameItem = new HbFrameItem(QString("qtg_fr_list_separator"), HbFrameDrawer::NinePieces);
+ HbLabel* label = static_cast<HbLabel*>(document()->findWidget(QString("separator")));
+ label->setPlainText(dataItem->titleText());
+ label->setBackgroundItem(frameItem); // takes ownership
+ mContainerLayout->addItem(label);
+ }
+
+ // details
+ else
+ {
+ //map support (image only)
+ if (pos >= CntContactCardDataItem::EAddress && pos <= CntContactCardDataItem::EAddressWork && !dataItem->icon().isNull())
+ {
+ int addressType = MapTileService::AddressPreference;
+
+ if( pos == CntContactCardDataItem::EAddressHome )
+ {
+ addressType = MapTileService::AddressHome;
+ }
+ else if( pos == CntContactCardDataItem::EAddressWork )
+ {
+ addressType = MapTileService::AddressWork;
+ }
+
+ HbLabel* maptileLabel = loadMaptileLabel( addressType );
+ setMaptileLabel( maptileLabel, dataItem->icon() );
+ mContainerLayout->addItem( maptileLabel );
+ mMaptileLabelList.insert( addressType, maptileLabel );
+ }
+ //other details
+ else
+ {
+ CntContactCardDetailItem* item = new CntContactCardDetailItem(index, containerWidget, false);
+ mDetailPtrs.append(item);
+
+ //To check whether maptile status icon is set with the address
+ if( ( dataItem->titleText() == hbTrId("txt_phob_formlabel_address") ||
+ dataItem->titleText() == hbTrId("txt_phob_formlabel_address_home")||
+ dataItem->titleText() == hbTrId("txt_phob_formlabel_address_work") ) &&
+ dataItem->secondaryIcon().iconName() == QString(CNT_MAPTILE_INPROGRESS_ICON) )
+
+ {
+ //Information for displaying maptile fetching progress bar.
+ //Memory will be deleted from the queue.
+ CntContactCardMapTileDetail* detail = new CntContactCardMapTileDetail;
+ detail->mContactId = mContact->localId();
+
+ if( dataItem->titleText() == hbTrId("txt_phob_formlabel_address") )
+ {
+ detail->mAddressType = MapTileService::AddressPreference;
+ }
+ else if ( dataItem->titleText() == hbTrId("txt_phob_formlabel_address_home") )
+ {
+ detail->mAddressType = MapTileService::AddressHome;
+ }
+ else if( dataItem->titleText() == hbTrId("txt_phob_formlabel_address_work") )
+ {
+ detail->mAddressType = MapTileService::AddressWork;
+ }
+
+ detail->mProgressCount = 0;
+ detail->mDetailItem = item;
+ detail->maptileStatus = CNT_UNKNOWN_MAPTILE_STATUS;
+ mAddressList.append( detail );
+
+ //Update the spinning indicator
+ updateSpinningIndicator();
+
+ }
+ item->setDetails(dataItem);
+ mContainerLayout->addItem(item);
+ }
+ }
+ }
+}
+
/*
Connects the action with a slot and also sets the view as the parent for the action.
*/
@@ -511,20 +575,20 @@
HbIcon icon(iconName);
mAddressList[index]->mDetailItem->setSecondaryIconItem( icon );
mAddressList[index]->mDetailItem->update();
- mProgressTimer->start(CNT_MAPTILE_PROGRESS_TIMER);
+ mProgressTimer->start(CNT_MAPTILE_PROGRESS_TIMER);
index++;
}
else
{
//Maptile status received. Show the maptile image if available
- CntMapTileService::ContactAddressType sourceAddressType =
- static_cast <CntMapTileService::ContactAddressType>( mAddressList[index]->mAddressType );
+ MapTileService::AddressType sourceAddressType =
+ static_cast <MapTileService::AddressType>( mAddressList[index]->mAddressType );
QContactLocalId contactId = mContact->localId();
- if( mAddressList[index]->mDetailItem != NULL )
+ if( mAddressList[index] != NULL )
{
- if( mAddressList[index]->maptileStatus == CntMapTileService::MapTileFetchingCompleted )
+ if( mAddressList[index]->maptileStatus == MapTileService::MapTileFetchingCompleted )
{
//Read the maptile path and update the image
@@ -626,8 +690,8 @@
//address
QString contextHome(QContactAddress::ContextHome.operator QString());
QString contextWork(QContactAddress::ContextWork.operator QString());
- CntMapTileService::ContactAddressType sourceAddressType
- = CntMapTileService::AddressPreference;
+ MapTileService::AddressType sourceAddressType
+ = MapTileService::AddressPreference;
QString imagePath;
@@ -636,12 +700,12 @@
if ( !addressDetails[i].contexts().isEmpty() &&
addressDetails[i].contexts().at(0) == contextHome )
{
- sourceAddressType = CntMapTileService::AddressHome;
+ sourceAddressType = MapTileService::AddressHome;
}
else if ( !addressDetails[i].contexts().isEmpty() &&
addressDetails[i].contexts().at(0) == contextWork )
{
- sourceAddressType = CntMapTileService::AddressWork;
+ sourceAddressType = MapTileService::AddressWork;
}
int status = mMaptile->getMapTileImage(
@@ -671,16 +735,11 @@
mapLabel->clear();
mapLabel->setIcon( icon );
- int width = icon.width();
- int height = icon.height();
-
- //HbLabel setPreferredSize is not working properly,
- //so added minimum , maximum size to fix the issue
- mapLabel->setPreferredSize(QSizeF(width,height));
- mapLabel->setMinimumSize(QSizeF(width, height));
- mapLabel->setMaximumSize(QSizeF(width, height));
- mapLabel->setSizePolicy(QSizePolicy( QSizePolicy::Fixed,
- QSizePolicy::Fixed));
+ qreal leftMarginSize;
+ mapLabel->getContentsMargins( &leftMarginSize, 0 , 0 , 0 );
+ mapLabel->setPreferredSize(
+ QSizeF(icon.width() + leftMarginSize, icon.height()));
+
}
/*
@@ -688,17 +747,17 @@
*/
HbLabel* CntContactCardViewPrivate::loadMaptileLabel( int addressType )
{
- HbLabel* maptileLabel = NULL ;
+ HbLabel* maptileLabel = NULL;
- if( addressType == CntMapTileService::AddressPreference )
+ if( addressType == MapTileService::AddressPreference )
{
maptileLabel = static_cast<HbLabel*>(document()->findWidget(QString("maptilePreferenceWidget")));
}
- else if( addressType == CntMapTileService::AddressHome )
+ else if( addressType == MapTileService::AddressHome )
{
maptileLabel = static_cast<HbLabel*>(document()->findWidget(QString("maptileHomeWidget")));
}
- else if( addressType == CntMapTileService::AddressWork )
+ else if( addressType == MapTileService::AddressWork )
{
maptileLabel = static_cast<HbLabel*>(document()->findWidget(QString("maptileWorkWidget")));
}
@@ -845,8 +904,12 @@
disconnect(contactManager(), SIGNAL(contactsRemoved(const QList<QContactLocalId>&)),
this, SLOT(contactDeletedFromOtherSource(const QList<QContactLocalId>&)));
- contactManager()->removeContact(mContact->localId());
- emit backPressed();
+ bool success = contactManager()->removeContact(mContact->localId());
+
+ int returnValue = success ? KCntServicesReturnValueContactDeleted : KCntServicesReturnValueContactNotModified;
+
+ emit backPressed(returnValue);
+
mViewManager->back( mArgs, true );
}
}
@@ -856,11 +919,17 @@
*/
void CntContactCardViewPrivate::viewHistory()
{
+ // stop the progress timer
+ if ( mProgressTimer && mProgressTimer->isActive())
+ {
+ mProgressTimer->stop();
+ }
+
QVariant var;
var.setValue(*mContact);
mArgs.insert(ESelectedContact, var);
mArgs.insert(EViewId, historyView);
-
+
mViewManager->changeView( mArgs );
}
@@ -869,7 +938,6 @@
*/
void CntContactCardViewPrivate::deactivate()
{
-
}
/*!
@@ -944,18 +1012,28 @@
{
CntContactCardDetailItem *item = qobject_cast<CntContactCardDetailItem*>(sender());
int index = item->index();
+ CntContactCardDataItem& dataItem = *mDataContainer->dataItem(index);
QString action = mDataContainer->dataItem(index)->action();
- // Check if action is internal
- QList<QContactActionDescriptor> actionDescriptors = QContactAction::actionDescriptors(action, "symbian", 1);
- if (0 < actionDescriptors.count())
+ CntUiContactCardExtension* extension = dataItem.contactCardExtension();
+ if (!extension)
{
- // These actions are considered internal(vendor=symbian and version=1)
- executeAction(*mContact, mDataContainer->dataItem(index)->detail(), action, item);
- }
- else
- {
- //Handle dynamic actions differently
- executeDynamicAction(*mContact, mDataContainer->dataItem(index)->detail(), mDataContainer->dataItem(index)->actionDescriptor());
+ //It's not an extension action.
+ // Check if action is internal
+ QList<QContactActionDescriptor> actionDescriptors = QContactAction::actionDescriptors(action, "symbian", 1);
+ if (0 < actionDescriptors.count())
+ {
+ // These actions are considered internal(vendor=symbian and version=1)
+ executeAction(*mContact, dataItem.detail(), action, item);
+ }
+ else
+ {
+ //Handle dynamic actions differently
+ executeDynamicAction(*mContact, dataItem.detail(), dataItem.actionDescriptor());
+ }
+ } else {
+ // The action is from an extension
+ int indexWithinPlugin = dataItem.contactCardExtensionActionIndex();
+ extension->handleShortPress(indexWithinPlugin);
}
}
@@ -1107,7 +1185,7 @@
preferredAction = menu->addAction(hbTrId("txt_phob_menu_set_as_default_email"));
}
- if (mContact->isPreferredDetail(action, detail))
+ if (mContact->isPreferredDetail(action, detail) && preferredAction)
{
preferredAction->setEnabled(false);
}
@@ -1329,7 +1407,10 @@
mImageLabel->clear();
mImageLabel->setAvatarIcon(HbIcon("qtg_large_add_contact_picture"));
mHeadingItem->setIcon(HbIcon("qtg_large_add_contact_picture"));
- contactManager()->saveContact(mContact);
+
+ disconnect(contactManager(), SIGNAL(contactsRemoved(const QList<QContactLocalId>&)),
+ this, SLOT(contactDeletedFromOtherSource(const QList<QContactLocalId>&)));
+ CntSaveManager::CntSaveResult result = mSaveManager->saveContact(mContact, contactManager());
}
}
}
@@ -1367,7 +1448,7 @@
*/
QContactManager* CntContactCardViewPrivate::contactManager()
{
- return mViewManager->contactManager(SYMBIAN_BACKEND);
+ return &mEngine->contactManager(SYMBIAN_BACKEND);
}
bool CntContactCardViewPrivate::eventFilter(QObject *obj, QEvent *event)
@@ -1380,6 +1461,42 @@
return sendKeyPressed();
}
}
+
+ // Update the contact only when the application is in the backgound
+ // This avoids flickering when the contact card is in focus
+ if ( event->type() == QEvent::ApplicationActivate )
+ {
+ CNT_LOG_ARGS("app activated")
+
+ disconnect(contactManager(), SIGNAL(contactsChanged(const QList<QContactLocalId>&)),
+ this, SLOT(contactUpdatedFromOtherSource(const QList<QContactLocalId>&)));
+
+ QContact c = contactManager()->contact(mContact->localId());
+
+ QContactTimestamp latestTimeStamp = c.detail<QContactTimestamp>();
+ QContactTimestamp localTimeStamp = mContact->detail<QContactTimestamp>();
+
+ // Once we regain focus check if the contact was modified in the background
+ if (contactManager()->error() == QContactManager::NoError
+ && latestTimeStamp.lastModified() > localTimeStamp.lastModified())
+ {
+ if (mContact)
+ delete mContact;
+ mContact = new QContact(c);
+
+ populateHeadingItem();
+ populateListItems();
+ }
+ }
+
+ if ( event->type() == QEvent::ApplicationDeactivate )
+ {
+ CNT_LOG_ARGS("app deactivated")
+
+ connect(contactManager(), SIGNAL(contactsChanged(const QList<QContactLocalId>&)),
+ this, SLOT(contactUpdatedFromOtherSource(const QList<QContactLocalId>&)), Qt::UniqueConnection);
+ }
+
return false;
}
@@ -1450,4 +1567,21 @@
}
}
+void CntContactCardViewPrivate::contactUpdatedFromOtherSource(const QList<QContactLocalId>& contactIds)
+{
+ if ( contactIds.contains(mContact->localId()) )
+ {
+ QContact c = contactManager()->contact(mContact->localId());
+ if (contactManager()->error() == QContactManager::NoError)
+ {
+ if (mContact)
+ delete mContact;
+ mContact = new QContact(c);
+
+ populateHeadingItem();
+ populateListItems();
+ }
+ }
+}
+
// end of file
--- a/phonebookui/pbkcommonui/src/cntdefaultviewfactory.cpp Wed Aug 18 09:39:00 2010 +0300
+++ b/phonebookui/pbkcommonui/src/cntdefaultviewfactory.cpp Thu Sep 02 20:16:15 2010 +0300
@@ -38,16 +38,14 @@
#include "cntsettingsview.h"
#include "cntextensionmanager.h"
-CntDefaultViewFactory::CntDefaultViewFactory():
- mExtensionManager(NULL)
+CntDefaultViewFactory::CntDefaultViewFactory( CntExtensionManager& aExt ):
+ mExtensionManager( aExt )
{
- mExtensionManager = new CntExtensionManager();
HbStyleLoader::registerFilePath( ":/style" );
}
CntDefaultViewFactory::~CntDefaultViewFactory()
{
- delete mExtensionManager;
}
CntAbstractView* CntDefaultViewFactory::createView( int aId )
@@ -55,13 +53,13 @@
switch ( aId )
{
case namesView:
- return new CntNamesView(*mExtensionManager);
+ return new CntNamesView();
case contactCardView:
return new CntContactCardView();
case myCardView:
return new CntMyCardView();
case collectionView:
- return new CntCollectionView(*mExtensionManager);
+ return new CntCollectionView();
case collectionFavoritesView:
return new CntFavoritesView();
case favoritesMemberView:
@@ -103,9 +101,9 @@
CntAbstractView* CntDefaultViewFactory::createPluginView( int aId )
{
- for(int i = 0;i < mExtensionManager->pluginCount();i++)
+ for(int i = 0;i < mExtensionManager.pluginCount();i++)
{
- CntViewSupplier* viewSupplier = mExtensionManager->pluginAt(i)->viewSupplier();
+ CntViewSupplier* viewSupplier = mExtensionManager.pluginAt(i)->viewSupplier();
if (viewSupplier)
{
for(int j = 0;j < viewSupplier->viewCount();j++)
--- a/phonebookui/pbkcommonui/src/cntdefaultviewmanager.cpp Wed Aug 18 09:39:00 2010 +0300
+++ b/phonebookui/pbkcommonui/src/cntdefaultviewmanager.cpp Thu Sep 02 20:16:15 2010 +0300
@@ -26,6 +26,7 @@
#include "cntsimutility.h"
#include "cntdebug.h"
#include <QApplication>
+#include "cntdefaultengine.h"
CntDefaultViewManager::CntDefaultViewManager( HbMainWindow* aWindow ) : QObject(),
mFactory(NULL),
@@ -33,12 +34,14 @@
mOldView(NULL),
mNavigator(NULL),
mMainWindow( aWindow ),
- mSimUtility(NULL)
+ mSimUtility(NULL),
+ mEngine(NULL)
{
CNT_ENTRY
- setViewFactory(new CntDefaultViewFactory());
- setViewNavigator(new CntViewNavigator(this));
+ mEngine = new CntDefaultEngine( *this );
+ setViewFactory( new CntDefaultViewFactory( mEngine->extensionManager()) );
+ setViewNavigator( new CntViewNavigator(this) );
int error = -1;
mSimUtility = new CntSimUtility(CntSimUtility::AdnStore, error);
@@ -51,12 +54,18 @@
CNT_EXIT
}
+CntAbstractEngine& CntDefaultViewManager::engine()
+{
+ return *mEngine;
+}
+
CntDefaultViewManager::~CntDefaultViewManager()
{
CNT_ENTRY
cleanup();
+ delete mEngine;
CNT_EXIT
}
@@ -161,7 +170,7 @@
CNT_EXIT
}
-
+/*
QContactManager* CntDefaultViewManager::contactManager( const QString& aType )
{
CNT_ENTRY
@@ -184,6 +193,7 @@
CNT_EXIT
return manager;
}
+*/
void CntDefaultViewManager::removeCurrentView()
{
@@ -241,6 +251,8 @@
else
{
nextView = mFactory->createView( id );
+ nextView->setEngine( *mEngine );
+
if (nextView->isDefault())
{
mDefaults.insert(id, nextView);
@@ -251,7 +263,7 @@
mCurrent = nextView;
mMainWindow->addView(mCurrent->view());
mMainWindow->setCurrentView(mCurrent->view(), true, flags);
- mCurrent->activate(this, aArgs);
+ mCurrent->activate(aArgs);
removeCurrentView();
}
--- a/phonebookui/pbkcommonui/src/cntdetaileditor.cpp Wed Aug 18 09:39:00 2010 +0300
+++ b/phonebookui/pbkcommonui/src/cntdetaileditor.cpp Thu Sep 02 20:16:15 2010 +0300
@@ -102,9 +102,9 @@
connect( insert, SIGNAL(triggered()), this, SLOT(insertField()) );
}
-void CntDetailEditor::activate( CntAbstractViewManager* aMgr, const CntViewParameters aArgs )
+void CntDetailEditor::activate( const CntViewParameters aArgs )
{
- mViewManager = aMgr;
+ mViewManager = &mEngine->viewManager();
mArgs = aArgs; //don't loose the params while swiching between editview and editorviews.
mCancel = static_cast<HbAction*>(document()->findObject("cnt:discardchanges"));
@@ -128,15 +128,15 @@
connect( mDataForm, SIGNAL(itemShown(const QModelIndex&)), this, SLOT(handleItemShown(const QModelIndex&)) );
}
- QContactManager* cm = mViewManager->contactManager(SYMBIAN_BACKEND);
- connect(cm, SIGNAL(contactsRemoved(const QList<QContactLocalId>&)),
+ QContactManager& cm = mEngine->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();
QContactLocalId localId = selectedContact.localId();
- QContactLocalId selfContactId = mViewManager->contactManager(SYMBIAN_BACKEND)->selfContactId();
+ QContactLocalId selfContactId = cm.selfContactId();
bool isMyCard = ( localId == selfContactId && localId != 0 ) || !myCard.isEmpty();
if (isMyCard)
@@ -159,6 +159,7 @@
{
mDataFormModel->insertDetailField();
}
+
mDataForm->setVerticalScrollBarPolicy(HbScrollArea::ScrollBarAsNeeded);
mDataForm->setScrollingStyle(HbScrollArea::PanWithFollowOn);
mDataForm->verticalScrollBar()->setInteractive(true);
@@ -166,13 +167,12 @@
void CntDetailEditor::deactivate()
{
+ QContactManager& mgr = mEngine->contactManager(SYMBIAN_BACKEND);
if( mId == groupEditorView) {
- QContactManager* mgr = mViewManager->contactManager(SYMBIAN_BACKEND);
- mgr->saveContact( mDataFormModel->contact() );
+ mgr.saveContact( mDataFormModel->contact() );
}
- QContactManager *cm = mViewManager->contactManager(SYMBIAN_BACKEND);
- disconnect(cm, SIGNAL(contactsRemoved(const QList<QContactLocalId>&)),
+ disconnect(&mgr, SIGNAL(contactsRemoved(const QList<QContactLocalId>&)),
this, SLOT(contactDeletedFromOtherSource(const QList<QContactLocalId>&)));
}
@@ -287,15 +287,15 @@
void CntDetailEditor::saveContact()
{
mDataFormModel->saveContactDetails();
-
- QString name = mViewManager->contactManager(SYMBIAN_BACKEND)->synthesizedContactDisplayLabel(*mDataFormModel->contact());
+ QContactManager& mgr = mEngine->contactManager( SYMBIAN_BACKEND );
+ QString name = mgr.synthesizedContactDisplayLabel(*mDataFormModel->contact());
if (name.isEmpty())
{
name = hbTrId("txt_phob_list_unnamed");
}
- CntSaveManager::CntSaveResult result = mSaveManager->saveContact(mDataFormModel->contact(), mViewManager->contactManager(SYMBIAN_BACKEND));
+ CntSaveManager::CntSaveResult result = mSaveManager->saveContact(mDataFormModel->contact(), &mgr);
if (mId != groupEditorView)
{
--- a/phonebookui/pbkcommonui/src/cntdetailorderinghelper.cpp Wed Aug 18 09:39:00 2010 +0300
+++ b/phonebookui/pbkcommonui/src/cntdetailorderinghelper.cpp Thu Sep 02 20:16:15 2010 +0300
@@ -267,4 +267,55 @@
return orderedSupportedList;
}
+/**
+* Return ordered list of address details
+*
+* @param QContact&, contact
+* @return QList<QContactAddress>, ordered list of address details
+*/
+QList<QContactAddress> CntDetailOrderingHelper::getOrderedAddresses( const QContact& contact )
+{
+ QMap<QString, int> orderMap;
+
+ orderMap.insert("" , EAddress);
+ orderMap.insert(QContactAddress::ContextHome , EAddressHome);
+ orderMap.insert(QContactAddress::ContextWork , EAddressWork);
+
+ QList<QContactAddress> completeList = contact.details<QContactAddress>();
+ QList<QContactAddress> orderedSupportedList;
+
+ foreach ( QContactAddress address, completeList )
+ {
+ QString context = address.contexts().isEmpty() ? QString() : address.contexts().first();
+
+ if ( orderMap.keys().contains(context) )
+ {
+ int position = orderMap.value(context);
+ bool added = false;
+
+ for (int i = 0; i < orderedSupportedList.count(); i++)
+ {
+ QString currentContext = orderedSupportedList.at(i).contexts().isEmpty() ?
+ QString() : orderedSupportedList.at(i).contexts().first();
+
+ int currentPosition = orderMap.value(currentContext);
+
+ if (currentPosition > position)
+ {
+ orderedSupportedList.insert(i, address);
+ added = true;
+ break;
+ }
+ }
+
+ if (!added)
+ {
+ orderedSupportedList.append(address);
+ }
+ }
+ }
+
+ return orderedSupportedList;
+}
+
// EOF
--- a/phonebookui/pbkcommonui/src/cnteditview.cpp Wed Aug 18 09:39:00 2010 +0300
+++ b/phonebookui/pbkcommonui/src/cnteditview.cpp Thu Sep 02 20:16:15 2010 +0300
@@ -17,7 +17,6 @@
#include "cnteditview.h"
#include "cnteditview_p.h"
-#include "cntabstractviewmanager.h"
#include <hbview.h>
#include "cntglobal.h"
@@ -31,7 +30,6 @@
#include <hbgroupbox.h>
#include <hbpushbutton.h>
#include <hbmenu.h>
-#include <thumbnailmanager_qt.h>
CntEditView::CntEditView() : d_ptr(new CntEditViewPrivate())
{
@@ -45,10 +43,10 @@
delete d;
}
-void CntEditView::activate( CntAbstractViewManager* aMgr, const CntViewParameters aArgs )
+void CntEditView::activate( const CntViewParameters aArgs )
{
Q_D(CntEditView);
- d->activate(aMgr,aArgs);
+ d->activate(aArgs);
}
void CntEditView::deactivate()
@@ -71,5 +69,11 @@
int CntEditView::viewId() const
{
return editView;
-}
+}
+
+void CntEditView::setEngine( CntAbstractEngine& aEngine )
+{
+ Q_D( CntEditView );
+ d->mEngine = &aEngine;
+}
// EOF
--- a/phonebookui/pbkcommonui/src/cnteditview_p.cpp Wed Aug 18 09:39:00 2010 +0300
+++ b/phonebookui/pbkcommonui/src/cnteditview_p.cpp Thu Sep 02 20:16:15 2010 +0300
@@ -20,15 +20,17 @@
#include "cntdocumentloader.h"
#include "cntdetailpopup.h"
#include "cnteditviewheadingitem.h"
+#include "cntthumbnailmanager.h"
#include "cntimagelabel.h"
#include "cntsavemanager.h"
+#include <cntabstractengine.h>
#include "cntglobal.h"
#include "cntdebug.h"
#include <qtcontacts.h>
#include <hbdocumentloader.h>
-#include <thumbnailmanager_qt.h>
#include <hbabstractviewitem.h>
+#include <hblistviewitem.h>
#include <hbmessagebox.h>
#include <hbgroupbox.h>
#include <hbmainwindow.h>
@@ -66,12 +68,15 @@
qFatal( "Unable to load %S", CNT_EDIT_XML );
}
mView = static_cast<HbView*>( mDocument->findWidget("view") );
+
mListView = static_cast<HbListView*>( mDocument->findWidget("listView") );
mListView->setLayoutName("editviewlist");
+ mListView->setItemPixmapCacheEnabled(true);
+
HbFrameBackground frame;
frame.setFrameGraphicsName("qtg_fr_list_normal");
frame.setFrameType(HbFrameDrawer::NinePieces);
- mListView->itemPrototypes().first()->setDefaultFrame(frame);
+ mListView->listItemPrototype()->setDefaultFrame( frame );
mHeading = static_cast<CntEditViewHeadingItem*>( mDocument->findWidget("editViewHeading") );
mImageLabel = static_cast<CntImageLabel*>(mDocument->findWidget("editViewImage"));
@@ -120,8 +125,7 @@
delete mMenu;
mMenu = NULL;
}
- delete mThumbnailManager;
- mThumbnailManager = NULL;
+
delete mSaveManager;
mSaveManager = NULL;
}
@@ -140,12 +144,12 @@
}
}
-void CntEditViewPrivate::activate( CntAbstractViewManager* aMgr, const CntViewParameters aArgs )
+void CntEditViewPrivate::activate( const CntViewParameters aArgs )
{
CNT_ENTRY
- mMgr = aMgr;
mArgs = aArgs;
+ mMgr = &mEngine->viewManager();
if ( mView->navigationAction() != mSoftkey)
{
@@ -164,12 +168,12 @@
QVariant contact = aArgs.value( ESelectedContact );
setSelectedContact( contact.value<QContact>() );
- mModel = new CntEditViewListModel( *mContact );
+ mModel = new CntEditViewListModel( *mContact, mEngine->extensionManager() );
mListView->setModel( mModel );
QContactLocalId localId = mContact->localId();
- QContactManager* cm = mMgr->contactManager(SYMBIAN_BACKEND);
- QContactLocalId selfContactId = cm->selfContactId();
+ QContactManager& cm = mEngine->contactManager(SYMBIAN_BACKEND);
+ QContactLocalId selfContactId = cm.selfContactId();
mIsMyCard = ( localId == selfContactId && localId != 0 ) || !myCard.isEmpty();
if (mIsMyCard)
@@ -209,17 +213,13 @@
}
// save and discard disabled if no changes found
- if ( *mContact == cm->contact( mContact->localId()) )
+ if ( *mContact == cm.contact( mContact->localId()) )
{
mDiscard->setEnabled( false );
mSave->setEnabled( false );
}
- mThumbnailManager = new ThumbnailManager(this);
- mThumbnailManager->setMode(ThumbnailManager::Default);
- mThumbnailManager->setQualityPreference(ThumbnailManager::OptimizeForQuality);
- mThumbnailManager->setThumbnailSize(ThumbnailManager::ThumbnailLarge);
-
+ mThumbnailManager = &mEngine->thumbnailManager();
connect( mThumbnailManager, SIGNAL(thumbnailReady(QPixmap, void*, int, int)),
this, SLOT(thumbnailReady(QPixmap, void*, int, int)) );
@@ -301,11 +301,12 @@
void CntEditViewPrivate::handleMenuAction( HbAction* aAction )
{
HbMenu *menu = static_cast<HbMenu*>(sender());
- int row = aAction->data().toInt();
- mIndex = mModel->index(row, 0);
- CntEditViewItem* item = mModel->itemAt( mIndex );
if ( aAction )
{
+ int row = aAction->data().toInt();
+ mIndex = mModel->index(row, 0);
+ CntEditViewItem* item = mModel->itemAt( mIndex );
+
switch ( aAction->property("menu").toInt() )
{
case HbAction::EditRole:
@@ -453,6 +454,8 @@
void CntEditViewPrivate::deleteContact()
{
+ CNT_ENTRY
+
if ( mIsMyCard )
{
HbMessageBox::question(hbTrId("txt_phob_dialog_remove_all_personal_data_from_my_c"), this,
@@ -461,8 +464,8 @@
}
else
{
- QContactManager* cm = mMgr->contactManager( SYMBIAN_BACKEND );
- QString name = cm->synthesizedContactDisplayLabel( *mContact );
+ QContactManager& cm = mEngine->contactManager( SYMBIAN_BACKEND );
+ QString name = cm.synthesizedContactDisplayLabel( *mContact );
if (name.isEmpty())
{
name = hbTrId("txt_phob_list_unnamed");
@@ -471,22 +474,28 @@
HbMessageBox::question(HbParameterLengthLimiter(hbTrId("txt_phob_info_delete_1")).arg(name), this, SLOT(handleDeleteContact(int)),
HbMessageBox::Delete | HbMessageBox::Cancel);
}
+
+ CNT_EXIT
}
void CntEditViewPrivate::handleDeleteContact(int action)
{
+ CNT_ENTRY
+
Q_Q(CntEditView);
if(action == HbMessageBox::Yes || action == HbMessageBox::Delete)
{
- QContactManager* cm = mMgr->contactManager( SYMBIAN_BACKEND );
+ QContactManager& cm = mEngine->contactManager( SYMBIAN_BACKEND );
- disconnect(cm, SIGNAL(contactsRemoved(const QList<QContactLocalId>&)),
+ disconnect(&cm, SIGNAL(contactsRemoved(const QList<QContactLocalId>&)),
this, SLOT(contactDeletedFromOtherSource(const QList<QContactLocalId>&)));
- emit q->contactRemoved(cm->removeContact( mContact->localId() ));
+ emit q->contactRemoved(cm.removeContact( mContact->localId() ));
mMgr->back( mArgs, true );
}
+
+ CNT_EXIT
}
void CntEditViewPrivate::discardChanges()
@@ -496,38 +505,42 @@
emit q->changesDiscarded();
// get a fresh one from backend.
- QContactManager* mgr = mMgr->contactManager(SYMBIAN_BACKEND);
- setSelectedContact( mgr->contact( mContact->localId()) );
+ QContactManager& mgr = mEngine->contactManager(SYMBIAN_BACKEND);
+ setSelectedContact( mgr.contact( mContact->localId()) );
QVariant var;
var.setValue(*mContact);
- CntViewParameters viewParameters;
- viewParameters.insert(ESelectedContact, var);
+ mArgs.insert(ESelectedContact, var);
if ( mArgs.value( EExtraAction ).toString() == CNT_ROOT_ACTION )
{
- mMgr->back( viewParameters, true );
+ mMgr->back( mArgs, true );
}
else
{
- mMgr->back( viewParameters );
+ mMgr->back( mArgs );
}
}
void CntEditViewPrivate::saveChanges()
{
+ CNT_ENTRY
+
Q_Q(CntEditView);
- QString name = mMgr->contactManager(SYMBIAN_BACKEND)->synthesizedContactDisplayLabel(*mContact);
+ QContactManager& mgr = mEngine->contactManager(SYMBIAN_BACKEND);
+ QString name = mgr.synthesizedContactDisplayLabel(*mContact);
if (name.isEmpty())
{
name = hbTrId("txt_phob_list_unnamed");
}
- CntSaveManager::CntSaveResult result = mSaveManager->saveContact(mContact, mMgr->contactManager(SYMBIAN_BACKEND));
+ disconnect(&mgr, SIGNAL(contactsRemoved(const QList<QContactLocalId>&)),
+ this, SLOT(contactDeletedFromOtherSource(const QList<QContactLocalId>&)));
+ CntSaveManager::CntSaveResult result = mSaveManager->saveContact(mContact, &mgr);
QVariant var;
bool backToRoot(false);
@@ -568,6 +581,8 @@
}
mMgr->back( mArgs, backToRoot );
+
+ CNT_EXIT
}
void CntEditViewPrivate::openNameEditor()
@@ -602,7 +617,7 @@
QUrl url = details.at(i).imageUrl();
if ( url.isValid() )
{
- mThumbnailManager->getThumbnail( url.toString() );
+ mThumbnailManager->getThumbnail( ThumbnailManager::ThumbnailLarge, url.toString() );
break;
}
}
@@ -740,6 +755,8 @@
void CntEditViewPrivate::setSelectedContact( QContact aContact )
{
+ CNT_ENTRY
+
if ( mContact )
{
delete mContact;
@@ -747,9 +764,10 @@
}
mContact = new QContact( aContact );
- QContactManager* cm = mMgr->contactManager( SYMBIAN_BACKEND );
- connect(cm, SIGNAL(contactsRemoved(const QList<QContactLocalId>&)),
+ QContactManager& cm = mEngine->contactManager( SYMBIAN_BACKEND );
+ connect(&cm, SIGNAL(contactsRemoved(const QList<QContactLocalId>&)),
this, SLOT(contactDeletedFromOtherSource(const QList<QContactLocalId>&)), Qt::UniqueConnection);
+ CNT_EXIT
}
void CntEditViewPrivate::contactDeletedFromOtherSource(const QList<QContactLocalId>& contactIds)
--- a/phonebookui/pbkcommonui/src/cnteditviewitembuilder.cpp Wed Aug 18 09:39:00 2010 +0300
+++ b/phonebookui/pbkcommonui/src/cnteditviewitembuilder.cpp Thu Sep 02 20:16:15 2010 +0300
@@ -172,7 +172,7 @@
if ( addresses.isEmpty() )
{
QStringList fieldList;
- fieldList << QContactAddress::FieldStreet << QContactAddress::FieldPostcode << QContactAddress::FieldPostOfficeBox;
+ fieldList << QContactAddress::FieldStreet << QContactAddress::FieldPostcode;
fieldList << QContactAddress::FieldLocality << QContactAddress::FieldRegion << QContactAddress::FieldCountry;
QContactAddress addr;
@@ -234,19 +234,23 @@
{
QList<CntEditViewItem*> list;
// Address
- foreach( QContactAddress addr, aContact.details<QContactAddress>() )
+ foreach( QContactAddress addr, CntDetailOrderingHelper::getOrderedAddresses(aContact) )
{
QStringList fieldList;
- fieldList << QContactAddress::FieldStreet << QContactAddress::FieldPostcode << QContactAddress::FieldPostOfficeBox;
+ fieldList << QContactAddress::FieldStreet << QContactAddress::FieldPostcode;
fieldList << QContactAddress::FieldLocality << QContactAddress::FieldRegion << QContactAddress::FieldCountry;
QStringList valueList;
foreach ( QString str, fieldList )
{
- valueList << addr.value( str );
+ QString value = addr.value( str );
+ if ( !value.isEmpty() )
+ {
+ valueList << addr.value( str );
+ }
}
- QString address = valueList.join(" ").trimmed();
+ QString address = valueList.join(", ").trimmed();
if ( !address.isEmpty() )
{
QString context = addr.contexts().isEmpty() ? "" : addr.contexts().first();
@@ -275,11 +279,14 @@
// Company
QContactOrganization org = aContact.detail<QContactOrganization>();
QStringList detailList;
- detailList << org.title();
- detailList << org.name();
- detailList << org.department().join(" ").trimmed();
+ if ( !org.title().isEmpty())
+ detailList << org.title();
+ if ( !org.name().isEmpty())
+ detailList << org.name();
+ if ( !org.department().isEmpty())
+ detailList << org.department().join(", ").trimmed();
- QString company = detailList.join(" ").trimmed();
+ QString company = detailList.join(", ").trimmed();
if ( !company.isEmpty() )
{
QStringList fields;
--- a/phonebookui/pbkcommonui/src/cnteditviewlistmodel.cpp Wed Aug 18 09:39:00 2010 +0300
+++ b/phonebookui/pbkcommonui/src/cnteditviewlistmodel.cpp Thu Sep 02 20:16:15 2010 +0300
@@ -24,8 +24,9 @@
#include <cntviewparams.h>
#include <QDir>
-CntEditViewListModel::CntEditViewListModel( QContact& aContact ) :
-mContact( aContact )
+CntEditViewListModel::CntEditViewListModel( QContact& aContact, CntExtensionManager& aMgr ) :
+mContact( aContact ),
+mManager( aMgr )
{
mLookupTable.insert( EPhonenumber, -1 );
mLookupTable.insert( EEmailAddress, -1 );
@@ -53,7 +54,6 @@
mLookupMap.insert( QContactNote::DefinitionName, ENote);
mLookupMap.insert( QContactFamily::DefinitionName, EFamily);
- mManager = new CntExtensionManager();
mBuilder = new CntEditViewItemBuilder();
mSeparator = new CntEditViewSeparator();
@@ -74,8 +74,6 @@
delete mBuilder;
mBuilder = NULL;
- delete mManager;
- mManager = NULL;
}
void CntEditViewListModel::updateRingtone()
@@ -216,29 +214,32 @@
void CntEditViewListModel::refreshExtensionItems()
{
- beginResetModel();
- // remove all extension items
+ // remove and delete all extension items
for( int i(mItemList.count()-1); i >= 0; i-- )
{
CntEditViewItem* item = mItemList.at( i );
if ( item->data(ERoleItemType) == QVariant(ETypeUiExtension) )
{
+ QModelIndex modelIndex = createIndex(i, 0);
+ beginRemoveRows( modelIndex.parent(), i, i );
mItemList.removeAt(i);
removeItem( EPluginItem );
+
+ delete item;
+ endRemoveRows();
}
}
- // query extension items again
- int count = mManager->pluginCount();
+ // query and reload extension items again
+ int count = mManager.pluginCount();
for ( int i(0); i < count; i++ )
{
- CntUiExtensionFactory* factory = mManager->pluginAt(i);
+ CntUiExtensionFactory* factory = mManager.pluginAt(i);
CntEditViewItemSupplier* supplier = factory->editViewItemSupplier( mContact );
if (supplier)
{
loadPluginItems( supplier );
}
}
- endResetModel();
}
void CntEditViewListModel::allInUseFields( CntViewIdList& aList )
@@ -321,17 +322,15 @@
void CntEditViewListModel::refresh()
{
- beginResetModel();
-
insertItem( EPhonenumber, mBuilder->phoneNumberItems(mContact) );
insertItem( EEmailAddress, mBuilder->emailAddressItems(mContact) );
insertItem( EAddressTemplate, mBuilder->addressItems(mContact) );
insertItem( EUrl, mBuilder->urlItems(mContact) );
- int count = mManager->pluginCount();
+ int count = mManager.pluginCount();
for ( int i(0); i < count; i++ )
{
- CntUiExtensionFactory* factory = mManager->pluginAt(i);
+ CntUiExtensionFactory* factory = mManager.pluginAt(i);
CntEditViewItemSupplier* supplier = factory->editViewItemSupplier( mContact );
if (supplier)
{
@@ -345,8 +344,6 @@
insertDetailItem( ENote, mBuilder->noteDetails(mContact) );
insertDetailItem( EFamily, mBuilder->familyDetails(mContact) );
insertDetailItem( ERingingTone, mBuilder->ringtoneDetails(mContact) );
-
- endResetModel();
}
bool CntEditViewListModel::isEmptyItem( CntEditViewItem* aItem )
@@ -381,7 +378,26 @@
}
if ( !list.isEmpty() )
+ {
+ // the new items will be inserted under already existing plugin items...
+ int index = mLookupTable.value( EPluginItem );
+
+ // ... or under the address template (if no plugins exist)
+ if (index == -1)
+ {
+ index = mLookupTable.value( EAddressTemplate );
+ }
+
+ // ... or as a final choice, under the email address items (if address template doesn't exist)
+ if (index == -1)
+ {
+ index = mLookupTable.value( EEmailAddress );
+ }
+ QModelIndex modelIndex = createIndex(index, 0);
+ beginInsertRows(modelIndex.parent(), index + 1, index + count);
insertItem( EPluginItem, list );
+ endInsertRows();
+ }
}
void CntEditViewListModel::insertDetailItem( KLookupKey aKey, QList<CntEditViewItem*> aList )
--- a/phonebookui/pbkcommonui/src/cntfavoritesmemberview.cpp Wed Aug 18 09:39:00 2010 +0300
+++ b/phonebookui/pbkcommonui/src/cntfavoritesmemberview.cpp Thu Sep 02 20:16:15 2010 +0300
@@ -40,8 +40,7 @@
mContact(NULL),
mModel(NULL),
mFavoriteListView(NULL),
- mViewManager(NULL),
- mFetchView(NULL)
+ mViewManager(NULL)
{
bool ok = false;
mDocumentLoader.load(CNT_FAVORITESMEMBERVIEW_XML, &ok);
@@ -87,13 +86,13 @@
mViewManager->back(viewParameters);
}
-void CntFavoritesMemberView::activate( CntAbstractViewManager* aMgr, const CntViewParameters aArgs )
+void CntFavoritesMemberView::activate( const CntViewParameters aArgs )
{
if (mView->navigationAction() != mSoftkey)
mView->setNavigationAction(mSoftkey);
mContact = new QContact(aArgs.value(ESelectedGroupContact).value<QContact>());
- mViewManager = aMgr;
+ mViewManager = &mEngine->viewManager();
mFavoriteListView = static_cast<HbListView*> (mDocumentLoader.findWidget("listView"));
mFavoriteListView->setUniformItemSizes(true);
@@ -111,10 +110,11 @@
frame.setFrameGraphicsName("qtg_fr_list_normal");
frame.setFrameType(HbFrameDrawer::NinePieces);
- mFavoriteListView->itemPrototypes().first()->setDefaultFrame(frame);
- mFavoriteListView->listItemPrototype()->setStretchingStyle(HbListViewItem::StretchLandscape);
- mFavoriteListView->listItemPrototype()->setGraphicsSize(HbListViewItem::Thumbnail);
-
+ HbListViewItem* prototype = mFavoriteListView->listItemPrototype();
+ prototype->setDefaultFrame( frame );
+ prototype->setStretchingStyle(HbListViewItem::StretchLandscape);
+ prototype->setGraphicsSize(HbListViewItem::Thumbnail);
+
if (!mModel)
{
createModel();
@@ -137,14 +137,6 @@
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"),
@@ -156,17 +148,6 @@
void CntFavoritesMemberView::handleManageFavorites(QSet<QContactLocalId> aIds)
{
-/*
- QSet<QContactLocalId> selectedContacts = mFetchView->getSelectedContacts();
- bool saveChanges = !mFetchView->wasCanceled();
-
- delete mFetchView;
- mFetchView = 0;
-
- if (!saveChanges) {
- return;
- }
-*/
for (int i = 0; i < 2; ++i) {
// first iteration processes added members, second removed members
QSet<QContactLocalId> members = (i == 0 ? aIds - mOriginalGroupMembers
@@ -174,21 +155,21 @@
QList<QContactRelationship> memberships;
foreach (QContactLocalId id, members) {
- QContact contact = getContactManager()->contact(id);
+ QContactId contactId;
+ contactId.setLocalId(id);
QContactRelationship membership;
membership.setRelationshipType(QContactRelationship::HasMember);
membership.setFirst(mContact->id());
- membership.setSecond(contact.id());
+ membership.setSecond(contactId);
memberships.append(membership);
}
if (!memberships.isEmpty()) {
- QMap<int, QContactManager::Error> errors;
if (i == 0) {
- getContactManager()->saveRelationships(&memberships, &errors);
+ getContactManager()->saveRelationships(&memberships, NULL);
}
else {
- getContactManager()->removeRelationships(memberships, &errors);
+ getContactManager()->removeRelationships(memberships, NULL);
}
}
}
@@ -201,7 +182,7 @@
rFilter.setRelatedContactRole(QContactRelationship::First);
rFilter.setRelatedContactId(mContact->id());
- mModel = new CntListModel(mViewManager->contactManager(SYMBIAN_BACKEND), rFilter, false);
+ mModel = new CntListModel( getContactManager(), rFilter, false);
mFavoriteListView->setModel(mModel);
}
@@ -316,7 +297,7 @@
return NULL;
}
- return mViewManager->contactManager(SYMBIAN_BACKEND);
+ return &mEngine->contactManager(SYMBIAN_BACKEND);
}
/*!
--- a/phonebookui/pbkcommonui/src/cntfavoritesview.cpp Wed Aug 18 09:39:00 2010 +0300
+++ b/phonebookui/pbkcommonui/src/cntfavoritesview.cpp Thu Sep 02 20:16:15 2010 +0300
@@ -59,7 +59,7 @@
mContact = NULL;
}
-void CntFavoritesView::activate( CntAbstractViewManager* aMgr, const CntViewParameters aArgs )
+void CntFavoritesView::activate( const CntViewParameters aArgs )
{
if (mView->navigationAction() != mSoftkey)
mView->setNavigationAction(mSoftkey);
@@ -69,10 +69,22 @@
setOrientation(window->orientation());
mContact = new QContact(aArgs.value(ESelectedGroupContact).value<QContact>());
- mViewManager = aMgr;
+ mViewManager = &mEngine->viewManager();
HbPushButton *addButton = static_cast<HbPushButton*>(mDocumentLoader.findWidget(QString("cnt_button_add")));
connect(addButton, SIGNAL(clicked()), this, SLOT(openSelectionPopup()));
+
+ // If no contacts are present, then disable the button
+ QContactDetailFilter filter;
+ filter.setDetailDefinitionName(QContactType::DefinitionName, QContactType::FieldType);
+ filter.setValue(QLatin1String(QContactType::TypeContact));
+
+ QList<QContactLocalId> contactIds = getContactManager()->contactIds(filter);
+ if (contactIds.isEmpty())
+ {
+ addButton->setEnabled(false);
+ }
+
}
void CntFavoritesView::deactivate()
@@ -81,33 +93,19 @@
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>)));
+ QSet<QContactLocalId> ids;
+ popup->setSelectedContacts(ids);
popup->showPopup();
}
void CntFavoritesView::handleMemberSelection( QSet<QContactLocalId> aIds )
{
- //QSet<QContactLocalId> members = mFetchView->getSelectedContacts();
- //bool saveChanges = !mFetchView->wasCanceled();
-
- //delete mFetchView;
- //mFetchView = 0;
-
- //if (!saveChanges || members.count() == 0)
if ( aIds.isEmpty() )
{
showPreviousView();
@@ -116,17 +114,17 @@
{
QList<QContactRelationship> memberships;
foreach (QContactLocalId id, aIds) {
- QContact contact = getContactManager()->contact(id);
+ QContactId contactId;
+ contactId.setLocalId(id);
QContactRelationship membership;
membership.setRelationshipType(QContactRelationship::HasMember);
membership.setFirst(mContact->id());
- membership.setSecond(contact.id());
+ membership.setSecond(contactId);
memberships.append(membership);
}
if (!memberships.isEmpty()) {
- QMap<int, QContactManager::Error> errors;
- getContactManager()->saveRelationships(&memberships, &errors);
+ getContactManager()->saveRelationships(&memberships, NULL);
}
CntViewParameters viewParameters;
@@ -164,7 +162,7 @@
return NULL;
}
- return mViewManager->contactManager(SYMBIAN_BACKEND);
+ return &mEngine->contactManager(SYMBIAN_BACKEND);
}
// end of file
--- a/phonebookui/pbkcommonui/src/cntfetchcontactpopup.cpp Wed Aug 18 09:39:00 2010 +0300
+++ b/phonebookui/pbkcommonui/src/cntfetchcontactpopup.cpp Thu Sep 02 20:16:15 2010 +0300
@@ -31,11 +31,13 @@
#include <hbsearchpanel.h>
#include <hblineedit.h>
#include <hbaction.h>
-#include <hbtextitem.h>
#include <hbstaticvkbhost.h>
+#include <hbstyleloader.h>
#include <QGraphicsLinearLayout>
#include <QCoreApplication>
+#include <QtAlgorithms>
+
const char *CNT_FETCHLIST_XML = ":/xml/contacts_fetchdialog.docml";
CntFetchContactPopup::CntFetchContactPopup( QContactManager& aMgr ) :
@@ -50,6 +52,8 @@
mMarkAll( NULL ),
mDoc( NULL )
{
+ HbStyleLoader::registerFilePath(":/temp/fetchdialog.css");
+
mDoc = new CntDocumentLoader();
bool ok;
@@ -59,10 +63,12 @@
{
qFatal("Unable to read %S", CNT_FETCHLIST_XML );
}
+ mDoc->load( CNT_FETCHLIST_XML, "size_section");
+
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" ));
+ mEmptyView = static_cast<HbLabel*>( mDoc->findWidget("emptyLabel" ));
mListView = static_cast<HbListView*>( mDoc->findWidget("listView") );
mHeading = static_cast<HbLabel*>( mDoc->findWidget("heading") );
@@ -78,10 +84,13 @@
mVirtualKeyboard = new HbStaticVkbHost(editor);
connect(mVirtualKeyboard, SIGNAL(keypadOpened()), this, SLOT(handleKeypadOpen()));
connect(mVirtualKeyboard, SIGNAL(keypadClosed()), this, SLOT(handleKeypadClosed()));
+
+ mMarkAll->setZValue( 2 );
}
CntFetchContactPopup::~CntFetchContactPopup()
{
+ HbStyleLoader::unregisterFilePath(":/temp/fetchdialog.css");
delete mDoc;
delete mModel;
}
@@ -108,12 +117,10 @@
if ( mListView->selectionMode() == HbAbstractItemView::MultiSelection )
{
mIdList.clear();
-
foreach ( QContactLocalId id, aIds )
{
mIdList.append( id );
- QContact contact = mManager.contact(id);
- QModelIndex contactIndex = mModel->indexOfContact(contact);
+ QModelIndex contactIndex = mModel->indexOfContactId(id);
mSelectionModel->select( contactIndex, QItemSelectionModel::Select );
}
}
@@ -123,11 +130,24 @@
void CntFetchContactPopup::showPopup()
{
CNT_ENTRY
+ if ( mListView->selectionMode() == HbAbstractItemView::MultiSelection )
+ {
+ mIds.clear();
+ mIds = mIdList;
+ qSort(mIds.begin(), mIds.end());
+ }
+
+ if ( mPrimaryAction )
+ {
+ mPrimaryAction->setEnabled(false);
+ }
+
+
HbMainWindow* window = mPopup->mainWindow();
if ( window )
{
connect(window, SIGNAL(orientationChanged(Qt::Orientation)),
- this, SLOT(loadLayout(Qt::Orientation)) );
+ this, SLOT(orientationChanged(Qt::Orientation)) );
}
mPopup->open( this, SLOT(dialogDismissed(HbAction*)) );
@@ -137,12 +157,15 @@
void CntFetchContactPopup::handleKeypadOpen()
{
CNT_ENTRY
+ HbListViewItem* prototype = mListView->listItemPrototype();
+ prototype->setTextFormat( Qt::RichText );
+
qreal height = mPopup->size().height() -
mVirtualKeyboard->keyboardArea().height() -
mSearch->size().height();
// in single selection we don't have the "mark all" option
- if ( mMarkAll )
+ if ( mMarkAll->isVisible() )
{
height = height - mMarkAll->size().height();
}
@@ -155,15 +178,14 @@
void CntFetchContactPopup::handleKeypadClosed()
{
CNT_ENTRY
-
- qreal height = mPopup->size().height() - mSearch->size().height();
- if ( mMarkAll )
+ if (mSearch->criteria().isEmpty())
{
- height = height - mMarkAll->size().height();
- }
+ HbListViewItem* prototype = mListView->listItemPrototype();
+ prototype->setTextFormat( Qt::PlainText );
+ }
- mListView->setMaximumHeight( height );
- mEmptyView->setMaximumHeight( height );
+ mListView->setMaximumHeight( -1 );
+ mEmptyView->setMaximumHeight( -1 );
CNT_EXIT
}
@@ -193,8 +215,7 @@
// remove all deselected items
foreach ( QModelIndex index, aDeselected.indexes() )
{
- QContact contact = mModel->contact( index );
- QContactLocalId id = contact.localId();
+ QContactLocalId id = mModel->contactId( index );
if ( mIdList.contains(id) )
{
mIdList.removeAll( id );
@@ -204,14 +225,23 @@
// add all selected items
foreach ( QModelIndex index, aSelected.indexes() )
{
- QContact contact = mModel->contact( index );
- QContactLocalId id = contact.localId();
+ QContactLocalId id = mModel->contactId( index );
if ( !mIdList.contains(id) )
{
mIdList.append( id );
}
}
-
+
+ qSort(mIdList.begin(), mIdList.end());
+ if (mIdList == mIds)
+ {
+ mPrimaryAction->setEnabled(false);
+ }
+ else
+ {
+ mPrimaryAction->setEnabled(true);
+ }
+
mMarkAll->setSelectedContactCount( mIdList.size() );
CNT_EXIT
}
@@ -255,8 +285,7 @@
QModelIndexList indexList = mSelectionModel->selectedIndexes();
foreach ( QModelIndex index, indexList )
{
- QContact contact = mModel->contact( index );
- mIdList.append( contact.localId() );
+ mIdList.append(mModel->contactId(index));
}
emit fetchReady( mIdList.toSet() );
}
@@ -276,13 +305,19 @@
detailfilter.setDetailDefinitionName(
QContactDisplayLabel::DefinitionName,
QContactDisplayLabel::FieldLabel);
-
+
+ int oldRowCount = mModel->rowCount();
mModel->setFilter(detailfilter);
+ int newRowCount = mModel->rowCount();
- HbMainWindow* window = mPopup->mainWindow();
- if ( window )
+ // minor optimization, only reload layout when needed
+ if ((oldRowCount == 0 && newRowCount > 0) || (oldRowCount > 0 && newRowCount == 0))
{
- loadLayout( window->orientation() );
+ HbMainWindow* window = mPopup->mainWindow();
+ if ( window )
+ {
+ loadLayout( window->orientation() );
+ }
}
setSelectedContacts( mIdList.toSet() );
@@ -319,13 +354,8 @@
mListView->setSelectionMode( aMode );
mListView->setModel( mModel );
- mListView->setSelectionModel( mSelectionModel );
-
- HbMainWindow* window = mPopup->mainWindow();
- if ( window )
- {
- loadLayout( window->orientation() );
- }
+ mListView->setSelectionModel( mSelectionModel );
+
if ( !aAction.isEmpty() )
{
@@ -350,6 +380,12 @@
this, SLOT(contactsSelected(const QItemSelection&, const QItemSelection&)) );
}
+
+ HbMainWindow* window = mPopup->mainWindow();
+ if ( window )
+ {
+ loadLayout( window->orientation() );
+ }
CNT_EXIT
}
@@ -368,10 +404,16 @@
}
else
{
- mHeading = new HbLabel( mTitle );
- mPopup->setHeadingWidget( mHeading );
- qreal popupHeight = mPopup->mainWindow()->layoutRect().height();
- mPopup->setMinimumHeight(popupHeight);
+ if (mPopup->headingWidget() == NULL)
+ {
+ mHeading = new HbLabel( mTitle );
+ mPopup->setHeadingWidget( mHeading );
+ }
+ else
+ {
+ mHeading->setPlainText( mTitle );
+ }
+
mDoc->load( CNT_FETCHLIST_XML, multi ? "find_list" : "find_list_single");
}
}
@@ -384,10 +426,16 @@
}
else
{
- mHeading = new HbLabel( mTitle );
- mPopup->setHeadingWidget( mHeading );
- qreal popupHeight = mPopup->mainWindow()->layoutRect().height();
- mPopup->setMinimumHeight(popupHeight);
+ if (mPopup->headingWidget() == NULL)
+ {
+ mHeading = new HbLabel( mTitle );
+ mPopup->setHeadingWidget( mHeading );
+ }
+ else
+ {
+ mHeading->setPlainText( mTitle );
+ }
+
mDoc->load( CNT_FETCHLIST_XML, multi ? "find_empty" : "find_empty_single" );
}
}
@@ -395,9 +443,21 @@
CNT_EXIT
}
+void CntFetchContactPopup::orientationChanged( Qt::Orientation aOrientation )
+{
+ CNT_ENTRY
+
+ mDoc->load( CNT_FETCHLIST_XML, "size_section");
+
+ loadLayout(aOrientation);
+
+ CNT_EXIT
+}
+
void CntFetchContactPopup::closePopup()
{
CNT_ENTRY
+ mPopup->close();
disconnect(mVirtualKeyboard, SIGNAL(keypadOpened()), this, SLOT(handleKeypadOpen()));
disconnect(mVirtualKeyboard, SIGNAL(keypadClosed()), this, SLOT(handleKeypadClosed()));
--- a/phonebookui/pbkcommonui/src/cntfetchmarkall.cpp Wed Aug 18 09:39:00 2010 +0300
+++ b/phonebookui/pbkcommonui/src/cntfetchmarkall.cpp Thu Sep 02 20:16:15 2010 +0300
@@ -34,7 +34,6 @@
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 );
@@ -43,6 +42,7 @@
mFrame->frameDrawer().setFrameGraphicsName("qtg_fr_groupbox_normal");
mFrame->frameDrawer().setFrameType(HbFrameDrawer::NinePieces);
mFrame->setZValue(-2);
+
style()->setItemName(mFrame, "background");
HbStyle::setItemName(mCheckBox,"checkbox");
--- a/phonebookui/pbkcommonui/src/cntgroupactionsview.cpp Wed Aug 18 09:39:00 2010 +0300
+++ b/phonebookui/pbkcommonui/src/cntgroupactionsview.cpp Thu Sep 02 20:16:15 2010 +0300
@@ -38,7 +38,6 @@
#include <qtcontacts.h>
#include <hbmainwindow.h>
#include "cntactionlauncher.h"
-
#include <QEvent>
#include <QStandardItemModel>
@@ -123,13 +122,13 @@
/*
Activates a default view and setup name label texts
*/
-void CntGroupActionsView::activate( CntAbstractViewManager* aMgr, const CntViewParameters aArgs )
+void CntGroupActionsView::activate( const CntViewParameters aArgs )
{
if (mView->navigationAction() != mSoftkey)
mView->setNavigationAction(mSoftkey);
mGroupContact = new QContact(aArgs.value(ESelectedGroupContact).value<QContact>());
- mViewManager = aMgr;
+ mViewManager = &mEngine->viewManager();
QContactName contactName = mGroupContact->detail( QContactName::DefinitionName );
QString groupName = contactName.value( QContactName::FieldCustomLabel );
@@ -210,10 +209,11 @@
mMessageActionParams.clear();
QString action = mModel->item(index.row())->data(Qt::UserRole+1).toString();
+ QContactManager& mgr = mEngine->contactManager( SYMBIAN_BACKEND );
//conference call
if (action.compare("call", Qt::CaseInsensitive) == 0 ) {
- CntActionLauncher* other = new CntActionLauncher(*mViewManager->contactManager(SYMBIAN_BACKEND), action);
+ CntActionLauncher* other = new CntActionLauncher( mgr, action);
connect(other, SIGNAL(actionExecuted(CntActionLauncher*)), this, SLOT(actionExecuted(CntActionLauncher*)));
other->execute(*mGroupContact, QContactDetail());
}
@@ -223,10 +223,10 @@
relationshipFilter.setRelationshipType(QContactRelationship::HasMember);
relationshipFilter.setRelatedContactRole(QContactRelationship::First);
relationshipFilter.setRelatedContactId(mGroupContact->id());
- QList<QContactLocalId> groupMembers = mViewManager->contactManager(SYMBIAN_BACKEND)->contactIds(relationshipFilter);
+ QList<QContactLocalId> groupMembers = mgr.contactIds(relationshipFilter);
for (int i = 0;i<groupMembers.count();i++) {
- QContact contact = mViewManager->contactManager(SYMBIAN_BACKEND)->contact(groupMembers.at(i));
+ QContact contact = mgr.contact(groupMembers.at(i));
QContactDetail preferredDetail = contact.preferredDetail(action);
//use preferred detail if exits
if (!preferredDetail.isEmpty()) {
@@ -265,7 +265,7 @@
params.setValue(mEmailActionParams);
}
map.insert(action,params);
- CntActionLauncher* other = new CntActionLauncher(*mViewManager->contactManager(SYMBIAN_BACKEND), action);
+ CntActionLauncher* other = new CntActionLauncher(mgr, action);
connect(other, SIGNAL(actionExecuted(CntActionLauncher*)), this, SLOT(actionExecuted(CntActionLauncher*)));
other->execute(*mGroupContact, QContactDetail(), map);
}
@@ -299,7 +299,7 @@
}
map.insert(action,params);
- CntActionLauncher* other = new CntActionLauncher(*mViewManager->contactManager(SYMBIAN_BACKEND), action);
+ CntActionLauncher* other = new CntActionLauncher( mEngine->contactManager(SYMBIAN_BACKEND), action);
connect(other, SIGNAL(actionExecuted(CntActionLauncher*)), this, SLOT(actionExecuted(CntActionLauncher*)));
other->execute(*mGroupContact, QContactDetail(), map);
}
@@ -345,7 +345,7 @@
mIsExecutingAction = true;
}
- CntActionLauncher* other = new CntActionLauncher(*mViewManager->contactManager(SYMBIAN_BACKEND), aAction);
+ CntActionLauncher* other = new CntActionLauncher( mEngine->contactManager(SYMBIAN_BACKEND), aAction);
connect(other, SIGNAL(actionExecuted(CntActionLauncher*)), this, SLOT(actionExecuted(CntActionLauncher*)));
other->execute(aContact, aDetail);
}
--- a/phonebookui/pbkcommonui/src/cntgroupdeletepopup.cpp Wed Aug 18 09:39:00 2010 +0300
+++ b/phonebookui/pbkcommonui/src/cntgroupdeletepopup.cpp Thu Sep 02 20:16:15 2010 +0300
@@ -16,7 +16,8 @@
*/
#include "cntgroupdeletepopup.h"
-
+#include <cntabstractengine.h>
+#include "cntglobal.h"
#include <hbgroupbox.h>
#include <hbaction.h>
#include <hblistview.h>
@@ -24,12 +25,12 @@
#include <qtcontacts.h>
#include <hbmainwindow.h>
-CntGroupDeletePopup::CntGroupDeletePopup(QContactManager *manager, QGraphicsItem *parent):
+CntGroupDeletePopup::CntGroupDeletePopup(CntAbstractEngine *aEngine, QGraphicsItem *parent):
HbSelectionDialog(parent),
- mContactManager(manager),
+ mContactManager( &aEngine->contactManager(SYMBIAN_BACKEND) ),
mModel(0)
{
- mModel = new CntGroupDeletePopupModel(mContactManager, this);
+ mModel = new CntGroupDeletePopupModel(aEngine, this);
}
CntGroupDeletePopup::~CntGroupDeletePopup()
--- a/phonebookui/pbkcommonui/src/cntgroupdeletepopupmodel.cpp Wed Aug 18 09:39:00 2010 +0300
+++ b/phonebookui/pbkcommonui/src/cntgroupdeletepopupmodel.cpp Thu Sep 02 20:16:15 2010 +0300
@@ -16,9 +16,11 @@
*/
#include "cntgroupdeletepopupmodel.h"
+#include "cntthumbnailmanager.h"
#include "cntfavourite.h"
+#include <cntabstractengine.h>
+#include "cntglobal.h"
-#include <thumbnailmanager_qt.h>
#include <qtcontacts.h>
#include <hbglobal.h>
#include <hbicon.h>
@@ -26,19 +28,16 @@
/*!
Constructor
*/
-CntGroupDeletePopupModel::CntGroupDeletePopupModel(QContactManager *manager, QObject *parent)
+CntGroupDeletePopupModel::CntGroupDeletePopupModel(CntAbstractEngine *aEngine, QObject *parent)
: QAbstractListModel(parent),
mFavoriteGroupId(-1)
{
d = new CntGroupPopupListData();
- d->mContactManager = manager;
+ d->mContactManager = &aEngine->contactManager( SYMBIAN_BACKEND );
mFavoriteGroupId = CntFavourite::createFavouriteGroup( d->mContactManager );
- d->mThumbnailManager = new ThumbnailManager(this);
- d->mThumbnailManager->setMode(ThumbnailManager::Default);
- d->mThumbnailManager->setQualityPreference(ThumbnailManager::OptimizeForPerformance);
- d->mThumbnailManager->setThumbnailSize(ThumbnailManager::ThumbnailSmall);
+ d->mThumbnailManager = &aEngine->thumbnailManager();
connect(d->mThumbnailManager, SIGNAL(thumbnailReady(QPixmap, void *, int, int)),
this, SLOT(onIconReady(QPixmap, void *, int, int)));
}
@@ -112,7 +111,7 @@
{
if (details.at(k).imageUrl().isValid())
{
- int id = d->mThumbnailManager->getThumbnail(details.at(k).imageUrl().toString());
+ int id = d->mThumbnailManager->getThumbnail(ThumbnailManager::ThumbnailSmall, details.at(k).imageUrl().toString());
d->mIconRequests.insert(id, rowCount());
break;
}
--- a/phonebookui/pbkcommonui/src/cntgroupeditormodel.cpp Wed Aug 18 09:39:00 2010 +0300
+++ b/phonebookui/pbkcommonui/src/cntgroupeditormodel.cpp Thu Sep 02 20:16:15 2010 +0300
@@ -65,8 +65,6 @@
void CntGroupEditorModel::saveContactDetails()
{
- HbDataFormModelItem* root = invisibleRootItem();
-
iGroupName.setCustomLabel( iNameItem->contentWidgetData("text").toString().trimmed());
iGroupConfCallNumber.setNumber( iNumberItem->contentWidgetData("text").toString().trimmed());
--- a/phonebookui/pbkcommonui/src/cntgroupmemberview.cpp Wed Aug 18 09:39:00 2010 +0300
+++ b/phonebookui/pbkcommonui/src/cntgroupmemberview.cpp Thu Sep 02 20:16:15 2010 +0300
@@ -46,10 +46,10 @@
delete d;
}
-void CntGroupMemberView::activate( CntAbstractViewManager* aMgr, const CntViewParameters aArgs )
+void CntGroupMemberView::activate( const CntViewParameters aArgs )
{
Q_D(CntGroupMemberView);
- d->activate(aMgr,aArgs);
+ d->activate(aArgs);
}
void CntGroupMemberView::deactivate()
@@ -73,5 +73,11 @@
{
return groupMemberView;
}
+
+void CntGroupMemberView::setEngine( CntAbstractEngine& aEngine )
+{
+ Q_D( CntGroupMemberView );
+ d->mEngine = &aEngine;
+}
// EOF
--- a/phonebookui/pbkcommonui/src/cntgroupmemberview_p.cpp Wed Aug 18 09:39:00 2010 +0300
+++ b/phonebookui/pbkcommonui/src/cntgroupmemberview_p.cpp Thu Sep 02 20:16:15 2010 +0300
@@ -21,6 +21,7 @@
#include "cntglobal.h"
#include "cntimagelabel.h"
#include "cntimageutility.h"
+#include "cntthumbnailmanager.h"
#include <hbnotificationdialog.h>
#include <hbmessagebox.h>
#include <hbmenu.h>
@@ -33,7 +34,6 @@
#include <hbaction.h>
#include <hblabel.h>
#include <hbparameterlengthlimiter.h>
-#include <thumbnailmanager_qt.h>
#include <cntlistmodel.h>
#include <hbmainwindow.h>
#include <xqservicerequest.h>
@@ -105,15 +105,6 @@
connect(mDeleteAction, SIGNAL(triggered()), this, SLOT(deleteGroup()));
mShowActionsAction = static_cast<HbAction*>( mDocument->findObject("cnt:groupactions"));
connect(mShowActionsAction, SIGNAL(triggered()), this, SLOT(openGroupActions()));
-
- // thumbnail manager
- mThumbnailManager = new ThumbnailManager(this);
- mThumbnailManager->setMode(ThumbnailManager::Default);
- mThumbnailManager->setQualityPreference(ThumbnailManager::OptimizeForQuality);
- mThumbnailManager->setThumbnailSize(ThumbnailManager::ThumbnailLarge);
-
- connect(mThumbnailManager, SIGNAL(thumbnailReady(QPixmap, void*, int, int)),
- this, SLOT(thumbnailReady(QPixmap, void*, int, int)));
}
/*!
@@ -147,11 +138,15 @@
}
}
-void CntGroupMemberViewPrivate::activate( CntAbstractViewManager* aMgr, const CntViewParameters aArgs )
+void CntGroupMemberViewPrivate::activate( const CntViewParameters aArgs )
{
- mViewManager = aMgr;
mArgs = aArgs;
-
+ mViewManager = &mEngine->viewManager();
+ mThumbnailManager = &mEngine->thumbnailManager();
+
+ connect(mThumbnailManager, SIGNAL(thumbnailReady(QPixmap, void*, int, int)),
+ this, SLOT(thumbnailReady(QPixmap, void*, int, int)));
+
if (mView->navigationAction() != mSoftkey)
{
mView->setNavigationAction(mSoftkey);
@@ -176,7 +171,7 @@
if (details.at(i).imageUrl().isValid())
{
mAvatar = new QContactAvatar(details.at(i));
- mThumbnailManager->getThumbnail(mAvatar->imageUrl().toString());
+ mThumbnailManager->getThumbnail(ThumbnailManager::ThumbnailLarge, mAvatar->imageUrl().toString());
break;
}
}
@@ -186,15 +181,29 @@
mListView->setScrollingStyle(HbScrollArea::PanWithFollowOn);
mListView->verticalScrollBar()->setInteractive(true);
mListView->setUniformItemSizes(true);
- mListView->listItemPrototype()->setGraphicsSize(HbListViewItem::Thumbnail);
+
+ HbFrameBackground frame;
+ frame.setFrameGraphicsName("qtg_fr_list_normal");
+ frame.setFrameType(HbFrameDrawer::NinePieces);
+
+ HbListViewItem* prototype = mListView->listItemPrototype();
+ prototype->setGraphicsSize(HbListViewItem::Thumbnail);
+ prototype->setDefaultFrame(frame);
+
HbIndexFeedback *indexFeedback = new HbIndexFeedback(mView);
indexFeedback->setIndexFeedbackPolicy(HbIndexFeedback::IndexFeedbackSingleCharacter);
indexFeedback->setItemView(mListView);
- HbFrameBackground frame;
- frame.setFrameGraphicsName("qtg_fr_list_normal");
- frame.setFrameType(HbFrameDrawer::NinePieces);
- mListView->itemPrototypes().first()->setDefaultFrame(frame);
+ // if no contacts are present, then disable the Manage Members toolbar
+ QContactDetailFilter filter;
+ filter.setDetailDefinitionName(QContactType::DefinitionName, QContactType::FieldType);
+ filter.setValue(QLatin1String(QContactType::TypeContact));
+
+ QList<QContactLocalId> contactIds = getContactManager()->contactIds(filter);
+ if (contactIds.isEmpty())
+ {
+ mManageAction->setEnabled(false);
+ }
createModel();
@@ -216,7 +225,7 @@
emit q->backPressed();
//save the contact if avatar has been changed.
- QContact contact = mViewManager->contactManager( SYMBIAN_BACKEND )->contact(mGroupContact->localId());
+ QContact contact = getContactManager()->contact(mGroupContact->localId());
if ( contact != *mGroupContact )
{
getContactManager()->saveContact(mGroupContact);
@@ -253,7 +262,7 @@
CntFetchContactPopup* popup = CntFetchContactPopup::createMultiSelectionPopup(
HbParameterLengthLimiter(hbTrId("txt_phob_title_members_of_1_group")).arg(groupName),
hbTrId("txt_common_button_save"),
- *mViewManager->contactManager(SYMBIAN_BACKEND));
+ mEngine->contactManager(SYMBIAN_BACKEND));
connect( popup, SIGNAL(fetchReady(QSet<QContactLocalId>)),this, SLOT(handleManageMembers(QSet<QContactLocalId>)) );
popup->setSelectedContacts( mOriginalGroupMembers.toSet() );
popup->showPopup();
@@ -270,15 +279,14 @@
QSet<QContactLocalId> addedMembers = aIds - mOriginalGroupMembers.toSet();
setRelationship(addedMembers, addedMemberships);
- QMap<int, QContactManager::Error> errors;
if (!addedMemberships.isEmpty())
{
- getContactManager()->saveRelationships(&addedMemberships, &errors);
+ getContactManager()->saveRelationships(&addedMemberships, NULL);
}
if (!removedMemberships.isEmpty())
{
- getContactManager()->removeRelationships(removedMemberships, &errors);
+ getContactManager()->removeRelationships(removedMemberships, NULL);
}
}
@@ -288,7 +296,7 @@
rFilter.setRelationshipType(QContactRelationship::HasMember);
rFilter.setRelatedContactRole(QContactRelationship::First);
rFilter.setRelatedContactId(mGroupContact->id());
-
+
mModel = new CntListModel(getContactManager(), rFilter, false);
mListView->setModel(mModel);
}
@@ -466,19 +474,19 @@
QContactManager* CntGroupMemberViewPrivate::getContactManager()
{
- return mViewManager->contactManager(SYMBIAN_BACKEND);
+ return &mEngine->contactManager(SYMBIAN_BACKEND);
}
-void CntGroupMemberViewPrivate::setRelationship(QSet<QContactLocalId> &aLocalId,
+void CntGroupMemberViewPrivate::setRelationship(QSet<QContactLocalId> &aLocalIds,
QList<QContactRelationship> &aRelationshipList)
{
- foreach (QContactLocalId id, aLocalId) {
- QContact contact = getContactManager()->contact(id);
-
+ foreach (QContactLocalId localId, aLocalIds) {
+ QContactId id;
+ id.setLocalId(localId);
QContactRelationship membership;
membership.setRelationshipType(QContactRelationship::HasMember);
membership.setFirst(mGroupContact->id());
- membership.setSecond(contact.id());
+ membership.setSecond(id);
aRelationshipList.append(membership);
}
}
@@ -492,7 +500,7 @@
HbAction *changeImageAction = menu->addAction(hbTrId("txt_phob_menu_change_picture"), this, SLOT(openImageEditor()));
if (mAvatar && !mAvatar->imageUrl().isEmpty())
{
- HbAction *removeAction = menu->addAction(hbTrId("txt_phob_menu_remove_image"), this, SLOT(removeImage()));
+ menu->addAction(hbTrId("txt_phob_menu_remove_image"), this, SLOT(removeImage()));
}
menu->setPreferredPos(aCoords);
menu->open();
--- a/phonebookui/pbkcommonui/src/cnthistoryview.cpp Wed Aug 18 09:39:00 2010 +0300
+++ b/phonebookui/pbkcommonui/src/cnthistoryview.cpp Thu Sep 02 20:16:15 2010 +0300
@@ -102,7 +102,7 @@
*/
void CntHistoryView::deactivate()
{
- QContactManager* cm = mViewMgr->contactManager(SYMBIAN_BACKEND);
+ QContactManager* cm = &mEngine->contactManager(SYMBIAN_BACKEND);
disconnect(cm, SIGNAL(contactsRemoved(const QList<QContactLocalId>&)),
this, SLOT(contactDeletedFromOtherSource(const QList<QContactLocalId>&)));
}
@@ -110,12 +110,12 @@
/**
* Activate the view
*/
-void CntHistoryView::activate( CntAbstractViewManager* aMgr, const CntViewParameters aArgs )
+void CntHistoryView::activate( const CntViewParameters aArgs )
{
- mViewMgr = aMgr;
mArgs = aArgs;
+ mViewMgr = &mEngine->viewManager();
- QContactManager* cm = mViewMgr->contactManager(SYMBIAN_BACKEND);
+ QContactManager* cm = &mEngine->contactManager(SYMBIAN_BACKEND);
mContact = new QContact(mArgs.value(ESelectedContact).value<QContact>());
// Set history view heading
--- a/phonebookui/pbkcommonui/src/cntimageeditorview.cpp Wed Aug 18 09:39:00 2010 +0300
+++ b/phonebookui/pbkcommonui/src/cntimageeditorview.cpp Thu Sep 02 20:16:15 2010 +0300
@@ -16,6 +16,7 @@
*/
#include "cntimageeditorview.h"
+#include "cntthumbnailmanager.h"
#include "cntimageutility.h"
#include "cntsavemanager.h"
#include "cntimagelabel.h"
@@ -27,7 +28,6 @@
#include "cntdebug.h"
#include "cntglobal.h"
-#include <thumbnailmanager_qt.h>
#include <hbaction.h>
#include <hbview.h>
#include <hbmainwindow.h>
@@ -75,15 +75,6 @@
mRemoveImage = static_cast<HbAction*>(mDocumentLoader.findObject("cnt:removeimage"));
connect(mRemoveImage, SIGNAL(triggered()), this, SLOT(removeImage()));
- // thumbnail manager
- mThumbnailManager = new ThumbnailManager(this);
- mThumbnailManager->setMode(ThumbnailManager::Default);
- mThumbnailManager->setQualityPreference(ThumbnailManager::OptimizeForQuality);
- mThumbnailManager->setThumbnailSize(ThumbnailManager::ThumbnailLarge);
-
- connect( mThumbnailManager, SIGNAL(thumbnailReady(QPixmap, void*, int, int)),
- this, SLOT(thumbnailReady(QPixmap, void*, int, int)) );
-
// closing the application from task swapper or end key will cause the contact to be saved
connect( qApp, SIGNAL(aboutToQuit()), this, SLOT(saveContact()));
}
@@ -116,11 +107,15 @@
/*!
Called when activating the view
*/
-void CntImageEditorView::activate( CntAbstractViewManager* aMgr, const CntViewParameters aArgs )
+void CntImageEditorView::activate( const CntViewParameters aArgs )
{
- mViewManager = aMgr;
mArgs = aArgs;
+ mViewManager = &mEngine->viewManager();
+ mThumbnailManager = &mEngine->thumbnailManager();
+ connect( mThumbnailManager, SIGNAL(thumbnailReady(QPixmap, void*, int, int)),
+ this, SLOT(thumbnailReady(QPixmap, void*, int, int)) );
+
if (mView->navigationAction() != mSoftkey)
mView->setNavigationAction(mSoftkey);
@@ -143,7 +138,7 @@
QString myCard = mArgs.value( EMyCard ).toString();
QContactLocalId localId = mContact->localId();
- QContactLocalId selfContactId = mViewManager->contactManager(SYMBIAN_BACKEND)->selfContactId();
+ QContactLocalId selfContactId = mEngine->contactManager(SYMBIAN_BACKEND).selfContactId();
bool isMyCard = ( localId == selfContactId && localId != 0 ) || !myCard.isEmpty();
if (isMyCard)
@@ -170,7 +165,7 @@
if (details.at(i).imageUrl().isValid())
{
mAvatar = new QContactAvatar(details.at(i));
- mThumbnailManager->getThumbnail(mAvatar->imageUrl().toString());
+ mThumbnailManager->getThumbnail(ThumbnailManager::ThumbnailLarge, mAvatar->imageUrl().toString());
break;
}
}
@@ -363,7 +358,7 @@
CNT_LOG_ARGS("image created, image = " << filePath)
mAvatar->setImageUrl(QUrl(imagepath));
- mThumbnailManager->getThumbnail(imagepath);
+ mThumbnailManager->getThumbnail(ThumbnailManager::ThumbnailLarge, imagepath);
mRemoveImage->setEnabled(true);
}
}
@@ -371,7 +366,7 @@
{
// No mass memory, use the orginal image
mAvatar->setImageUrl(QUrl(value.toString()));
- mThumbnailManager->getThumbnail(value.toString());
+ mThumbnailManager->getThumbnail(ThumbnailManager::ThumbnailLarge, value.toString());
mRemoveImage->setEnabled(true);
}
}
@@ -446,14 +441,14 @@
mContact->removeDetail(mAvatar);
}
- QString name = mViewManager->contactManager(SYMBIAN_BACKEND)->synthesizedContactDisplayLabel(*mContact);
+ QString name = mEngine->contactManager(SYMBIAN_BACKEND).synthesizedContactDisplayLabel(*mContact);
if (name.isEmpty())
{
name = hbTrId("txt_phob_list_unnamed");
}
- CntSaveManager::CntSaveResult result = mSaveManager->saveContact(mContact, mViewManager->contactManager(SYMBIAN_BACKEND));
+ CntSaveManager::CntSaveResult result = mSaveManager->saveContact(mContact, &mEngine->contactManager(SYMBIAN_BACKEND));
if (mContact->type() != QContactType::TypeGroup)
{
--- a/phonebookui/pbkcommonui/src/cntimportsview.cpp Wed Aug 18 09:39:00 2010 +0300
+++ b/phonebookui/pbkcommonui/src/cntimportsview.cpp Thu Sep 02 20:16:15 2010 +0300
@@ -17,6 +17,7 @@
#include "cntimportsview.h"
#include "cntglobal.h"
+
#include <hbpushbutton.h>
#include <hbaction.h>
#include <hbview.h>
@@ -48,6 +49,7 @@
mFetchRequestADN(0),
mFetchRequestSDN(0),
mListView(0),
+ mModel(0),
mAdnSimUtility(0),
mSdnSimUtility(0),
mAdnEntriesPresent(0),
@@ -109,19 +111,18 @@
/*
Activates a default view
*/
-void CntImportsView::activate(CntAbstractViewManager* aMgr, const CntViewParameters aArgs)
+void CntImportsView::activate(const CntViewParameters aArgs)
{
Q_UNUSED(aArgs);
//back button
- HbMainWindow* window = mView->mainWindow();
if (mView->navigationAction() != mSoftkey)
{
mView->setNavigationAction(mSoftkey);
}
- mViewManager = aMgr;
- mContactSymbianManager = mViewManager->contactManager(SYMBIAN_BACKEND);
+ mViewManager = &mEngine->viewManager();
+ mContactSymbianManager = &mEngine->contactManager(SYMBIAN_BACKEND);
// Sim Utility info fetch
int getSimInfoError(0);
@@ -191,13 +192,17 @@
if (mSdnStorePresent && !mWaitingForAdnCache)
{
int sdnError = -1;
- mSdnSimUtility = new CntSimUtility(CntSimUtility::SdnStore, sdnError);
- if (sdnError != 0)
+ mSdnStorePresent = false;
+ if (!mSdnSimUtility)
{
- delete mSdnSimUtility;
- mSdnSimUtility = 0;
+ mSdnSimUtility = new CntSimUtility(CntSimUtility::SdnStore, sdnError);
+ if (sdnError != 0)
+ {
+ delete mSdnSimUtility;
+ mSdnSimUtility = 0;
+ }
}
- else
+ if (mSdnSimUtility)
{
//get number of SDN contacts
CntSimUtility::SimInfo sdnSimInfo = mSdnSimUtility->getSimInfo(getSdnSimInfoError);
@@ -205,13 +210,14 @@
{
// sim entries are present
mSdnStoreEntries = sdnSimInfo.usedEntries;
+ if (mSdnStoreEntries > 0) {
+ mSdnStorePresent = true;
+ }
}
}
}
// end SDN store
-
-
mListView = static_cast<HbListView*>(mDocumentLoader.findWidget(QString("listView")));
HbFrameBackground frame;
@@ -332,12 +338,12 @@
mImportInProgress = true;
delete mFetchRequestADN;
- mContactSimManagerADN = mViewManager->contactManager(SIM_BACKEND_ADN);
+ mContactSimManagerADN = &mEngine->contactManager(SIM_BACKEND_ADN);
mFetchRequestADN = new QContactFetchRequest;
mFetchRequestADN->setManager(mContactSimManagerADN);
delete mFetchRequestSDN;
- mContactSimManagerSDN = mViewManager->contactManager(SIM_BACKEND_SDN);
+ mContactSimManagerSDN = &mEngine->contactManager(SIM_BACKEND_SDN);
mFetchRequestSDN = new QContactFetchRequest;
mFetchRequestSDN->setManager(mContactSimManagerSDN);
@@ -693,6 +699,7 @@
{
mAdnStorePresent = false;
mAdnEntriesPresent = false;
+ mSdnStorePresent = false;
}
else
{
@@ -710,9 +717,69 @@
mAdnEntriesPresent = true;
}
}
+
+ //get number of SDN contacts
+ int sdnError = -1;
+ mSdnStorePresent = false;
+ if (!mSdnSimUtility)
+ {
+ mSdnSimUtility = new CntSimUtility(CntSimUtility::SdnStore, sdnError);
+ if (sdnError != 0)
+ {
+ delete mSdnSimUtility;
+ mSdnSimUtility = 0;
+ }
+ }
+ if (mSdnSimUtility)
+ {
+ int getSdnSimInfoError = 0;
+ CntSimUtility::SimInfo sdnSimInfo = mSdnSimUtility->getSimInfo(getSdnSimInfoError);
+ if (!getSdnSimInfoError)
+ {
+ mSdnStoreEntries = sdnSimInfo.usedEntries;
+ if (mSdnStoreEntries > 0)
+ {
+ mSdnStorePresent = true;
+ }
+ }
+ }
}
- //and start SIM contacts import, if user tapped "SIM import"
+ //dismiss progress dialog, if there are no SIM contacts
+ if(mImportSimPopup != NULL && mImportSimPopup->isActive() &&
+ !mAdnEntriesPresent && !mSdnStorePresent)
+ {
+ mImportSimPopup->close();
+ showSimImportResults();
+ }
+
+ //disable sim import item, if there are no SIM contacts
+ if(!mAdnEntriesPresent && !mSdnStorePresent && mModel)
+ {
+ QList<QStandardItem*> importSimItems = mModel->takeRow(0);
+ QStandardItem* importSimItem = 0;
+ if (importSimItems.count() > 0)
+ {
+ importSimItem = importSimItems.at(0);
+ }
+
+ if (importSimItem != 0)
+ {
+ QStringList simList;
+ QString simImport(hbTrId("txt_phob_dblist_import_from_sim"));
+ simList << simImport;
+ QString simNoContacts(hbTrId("txt_phob_dblist_import_from_1_val_no_sim_contacts"));
+ simList << simNoContacts;
+
+ importSimItem->setData(simList, Qt::DisplayRole);
+ importSimItem->setData(HbIcon("qtg_large_sim"), Qt::DecorationRole);
+ importSimItem->setEnabled(false);
+ mModel->insertRow(0, importSimItem);
+ mListView->reset();
+ }
+ }
+
+ //start SIM contacts import, if user tapped "SIM import"
if(mImportSimPopup != NULL && mImportSimPopup->isActive())
{
if (!startSimImport())
--- a/phonebookui/pbkcommonui/src/cntmycardview.cpp Wed Aug 18 09:39:00 2010 +0300
+++ b/phonebookui/pbkcommonui/src/cntmycardview.cpp Thu Sep 02 20:16:15 2010 +0300
@@ -18,6 +18,7 @@
#include "cntmycardview.h"
#include "cntfetchcontactpopup.h"
#include "cntglobal.h"
+
#include <qtcontacts.h>
#include <hbpushbutton.h>
#include <hbaction.h>
@@ -67,9 +68,9 @@
/*
Activates a default view
*/
-void CntMyCardView::activate(CntAbstractViewManager* aMgr, const CntViewParameters aArgs)
+void CntMyCardView::activate(const CntViewParameters aArgs)
{
- mViewManager = aMgr;
+ mViewManager = &mEngine->viewManager();
if (mView->navigationAction() != mSoftkey) {
mView->setNavigationAction(mSoftkey);
@@ -90,7 +91,7 @@
filter.setDetailDefinitionName(QContactType::DefinitionName, QContactType::FieldType);
filter.setValue(QLatin1String(QContactType::TypeContact));
- if (mViewManager->contactManager( SYMBIAN_BACKEND )->contactIds(filter).isEmpty())
+ if (mEngine->contactManager( SYMBIAN_BACKEND ).contactIds(filter).isEmpty())
{
chooseButton->setEnabled(false);
}
@@ -137,21 +138,23 @@
{
CntFetchContactPopup* popup = CntFetchContactPopup::createSingleSelectionPopup(
hbTrId("txt_phob_title_select_contact"),
- *mViewManager->contactManager(SYMBIAN_BACKEND));
+ mEngine->contactManager(SYMBIAN_BACKEND));
connect( popup, SIGNAL(fetchReady(QSet<QContactLocalId>)), this, SLOT(handleMultiCardSelection(QSet<QContactLocalId>)));
+ QSet<QContactLocalId> ids;
+ popup->setSelectedContacts(ids);
popup->showPopup();
}
void CntMyCardView::handleMultiCardSelection( QSet<QContactLocalId> aIds )
{
- QContactManager* manager = mViewManager->contactManager( SYMBIAN_BACKEND );
+ QContactManager& manager = mEngine->contactManager( SYMBIAN_BACKEND );
if ( !aIds.isEmpty() ) {
QList<QContactLocalId> selectedContactsList = aIds.values();
- QContact contact = manager->contact(selectedContactsList.front());
+ QContact contact = manager.contact(selectedContactsList.front());
removeFromGroup(&contact);
- manager->setSelfContactId( contact.localId() );
+ manager.setSelfContactId( contact.localId() );
showPreviousView();
}
}
@@ -162,16 +165,16 @@
groupFilter.setDetailDefinitionName(QContactType::DefinitionName, QContactType::FieldType);
groupFilter.setValue(QLatin1String(QContactType::TypeGroup));
- QContactManager* mgr = mViewManager->contactManager(SYMBIAN_BACKEND);
- QList<QContactLocalId> groupContactIds = mgr->contactIds(groupFilter);
+ QContactManager& mgr = mEngine->contactManager(SYMBIAN_BACKEND);
+ QList<QContactLocalId> groupContactIds = mgr.contactIds(groupFilter);
if (!groupContactIds.isEmpty()) {
for(int i = 0;i < groupContactIds.count();i++) {
- QContact groupContact = mgr->contact(groupContactIds.at(i));
+ QContact groupContact = mgr.contact(groupContactIds.at(i));
QContactRelationship relationship;
relationship.setRelationshipType(QContactRelationship::HasMember);
relationship.setFirst(groupContact.id());
relationship.setSecond(aContact->id());
- mgr->removeRelationship(relationship);
+ mgr.removeRelationship(relationship);
}
}
}
--- a/phonebookui/pbkcommonui/src/cntnamesview.cpp Wed Aug 18 09:39:00 2010 +0300
+++ b/phonebookui/pbkcommonui/src/cntnamesview.cpp Thu Sep 02 20:16:15 2010 +0300
@@ -17,11 +17,9 @@
#include "cntnamesview.h"
#include "cntnamesview_p.h"
-
#include <hbview.h>
-CntNamesView::CntNamesView(CntExtensionManager &extensionManager) :
-d_ptr( new CntNamesViewPrivate(extensionManager) )
+CntNamesView::CntNamesView() : d_ptr( new CntNamesViewPrivate() )
{
Q_D(CntNamesView);
d->q_ptr = this;
@@ -36,10 +34,10 @@
delete d;
}
-void CntNamesView::activate(CntAbstractViewManager* aMgr, const CntViewParameters aArgs)
+void CntNamesView::activate(const CntViewParameters aArgs)
{
Q_D(CntNamesView);
- d->activate( aMgr, aArgs );
+ d->activate( aArgs );
}
void CntNamesView::deactivate()
@@ -64,6 +62,12 @@
Q_D(const CntNamesView);
return d->mId;
}
+
+void CntNamesView::setEngine( CntAbstractEngine& aEngine )
+{
+ Q_D(CntNamesView);
+ d->setEngine( aEngine );
+}
// end of file
--- a/phonebookui/pbkcommonui/src/cntnamesview_p.cpp Wed Aug 18 09:39:00 2010 +0300
+++ b/phonebookui/pbkcommonui/src/cntnamesview_p.cpp Thu Sep 02 20:16:15 2010 +0300
@@ -22,6 +22,7 @@
#include "cntglobal.h"
#include "cntdebug.h"
#include "cntapplication.h"
+#include <cntabstractengine.h>
#include <cntuiextensionfactory.h>
#include <cntuisocialextension.h>
@@ -39,7 +40,6 @@
#include <hblineedit.h>
#include <hbindexfeedback.h>
#include <hbscrollbar.h>
-#include <hbgroupbox.h>
#include <hbsearchpanel.h>
#include <hbtoolbar.h>
#include <hbframebackground.h>
@@ -52,14 +52,12 @@
const char *CNT_CONTACTLIST_XML = ":/xml/contacts_namelist.docml";
static const int CNT_MIN_ROW_COUNT = 2;
-CntNamesViewPrivate::CntNamesViewPrivate(CntExtensionManager &extensionManager) :
+CntNamesViewPrivate::CntNamesViewPrivate() :
QObject(),
- mExtensionManager(extensionManager),
mViewManager(NULL),
mListModel(NULL),
mListView(NULL),
mEmptyList(NULL),
- mBanner(NULL),
mSearchPanel(NULL),
mLoader(NULL),
mVirtualKeyboard(NULL),
@@ -133,7 +131,6 @@
SLOT(showContactView(const QModelIndex&)));
mEmptyList = static_cast<HbLabel*> (document()->findWidget("emptyLabel"));
- mBanner = static_cast<HbGroupBox*> (document()->findWidget("banner"));
mSearchPanel = static_cast<HbSearchPanel*> (document()->findWidget("searchPanel"));
connect(mSearchPanel, SIGNAL(exitClicked()), this, SLOT(hideFinder()));
connect(mSearchPanel, SIGNAL(criteriaChanged(QString)), this, SLOT(setFilter(QString)));
@@ -183,11 +180,11 @@
CNT_EXIT
}
-void CntNamesViewPrivate::activate(CntAbstractViewManager* aMgr, const CntViewParameters aArgs)
+void CntNamesViewPrivate::activate(const CntViewParameters aArgs)
{
CNT_ENTRY
- mViewManager = aMgr;
+ mViewManager = &mEngine->viewManager();
if (mView->mainWindow() != NULL && !(mView->visibleItems() & Hb::AllItems))
{
hideFinder();
@@ -199,7 +196,7 @@
QString typeContact = QContactType::TypeContact;
filter.setValue(typeContact);
- mListModel = new CntListModel(mViewManager->contactManager(SYMBIAN_BACKEND), filter);
+ mListModel = new CntListModel( &mEngine->contactManager(SYMBIAN_BACKEND), filter);
list()->setModel(mListModel);
}
@@ -218,7 +215,7 @@
changeDeleteActionStatus();
- QContactManager* contactManager = aMgr->contactManager( SYMBIAN_BACKEND );
+ QContactManager* contactManager = &mEngine->contactManager( SYMBIAN_BACKEND );
// make connections unique, that is, duplicate connections are not connected again
connect(contactManager, SIGNAL(contactsAdded(const QList<QContactLocalId>&)),
this, SLOT(handleContactAddition(const QList<QContactLocalId>&)), Qt::UniqueConnection);
@@ -270,11 +267,10 @@
CNT_ENTRY
HbLineEdit *editor = static_cast<HbLineEdit*>(mSearchPanel->primitive("lineedit"));
- editor->setObjectName("focusLineEdit");
- editor->setInputMethodHints(Qt::ImhNoPredictiveText);
-
if (editor)
{
+ editor->setObjectName("focusLineEdit");
+ editor->setInputMethodHints(Qt::ImhNoPredictiveText);
editor->setText("");
editor->setFocus();
@@ -286,7 +282,6 @@
ic->filterEvent(event);
delete event;
}
-
}
CNT_EXIT
@@ -323,15 +318,12 @@
mListModel->showMyCard(false);
- focusLineEdit();
+ HbListViewItem* proto = mListView->listItemPrototype();
+ proto->setTextFormat( Qt::RichText );
mView->hideItems(Hb::AllItems);
-
- mImportSim->setVisible(false);
- mNewContact->setVisible(false);
- mMultipleDeleter->setVisible(false);
- HbAction* settings = static_cast<HbAction*>(document()->findObject("cnt:settings") );
- settings->setVisible(false);
+
+ focusLineEdit();
CNT_EXIT
}
@@ -343,6 +335,9 @@
document()->load( CNT_CONTACTLIST_XML, "no_find" );
mView->showItems(Hb::AllItems);
+ HbListViewItem* proto = mListView->listItemPrototype();
+ proto->setTextFormat( Qt::PlainText );
+
mListModel->showMyCard(true);
if (mFilterChanged)
@@ -355,12 +350,6 @@
mFilterChanged = false;
}
- mNewContact->setVisible(true);
- mImportSim->setVisible(true);
- mMultipleDeleter->setVisible(true);
- HbAction* settings = static_cast<HbAction*>(document()->findObject("cnt:settings") );
- settings->setVisible(true);
-
CNT_EXIT
}
@@ -397,10 +386,10 @@
void CntNamesViewPrivate::handleExtensionAction()
{
CNT_ENTRY
-
- for (int i = 0; i < mExtensionManager.pluginCount(); i++)
+ CntExtensionManager& mgr = mEngine->extensionManager();
+ for (int i = 0; i < mgr.pluginCount(); i++)
{
- CntUiSocialExtension* socialExtension = mExtensionManager.pluginAt(i)->socialExtension();
+ CntUiSocialExtension* socialExtension = mgr.pluginAt(i)->socialExtension();
if (socialExtension)
{
CntViewParameters params;
@@ -432,8 +421,8 @@
{
CNT_ENTRY
- QContactManager* manager = mViewManager->contactManager( SYMBIAN_BACKEND );
- QString name = manager->synthesizedContactDisplayLabel(aContact);
+ QContactManager& manager = mEngine->contactManager( SYMBIAN_BACKEND );
+ QString name = manager.synthesizedContactDisplayLabel(aContact);
if (name.isEmpty())
{
name = hbTrId("txt_phob_list_unnamed");
@@ -453,10 +442,11 @@
CntFetchContactPopup* popup = CntFetchContactPopup::createMultiSelectionPopup(
hbTrId("txt_phob_title_delete_contacts"),
hbTrId("txt_common_button_delete"),
- *mViewManager->contactManager(SYMBIAN_BACKEND));
+ mEngine->contactManager(SYMBIAN_BACKEND));
connect(popup, SIGNAL(fetchReady(QSet<QContactLocalId>)),
this, SLOT(handleDeleteMultipleContacts(QSet<QContactLocalId>)) );
-
+ QSet<QContactLocalId> ids;
+ popup->setSelectedContacts(ids);
popup->showPopup();
CNT_EXIT
}
@@ -465,11 +455,7 @@
{
CNT_ENTRY
- QContactManager* manager = mViewManager->contactManager( SYMBIAN_BACKEND );
- foreach ( QContactLocalId id, aIds )
- {
- manager->removeContact( id );
- }
+ mEngine->contactManager( SYMBIAN_BACKEND ).removeContacts(aIds.toList(), NULL);
CNT_EXIT
}
@@ -529,7 +515,7 @@
{
CNT_ENTRY
- CntActionLauncher* other = new CntActionLauncher( *mViewManager->contactManager(SYMBIAN_BACKEND), aAction );
+ CntActionLauncher* other = new CntActionLauncher( mEngine->contactManager(SYMBIAN_BACKEND), aAction );
connect(other, SIGNAL(actionExecuted(CntActionLauncher*)), this, SLOT(actionExecuted(CntActionLauncher*)));
other->execute(aContact, aDetail);
@@ -551,7 +537,7 @@
if (aAction == HbMessageBox::Delete)
{
- mViewManager->contactManager( SYMBIAN_BACKEND )->removeContact(mHandledContactId);
+ mEngine->contactManager( SYMBIAN_BACKEND ).removeContact(mHandledContactId);
}
mHandledContactId = 0;
@@ -636,6 +622,8 @@
Q_UNUSED(aNewId);
changeDeleteActionStatus();
+ list()->scrollTo(mListModel->index(0));
+
CNT_EXIT
}
@@ -646,8 +634,8 @@
// Scroll to the focused contact
if ( focusedContact > 0 )
{
- QContactManager* contactManager = mViewManager->contactManager( SYMBIAN_BACKEND );
- QContact c = contactManager->contact(focusedContact);
+ QContactManager& contactManager = mEngine->contactManager( SYMBIAN_BACKEND );
+ QContact c = contactManager.contact(focusedContact);
list()->scrollTo(mListModel->indexOfContact(c), HbAbstractItemView::EnsureVisible);
}
@@ -671,7 +659,9 @@
HbFrameBackground frame;
frame.setFrameGraphicsName("qtg_fr_list_normal");
frame.setFrameType(HbFrameDrawer::NinePieces);
- mListView->itemPrototypes().first()->setDefaultFrame(frame);
+
+ HbListViewItem* prototype = mListView->listItemPrototype();
+ prototype->setDefaultFrame( frame );
mListView->setUniformItemSizes(true);
mListView->setItemRecycling(true);
--- a/phonebookui/pbkcommonui/src/cntpresencelistener.cpp Wed Aug 18 09:39:00 2010 +0300
+++ b/phonebookui/pbkcommonui/src/cntpresencelistener.cpp Thu Sep 02 20:16:15 2010 +0300
@@ -25,10 +25,9 @@
presence information for a contact and separately for each
valid QContactOnlineAccount.
*/
-CntPresenceListener::CntPresenceListener(const QContact& contact, QObject* parent) :
+CntPresenceListener::CntPresenceListener(QObject* parent) :
QObject(parent),
- mReader(NULL),
- mContact(contact)
+ mReader(NULL)
{
mReader = PrcPresenceReader::createReader();
connect(mReader, SIGNAL(signalPresenceNotification(bool, PrcPresenceBuddyInfoQt*)),
@@ -51,11 +50,11 @@
\param combinedOnlineStatus aggregated online status
\return QMap with account specific (for example "sip:sip@sip.com") online information
*/
-QMap<QString, bool> CntPresenceListener::initialPresences(bool &combinedOnlineStatus)
+QMap<QString, bool> CntPresenceListener::initialPresences(const QContact& contact, bool &combinedOnlineStatus)
{
QMap<QString, bool> initialMap;
- QList<QContactOnlineAccount> accounts = mContact.details<QContactOnlineAccount>();
+ QList<QContactOnlineAccount> accounts = contact.details<QContactOnlineAccount>();
QList<PrcPresenceBuddyInfoQt*> buddies;
--- a/phonebookui/pbkcommonui/src/cntsettingsview.cpp Wed Aug 18 09:39:00 2010 +0300
+++ b/phonebookui/pbkcommonui/src/cntsettingsview.cpp Thu Sep 02 20:16:15 2010 +0300
@@ -65,13 +65,13 @@
CNT_EXIT
}
-void CntSettingsView::activate( CntAbstractViewManager* aMgr, const CntViewParameters aArgs )
+void CntSettingsView::activate( const CntViewParameters aArgs )
{
CNT_ENTRY
- mViewMgr = aMgr;
mArgs = aArgs;
-
+ mViewMgr = &mEngine->viewManager();
+
if ( mView->navigationAction() != mBack) {
mView->setNavigationAction(mBack);
}
--- a/phonebookui/pbkcommonui/src/cntviewnavigator.cpp Wed Aug 18 09:39:00 2010 +0300
+++ b/phonebookui/pbkcommonui/src/cntviewnavigator.cpp Thu Sep 02 20:16:15 2010 +0300
@@ -49,7 +49,6 @@
const int& CntViewNavigator::back( QFlags<Hb::ViewSwitchFlag> &flags, bool toRoot )
{
- qDebug() << "CntViewNavigator::back() - IN";
iTop = noView;
// Check if exception is set for current view item. Exception
// means that instead of one step back, we go back until that
@@ -108,7 +107,7 @@
flags = Hb::ViewSwitchUseBackAnim;
}
}
- qDebug() << "CntViewNavigator::back() - OUT";
+
return iTop;
}
--- a/phonebookui/phonebookservices/inc/cntabstractserviceprovider.h Wed Aug 18 09:39:00 2010 +0300
+++ b/phonebookui/phonebookservices/inc/cntabstractserviceprovider.h Thu Sep 02 20:16:15 2010 +0300
@@ -34,6 +34,18 @@
*/
virtual void CompleteServiceAndCloseApp(const QVariant& retValue) = 0;
+ /*!
+ If this method has been called, then the argument in a call to CompleteServiceAndCloseApp()
+ can be ignored by concrete provider.
+ */
+ virtual void overrideReturnValue(const QVariant& retValue) { Q_UNUSED(retValue) };
+
+ /*!
+ By default sub views are allowed to exit the service, override this and return false to
+ restrict this functionality.
+ */
+ virtual bool allowSubViewsExit() { return true; };
+
};
#endif /* CNTABSTRACTSERVICEPROVIDER_H */
--- a/phonebookui/phonebookservices/inc/cntserviceassigncontactcardview.h Wed Aug 18 09:39:00 2010 +0300
+++ b/phonebookui/phonebookservices/inc/cntserviceassigncontactcardview.h Thu Sep 02 20:16:15 2010 +0300
@@ -39,7 +39,7 @@
Q_OBJECT
public slots:
- void doCloseView();
+ void doCloseView(int value);
void addToContacts();
void saveNew();
void updateExisting();
--- a/phonebookui/phonebookservices/inc/cntservicecontactcardview.h Wed Aug 18 09:39:00 2010 +0300
+++ b/phonebookui/phonebookservices/inc/cntservicecontactcardview.h Thu Sep 02 20:16:15 2010 +0300
@@ -35,7 +35,7 @@
int viewId() const { return serviceContactCardView; }
private slots:
- void closeContactCard();
+ void closeContactCard(int value);
private:
CntAbstractServiceProvider& mProvider;
--- a/phonebookui/phonebookservices/inc/cntserviceproviderold.h Wed Aug 18 09:39:00 2010 +0300
+++ b/phonebookui/phonebookservices/inc/cntserviceproviderold.h Thu Sep 02 20:16:15 2010 +0300
@@ -111,10 +111,13 @@
private: // from CntAbstractServiceProvider
void CompleteServiceAndCloseApp(const QVariant& retValue);
+ void overrideReturnValue(const QVariant& retValue);
private:
CntServices& mServices;
int mCurrentRequestIndex;
+
+ QVariant mOverriddenReturnValue;
};
#endif /* CNTSERVICEPROVIDEROLD_H */
--- a/phonebookui/phonebookservices/inc/cntserviceproviderold2.h Wed Aug 18 09:39:00 2010 +0300
+++ b/phonebookui/phonebookservices/inc/cntserviceproviderold2.h Thu Sep 02 20:16:15 2010 +0300
@@ -110,10 +110,13 @@
private: // from CntAbstractServiceProvider
void CompleteServiceAndCloseApp(const QVariant& retValue);
+ void overrideReturnValue(const QVariant& retValue);
private:
CntServices& mServices;
int mCurrentRequestIndex;
+
+ QVariant mOverriddenReturnValue;
};
#endif /* CNTSERVICEPROVIDEROLD2_H */
--- a/phonebookui/phonebookservices/inc/cntserviceproviderviewing.h Wed Aug 18 09:39:00 2010 +0300
+++ b/phonebookui/phonebookservices/inc/cntserviceproviderviewing.h Thu Sep 02 20:16:15 2010 +0300
@@ -62,10 +62,15 @@
private: // from CntAbstractServiceProvider
void CompleteServiceAndCloseApp(const QVariant& retValue);
+ void overrideReturnValue(const QVariant& retValue);
+ bool allowSubViewsExit();
private:
CntServices& mServices;
int mCurrentRequestIndex;
+ bool mAllowExit;
+
+ QVariant mOverriddenReturnValue;
};
#endif /* CNTSERVICEPROVIDERVIEW_H */
--- a/phonebookui/phonebookservices/inc/cntservices.h Wed Aug 18 09:39:00 2010 +0300
+++ b/phonebookui/phonebookservices/inc/cntservices.h Thu Sep 02 20:16:15 2010 +0300
@@ -23,6 +23,7 @@
#include "cntabstractserviceprovider.h"
+class CntAbstractEngine;
class CntAbstractViewManager;
class XQServiceProvider;
@@ -38,7 +39,8 @@
public:
- void setViewManager( CntAbstractViewManager& aViewManager );
+ //void setViewManager( CntAbstractViewManager& aViewManager );
+ void setEngine( CntAbstractEngine& aEngine );
/**
* Opens contact selection view where multiple contacts can be selected.
@@ -175,8 +177,11 @@
private: // from CntAbstractServiceProvider
void CompleteServiceAndCloseApp(const QVariant& retValue);
+ void overrideReturnValue(const QVariant& retValue);
+ bool allowSubViewsExit();
private:
CntAbstractViewManager* mViewManager; // not owned
+ CntAbstractEngine* mEngine;
QStringList m_definitionNames;
CntAbstractServiceProvider* mCurrentProvider; // not owned
bool mIsQuittable;
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/phonebookui/phonebookservices/inc/cntservicesubeditview.h Thu Sep 02 20:16:15 2010 +0300
@@ -0,0 +1,49 @@
+/*
+* 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 CNTSERVICESUBEDITVIEW_H
+#define CNTSERVICESUBEDITVIEW_H
+
+#include <QObject>
+#include "cnteditview.h"
+#include "cntabstractserviceprovider.h"
+
+class CntServiceHandler;
+
+class CntServiceSubEditView : public CntEditView
+{
+
+Q_OBJECT
+
+public:
+
+ CntServiceSubEditView( CntAbstractServiceProvider& aServiceProvider );
+ ~CntServiceSubEditView();
+
+ int viewId() const { return editView; }
+
+private slots:
+ void doContactUpdated(int aSuccess);
+ void doContactRemoved(bool aSuccess);
+
+private:
+ CntAbstractServiceProvider& mProvider;
+
+};
+
+#endif //CNTSERVICESUBEDITVIEW_H
+// EOF
--- a/phonebookui/phonebookservices/inc/cntserviceviewfactory.h Wed Aug 18 09:39:00 2010 +0300
+++ b/phonebookui/phonebookservices/inc/cntserviceviewfactory.h Thu Sep 02 20:16:15 2010 +0300
@@ -22,11 +22,12 @@
class CntAbstractView;
class CntAbstractServiceProvider;
+class CntExtensionManager;
class CntServiceViewFactory : public CntDefaultViewFactory
{
public:
- CntServiceViewFactory( CntAbstractServiceProvider& aServiceProvider );
+ CntServiceViewFactory( CntAbstractServiceProvider& aServiceProvider, CntExtensionManager& aMgr );
~CntServiceViewFactory();
public:
--- a/phonebookui/phonebookservices/phonebookservices.pro Wed Aug 18 09:39:00 2010 +0300
+++ b/phonebookui/phonebookservices/phonebookservices.pro Thu Sep 02 20:16:15 2010 +0300
@@ -18,6 +18,7 @@
src
INCLUDEPATH += ../pbkcommonui/inc \
+ ../pbkcommonui/engine_inc \
../../inc
INCLUDEPATH += ../../phonebookengines/cntimageutility/inc
@@ -46,7 +47,8 @@
inc/cntserviceproviderfetch.h \
inc/cntserviceproviderviewing.h \
inc/cntserviceprovideredit.h \
- inc/cntserviceviewparams.h
+ inc/cntserviceviewparams.h \
+ inc/cntservicesubeditview.h
SOURCES += src/main.cpp \
src/cntserviceviewmanager.cpp \
@@ -62,7 +64,8 @@
src/cntservices.cpp \
src/cntserviceproviderfetch.cpp \
src/cntserviceproviderviewing.cpp \
- src/cntserviceprovideredit.cpp
+ src/cntserviceprovideredit.cpp \
+ src/cntservicesubeditview.cpp
# capability
TARGET.CAPABILITY = CAP_APPLICATION
--- a/phonebookui/phonebookservices/src/cntserviceassigncontactcardview.cpp Wed Aug 18 09:39:00 2010 +0300
+++ b/phonebookui/phonebookservices/src/cntserviceassigncontactcardview.cpp Thu Sep 02 20:16:15 2010 +0300
@@ -38,7 +38,7 @@
mProvider( aServiceProvider )
{
CNT_ENTRY
- connect(this, SIGNAL(backPressed()), this, SLOT(doCloseView()));
+ connect(this, SIGNAL(backPressed(int)), this, SLOT(doCloseView(int)));
connect(this, SIGNAL(viewActivated(CntAbstractViewManager*, const CntViewParameters)), this, SLOT(doViewActivated(CntAbstractViewManager*,const CntViewParameters)));
connect(this, SIGNAL(addToContacts()), this, SLOT(addToContacts()));
CNT_EXIT
@@ -145,10 +145,12 @@
/*!
Close the view (quits the service as well)
*/
-void CntServiceAssignContactCardView::doCloseView()
+void CntServiceAssignContactCardView::doCloseView(int value)
{
CNT_ENTRY
- qApp->quit();
+ QVariant variant;
+ variant.setValue(value);
+ mProvider.CompleteServiceAndCloseApp(variant);
CNT_EXIT
}
--- a/phonebookui/phonebookservices/src/cntservicecontactcardview.cpp Wed Aug 18 09:39:00 2010 +0300
+++ b/phonebookui/phonebookservices/src/cntservicecontactcardview.cpp Thu Sep 02 20:16:15 2010 +0300
@@ -29,7 +29,7 @@
mProvider( aServiceProvider )
{
CNT_ENTRY
- connect(this, SIGNAL(backPressed()), this, SLOT(closeContactCard()));
+ connect(this, SIGNAL(backPressed(int)), this, SLOT(closeContactCard(int)));
CNT_EXIT
}
@@ -45,11 +45,12 @@
/*!
Close the view (quits the service as well)
*/
-void CntServiceContactCardView::closeContactCard()
+void CntServiceContactCardView::closeContactCard(int value)
{
CNT_ENTRY
+ CNT_LOG_ARGS(value);
QVariant variant;
- variant.setValue(KCntServicesTerminated);
+ variant.setValue(value);
mProvider.CompleteServiceAndCloseApp(variant);
CNT_EXIT
}
--- a/phonebookui/phonebookservices/src/cntservicecontactfetchview.cpp Wed Aug 18 09:39:00 2010 +0300
+++ b/phonebookui/phonebookservices/src/cntservicecontactfetchview.cpp Thu Sep 02 20:16:15 2010 +0300
@@ -58,7 +58,6 @@
void CntServiceContactFetchView::closeFetchView()
{
- QContactManager* mgr = mMgr->contactManager(SYMBIAN_BACKEND);
QModelIndexList temp = mListView->selectionModel()->selection().indexes();
mIndex = 0;
for(int i = 0; i < temp.count(); i++ )
@@ -306,7 +305,7 @@
{
aContact.setPreferredDetail(aAction, contactDetail);
//return value will be ignored because we cannot do anything if it fails.
- mMgr->contactManager(SYMBIAN_BACKEND)->saveContact(&aContact);
+ mEngine->contactManager(SYMBIAN_BACKEND).saveContact(&aContact);
}
showPreviousView();
--- a/phonebookui/phonebookservices/src/cntserviceproviderold.cpp Wed Aug 18 09:39:00 2010 +0300
+++ b/phonebookui/phonebookservices/src/cntserviceproviderold.cpp Thu Sep 02 20:16:15 2010 +0300
@@ -136,8 +136,19 @@
connect(this, SIGNAL(returnValueDelivered()), qApp, SLOT(quit()));
if ( mCurrentRequestIndex != 0 )
{
- CNT_LOG_ARGS("next, completing request.")
- const bool success = completeRequest(mCurrentRequestIndex, retValue);
+ bool success = false;
+
+ if (!mOverriddenReturnValue.isNull() && retValue.value<int>() != KCntServicesReturnValueContactDeleted)
+ {
+ CNT_LOG_ARGS(mOverriddenReturnValue.value<int>());
+ success = completeRequest(mCurrentRequestIndex, mOverriddenReturnValue);
+ }
+ else
+ {
+ CNT_LOG_ARGS(retValue.value<int>());
+ success = completeRequest(mCurrentRequestIndex, retValue);
+ }
+
if ( !success )
{
CNT_LOG_ARGS("Failed to complete highway request.");
@@ -147,4 +158,16 @@
CNT_EXIT
}
+void CntServiceProviderOld::overrideReturnValue(const QVariant& retValue)
+{
+ CNT_ENTRY
+
+ if (mOverriddenReturnValue.isNull() || mOverriddenReturnValue.value<int>() != KCntServicesReturnValueContactSaved)
+ {
+ mOverriddenReturnValue = retValue;
+ }
+
+ CNT_EXIT
+}
+
// end of file
--- a/phonebookui/phonebookservices/src/cntserviceproviderold2.cpp Wed Aug 18 09:39:00 2010 +0300
+++ b/phonebookui/phonebookservices/src/cntserviceproviderold2.cpp Thu Sep 02 20:16:15 2010 +0300
@@ -135,8 +135,19 @@
connect(this, SIGNAL(returnValueDelivered()), qApp, SLOT(quit()));
if ( mCurrentRequestIndex != 0 )
{
- CNT_LOG_ARGS("next, completing request.")
- const bool success = completeRequest(mCurrentRequestIndex, retValue);
+ bool success = false;
+
+ if (!mOverriddenReturnValue.isNull() && retValue.value<int>() != KCntServicesReturnValueContactDeleted)
+ {
+ CNT_LOG_ARGS(mOverriddenReturnValue.value<int>());
+ success = completeRequest(mCurrentRequestIndex, mOverriddenReturnValue);
+ }
+ else
+ {
+ CNT_LOG_ARGS(retValue.value<int>());
+ success = completeRequest(mCurrentRequestIndex, retValue);
+ }
+
if ( !success )
{
CNT_LOG_ARGS("Failed to complete highway request.");
@@ -146,5 +157,17 @@
CNT_EXIT
}
+void CntServiceProviderOld2::overrideReturnValue(const QVariant& retValue)
+{
+ CNT_ENTRY
+
+ if (mOverriddenReturnValue.isNull() || mOverriddenReturnValue.value<int>() != KCntServicesReturnValueContactSaved)
+ {
+ mOverriddenReturnValue = retValue;
+ }
+
+ CNT_EXIT
+}
+
// end of file
--- a/phonebookui/phonebookservices/src/cntserviceproviderviewing.cpp Wed Aug 18 09:39:00 2010 +0300
+++ b/phonebookui/phonebookservices/src/cntserviceproviderviewing.cpp Thu Sep 02 20:16:15 2010 +0300
@@ -28,7 +28,8 @@
CntServiceProviderViewing::CntServiceProviderViewing(CntServices& aServices, QObject *parent):
XQServiceProvider(QLatin1String(KCntServiceInterfaceView), parent),
mServices(aServices),
- mCurrentRequestIndex(0)
+ mCurrentRequestIndex(0),
+ mAllowExit(true)
{
CNT_ENTRY
publishAll();
@@ -43,39 +44,52 @@
}
void CntServiceProviderViewing::openContactCard( int aContactId )
- {
+{
CNT_ENTRY
mCurrentRequestIndex = setCurrentRequestAsync();
mServices.setQuittable(requestInfo().isEmbedded());
mServices.launchContactCard( aContactId, *this );
CNT_EXIT
- }
+}
void CntServiceProviderViewing::openTemporaryContactCard( QString aFieldName, QString aFieldValue )
- {
+{
CNT_ENTRY
mCurrentRequestIndex = setCurrentRequestAsync();
mServices.setQuittable(requestInfo().isEmbedded());
mServices.launchTemporaryContactCard( aFieldName, aFieldValue, *this );
CNT_EXIT
- }
+}
void CntServiceProviderViewing::openGroup( int aContactId )
- {
+{
CNT_ENTRY
mCurrentRequestIndex = setCurrentRequestAsync();
+ mAllowExit = false;
mServices.setQuittable(requestInfo().isEmbedded());
mServices.launchGroupMemberView( aContactId, *this );
CNT_EXIT
- }
+}
void CntServiceProviderViewing::CompleteServiceAndCloseApp(const QVariant& retValue)
- {
+{
CNT_ENTRY
connect(this, SIGNAL(returnValueDelivered()), qApp, SLOT(quit()));
if ( mCurrentRequestIndex != 0 )
{
- const bool success = completeRequest(mCurrentRequestIndex, retValue);
+ bool success = false;
+
+ if (!mOverriddenReturnValue.isNull() && retValue.value<int>() != KCntServicesReturnValueContactDeleted)
+ {
+ CNT_LOG_ARGS(mOverriddenReturnValue.value<int>());
+ success = completeRequest(mCurrentRequestIndex, mOverriddenReturnValue);
+ }
+ else
+ {
+ CNT_LOG_ARGS(retValue.value<int>());
+ success = completeRequest(mCurrentRequestIndex, retValue);
+ }
+
if ( !success )
{
CNT_LOG_ARGS("Failed to complete highway request.");
@@ -83,4 +97,21 @@
mCurrentRequestIndex = 0;
}
CNT_EXIT
+}
+
+void CntServiceProviderViewing::overrideReturnValue(const QVariant& retValue)
+{
+ CNT_ENTRY
+
+ if (mOverriddenReturnValue.isNull() || mOverriddenReturnValue.value<int>() != KCntServicesReturnValueContactSaved)
+ {
+ mOverriddenReturnValue = retValue;
}
+
+ CNT_EXIT
+}
+
+bool CntServiceProviderViewing::allowSubViewsExit()
+{
+ return mAllowExit;
+}
--- a/phonebookui/phonebookservices/src/cntservices.cpp Wed Aug 18 09:39:00 2010 +0300
+++ b/phonebookui/phonebookservices/src/cntservices.cpp Thu Sep 02 20:16:15 2010 +0300
@@ -30,11 +30,15 @@
#include <qversitcontactimporter.h>
#include <qversitdocument.h>
#include <xqserviceprovider.h>
+#include <cntabstractengine.h>
#include <QApplication>
#include <QPixmap>
#include <QFile>
#include <QUrl>
+#include <QTextCodec>
+
+const int Latin1CharSetMIB = 4;
CntServices::CntServices() :
mViewManager(NULL),
@@ -71,6 +75,15 @@
}
+void CntServices::setEngine( CntAbstractEngine& aEngine )
+{
+ CNT_LOG
+ mEngine = &aEngine;
+ mViewManager = &mEngine->viewManager();
+ CntServiceViewManager* srvMng = static_cast<CntServiceViewManager*>(mViewManager);
+ connect(srvMng, SIGNAL(applicationClosed()), this, SLOT(terminateService()));
+}
+/*
void CntServices::setViewManager( CntAbstractViewManager& aViewManager )
{
CNT_LOG
@@ -78,7 +91,7 @@
CntServiceViewManager* srvMng = static_cast<CntServiceViewManager*>(mViewManager);
connect(srvMng, SIGNAL(applicationClosed()), this, SLOT(terminateService()));
}
-
+*/
void CntServices::singleFetch(
const QString &title, const QString &action,
@@ -171,7 +184,7 @@
}
-void CntServices::editCreateNewFromVCard(const QString &vCardFile,
+void CntServices::editCreateNewFromVCard(const QString &fileName,
CntAbstractServiceProvider& aServiceProvider )
{
CNT_ENTRY
@@ -180,11 +193,26 @@
CntImageUtility imageUtility;
QContact contact;
QVersitReader reader;
- QFile file(vCardFile);
- if (!file.open(QIODevice::ReadOnly))
+ QFile inputFile(fileName);
+ if (!inputFile.open(QIODevice::ReadOnly))
return;
- reader.setDevice(&file);
+ // Versit parser default codec is UTF-8
+ // Check if decoding text to unicode is possible, else use Latin-1 text codec
+ QByteArray ba = inputFile.readAll();
+ if(!ba.isEmpty())
+ {
+ QTextCodec *c = QTextCodec::codecForUtfText(ba);
+ // Text codec returned is Latin-1, set default to Latin-1
+ if(c->mibEnum()==Latin1CharSetMIB)
+ reader.setDefaultCodec(QTextCodec::codecForName("ISO 8859-1"));
+ }
+ inputFile.close();
+
+ QFile vCardFile(fileName);
+ if (!vCardFile.open(QIODevice::ReadOnly))
+ return;
+ reader.setDevice(&vCardFile);
reader.startReading();
reader.waitForFinished();
// Use the resulting document(s)...
@@ -197,7 +225,7 @@
if(contacts.count() > 0)
contact = contacts.first();
}
- file.close();
+ vCardFile.close();
// Save thumbnail images
QList<QContactThumbnail> details = contact.details<QContactThumbnail>();
@@ -533,6 +561,29 @@
CNT_EXIT
}
+// This method is inherited from CntAbstractServiceProvider
+void CntServices::overrideReturnValue(const QVariant& retValue)
+{
+ CNT_ENTRY
+ if ( mCurrentProvider )
+ {
+ mCurrentProvider->overrideReturnValue( retValue );
+ }
+ CNT_EXIT
+}
+
+// This method is inherited from CntAbstractServiceProvider
+bool CntServices::allowSubViewsExit()
+{
+ bool allow = true;
+ if ( mCurrentProvider )
+ {
+ allow = mCurrentProvider->allowSubViewsExit();
+ }
+
+ return allow;
+}
+
void CntServices::terminateService()
{
CNT_ENTRY
@@ -547,8 +598,8 @@
QContactManager* CntServices::contactManager()
{
- if ( mViewManager )
- return mViewManager->contactManager(SYMBIAN_BACKEND);
+ if ( mEngine )
+ return &mEngine->contactManager(SYMBIAN_BACKEND);
return NULL;
}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/phonebookui/phonebookservices/src/cntservicesubeditview.cpp Thu Sep 02 20:16:15 2010 +0300
@@ -0,0 +1,65 @@
+/*
+* 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 "cntservicesubeditview.h"
+#include <cntservicescontact.h>
+#include <QCoreApplication>
+#include "cntdebug.h"
+
+CntServiceSubEditView::CntServiceSubEditView( CntAbstractServiceProvider& aServiceProvider )
+: CntEditView(),
+mProvider( aServiceProvider )
+{
+ connect( this, SIGNAL(contactUpdated(int)), this, SLOT(doContactUpdated(int)) );
+ connect( this, SIGNAL(contactRemoved(bool)), this, SLOT(doContactRemoved(bool)) );
+}
+
+CntServiceSubEditView::~CntServiceSubEditView()
+{
+}
+
+void CntServiceSubEditView::doContactUpdated(int aSuccess)
+{
+ CNT_ENTRY_ARGS(aSuccess)
+
+ if ( mProvider.allowSubViewsExit() )
+ {
+ int retValue = aSuccess ? KCntServicesReturnValueContactSaved : KCntServicesReturnValueContactNotModified;
+ QVariant variant;
+ variant.setValue(retValue);
+ mProvider.overrideReturnValue(variant);
+ }
+
+ CNT_EXIT
+}
+
+void CntServiceSubEditView::doContactRemoved(bool aSuccess)
+{
+ CNT_ENTRY_ARGS(aSuccess)
+
+ if ( mProvider.allowSubViewsExit() )
+ {
+ int retValue = aSuccess ? KCntServicesReturnValueContactDeleted : KCntServicesReturnValueContactNotModified;
+ QVariant variant;
+ variant.setValue(retValue);
+ mProvider.CompleteServiceAndCloseApp(variant);
+ }
+
+ CNT_EXIT
+}
+
+// EOF
--- a/phonebookui/phonebookservices/src/cntserviceviewfactory.cpp Wed Aug 18 09:39:00 2010 +0300
+++ b/phonebookui/phonebookservices/src/cntserviceviewfactory.cpp Thu Sep 02 20:16:15 2010 +0300
@@ -18,6 +18,7 @@
#include "cntserviceviewfactory.h"
#include "cntabstractview.h"
+#include "cntservicesubeditview.h"
#include "cntserviceeditview.h"
#include "cntservicecontactselectionview.h"
@@ -28,8 +29,8 @@
#include "cntserviceassigncontactcardview.h"
-CntServiceViewFactory::CntServiceViewFactory( CntAbstractServiceProvider& aServiceProvider ) :
-CntDefaultViewFactory(),
+CntServiceViewFactory::CntServiceViewFactory( CntAbstractServiceProvider& aServiceProvider, CntExtensionManager& aMgr ) :
+CntDefaultViewFactory( aMgr ),
mProvider( aServiceProvider )
{
}
@@ -52,6 +53,9 @@
case serviceEditView:
return new CntServiceEditView( mProvider );
+
+ case editView:
+ return new CntServiceSubEditView( mProvider );
case serviceContactCardView:
return new CntServiceContactCardView( mProvider );
--- a/phonebookui/phonebookservices/src/cntserviceviewmanager.cpp Wed Aug 18 09:39:00 2010 +0300
+++ b/phonebookui/phonebookservices/src/cntserviceviewmanager.cpp Thu Sep 02 20:16:15 2010 +0300
@@ -17,7 +17,7 @@
#include "cntserviceviewmanager.h"
#include "cntserviceviewfactory.h"
-
+#include <cntabstractengine.h>
/*!
Constructor
*/
@@ -26,7 +26,7 @@
CntDefaultViewManager(mainWindow)
{
// ownership of the factory is given to the base class.
- setViewFactory( new CntServiceViewFactory( aProvider ) );
+ setViewFactory( new CntServiceViewFactory( aProvider, engine().extensionManager() ) );
}
/*!
--- a/phonebookui/phonebookservices/src/main.cpp Wed Aug 18 09:39:00 2010 +0300
+++ b/phonebookui/phonebookservices/src/main.cpp Thu Sep 02 20:16:15 2010 +0300
@@ -48,9 +48,11 @@
CntKeyGrabber *keyGrabber = new CntKeyGrabber(&mainWindow, &mainWindow);
CntViewNavigator* navigator = new CntViewNavigator( &mainWindow );
- navigator->addException( serviceEditView, noView );
navigator->addEffect( serviceContactCardView, historyView );
navigator->addEffect( historyView, serviceContactCardView );
+ navigator->addEffect( serviceGroupMemberView, groupActionsView );
+ navigator->addEffect( groupActionsView, serviceGroupMemberView );
+ navigator->addRoot( serviceGroupMemberView );
// This object actually executes the services
CntServices* services = new CntServices();
@@ -61,7 +63,8 @@
*services ); // as CntAbstractServiceProvider
viewManager->setViewNavigator( navigator );
- services->setViewManager( *viewManager );
+ //services->setViewManager( *viewManager );
+ services->setEngine( viewManager->engine() );
// These objects talk with QT Highway (send/receive)
CntServiceProviderOld* serviceProviderOld = new CntServiceProviderOld( *services, &mainWindow ); // com.nokia.services.phonebookservices.Fetch
--- a/phonebookui/phonebookui.pro Wed Aug 18 09:39:00 2010 +0300
+++ b/phonebookui/phonebookui.pro Thu Sep 02 20:16:15 2010 +0300
@@ -38,8 +38,7 @@
exists(implml/phonebook.implml) :BLD_INF_RULES.prj_exports += "implml/phonebook.implml CRML_EXPORT_PATH(phonebook.implml,uda_content)"
exists(content/SQLite__Contacts.zip) :BLD_INF_RULES.prj_exports += "content/SQLite__Contacts.zip CRML_EXPORT_PATH(../content/zip/,uda_content)"
-
-
+BLD_INF_RULES.prj_exports += "../sis/contacts_stub.sis /epoc32/data/z/system/install/contacts_stub.sis"
DEPLOYMENT += romfiles
--- a/phonebookui/rom/phonebook.iby Wed Aug 18 09:39:00 2010 +0300
+++ b/phonebookui/rom/phonebook.iby Thu Sep 02 20:16:15 2010 +0300
@@ -27,7 +27,6 @@
file=ABI_DIR\BUILD_DIR\cntlistmodel.dll SHARED_LIB_DIR\cntlistmodel.dll UNPAGED
file=ABI_DIR\BUILD_DIR\cnthistorymodel.dll SHARED_LIB_DIR\cnthistorymodel.dll UNPAGED
file=ABI_DIR\BUILD_DIR\cntactionsplugin.dll SHARED_LIB_DIR\cntactionsplugin.dll UNPAGED
-file=ABI_DIR\BUILD_DIR\cntmaptileservice.dll SHARED_LIB_DIR\cntmaptileservice.dll UNPAGED
file=ABI_DIR\BUILD_DIR\cntsimutility.dll SHARED_LIB_DIR\cntsimutility.dll UNPAGED
file=ABI_DIR\BUILD_DIR\cntimageutility.dll SHARED_LIB_DIR\cntimageutility.dll UNPAGED
@@ -42,5 +41,6 @@
data=ZRESOURCE\hb\splashml\phonebook.splashml RESOURCE_FILES_DIR\hb\splashml\phonebook.splashml
data=ZRESOURCE\hb\splashml\phonebook.docml RESOURCE_FILES_DIR\hb\splashml\phonebook.docml
-data=ZRESOURCE\qt\crml\cntmaptilepublisher.qcrml RESOURCE_FILES_DIR\qt\crml\cntmaptilepublisher.qcrml
+data=ZSYSTEM\install\contacts_stub.sis System\Install\contacts_stub.sis
+
#endif
\ No newline at end of file
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/phonebookui/tsrc/generator/rom/contactgenerator.iby Thu Sep 02 20:16:15 2010 +0300
@@ -0,0 +1,28 @@
+/*
+* Copyright (c) 2010 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 __CONTACT_GENERATOR_IBY__
+#define __CONTACT_GENERATOR_IBY__
+
+#include <bldvariant.hrh>
+#include <data_caging_paths_for_iby.hrh>
+
+S60_APP_EXE(ContactGenerator)
+S60_APP_RESOURCE(ContactGenerator)
+data=DATAZ_\PRIVATE\10003A3F\IMPORT\APPS\ContactGenerator_reg.rsc Private\10003a3f\import\apps\ContactGenerator_reg.rsc
+
+#endif
\ No newline at end of file
--- a/pimprotocols/pbap/group/btaccesshost.mmp Wed Aug 18 09:39:00 2010 +0300
+++ b/pimprotocols/pbap/group/btaccesshost.mmp Thu Sep 02 20:16:15 2010 +0300
@@ -61,7 +61,7 @@
LIBRARY pbaplogeng.lib logcli.lib
LIBRARY cntmodel.lib cntview.lib
LIBRARY versit.lib vcard.lib logwrap.lib
-
+LIBRARY centralrepository.lib
LIBRARY btlogger.lib tzclient.lib
SMPSAFE
--- a/pimprotocols/pbap/inc/pbapvcardexporterutil.h Wed Aug 18 09:39:00 2010 +0300
+++ b/pimprotocols/pbap/inc/pbapvcardexporterutil.h Thu Sep 02 20:16:15 2010 +0300
@@ -79,6 +79,7 @@
TVCardVersion iFormat;
TUint64 iFilter;
RTz iTzClient;
+ TInt iMatchDigitCount;
};
#endif // PBAPVCARDEXPORTERUTIL_H
--- a/pimprotocols/pbap/server/pbapvcardexporterutil.cpp Wed Aug 18 09:39:00 2010 +0300
+++ b/pimprotocols/pbap/server/pbapvcardexporterutil.cpp Thu Sep 02 20:16:15 2010 +0300
@@ -21,6 +21,8 @@
#include <s32strm.h>
#include <vprop.h>
#include <vcard.h>
+#include <centralrepository.h>
+
#ifdef SYMBIAN_ENABLE_SPLIT_HEADERS
#include "vcard3.h"
#include "cntdb_internal.h"
@@ -29,6 +31,13 @@
#include "pbaplogeng.h"
#include "btaccesshostlog.h"
+/* These constants are properly defined in telconfigcrkeys.h, however we
+are not allowed to include that from here. As a temporary fix the constants
+from that file are re-defined here. */
+const TUid KCRUidTelConfiguration = {0x102828B8};
+const TUint32 KTelMatchDigits = 0x00000001;
+/* And similarly this constant is defined in ccsdefs.h */
+const TInt KDefaultGsmNumberMatchLength = 7;
//constants
_LIT8(KVersitTokenCALLDATETIME,"X-IRMC-CALL-DATETIME");
@@ -59,6 +68,23 @@
LOG_FUNC
CVersitTlsData::VersitTlsDataL();
User::LeaveIfError(iTzClient.Connect());
+
+ // Read the amount of digits to be used in contact matching
+ // The key is properly owned by PhoneApp, however we cannot include
+ // that header file from here, so a temporary fix has been done to
+ // use locally defined versions. If there is a problem here it is
+ // likely because these values have gone out of sync.
+ CRepository* repository = CRepository::NewLC(KCRUidTelConfiguration);
+ if ( repository->Get(KTelMatchDigits, iMatchDigitCount) == KErrNone )
+ {
+ // Min is 7
+ iMatchDigitCount = Max(iMatchDigitCount, KDefaultGsmNumberMatchLength);
+ }
+ else
+ {
+ iMatchDigitCount = KDefaultGsmNumberMatchLength;
+ }
+ CleanupStack::PopAndDestroy(repository);
}
CPbapVCardExporterUtil::~CPbapVCardExporterUtil()
@@ -161,16 +187,12 @@
TContactItemId CPbapVCardExporterUtil::FindContactIdFromNumberL(const TDesC& aNumber)
{
TContactItemId ret = KNullContactId;
- CContactItemFieldDef* fieldDef;
- fieldDef = new(ELeave) CContactItemFieldDef;
- CleanupStack::PushL(fieldDef);
- fieldDef->AppendL(KUidContactFieldPhoneNumber);
- CContactIdArray* contactIdArray = iDatabase.FindLC(aNumber, fieldDef);
+ CContactIdArray* contactIdArray = iDatabase.MatchPhoneNumberL(aNumber, iMatchDigitCount);
if (contactIdArray->Count() > 0)
{
ret = (*contactIdArray)[0];
}
- CleanupStack::PopAndDestroy(2); // contactIdArray, fieldDef
+ delete contactIdArray;
return ret;
}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/sis/contacts.pkg Thu Sep 02 20:16:15 2010 +0300
@@ -0,0 +1,57 @@
+;
+; 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: pkg file of Contacts Application for IAD.
+;
+
+
+; Language
+&EN
+
+
+; SIS header: name, uid, version
+#{"Contacts"},(0x20022EF9),1,1,0, TYPE=SA, RU
+
+; Localised Vendor name
+%{"Nokia"}
+
+; Unique Vendor name
+:"Nokia"
+
+
+
+
+"/epoc32/release/armv5/urel/cntlistmodel.dll" - "!:/sys/bin/cntlistmodel.dll"
+"/epoc32/release/armv5/urel/cnthistorymodel.dll" - "!:/sys/bin/cnthistorymodel.dll"
+"/epoc32/release/armv5/urel/cntactionsplugin.dll" - "!:/sys/bin/cntactionsplugin.dll"
+"/epoc32/release/armv5/urel/cntsimutility.dll" - "!:/sys/bin/cntsimutility.dll"
+"/epoc32/release/armv5/urel/cntimageutility.dll" - "!:/sys/bin/cntimageutility.dll"
+
+"/epoc32/release/armv5/urel/pbkcommonui.dll" - "!:/sys/bin/pbkcommonui.dll"
+"/epoc32/release/armv5/urel/phonebook.exe" - "!:/sys/bin/phonebook.exe"
+
+
+"/epoc32/data/z/resource/qt/plugins/contacts\cntactionsplugin.qtplugin" - "!:/resource/qt/plugins/contacts\cntactionsplugin.qtplugin"
+
+"/epoc32/data/z/resource/hb/splashml/phonebook.splashml" - "!:\resource\hb\splashml\phonebook.splashml"
+"/epoc32/data/z/resource/hb/splashml/phonebook.splashml" - "!:\resource\hb\splashml\phonebook.splashml"
+
+; Phonebook services
+"/epoc32/release/armv5/urel/phonebookservices.exe" - "!:/sys/bin/phonebookservices.exe"
+"/epoc32/data/z/resource/apps/phonebookservices.rsc" - "!:/resource/apps/phonebookservices.rsc"
+"/epoc32/data/Z/private/10003a3f/import/apps/phonebookservices_reg.rsc" - "!:/private/10003a3f/import/apps/phonebookservices_reg.rsc"
+
+
+;Phonebook resources
+"/epoc32/data/z/resource/apps/phonebook.rsc" - "!:/resource/apps/phonebook.rsc"
+"/epoc32/data/z/resource/qt/translations/contacts_en.qm" - "!:/resource/qt/translations/contacts_en.qm"
\ No newline at end of file
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/sis/contacts_stub.pkg Thu Sep 02 20:16:15 2010 +0300
@@ -0,0 +1,56 @@
+;
+; 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: PKG file of Contacts Application for IAD.
+;
+
+; Language
+&EN
+
+
+; SIS header: name, uid, version
+#{"Contacts"},(0x20022EF9),1,0,0, TYPE=SA
+
+; Localised Vendor name
+%{"Nokia"}
+
+; Unique Vendor name
+:"Nokia"
+
+
+; Phonebook.iby contents
+
+"" - "z:\sys\bin\cntlistmodel.dll"
+"" - "z:\sys\bin\cnthistorymodel.dll"
+"" - "z:\sys\bin\cntactionsplugin.dll"
+"" - "z:\sys\bin\cntsimutility.dll"
+"" - "z:\sys\bin\cntimageutility.dll"
+"" - "z:\sys\bin\pbkcommonui.dll"
+"" - "z:\sys\bin\phonebook.exe"
+
+"" - "z:\resource\qt\plugins\contacts\cntactionsplugin.qtplugin"
+
+"" - "z:\resource\hb\splashml\phonebook.splashml"
+"" - "z:\resource\hb\splashml\phonebook.docml"
+
+; Phonebookservices.iby contents
+"" - "z:\sys\bin\phonebookservices.exe"
+"" - "z:\resource\apps\phonebookservices.r*"
+"" - "z:\private\10003a3f\import\apps\phonebookservices_reg.rsc"
+
+
+
+;Phonebookresources.iby contents
+"" - "z:\resource\qt\translations\contacts*.qm"
+"" - "z:\resource\apps\phonebook.r*"
+
Binary file sis/contacts_stub.sis has changed
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/sis/create_sis_package.bat Thu Sep 02 20:16:15 2010 +0300
@@ -0,0 +1,29 @@
+@rem
+@rem Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+@rem All rights reserved.
+@rem This component and the accompanying materials are made available
+@rem under the terms of "Eclipse Public License v1.0"
+@rem which accompanies this distribution, and is available
+@rem at the URL "http://www.eclipse.org/legal/epl-v10.html".
+@rem
+@rem Initial Contributors:
+@rem Nokia Corporation - initial contribution.
+@rem
+@rem Contributors:
+@rem
+@rem Description:
+@rem
+
+@echo off
+
+IF EXIST contacts.sisx (
+ echo Deleting old contacts.sisx file.
+ del contacts.sisx
+)
+
+
+CALL createsis create -cert ./certs/rd.cer -key ./certs/rd-key.pem contacts.pkg
+
+RENAME contacts.sis contacts.sisx
+echo Created new contacts.sisx file.
+@echo done.
\ No newline at end of file