os/mm/mmlibs/mmfw/tsrc/mmvalidationsuite/mmvalidationsuiteapp/src/MVSMultipleScreenDialog.cpp
changeset 0 bde4ae8d615e
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/os/mm/mmlibs/mmfw/tsrc/mmvalidationsuite/mmvalidationsuiteapp/src/MVSMultipleScreenDialog.cpp	Fri Jun 15 03:10:57 2012 +0200
     1.3 @@ -0,0 +1,62 @@
     1.4 +// Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies).
     1.5 +// All rights reserved.
     1.6 +// This component and the accompanying materials are made available
     1.7 +// under the terms of "Eclipse Public License v1.0"
     1.8 +// which accompanies this distribution, and is available
     1.9 +// at the URL "http://www.eclipse.org/legal/epl-v10.html".
    1.10 +//
    1.11 +// Initial Contributors:
    1.12 +// Nokia Corporation - initial contribution.
    1.13 +//
    1.14 +// Contributors:
    1.15 +//
    1.16 +// Description:
    1.17 +// Part of the MVS Application for TechView
    1.18 +//
    1.19 +
    1.20 +#include "MVSMultipleScreenDialog.h"
    1.21 +#include "MVSApp.hrh"
    1.22 +
    1.23 +
    1.24 +void CMVSMultipleScreenDialog::SetupDialogLD(TInt aScreenNumber,CMVSAppUi* aAppUi)
    1.25 +	{
    1.26 +    CMVSMultipleScreenDialog* dialog = new (ELeave) CMVSMultipleScreenDialog(aScreenNumber,
    1.27 +                                                       aAppUi);
    1.28 +    dialog->ExecuteLD(R_MVS_DIALOG_MULTIPLESCREEN);
    1.29 +    }
    1.30 +
    1.31 +
    1.32 +void CMVSMultipleScreenDialog::PreLayoutDynInitL()
    1.33 +    {
    1.34 +    // Get a downcasted pointer to the controls
    1.35 +    CEikNumberEditor* myScreenControl = static_cast<CEikNumberEditor*>(Control(EMVSCmdMultiScreen));
    1.36 +	
    1.37 +    //Now seed the controls with appropriate values
    1.38 +    if(myScreenControl)
    1.39 +    	{
    1.40 +    	myScreenControl->SetNumber(iScreenNumber);
    1.41 +    	myScreenControl->SetMinimumAndMaximum(0, ControlEnv()->WsSession().NumberOfScreens() - 1);
    1.42 +    	}
    1.43 +    }
    1.44 +
    1.45 +
    1.46 +CMVSMultipleScreenDialog::CMVSMultipleScreenDialog(TInt aScreenNumber,
    1.47 +                             CMVSAppUi* aAppUi)
    1.48 +: iScreenNumber(aScreenNumber),iAppUi(aAppUi)
    1.49 +    {
    1.50 +    }
    1.51 +
    1.52 +
    1.53 +TBool CMVSMultipleScreenDialog::OkToExitL(TInt aButtonId)
    1.54 +    {
    1.55 +    if(aButtonId == EMVSButtonCancel)
    1.56 +    	{
    1.57 +        return ETrue;
    1.58 +        }
    1.59 +
    1.60 +    //set the desired screen for output
    1.61 +    iScreenNumber = static_cast<CEikNumberEditor*>(Control(EMVSCmdMultiScreen))->Number();        
    1.62 +    
    1.63 +   	iAppUi->SetOutputScreen(iScreenNumber);
    1.64 +   	return ETrue;
    1.65 +    }