clock/clockui/clockviewmanager/src/clockviewmanager.cpp
changeset 55 2c54b51f39c4
parent 45 b6db4fd4947b
child 57 bb2d3e476f29
equal deleted inserted replaced
51:0b38fc5b94c6 55:2c54b51f39c4
    17 */
    17 */
    18 
    18 
    19 // System includes
    19 // System includes
    20 #include <HbMainWindow>
    20 #include <HbMainWindow>
    21 #include <HbInstance>
    21 #include <HbInstance>
    22 #include <hbapplication> // hbapplication
    22 #include <HbApplication>
    23 #include <hbactivitymanager> // hbactivitymanager
    23 #include <HbActivityManager>
       
    24 #include <HbToolBar>
    24 
    25 
    25 // User includes
    26 // User includes
    26 #include "clockviewmanager.h"
    27 #include "clockviewmanager.h"
    27 #include "clockdocloader.h"
    28 #include "clockdocloader.h"
    28 #include "clockmainview.h"
    29 #include "clockmainview.h"
   146 	docLoader->load(CLOCK_MAIN_VIEW_DOCML, &loadSuccess);
   147 	docLoader->load(CLOCK_MAIN_VIEW_DOCML, &loadSuccess);
   147 
   148 
   148 	// Find the main view.
   149 	// Find the main view.
   149 	mMainView = static_cast<ClockMainView *> (
   150 	mMainView = static_cast<ClockMainView *> (
   150 			docLoader->findWidget(CLOCK_MAIN_VIEW));
   151 			docLoader->findWidget(CLOCK_MAIN_VIEW));
       
   152 	
       
   153 	// Disable animation effect on toolbar.
       
   154 	HbEffect::disable(mMainView->toolBar()->graphicsItem());
   151 
   155 
   152 	// Setup the view.
   156 	// Setup the view.
   153 	mMainView->setupView(mAppControllerIf, docLoader);
   157 	mMainView->setupView(mAppControllerIf, docLoader);
   154 
   158 
   155 	// Set the main view to the window
   159 	// Set the main view to the window
   170 	docLoader->load(CLOCK_WORLD_VIEW_DOCML, &loadSuccess);
   174 	docLoader->load(CLOCK_WORLD_VIEW_DOCML, &loadSuccess);
   171 
   175 
   172 	// Get the world list view.
   176 	// Get the world list view.
   173 	mWorldClockView = static_cast<ClockWorldView *> (
   177 	mWorldClockView = static_cast<ClockWorldView *> (
   174 			docLoader->findWidget(CLOCK_WORLD_VIEW));
   178 			docLoader->findWidget(CLOCK_WORLD_VIEW));
       
   179 	
       
   180 	// Disable animation effect on toolbar.
       
   181 	HbEffect::disable(mWorldClockView->toolBar()->graphicsItem());
   175 
   182 
   176 	mWorldClockView->setupView(mAppControllerIf, docLoader);
   183 	mWorldClockView->setupView(mAppControllerIf, docLoader);
   177 }
   184 }
   178 
   185 
   179 /*!
   186 /*!
   189 	// Disconnect the signal viewReady as all the views are loaded.
   196 	// Disconnect the signal viewReady as all the views are loaded.
   190 	HbMainWindow *window = hbInstance->allMainWindows().first();
   197 	HbMainWindow *window = hbInstance->allMainWindows().first();
   191 	disconnect(
   198 	disconnect(
   192 			window, SIGNAL(viewReady()),
   199 			window, SIGNAL(viewReady()),
   193 			this, SLOT(loadOtherViews()));
   200 			this, SLOT(loadOtherViews()));
       
   201 	
       
   202 	// Need to emit this signal after the view is fully constructed & populated
       
   203 	// with actual data and ready to be used. So entry view & instance view
       
   204 	// needs to be created so that a new entry can also be created. Finally
       
   205 	// NotesApplication object needs to emit applicationReady Signal.
       
   206 	emit appReady();
   194 }
   207 }
   195 
   208 
   196 // End of file	--Don't remove this.
   209 // End of file	--Don't remove this.