equal
deleted
inserted
replaced
12 * Contributors: |
12 * Contributors: |
13 * |
13 * |
14 * Description: This is the Definition file for ClockAppController class. |
14 * Description: This is the Definition file for ClockAppController class. |
15 * |
15 * |
16 */ |
16 */ |
17 |
|
18 // System includes |
|
19 #include <QDebug> |
|
20 |
17 |
21 // User includes |
18 // User includes |
22 #include "clockappcontroller.h" |
19 #include "clockappcontroller.h" |
23 #include "clockappcontrollerifimpl.h" |
20 #include "clockappcontrollerifimpl.h" |
24 #include "clockviewmanager.h" |
21 #include "clockviewmanager.h" |
36 ClockAppController::ClockAppController(QObject *parent) |
33 ClockAppController::ClockAppController(QObject *parent) |
37 :QObject(parent), |
34 :QObject(parent), |
38 mViewManager(0), |
35 mViewManager(0), |
39 mIfImpl(0) |
36 mIfImpl(0) |
40 { |
37 { |
41 qDebug() << "clock: ClockAppController::ClockAppController -->"; |
|
42 |
|
43 // Construct the interface implementation. |
38 // Construct the interface implementation. |
44 mIfImpl = new ClockAppControllerIfImpl(this, this); |
39 mIfImpl = new ClockAppControllerIfImpl(this, this); |
45 |
40 |
46 // Construct the view manager. |
41 // Construct the view manager. |
47 mViewManager = new ClockViewManager(*mIfImpl, this); |
42 mViewManager = new ClockViewManager(*mIfImpl, this); |
48 Q_ASSERT_X( |
43 Q_ASSERT_X( |
49 mViewManager, "clockappcontroller.cpp", |
44 mViewManager, "clockappcontroller.cpp", |
50 "ClockViewManager is 0"); |
45 "ClockViewManager is 0"); |
51 |
|
52 qDebug() << "clock: ClockAppController::ClockAppController <--"; |
|
53 } |
46 } |
54 |
47 |
55 /*! |
48 /*! |
56 Destructor. |
49 Destructor. |
57 */ |
50 */ |
58 ClockAppController::~ClockAppController() |
51 ClockAppController::~ClockAppController() |
59 { |
52 { |
60 qDebug() << "clock: ClockAppController::~ClockAppController -->"; |
|
61 |
|
62 if (mViewManager) { |
53 if (mViewManager) { |
63 delete mViewManager; |
54 delete mViewManager; |
64 mViewManager = 0; |
55 mViewManager = 0; |
65 } |
56 } |
66 if (mIfImpl) { |
57 if (mIfImpl) { |
67 delete mIfImpl; |
58 delete mIfImpl; |
68 mIfImpl = 0; |
59 mIfImpl = 0; |
69 } |
60 } |
70 |
|
71 qDebug() << "clock: ClockAppController::~ClockAppController <--"; |
|
72 } |
61 } |
73 |
62 |
74 // End of file --Don't remove this. |
63 // End of file --Don't remove this. |