17 |
17 |
18 // User includes |
18 // User includes |
19 #include "clockappcontroller.h" |
19 #include "clockappcontroller.h" |
20 #include "clockappcontrollerifimpl.h" |
20 #include "clockappcontrollerifimpl.h" |
21 #include "clockviewmanager.h" |
21 #include "clockviewmanager.h" |
|
22 #include "OstTraceDefinitions.h" |
|
23 #ifdef OST_TRACE_COMPILER_IN_USE |
|
24 #include "clockappcontrollerTraces.h" |
|
25 #endif |
|
26 |
22 |
27 |
23 /*! |
28 /*! |
24 \class ClockAppController |
29 \class ClockAppController |
25 |
30 |
26 This is the heart of clock application. It constructs and owns the |
31 This is the heart of clock application. It constructs and owns the |
33 ClockAppController::ClockAppController(QObject *parent) |
38 ClockAppController::ClockAppController(QObject *parent) |
34 :QObject(parent), |
39 :QObject(parent), |
35 mViewManager(0), |
40 mViewManager(0), |
36 mIfImpl(0) |
41 mIfImpl(0) |
37 { |
42 { |
|
43 OstTraceFunctionEntry0( CLOCKAPPCONTROLLER_CLOCKAPPCONTROLLER_ENTRY ); |
38 // Construct the interface implementation. |
44 // Construct the interface implementation. |
39 mIfImpl = new ClockAppControllerIfImpl(this, this); |
45 mIfImpl = new ClockAppControllerIfImpl(this, this); |
40 |
46 |
41 // Construct the view manager. |
47 // Construct the view manager. |
42 mViewManager = new ClockViewManager(*mIfImpl, this); |
48 mViewManager = new ClockViewManager(*mIfImpl, this); |
43 Q_ASSERT_X( |
49 Q_ASSERT_X( |
44 mViewManager, "clockappcontroller.cpp", |
50 mViewManager, "clockappcontroller.cpp", |
45 "ClockViewManager is 0"); |
51 "ClockViewManager is 0"); |
46 connect(mViewManager, SIGNAL(appReady()), this, SLOT(handleAppReady())); |
52 connect(mViewManager, SIGNAL(appReady()), this, SLOT(handleAppReady())); |
|
53 OstTraceFunctionExit0( CLOCKAPPCONTROLLER_CLOCKAPPCONTROLLER_EXIT ); |
47 } |
54 } |
48 |
55 |
49 /*! |
56 /*! |
50 Destructor. |
57 Destructor. |
51 */ |
58 */ |
52 ClockAppController::~ClockAppController() |
59 ClockAppController::~ClockAppController() |
53 { |
60 { |
|
61 OstTraceFunctionEntry0( DUP1_CLOCKAPPCONTROLLER_CLOCKAPPCONTROLLER_ENTRY ); |
54 if (mViewManager) { |
62 if (mViewManager) { |
55 delete mViewManager; |
63 delete mViewManager; |
56 mViewManager = 0; |
64 mViewManager = 0; |
57 } |
65 } |
58 if (mIfImpl) { |
66 if (mIfImpl) { |
59 delete mIfImpl; |
67 delete mIfImpl; |
60 mIfImpl = 0; |
68 mIfImpl = 0; |
61 } |
69 } |
|
70 OstTraceFunctionExit0( DUP1_CLOCKAPPCONTROLLER_CLOCKAPPCONTROLLER_EXIT ); |
62 } |
71 } |
63 |
72 |
64 /*! |
73 /*! |
65 Emits the appReday signal. |
74 Emits the appReday signal. |
66 */ |
75 */ |
67 void ClockAppController::handleAppReady() |
76 void ClockAppController::handleAppReady() |
68 { |
77 { |
|
78 OstTraceFunctionEntry0( CLOCKAPPCONTROLLER_HANDLEAPPREADY_ENTRY ); |
69 emit appReady(); |
79 emit appReady(); |
70 disconnect(mViewManager, SIGNAL(appReady()), this, SLOT(handleAppReady())); |
80 disconnect(mViewManager, SIGNAL(appReady()), this, SLOT(handleAppReady())); |
|
81 OstTraceFunctionExit0( CLOCKAPPCONTROLLER_HANDLEAPPREADY_EXIT ); |
71 } |
82 } |
72 |
83 |
73 // End of file --Don't remove this. |
84 // End of file --Don't remove this. |