os/mm/mmlibs/mmfw/tsrc/mmvalidationsuite/mmvalidationsuiteapp/src/MVSMultipleScreenDialog.cpp
Update contrib.
1 // Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies).
2 // All rights reserved.
3 // This component and the accompanying materials are made available
4 // under the terms of "Eclipse Public License v1.0"
5 // which accompanies this distribution, and is available
6 // at the URL "http://www.eclipse.org/legal/epl-v10.html".
8 // Initial Contributors:
9 // Nokia Corporation - initial contribution.
14 // Part of the MVS Application for TechView
17 #include "MVSMultipleScreenDialog.h"
21 void CMVSMultipleScreenDialog::SetupDialogLD(TInt aScreenNumber,CMVSAppUi* aAppUi)
23 CMVSMultipleScreenDialog* dialog = new (ELeave) CMVSMultipleScreenDialog(aScreenNumber,
25 dialog->ExecuteLD(R_MVS_DIALOG_MULTIPLESCREEN);
29 void CMVSMultipleScreenDialog::PreLayoutDynInitL()
31 // Get a downcasted pointer to the controls
32 CEikNumberEditor* myScreenControl = static_cast<CEikNumberEditor*>(Control(EMVSCmdMultiScreen));
34 //Now seed the controls with appropriate values
37 myScreenControl->SetNumber(iScreenNumber);
38 myScreenControl->SetMinimumAndMaximum(0, ControlEnv()->WsSession().NumberOfScreens() - 1);
43 CMVSMultipleScreenDialog::CMVSMultipleScreenDialog(TInt aScreenNumber,
45 : iScreenNumber(aScreenNumber),iAppUi(aAppUi)
50 TBool CMVSMultipleScreenDialog::OkToExitL(TInt aButtonId)
52 if(aButtonId == EMVSButtonCancel)
57 //set the desired screen for output
58 iScreenNumber = static_cast<CEikNumberEditor*>(Control(EMVSCmdMultiScreen))->Number();
60 iAppUi->SetOutputScreen(iScreenNumber);