phoneapp/phoneui2/src/phonemainwindow.cpp
changeset 78 baacf668fe89
equal deleted inserted replaced
76:cfea66083b62 78:baacf668fe89
       
     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:  Main window class.
       
    15 *
       
    16 */
       
    17 
       
    18 #include <QEvent>
       
    19 #include "phonemainwindow.h"
       
    20 #include "phoneuihousehold.h"
       
    21 
       
    22 #include "qtphonelog.h"
       
    23 
       
    24 PhoneMainWindow::PhoneMainWindow(QWidget *parent): 
       
    25     HbMainWindow(parent)
       
    26 {
       
    27     mHouseHold = new PhoneUiHouseHold (*this);
       
    28 }
       
    29 
       
    30 PhoneMainWindow::~PhoneMainWindow ()
       
    31 {
       
    32     delete mHouseHold;
       
    33 }
       
    34 
       
    35 void PhoneMainWindow::onFocusLost()
       
    36 {
       
    37     emit focusLost();
       
    38 }
       
    39 void PhoneMainWindow::onFocusGained()
       
    40 {
       
    41     emit focusGained();
       
    42 }
       
    43 
       
    44 void PhoneMainWindow::changeEvent(QEvent *event)
       
    45 {
       
    46     if (event->type() == QEvent::LocaleChange) {
       
    47         PHONE_DEBUG("PhoneMainWindow::changeEvent, language changed");
       
    48         mHouseHold->reloadTranslators();
       
    49     }
       
    50     HbMainWindow::changeEvent(event);
       
    51 }
       
    52