notes/notesui/notesappcontroller/src/notesappcontroller.cpp
changeset 23 fd30d51f876b
parent 18 c198609911f9
child 45 b6db4fd4947b
equal deleted inserted replaced
18:c198609911f9 23:fd30d51f876b
    12 * Contributors:
    12 * Contributors:
    13 *
    13 *
    14 * Description: This is the Definition file for NotesAppController class.
    14 * Description: This is the Definition file for NotesAppController class.
    15 *
    15 *
    16 */
    16 */
    17 
       
    18 // System includes
       
    19 #include <QDebug>
       
    20 
    17 
    21 // User includes
    18 // User includes
    22 #include "notesappcontroller.h"
    19 #include "notesappcontroller.h"
    23 #include "notesappcontrollerifimpl.h"
    20 #include "notesappcontrollerifimpl.h"
    24 #include "notesviewmanager.h"
    21 #include "notesviewmanager.h"
    38 :QObject(parent),
    35 :QObject(parent),
    39  mViewManager(0),
    36  mViewManager(0),
    40  mNotesModelHandler(0),
    37  mNotesModelHandler(0),
    41  mIfImpl(0)
    38  mIfImpl(0)
    42 {
    39 {
    43 	qDebug() << "notes: NotesAppController::NoteAppController -->";
       
    44 
       
    45 	// Construct the interface implementation.
    40 	// Construct the interface implementation.
    46 	mIfImpl = new NotesAppControllerIfImpl(this, this);
    41 	mIfImpl = new NotesAppControllerIfImpl(this, this);
    47 
    42 
    48 	// Construct the model handler.
    43 	// Construct the model handler.
    49 	mNotesModelHandler = new NotesModelHandler(this);
    44 	mNotesModelHandler = new NotesModelHandler(this);
    54 	// Construct the view manager.
    49 	// Construct the view manager.
    55 	mViewManager = new NotesViewManager(*mIfImpl, this);
    50 	mViewManager = new NotesViewManager(*mIfImpl, this);
    56 	Q_ASSERT_X(
    51 	Q_ASSERT_X(
    57 			mViewManager, "notesappcontroller.cpp",
    52 			mViewManager, "notesappcontroller.cpp",
    58 			"NotesViewManager is 0");
    53 			"NotesViewManager is 0");
    59 
       
    60 	qDebug() << "notes: NotesAppController::NoteAppController <--";
       
    61 }
    54 }
    62 
    55 
    63 /*!
    56 /*!
    64 	Destructor.
    57 	Destructor.
    65  */
    58  */
    66 NotesAppController::~NotesAppController()
    59 NotesAppController::~NotesAppController()
    67 {
    60 {
    68 	qDebug() << "notes: NotesAppController::~NoteAppController -->";
       
    69 
       
    70 	if (mViewManager) {
    61 	if (mViewManager) {
    71 		delete mViewManager;
    62 		delete mViewManager;
    72 		mViewManager = 0;
    63 		mViewManager = 0;
    73 	}
    64 	}
    74 	if (mNotesModelHandler) {
    65 	if (mNotesModelHandler) {
    77 	}
    68 	}
    78 	if (mIfImpl) {
    69 	if (mIfImpl) {
    79 		delete mIfImpl;
    70 		delete mIfImpl;
    80 		mIfImpl = 0;
    71 		mIfImpl = 0;
    81 	}
    72 	}
    82 
       
    83 	qDebug() << "notes: NotesAppController::~NoteAppController <--";
       
    84 }
    73 }
    85 
    74 
    86 // End of file	--Don't remove this.
    75 // End of file	--Don't remove this.