Symbian 等待对话框
2010-06-19 04:23:00 来源:WEB开发网self->ConstructL();
CleanupStack::Pop( self );
return self;
}
CMyWaitDialog::~CMyWaitDialog()
{
iObserver = NULL;
if(iWaitDialog)
{
delete iWaitDialog;
iWaitDialog = NULL;
}
}
void CMyWaitDialog::StartupWait(const TDesC& aLabel,MMyWaitDialogObserver* aObserver)
{
// RESOURCE DIALOG r_general_wait_note
// {
// flags = EAknWaitNoteFlags;
// buttons = R_AVKON_SOFTKEYS_CANCEL;
// items =
// {
// DLG_LINE
// {
// type = EAknCtNote;
// id = 100;
// control = AVKON_NOTE
// {
// layout = EWaitLayout;
// singular_label = "";
// plural_label = "";
// animation = R_QGN_GRAF_WAIT_BAR_ANIM;
// };
// }
// };
// }
iObserver = aObserver;
if (iWaitDialog)
{
delete iWaitDialog;
iWaitDialog = NULL;
}
iWaitDialog = new (ELeave) CAknWaitDialog(
REINTERPRET_CAST(CEikDialog**, &iWaitDialog));
iWaitDialog->SetCallback(this);
iWaitDialog->SetTextL(aLabel);
iWaitDialog->ExecuteLD(R_GENERAL_WAIT_NOTE);
}
void CMyWaitDialog::DialogDismissedL(TInt aButtonId)
{
iWaitDialog = NULL;
if (iObserver)
{
iObserver->HandleWaitDialogEvent(aButtonId);
}
}
void CMyWaitDialog::DismissedL()
{
if (iWaitDialog)
{
iWaitDialog->ProcessFinishedL();
iWaitDialog = NULL;
}
}
CMyWaitDialog::CMyWaitDialog()
{
iObserver = NULL;
iWaitDialog = NULL;
}
void CMyWaitDialog::ConstructL()
{
}
//////////////////////////////////////////////////////////
更多精彩
赞助商链接