messagingapp/msgsettings/settingsserviceapp/src/settingsserviceinterface.cpp
author hgs
Tue, 13 Jul 2010 22:09:22 +0530
changeset 46 b1f0785c289d
permissions -rw-r--r--
201027_03
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
46
b1f0785c289d 201027_03
hgs
parents:
diff changeset
     1
/*
b1f0785c289d 201027_03
hgs
parents:
diff changeset
     2
 * Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
b1f0785c289d 201027_03
hgs
parents:
diff changeset
     3
 * All rights reserved.
b1f0785c289d 201027_03
hgs
parents:
diff changeset
     4
 * This component and the accompanying materials are made available
b1f0785c289d 201027_03
hgs
parents:
diff changeset
     5
 * under the terms of "Eclipse Public License v1.0"
b1f0785c289d 201027_03
hgs
parents:
diff changeset
     6
 * which accompanies this distribution, and is available
b1f0785c289d 201027_03
hgs
parents:
diff changeset
     7
 * at the URL "http://www.eclipse.org/legal/epl-v10.html".
b1f0785c289d 201027_03
hgs
parents:
diff changeset
     8
 *
b1f0785c289d 201027_03
hgs
parents:
diff changeset
     9
 * Initial Contributors:
b1f0785c289d 201027_03
hgs
parents:
diff changeset
    10
 * Nokia Corporation - initial contribution.
b1f0785c289d 201027_03
hgs
parents:
diff changeset
    11
 *
b1f0785c289d 201027_03
hgs
parents:
diff changeset
    12
 * Contributors:
b1f0785c289d 201027_03
hgs
parents:
diff changeset
    13
 *
b1f0785c289d 201027_03
hgs
parents:
diff changeset
    14
 * Description: Interface for launching settings view as 
b1f0785c289d 201027_03
hgs
parents:
diff changeset
    15
 * Qthighway service
b1f0785c289d 201027_03
hgs
parents:
diff changeset
    16
 *
b1f0785c289d 201027_03
hgs
parents:
diff changeset
    17
 */
b1f0785c289d 201027_03
hgs
parents:
diff changeset
    18
b1f0785c289d 201027_03
hgs
parents:
diff changeset
    19
#include "settingsserviceinterface.h"
b1f0785c289d 201027_03
hgs
parents:
diff changeset
    20
#include <hbmainwindow.h>
b1f0785c289d 201027_03
hgs
parents:
diff changeset
    21
#include <hbaction.h>
b1f0785c289d 201027_03
hgs
parents:
diff changeset
    22
#include <hbapplication.h>
b1f0785c289d 201027_03
hgs
parents:
diff changeset
    23
b1f0785c289d 201027_03
hgs
parents:
diff changeset
    24
#include "msgsettingsview.h"
b1f0785c289d 201027_03
hgs
parents:
diff changeset
    25
#include "debugtraces.h"
b1f0785c289d 201027_03
hgs
parents:
diff changeset
    26
b1f0785c289d 201027_03
hgs
parents:
diff changeset
    27
//----------------------------------------------------------------------------
b1f0785c289d 201027_03
hgs
parents:
diff changeset
    28
// SettingsViewInterface::SettingsViewInterface
b1f0785c289d 201027_03
hgs
parents:
diff changeset
    29
// @see header
b1f0785c289d 201027_03
hgs
parents:
diff changeset
    30
//----------------------------------------------------------------------------
b1f0785c289d 201027_03
hgs
parents:
diff changeset
    31
SettingsViewInterface::SettingsViewInterface(HbMainWindow *mainWindow,QObject* parent)
b1f0785c289d 201027_03
hgs
parents:
diff changeset
    32
:XQServiceProvider(QLatin1String("messagesettings.com.nokia.symbian.IMessageSettings"),parent),
b1f0785c289d 201027_03
hgs
parents:
diff changeset
    33
mMainWindow(mainWindow)
b1f0785c289d 201027_03
hgs
parents:
diff changeset
    34
    {
b1f0785c289d 201027_03
hgs
parents:
diff changeset
    35
    publishAll();    
b1f0785c289d 201027_03
hgs
parents:
diff changeset
    36
b1f0785c289d 201027_03
hgs
parents:
diff changeset
    37
    //creating back action.
b1f0785c289d 201027_03
hgs
parents:
diff changeset
    38
    mBackAction = new HbAction(Hb::BackNaviAction, this);
b1f0785c289d 201027_03
hgs
parents:
diff changeset
    39
    connect(mBackAction, SIGNAL(triggered()), qApp, SLOT(quit()));
b1f0785c289d 201027_03
hgs
parents:
diff changeset
    40
b1f0785c289d 201027_03
hgs
parents:
diff changeset
    41
    }
b1f0785c289d 201027_03
hgs
parents:
diff changeset
    42
b1f0785c289d 201027_03
hgs
parents:
diff changeset
    43
//----------------------------------------------------------------------------
b1f0785c289d 201027_03
hgs
parents:
diff changeset
    44
// SettingsViewInterface::~SettingsViewInterface
b1f0785c289d 201027_03
hgs
parents:
diff changeset
    45
// @see header
b1f0785c289d 201027_03
hgs
parents:
diff changeset
    46
//----------------------------------------------------------------------------
b1f0785c289d 201027_03
hgs
parents:
diff changeset
    47
SettingsViewInterface::~SettingsViewInterface()
b1f0785c289d 201027_03
hgs
parents:
diff changeset
    48
    {
b1f0785c289d 201027_03
hgs
parents:
diff changeset
    49
    }
b1f0785c289d 201027_03
hgs
parents:
diff changeset
    50
b1f0785c289d 201027_03
hgs
parents:
diff changeset
    51
//----------------------------------------------------------------------------
b1f0785c289d 201027_03
hgs
parents:
diff changeset
    52
// SettingsViewInterface::launchSettings
b1f0785c289d 201027_03
hgs
parents:
diff changeset
    53
// @see header
b1f0785c289d 201027_03
hgs
parents:
diff changeset
    54
//----------------------------------------------------------------------------
b1f0785c289d 201027_03
hgs
parents:
diff changeset
    55
void SettingsViewInterface::launchSettings(int view)
b1f0785c289d 201027_03
hgs
parents:
diff changeset
    56
    {   
b1f0785c289d 201027_03
hgs
parents:
diff changeset
    57
    QDEBUG_WRITE("Entered launchSettings")
b1f0785c289d 201027_03
hgs
parents:
diff changeset
    58
        MsgSettingsView* settingsView = new MsgSettingsView((MsgSettingsView::SettingsView)view);
b1f0785c289d 201027_03
hgs
parents:
diff changeset
    59
        settingsView->setNavigationAction(mBackAction);
b1f0785c289d 201027_03
hgs
parents:
diff changeset
    60
        mMainWindow->addView(settingsView);
b1f0785c289d 201027_03
hgs
parents:
diff changeset
    61
        
b1f0785c289d 201027_03
hgs
parents:
diff changeset
    62
        if(view != MsgSettingsView::SMSView)
b1f0785c289d 201027_03
hgs
parents:
diff changeset
    63
        {
b1f0785c289d 201027_03
hgs
parents:
diff changeset
    64
            mMainWindow->setCurrentView(settingsView);
b1f0785c289d 201027_03
hgs
parents:
diff changeset
    65
        }        
b1f0785c289d 201027_03
hgs
parents:
diff changeset
    66
    }
b1f0785c289d 201027_03
hgs
parents:
diff changeset
    67
b1f0785c289d 201027_03
hgs
parents:
diff changeset
    68
//EOF
b1f0785c289d 201027_03
hgs
parents:
diff changeset
    69