os/mm/mmlibs/mmfw/tsrc/mmvalidationsuite/mmvalidationsuiteapp/src/MVSResourceNotifyDialog.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 "MVSResourceNotifyDialog.h"
22 void CMVSResourceNotifyDialog::SetupDialogLD(/*TBool aNotifyFlag,*/CMVSAppUi* aAppUi)
24 CMVSResourceNotifyDialog* dialog = new (ELeave) CMVSResourceNotifyDialog(aAppUi);
25 dialog->ExecuteLD(R_MVS_DIALOG_REGISTER);
26 //iRegisteredForNotification = aNotifyFlag;
30 void CMVSResourceNotifyDialog::PreLayoutDynInitL()
32 CEikCheckBox* registerfornotification = static_cast<CEikCheckBox*>(Control(EMVSRegisterForNotification));
33 if(registerfornotification)
35 iRegisteredForNotificationCtl = registerfornotification;
36 //iRegisteredForNotification = ETrue;
37 iRegisteredForNotificationCtl->SetObserver(this);
42 CMVSResourceNotifyDialog::CMVSResourceNotifyDialog(CMVSAppUi* aAppUi)
48 TBool CMVSResourceNotifyDialog::OkToExitL(TInt aButtonId)
51 {//to be implemented once Video agents/controller is in place
52 case(EMVSButtonCancel):
56 iAppUi->RegisterForNotification(iRegisteredForNotification);
60 void CMVSResourceNotifyDialog::HandleControlEventL(CCoeControl *aControl, TCoeEvent aEventType)
62 CEikDialog::HandleControlEventL(aControl,aEventType);
63 if(iRegisteredForNotificationCtl == aControl && aEventType == EEventStateChanged)
65 if(iRegisteredForNotification == EFalse)
67 iRegisteredForNotification = ETrue;
71 iRegisteredForNotification = EFalse;