00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
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
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