examples/SFExamples/PIM/ContactRemove/src/uiq3/ContactRemoveMainView.cpp

00001 // 
00002 // Copyright (c) 2002-2009 Nokia Corporation and/or its subsidiary(-ies).
00003 // All rights reserved.
00004 // This component and the accompanying materials are made available
00005 // under the terms of the License "Eclipse Public License v1.0"
00006 // which accompanies this distribution, and is available
00007 // at the URL "http://www.eclipse.org/legal/epl-v10.html".
00008 // 
00009 // Initial Contributors:
00010 // Nokia Corporation - initial contribution.
00011 // 
00012 // Contributors:
00013 // 
00014 // Description:
00015 // 
00016 
00017 // INCLUDES
00018 #include <QikCommand.h>
00019 #include <eiklabel.h>
00020 #include <ContactRemove.rsg>
00021 
00022 #include "ContactRemoveExternalInterface.h"
00023 #include "ContactRemoveAppUi.h"
00024 #include "ContactRemoveMainView.h"
00025 #include "ContactRemove.hrh"
00026 
00027 // MEMBER FUNCTIONS
00028 
00029 CContactRemoveMainView* CContactRemoveMainView::NewLC(CQikAppUi& aAppUi)
00030         {
00031         CContactRemoveMainView* self = new (ELeave) CContactRemoveMainView(aAppUi);
00032         CleanupStack::PushL(self);
00033         self->ConstructL();
00034         return self;
00035         }
00036 
00037 CContactRemoveMainView::CContactRemoveMainView(CQikAppUi& aAppUi) 
00038         : CQikViewBase(aAppUi, KNullViewId)
00039         {
00040         }
00041 
00042 CContactRemoveMainView::~CContactRemoveMainView()
00043         {
00044         }
00045 
00046 void CContactRemoveMainView::ConstructL()
00047         {
00048         BaseConstructL();
00049         SetExtentToWholeScreen();
00050         }
00051         
00052 void CContactRemoveMainView::ViewConstructL()
00053         {
00054         ViewConstructFromResourceL(R_CONTACTREMOVE_UI_CONFIGURATIONS);  
00055         iEikLabel = LocateControlByUniqueHandle<CEikLabel> (EContactRemoveLabelCtrl);
00056         }
00057 
00058 TVwsViewId CContactRemoveMainView::ViewId()const
00059         {
00060         return TVwsViewId(KUidContactRemoveApp, KUidContactRemoveMainView);
00061         }
00062 
00063 void CContactRemoveMainView::HandleCommandL(CQikCommand& aCommand)
00064         {
00065         iQikAppUi.HandleCommandL(aCommand.Id());
00066         CQikViewBase::HandleCommandL(aCommand);
00067         }
00068 
00069 void CContactRemoveMainView::SetTextL(const TDesC& aText)
00070         {
00071         if (iEikLabel)
00072                 {
00073                 iEikLabel->SetTextL(aText);
00074                 DrawDeferred();
00075                 }
00076         }
00077 
00078 void CContactRemoveMainView::SizeChanged()
00079     {
00080         if (iEikLabel)
00081                 {
00082                 TRect rect(Rect());
00083                 iEikLabel->SetExtent(
00084                         TPoint(0, 0),
00085                         TSize(rect.Width(), rect.Height()));
00086                 }
00087         }
00088         
00089 // End of File

Generated by  doxygen 1.6.2