messagingapp/msgui/unifiedviewer/src/unifiedviewer.cpp
changeset 63 eceabb8c7a12
parent 62 fdbe8253b596
child 67 fc91263aee62
equal deleted inserted replaced
62:fdbe8253b596 63:eceabb8c7a12
    27 #include <centralrepository.h>
    27 #include <centralrepository.h>
    28 #include <MmsEngineDomainCRKeys.h>
    28 #include <MmsEngineDomainCRKeys.h>
    29 #include <ccsdefs.h>
    29 #include <ccsdefs.h>
    30 #include <xqappmgr.h>
    30 #include <xqappmgr.h>
    31 #include <xqaiwrequest.h>
    31 #include <xqaiwrequest.h>
       
    32 #include <sqldb.h>
    32 
    33 
    33 // USER INCLUDES
    34 // USER INCLUDES
    34 #include "uniscrollarea.h"
    35 #include "uniscrollarea.h"
    35 #include "unicontentswidget.h"
    36 #include "unicontentswidget.h"
    36 #include "univiewerfeeder.h"
    37 #include "univiewerfeeder.h"
    62 
    63 
    63 //----------------------------------------------------------------------------
    64 //----------------------------------------------------------------------------
    64 // UnifiedViewer::UnifiedViewer
    65 // UnifiedViewer::UnifiedViewer
    65 // constructor
    66 // constructor
    66 //----------------------------------------------------------------------------
    67 //----------------------------------------------------------------------------
    67 UnifiedViewer::UnifiedViewer(const qint32 messageId,
    68 UnifiedViewer::UnifiedViewer(const qint32 messageId, QGraphicsItem *parent) :
    68                              QGraphicsItem *parent) :
       
    69     MsgBaseView(parent), mConversationID(-1)
    69     MsgBaseView(parent), mConversationID(-1)
    70 {
    70 {
    71     QDEBUG_WRITE("UnifiedViewer contruction start");
    71     QDEBUG_WRITE("UnifiedViewer contruction start");
    72 
    72 
    73     if (!HbStyleLoader::registerFilePath(":/layouts"))
    73     if (!HbStyleLoader::registerFilePath(":/layouts")) {
    74     {
       
    75         QDEBUG_WRITE("ERROR: UnifiedViewer -> HbStyleLoader::registerFilePath");
    74         QDEBUG_WRITE("ERROR: UnifiedViewer -> HbStyleLoader::registerFilePath");
    76     }
    75     }
    77 
    76 
    78     mMessageId = messageId;
    77     mMessageId = messageId;
    79     mViewFeeder = new UniViewerFeeder(mMessageId, this);
    78     mViewFeeder = new UniViewerFeeder(mMessageId, this);
    80 
    79 
    81     mScrollArea = new UniScrollArea(this);
    80     mScrollArea = new UniScrollArea(this);
    82     this->setWidget(mScrollArea);
    81     this->setWidget(mScrollArea);
    83 
    82 
    84     mContentsWidget = new UniContentsWidget(mViewFeeder,this);
    83     mContentsWidget = new UniContentsWidget(mViewFeeder, this);
    85 
    84 
    86     connect(mContentsWidget,SIGNAL(sendMessage(const QString&,const QString&)),
    85     connect(mContentsWidget, SIGNAL(sendMessage(const QString&,const QString&)), this,
    87             this, SLOT(sendMessage(const QString&,const QString&)));
    86         SLOT(sendMessage(const QString&,const QString&)));
    88 
    87 
    89     connect(mScrollArea, SIGNAL(scrolledToNextSlide()),
    88     connect(mScrollArea, SIGNAL(scrolledToNextSlide()), mContentsWidget, SLOT(populateNextSlide()));
    90     mContentsWidget, SLOT(populateNextSlide()));
       
    91 
    89 
    92     mScrollArea->setContentWidget(mContentsWidget);
    90     mScrollArea->setContentWidget(mContentsWidget);
    93     mScrollArea->setHorizontalScrollBarPolicy(HbScrollArea::ScrollBarAlwaysOff);
    91     mScrollArea->setHorizontalScrollBarPolicy(HbScrollArea::ScrollBarAlwaysOff);
    94     mScrollArea->setVerticalScrollBarPolicy(HbScrollArea::ScrollBarAutoHide);
    92     mScrollArea->setVerticalScrollBarPolicy(HbScrollArea::ScrollBarAutoHide);
    95 
    93