clock/clockui/clockapplication/src/clockapplication.cpp
changeset 55 2c54b51f39c4
child 57 bb2d3e476f29
equal deleted inserted replaced
51:0b38fc5b94c6 55:2c54b51f39c4
       
     1 /*
       
     2 * Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
       
     3 * All rights reserved.
       
     4 * This component and the accompanying materials are made available
       
     5 * under the terms of "Eclipse Public License v1.0"
       
     6 * which accompanies this distribution, and is available
       
     7 * at the URL "http://www.eclipse.org/legal/epl-v10.html".
       
     8 *
       
     9 * Initial Contributors:
       
    10 * Nokia Corporation - initial contribution.
       
    11 *
       
    12 * Contributors:
       
    13 *
       
    14 * Description: Definition file for class ClockApplication.
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 // User includes
       
    20 #include "clockapplication.h"
       
    21 #include "clockappcontroller.h"
       
    22 
       
    23 /*!
       
    24 	\class ClockApplication
       
    25 
       
    26 	This class creates the ClockAppController object.
       
    27  */
       
    28 /*!
       
    29 	Constructor.
       
    30  */
       
    31 ClockApplication::ClockApplication(int &argc, char *argv[]):
       
    32  HbApplication(argc, argv)
       
    33 {
       
    34 }
       
    35 
       
    36 /*!
       
    37 	Destructor.
       
    38  */
       
    39 ClockApplication::~ClockApplication()
       
    40 {
       
    41 	if (mController) {
       
    42 		delete mController;
       
    43 		mController = 0;
       
    44 	}
       
    45 }
       
    46 
       
    47 /*!
       
    48 	creates the ClockAppController object.
       
    49 */
       
    50 void ClockApplication::createController()
       
    51 {
       
    52 	mController = new ClockAppController;
       
    53 	connect(mController, SIGNAL(appReady()), this, SLOT(handleAppReady()));
       
    54 }
       
    55 
       
    56 /*!
       
    57 	Start the event loop for the application.
       
    58 */
       
    59 bool ClockApplication::execution()
       
    60 {
       
    61 	int ret = 0;
       
    62 	ret = exec();
       
    63 	return ret;
       
    64 }
       
    65 
       
    66 /*!
       
    67 	Emits the applicationReady signal.
       
    68  */
       
    69 void ClockApplication::handleAppReady()
       
    70 {
       
    71 	emit applicationReady();
       
    72 	disconnect(mController, SIGNAL(appReady()), this, SLOT(handleAppReady()));
       
    73 }
       
    74 
       
    75 // End of file	--Don't remove this.