emailuis/nmsettingui/src/nmsettingsviewlauncher.cpp
changeset 18 578830873419
child 30 759dc5235cdb
equal deleted inserted replaced
4:e7aa27f58ae1 18:578830873419
       
     1 /*
       
     2 * Copyright (c) 2010 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:
       
    15 *
       
    16 */
       
    17 
       
    18 #include <cpitemdatahelper.h>
       
    19 
       
    20 #include "nmsettingsviewlauncher.h"
       
    21 #include "nmsettingsviewfactory.h"
       
    22 #include "nmcommon.h"
       
    23 
       
    24 /*!
       
    25     \class NmSettingsViewLauncher
       
    26     \brief Constructs and displays settings views.
       
    27 */
       
    28 
       
    29 
       
    30 // ======== MEMBER FUNCTIONS ========
       
    31 
       
    32 /*!
       
    33     Constructor of NmSettingsViewLauncher.
       
    34     \return A newly constructed settings view launcher instance.
       
    35 */
       
    36 NmSettingsViewLauncher::NmSettingsViewLauncher()
       
    37 {
       
    38     QScopedPointer<CpItemDataHelper> helper(new CpItemDataHelper());
       
    39     mSettingsViewFactory = new NmSettingsViewFactory(this, *helper.data());
       
    40     mItemDataHelper = helper.take();
       
    41 }
       
    42 
       
    43 /*!
       
    44     Destructor of NmSettingsViewLauncher.
       
    45 */
       
    46 NmSettingsViewLauncher::~NmSettingsViewLauncher()
       
    47 {
       
    48     delete mSettingsViewFactory;
       
    49     delete mItemDataHelper;
       
    50 }
       
    51 
       
    52 /*!
       
    53     Constructs and shows the settings view for the given mailbox.
       
    54 
       
    55     \param mailboxId The id of the mailbox.
       
    56     \param mailboxName The name of the mailbox.
       
    57 */
       
    58 void NmSettingsViewLauncher::launchSettingsView(
       
    59     const NmId &mailboxId,
       
    60     const QString &mailboxName)
       
    61 {
       
    62     NMLOG(QString("NmSettingsViewLauncher::launchSettingsView"));
       
    63 
       
    64     mSettingsViewFactory->launchSettingView(mailboxId, mailboxName);
       
    65 
       
    66     NMLOG(QString("NmSettingsViewLauncher::launchSettingsView - OK"));
       
    67 }
       
    68 
       
    69 // End of file.