camerauis/cameraxui/cxui/src/cxuiapplicationframeworkmonitor.cpp
author hgs
Thu, 13 May 2010 21:30:19 +0300
changeset 28 3075d9b614e6
child 36 b12f3922a74f
permissions -rw-r--r--
201017_1
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
28
3075d9b614e6 201017_1
hgs
parents:
diff changeset
     1
/*
3075d9b614e6 201017_1
hgs
parents:
diff changeset
     2
* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
3075d9b614e6 201017_1
hgs
parents:
diff changeset
     3
* All rights reserved.
3075d9b614e6 201017_1
hgs
parents:
diff changeset
     4
* This component and the accompanying materials are made available
3075d9b614e6 201017_1
hgs
parents:
diff changeset
     5
* under the terms of "Eclipse Public License v1.0"
3075d9b614e6 201017_1
hgs
parents:
diff changeset
     6
* which accompanies this distribution, and is available
3075d9b614e6 201017_1
hgs
parents:
diff changeset
     7
* at the URL "http://www.eclipse.org/legal/epl-v10.html".
3075d9b614e6 201017_1
hgs
parents:
diff changeset
     8
*
3075d9b614e6 201017_1
hgs
parents:
diff changeset
     9
* Initial Contributors:
3075d9b614e6 201017_1
hgs
parents:
diff changeset
    10
* Nokia Corporation - initial contribution.
3075d9b614e6 201017_1
hgs
parents:
diff changeset
    11
*
3075d9b614e6 201017_1
hgs
parents:
diff changeset
    12
* Contributors:
3075d9b614e6 201017_1
hgs
parents:
diff changeset
    13
*
3075d9b614e6 201017_1
hgs
parents:
diff changeset
    14
* Description:
3075d9b614e6 201017_1
hgs
parents:
diff changeset
    15
*
3075d9b614e6 201017_1
hgs
parents:
diff changeset
    16
*/
3075d9b614e6 201017_1
hgs
parents:
diff changeset
    17
3075d9b614e6 201017_1
hgs
parents:
diff changeset
    18
#include "cxutils.h"
3075d9b614e6 201017_1
hgs
parents:
diff changeset
    19
#include "cxuiapplication.h"
3075d9b614e6 201017_1
hgs
parents:
diff changeset
    20
#include "cxesettings.h"
3075d9b614e6 201017_1
hgs
parents:
diff changeset
    21
#include "cxuiapplicationframeworkmonitor.h"
3075d9b614e6 201017_1
hgs
parents:
diff changeset
    22
#include "cxuiapplicationframeworkmonitorprivate.h"
3075d9b614e6 201017_1
hgs
parents:
diff changeset
    23
3075d9b614e6 201017_1
hgs
parents:
diff changeset
    24
3075d9b614e6 201017_1
hgs
parents:
diff changeset
    25
/*!
3075d9b614e6 201017_1
hgs
parents:
diff changeset
    26
* Constructor
3075d9b614e6 201017_1
hgs
parents:
diff changeset
    27
*/
3075d9b614e6 201017_1
hgs
parents:
diff changeset
    28
CxuiApplicationFrameworkMonitor::CxuiApplicationFrameworkMonitor(CxuiApplication &application, CxeSettings &settings)
3075d9b614e6 201017_1
hgs
parents:
diff changeset
    29
{
3075d9b614e6 201017_1
hgs
parents:
diff changeset
    30
    CX_DEBUG_ENTER_FUNCTION();
3075d9b614e6 201017_1
hgs
parents:
diff changeset
    31
    p = new CxuiApplicationFrameworkMonitorPrivate(application, settings);
3075d9b614e6 201017_1
hgs
parents:
diff changeset
    32
3075d9b614e6 201017_1
hgs
parents:
diff changeset
    33
    connect(p, SIGNAL(foregroundStateChanged(CxuiApplicationFrameworkMonitor::ForegroundState)),
3075d9b614e6 201017_1
hgs
parents:
diff changeset
    34
            this, SIGNAL(foregroundStateChanged(CxuiApplicationFrameworkMonitor::ForegroundState)));
3075d9b614e6 201017_1
hgs
parents:
diff changeset
    35
    connect(p, SIGNAL(batteryEmpty()), this, SIGNAL(batteryEmpty()));
3075d9b614e6 201017_1
hgs
parents:
diff changeset
    36
3075d9b614e6 201017_1
hgs
parents:
diff changeset
    37
3075d9b614e6 201017_1
hgs
parents:
diff changeset
    38
    CX_DEBUG_EXIT_FUNCTION();
3075d9b614e6 201017_1
hgs
parents:
diff changeset
    39
}
3075d9b614e6 201017_1
hgs
parents:
diff changeset
    40
3075d9b614e6 201017_1
hgs
parents:
diff changeset
    41
/*!
3075d9b614e6 201017_1
hgs
parents:
diff changeset
    42
* Destructor
3075d9b614e6 201017_1
hgs
parents:
diff changeset
    43
*/
3075d9b614e6 201017_1
hgs
parents:
diff changeset
    44
CxuiApplicationFrameworkMonitor::~CxuiApplicationFrameworkMonitor()
3075d9b614e6 201017_1
hgs
parents:
diff changeset
    45
{
3075d9b614e6 201017_1
hgs
parents:
diff changeset
    46
    CX_DEBUG_ENTER_FUNCTION();
3075d9b614e6 201017_1
hgs
parents:
diff changeset
    47
    delete p;
3075d9b614e6 201017_1
hgs
parents:
diff changeset
    48
    CX_DEBUG_EXIT_FUNCTION();
3075d9b614e6 201017_1
hgs
parents:
diff changeset
    49
}
3075d9b614e6 201017_1
hgs
parents:
diff changeset
    50
3075d9b614e6 201017_1
hgs
parents:
diff changeset
    51
/*!
3075d9b614e6 201017_1
hgs
parents:
diff changeset
    52
* Current foreground owning state of this application.
3075d9b614e6 201017_1
hgs
parents:
diff changeset
    53
* @return Foreground owning state.
3075d9b614e6 201017_1
hgs
parents:
diff changeset
    54
*/
3075d9b614e6 201017_1
hgs
parents:
diff changeset
    55
CxuiApplicationFrameworkMonitor::ForegroundState CxuiApplicationFrameworkMonitor::foregroundState() const
3075d9b614e6 201017_1
hgs
parents:
diff changeset
    56
{
3075d9b614e6 201017_1
hgs
parents:
diff changeset
    57
    return p->foregroundState();
3075d9b614e6 201017_1
hgs
parents:
diff changeset
    58
}
3075d9b614e6 201017_1
hgs
parents:
diff changeset
    59
3075d9b614e6 201017_1
hgs
parents:
diff changeset
    60
// end of file