46
|
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: Interface for launching settings view as
|
|
15 |
* Qthighway service
|
|
16 |
*
|
|
17 |
*/
|
|
18 |
|
|
19 |
#include "settingsserviceinterface.h"
|
|
20 |
#include <hbmainwindow.h>
|
|
21 |
#include <hbaction.h>
|
|
22 |
#include <hbapplication.h>
|
|
23 |
|
|
24 |
#include "msgsettingsview.h"
|
|
25 |
#include "debugtraces.h"
|
|
26 |
|
|
27 |
//----------------------------------------------------------------------------
|
|
28 |
// SettingsViewInterface::SettingsViewInterface
|
|
29 |
// @see header
|
|
30 |
//----------------------------------------------------------------------------
|
|
31 |
SettingsViewInterface::SettingsViewInterface(HbMainWindow *mainWindow,QObject* parent)
|
|
32 |
:XQServiceProvider(QLatin1String("messagesettings.com.nokia.symbian.IMessageSettings"),parent),
|
|
33 |
mMainWindow(mainWindow)
|
|
34 |
{
|
|
35 |
publishAll();
|
|
36 |
|
|
37 |
//creating back action.
|
|
38 |
mBackAction = new HbAction(Hb::BackNaviAction, this);
|
|
39 |
connect(mBackAction, SIGNAL(triggered()), qApp, SLOT(quit()));
|
|
40 |
|
|
41 |
}
|
|
42 |
|
|
43 |
//----------------------------------------------------------------------------
|
|
44 |
// SettingsViewInterface::~SettingsViewInterface
|
|
45 |
// @see header
|
|
46 |
//----------------------------------------------------------------------------
|
|
47 |
SettingsViewInterface::~SettingsViewInterface()
|
|
48 |
{
|
|
49 |
}
|
|
50 |
|
|
51 |
//----------------------------------------------------------------------------
|
|
52 |
// SettingsViewInterface::launchSettings
|
|
53 |
// @see header
|
|
54 |
//----------------------------------------------------------------------------
|
|
55 |
void SettingsViewInterface::launchSettings(int view)
|
|
56 |
{
|
|
57 |
QDEBUG_WRITE("Entered launchSettings")
|
|
58 |
MsgSettingsView* settingsView = new MsgSettingsView((MsgSettingsView::SettingsView)view);
|
|
59 |
settingsView->setNavigationAction(mBackAction);
|
|
60 |
mMainWindow->addView(settingsView);
|
|
61 |
|
|
62 |
if(view != MsgSettingsView::SMSView)
|
|
63 |
{
|
|
64 |
mMainWindow->setCurrentView(settingsView);
|
|
65 |
}
|
|
66 |
}
|
|
67 |
|
|
68 |
//EOF
|
|
69 |
|