69 |
69 |
70 void GlxViewManager::setupItems( ) |
70 void GlxViewManager::setupItems( ) |
71 { |
71 { |
72 mMenuManager = new GlxMenuManager(mMainWindow); |
72 mMenuManager = new GlxMenuManager(mMainWindow); |
73 addBackSoftKeyAction(); |
73 addBackSoftKeyAction(); |
74 createToolBar(); |
74 |
75 addConnection(); |
75 addConnection(); |
76 mView->addToolBar(mViewToolBar); |
76 |
77 mMenuManager->addMenu( mView->viewId(), mView->menu() ); |
77 mMenuManager->addMenu( mView->viewId(), mView->menu() ); |
78 mMenuManager->setModel( mModel ); |
78 mMenuManager->setModel( mModel ); |
79 } |
79 } |
80 |
80 |
81 void GlxViewManager::launchApplication(qint32 id, QAbstractItemModel *model) |
81 void GlxViewManager::launchApplication(qint32 id, QAbstractItemModel *model) |
82 { |
82 { |
83 mModel = model; |
83 mModel = model; |
84 PERFORMANCE_ADV ( viewMgrD1, "View Creation time" ) { |
84 PERFORMANCE_ADV ( viewMgrD1, "View Creation time" ) { |
85 mView = resolveView(id); |
85 mView = resolveView(id); |
86 } |
86 } |
|
87 createToolBar(); |
|
88 mView->addToolBar(mViewToolBar); |
|
89 |
|
90 /* We are showing the toolBar before activating the |
|
91 * view. This is done to avoid the animation effect seen otherwise |
|
92 * when the tool bar comes up. |
|
93 * |
|
94 * If animation Effect is not removed, it leads to flickering effect |
|
95 * since we are creating a new tool bar..although a fake tool bar was |
|
96 * already created on the splashscreen |
|
97 * |
|
98 */ |
87 mView->activate(); |
99 mView->activate(); |
88 |
100 |
89 PERFORMANCE_ADV ( viewMgrD3, "Set Model time") |
101 PERFORMANCE_ADV ( viewMgrD3, "Set Model time") |
90 mView->setModel(mModel); |
102 mView->setModel(mModel); |
91 |
103 |
143 return launchView(id, model); |
155 return launchView(id, model); |
144 } |
156 } |
145 |
157 |
146 //create and registered the effect |
158 //create and registered the effect |
147 if ( mEffectEngine == NULL ) { |
159 if ( mEffectEngine == NULL ) { |
148 mEffectEngine = new GlxSlideShowEffectEngine(); |
160 mEffectEngine = new GlxEffectEngine(); |
149 mEffectEngine->registerTransitionEffect(); |
161 mEffectEngine->registerTransitionEffect(); |
150 connect( mEffectEngine, SIGNAL( effectFinished() ), this, SLOT( effectFinished() ) ); |
162 connect( mEffectEngine, SIGNAL( effectFinished() ), this, SLOT( effectFinished() ) ); |
151 } |
163 } |
152 |
164 |
153 QList< QGraphicsItem * > itemList; |
165 QList< QGraphicsItem * > itemList; |