diff -r bbb98528c666 -r 3738fe97f027 videocollection/videocollectionview/src/videocollectionviewplugin.cpp --- a/videocollection/videocollectionview/src/videocollectionviewplugin.cpp Thu Apr 01 23:22:15 2010 +0300 +++ b/videocollection/videocollectionview/src/videocollectionviewplugin.cpp Thu Apr 01 23:32:44 2010 +0300 @@ -17,6 +17,7 @@ // INCLUDE FILES #include +#include #include #include #include @@ -24,6 +25,7 @@ #include "videocollectionviewplugin.h" #include "videolistview.h" #include "videocollectionuiloader.h" +#include "mpxhbvideocommondefs.h" // --------------------------------------------------------------------------- // Constructor @@ -32,7 +34,8 @@ VideoCollectionViewPlugin::VideoCollectionViewPlugin() : mUiLoader(0), mView(0), - mActivated(false) + mActivated(false), + mIsService(false) { } @@ -61,6 +64,13 @@ mUiLoader->reset(); + if (XQServiceUtil::isService()) + { + mIsService = true; + } + + mUiLoader->setIsService(mIsService); + bool ok(false); QList objects = mUiLoader->load(DOCML_VIDEOCOLLECTIONVIEW_FILE, &ok); @@ -78,15 +88,35 @@ return; } - if(!connect( mView, SIGNAL(command(int)), this, SIGNAL(command(int)) ) ) { + if(!connect( mView, SIGNAL(command(int)), this, SIGNAL(command(int)) ) || + !connect( this, SIGNAL(doDelayeds()), mView, SLOT(doDelayedsSlot()) )) { // TODO: handle error: connecting signal delete mView; mView = 0; return; } - + mTimerId = startTimer(DELAYED_LOAD_TIMEOUT); mView->initializeView(); + } +} + +// --------------------------------------------------------------------------- +// timerEvent +// --------------------------------------------------------------------------- +// +void VideoCollectionViewPlugin::timerEvent(QTimerEvent *event) +{ + if (event) + { + if (event->timerId() == mTimerId) + { + killTimer(mTimerId); + mTimerId = 0; + + emit command(MpxHbVideoCommon::DoDelayedLoad); + emit doDelayeds(); + } } }