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 <AudioPlaying.rsg>
00021
00022 #include "AudioPlayingExternalInterface.h"
00023 #include "AudioPlayingAppUi.h"
00024 #include "AudioPlayingMainView.h"
00025 #include "AudioPlaying.hrh"
00026
00027
00028
00029 CAudioPlayingMainView* CAudioPlayingMainView::NewLC(CQikAppUi& aAppUi)
00030 {
00031 CAudioPlayingMainView* self = new (ELeave) CAudioPlayingMainView(aAppUi);
00032 CleanupStack::PushL(self);
00033 self->ConstructL();
00034 return self;
00035 }
00036
00037 CAudioPlayingMainView::CAudioPlayingMainView(CQikAppUi& aAppUi)
00038 : CQikViewBase(aAppUi, KNullViewId)
00039 {
00040 }
00041
00042 CAudioPlayingMainView::~CAudioPlayingMainView()
00043 {
00044 }
00045
00046 void CAudioPlayingMainView::ConstructL()
00047 {
00048 BaseConstructL();
00049
00050 SetExtentToWholeScreen();
00051 }
00052
00053 void CAudioPlayingMainView::ViewConstructL()
00054 {
00055 ViewConstructFromResourceL(R_AUDIOPLAYING_UI_CONFIGURATIONS);
00056 iEikLabel = LocateControlByUniqueHandle<CEikLabel> (EAudioPlayingLabelCtrl);
00057 }
00058
00059 TVwsViewId CAudioPlayingMainView::ViewId()const
00060 {
00061 return TVwsViewId(KUidAudioPlayingApp, KUidAudioPlayingMainView);
00062 }
00063
00064 void CAudioPlayingMainView::HandleCommandL(CQikCommand& aCommand)
00065 {
00066
00067
00068 iQikAppUi.HandleCommandL(aCommand.Id());
00069 CQikViewBase::HandleCommandL(aCommand);
00070 }
00071
00072 void CAudioPlayingMainView::SetTextL(const TDesC& aText)
00073 {
00074 if (iEikLabel)
00075 {
00076 iEikLabel->SetTextL(aText);
00077 DrawDeferred();
00078 }
00079 }
00080
00081 void CAudioPlayingMainView::SizeChanged()
00082 {
00083 if (iEikLabel)
00084 {
00085 TRect rect(Rect());
00086 iEikLabel->SetExtent(
00087 TPoint(0, 0),
00088 TSize(rect.Width(), rect.Height()));
00089 }
00090 }
00091
00092