clock/clockui/clockapplication/src/clockapplication.cpp
changeset 57 bb2d3e476f29
parent 55 2c54b51f39c4
equal deleted inserted replaced
55:2c54b51f39c4 57:bb2d3e476f29
    17 
    17 
    18 
    18 
    19 // User includes
    19 // User includes
    20 #include "clockapplication.h"
    20 #include "clockapplication.h"
    21 #include "clockappcontroller.h"
    21 #include "clockappcontroller.h"
       
    22 #include "OstTraceDefinitions.h"
       
    23 #ifdef OST_TRACE_COMPILER_IN_USE
       
    24 #include "clockapplicationTraces.h"
       
    25 #endif
       
    26 
    22 
    27 
    23 /*!
    28 /*!
    24 	\class ClockApplication
    29 	\class ClockApplication
    25 
    30 
    26 	This class creates the ClockAppController object.
    31 	This class creates the ClockAppController object.
    29 	Constructor.
    34 	Constructor.
    30  */
    35  */
    31 ClockApplication::ClockApplication(int &argc, char *argv[]):
    36 ClockApplication::ClockApplication(int &argc, char *argv[]):
    32  HbApplication(argc, argv)
    37  HbApplication(argc, argv)
    33 {
    38 {
       
    39 OstTraceFunctionEntry0( CLOCKAPPLICATION_CLOCKAPPLICATION_ENTRY );
       
    40 OstTraceFunctionExit0( CLOCKAPPLICATION_CLOCKAPPLICATION_EXIT );
    34 }
    41 }
    35 
    42 
    36 /*!
    43 /*!
    37 	Destructor.
    44 	Destructor.
    38  */
    45  */
    39 ClockApplication::~ClockApplication()
    46 ClockApplication::~ClockApplication()
    40 {
    47 {
       
    48 	OstTraceFunctionEntry0( DUP1_CLOCKAPPLICATION_CLOCKAPPLICATION_ENTRY );
    41 	if (mController) {
    49 	if (mController) {
    42 		delete mController;
    50 		delete mController;
    43 		mController = 0;
    51 		mController = 0;
    44 	}
    52 	}
       
    53 OstTraceFunctionExit0( DUP1_CLOCKAPPLICATION_CLOCKAPPLICATION_EXIT );
    45 }
    54 }
    46 
    55 
    47 /*!
    56 /*!
    48 	creates the ClockAppController object.
    57 	creates the ClockAppController object.
    49 */
    58 */
    50 void ClockApplication::createController()
    59 void ClockApplication::createController()
    51 {
    60 {
       
    61 	OstTraceFunctionEntry0( CLOCKAPPLICATION_CREATECONTROLLER_ENTRY );
    52 	mController = new ClockAppController;
    62 	mController = new ClockAppController;
    53 	connect(mController, SIGNAL(appReady()), this, SLOT(handleAppReady()));
    63 	connect(mController, SIGNAL(appReady()), this, SLOT(handleAppReady()));
       
    64 OstTraceFunctionExit0( CLOCKAPPLICATION_CREATECONTROLLER_EXIT );
    54 }
    65 }
    55 
    66 
    56 /*!
    67 /*!
    57 	Start the event loop for the application.
    68 	Start the event loop for the application.
    58 */
    69 */
    59 bool ClockApplication::execution()
    70 bool ClockApplication::execution()
    60 {
    71 {
       
    72 	OstTraceFunctionEntry0( CLOCKAPPLICATION_EXECUTION_ENTRY );
    61 	int ret = 0;
    73 	int ret = 0;
    62 	ret = exec();
    74 	ret = exec();
       
    75 	OstTraceFunctionExit0( CLOCKAPPLICATION_EXECUTION_EXIT );
    63 	return ret;
    76 	return ret;
    64 }
    77 }
    65 
    78 
    66 /*!
    79 /*!
    67 	Emits the applicationReady signal.
    80 	Emits the applicationReady signal.
    68  */
    81  */
    69 void ClockApplication::handleAppReady()
    82 void ClockApplication::handleAppReady()
    70 {
    83 {
       
    84 	OstTraceFunctionEntry0( CLOCKAPPLICATION_HANDLEAPPREADY_ENTRY );
    71 	emit applicationReady();
    85 	emit applicationReady();
    72 	disconnect(mController, SIGNAL(appReady()), this, SLOT(handleAppReady()));
    86 	disconnect(mController, SIGNAL(appReady()), this, SLOT(handleAppReady()));
       
    87 OstTraceFunctionExit0( CLOCKAPPLICATION_HANDLEAPPREADY_EXIT );
    73 }
    88 }
    74 
    89 
    75 // End of file	--Don't remove this.
    90 // End of file	--Don't remove this.