本文整理汇总了C++中CEikEdwin::GetText方法的典型用法代码示例。如果您正苦于以下问题:C++ CEikEdwin::GetText方法的具体用法?C++ CEikEdwin::GetText怎么用?C++ CEikEdwin::GetText使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CEikEdwin
的用法示例。
在下文中一共展示了CEikEdwin::GetText方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: FetchFloatL
// -----------------------------------------------------------------------------
// CLandmarksEditDialog::FetchFloatL
//
// (other items were commented in a header).
// -----------------------------------------------------------------------------
//
void CLandmarksEditDialog::FetchFloatL(
TRealX& aFloat,
TInt aEditorResourceId,
TInt aErrorResourceId)
{
const TChar KDecimalPoint = '.';
TBuf<KPosLmMaxTextFieldLength> textFieldValue;
TLex fieldLex;
TInt result(KErrNone);
CEikEdwin* editor = static_cast <CEikEdwin*> (Control(aEditorResourceId));
editor->GetText(textFieldValue);
if (textFieldValue == KNullDesC)
{
// User has indicated that he/she wants this value to be undefined.
aFloat.SetNaN();
}
else
{
// Try to extract value
fieldLex = textFieldValue;
TReal floatValue(0);
result = fieldLex.Val(floatValue, KDecimalPoint);
if (result != KErrNone)
{
NotifyErrorToUserL(aErrorResourceId);
}
// Update output parameter
User::LeaveIfError(aFloat.Set(floatValue));
}
}
示例2: SaveFormDataL
TBool CEmTubeVideoUploadDialog::SaveFormDataL()
{
TBuf<KUploadVideoMaxFieldLength> data;
CEikEdwin* editor;
editor = static_cast <CEikEdwin*> (Control(EUploadVideoFieldTitle));
editor->GetText( data );
iQueueEntry->SetTitleL( data );
editor = static_cast <CEikEdwin*> (Control(EUploadVideoFieldDescription));
editor->GetText( data );
iQueueEntry->SetDescriptionL( data );
editor = static_cast <CEikEdwin*> (Control(EUploadVideoFieldTags));
editor->GetText( data );
iQueueEntry->SetTagsL( data );
CAknPopupFieldText* popup = static_cast<CAknPopupFieldText*>(ControlOrNull(EUploadVideoFieldPublic));
switch ( popup->CurrentValueIndex() )
{
case 0:
iQueueEntry->SetPublic( ETrue );
break;
case 1:
iQueueEntry->SetPublic( EFalse );
break;
}
popup = static_cast<CAknPopupFieldText*>(ControlOrNull(EUploadVideoFieldCategory));
iQueueEntry->SetCategory( KCategories[ popup->CurrentValueIndex() ] );
return ETrue;
}
示例3: UpdateTitleBarL
// -----------------------------------------------------------------------------
// CLandmarksEditDialog::UpdateTitleBarL
//
// (other items were commented in a header).
// -----------------------------------------------------------------------------
//
void CLandmarksEditDialog::UpdateTitleBarL(TBool aFromField)
{
if (aFromField)
{
TBuf<KPosLmMaxTextFieldLength> name;
CEikEdwin* nameEditor =
static_cast<CEikEdwin*>(Control(ELandmarkNameField));
nameEditor->GetText(name);
iTitlePane->SetTextL(name);
}
else
{
TPtrC ptr;
iLandmark->GetLandmarkName(ptr);
iTitlePane->SetTextL(ptr);
}
}
示例4: if
TBool CCreate2WayVideoSessionDialog::OkToExitL( TInt aKey )
{
if ( aKey == EEikCmdCanceled )
{
// Cancel pressed. Just exit.
return ETrue;
}
CEikEdwin* edwinRecipientAddress = static_cast<CEikEdwin*>(
Control( ESessionDialog2WayVideoRecipientAddress ) );
TBuf<KBufLength> buffer;
edwinRecipientAddress->GetText(buffer);
iParams->iRecipentAddress = buffer;
CAknPopupFieldText* popupFieldText =
static_cast <CAknPopupFieldText*> (Control(ESessionDialog2WayVideoVideoCodec));
TInt index = popupFieldText->CurrentValueIndex();
if(index == 0)
{
iParams->iVideoCodec = TSessionParams::EMceCodecSingle;
}
else if ( index == 1 )
{
iParams->iVideoCodec = TSessionParams::EMceCodecAll;
}
else
{
iParams->iVideoCodec = TSessionParams::EMceCodecMultipleModes;
}
popupFieldText =
static_cast <CAknPopupFieldText*> (Control(ESessionDialog2WayVideoAudioCodec));
index = popupFieldText->CurrentValueIndex();
if(index == 0)
{
iParams->iAudioCodec = TSessionParams::EMceCodecSingle;
}
else if (index == 1)
{
iParams->iAudioCodec = TSessionParams::EMceCodecAll;
}
else
{
iParams->iAudioCodec = TSessionParams::EMceCodecNone;
}
popupFieldText =
static_cast <CAknPopupFieldText*> (Control(ESessionDialog2WayVideoViewFinder));
index = popupFieldText->CurrentValueIndex();
if(index == 0)
{
iParams->videoSinkDisplay = TSessionParams::EMceViewFinderDisabled;
}
else
{
iParams->videoSinkDisplay = TSessionParams::EMceViewFinderEnabled;
}
popupFieldText =
static_cast <CAknPopupFieldText*> (Control(ESessionDialog2WayVideoCamera));
index = popupFieldText->CurrentValueIndex();
if(index == 0)
{
iParams->iCameraSetting = TSessionParams::EMceCameraPrimary;
}
else
{
iParams->iCameraSetting = TSessionParams::EMceCameraSecondary;
}
return ETrue;
}
示例5: SaveFormDataL
// -----------------------------------------------------------------------------
// CLandmarksEditDialog::SaveFormDataL
//
// (other items were commented in a header).
// -----------------------------------------------------------------------------
//
TBool CLandmarksEditDialog::SaveFormDataL()
{
CEikEdwin* editor = NULL;
// Fetch name
TBuf<KPosLmMaxTextFieldLength> name;
editor = static_cast <CEikEdwin*> (Control(ELandmarkNameField));
editor->GetText(name);
// Fetch description
HBufC* descBuf = HBufC::NewLC(KPosLmMaxDescriptionLength);
TPtr desc = descBuf->Des();
editor = static_cast <CEikEdwin*> (Control(ELandmarkDescField));
editor->GetText(desc);
// Fetch existing location
TLocality existingLocation;
TBool locationExists =
(iLandmark->GetPosition(existingLocation) == KErrNone);
TRealX floatFieldValue;
// Fetch Latitude
TReal latitude = existingLocation.Latitude();
if (iIsRealValueEdited[ELatitudeEditor] || !locationExists)
{
FetchFloatL(floatFieldValue, ELandmarkLatitudeField,
R_LMREFAPP_LATITUDE_ERROR);
floatFieldValue.GetTReal(latitude);
}
// Fetch Longitude
TReal longitude = existingLocation.Longitude();
if (iIsRealValueEdited[ELongitudeEditor] || !locationExists)
{
FetchFloatL(floatFieldValue, ELandmarkLongitudeField,
R_LMREFAPP_LONGITUDE_ERROR);
floatFieldValue.GetTReal(longitude);
}
// Fetch Altitude
TReal32 altitude = existingLocation.Altitude();
if (iIsRealValueEdited[EAltitudeEditor] || !locationExists)
{
FetchFloatL(floatFieldValue, ELandmarkAltitudeField,
R_LMREFAPP_ALTITUDE_ERROR);
floatFieldValue.GetTReal(altitude);
}
// Fetch horizontal accuracy
TReal32 horAcc = existingLocation.HorizontalAccuracy();
if (iIsRealValueEdited[EHorizontalAccEditor] || !locationExists)
{
FetchFloatL(floatFieldValue, ELandmarkHorAccField,
R_LMREFAPP_HOR_ACC_ERROR);
floatFieldValue.GetTReal(horAcc);
}
// Fetch vertical accuracy
TReal32 verAcc = existingLocation.VerticalAccuracy();
if (iIsRealValueEdited[EVerticalAccEditor] || !locationExists)
{
FetchFloatL(floatFieldValue, ELandmarkVerAccField,
R_LMREFAPP_VER_ACC_ERROR);
floatFieldValue.GetTReal(verAcc);
}
// Fetch Coverage Radius
TReal32 radius;
TInt radiusExists = (iLandmark->GetCoverageRadius(radius) == KErrNone);
if (iIsRealValueEdited[ERadiusEditor] || !radiusExists)
{
FetchFloatL(floatFieldValue, ELandmarkRadiusField,
R_LMREFAPP_RADIUS_ERROR);
floatFieldValue.GetTReal(radius);
}
// Fetch street
TBuf<KPosLmMaxTextFieldLength> street;
editor =
static_cast <CEikEdwin*> (Control(ELandmarkStreetField));
editor->GetText(street);
// Fetch postal code
TBuf<KPosLmMaxTextFieldLength> postalCode;
editor =
static_cast <CEikEdwin*> (Control(ELandmarkPostalField));
editor->GetText(postalCode);
// Fetch city
TBuf<KPosLmMaxTextFieldLength> city;
editor = static_cast <CEikEdwin*> (Control(ELandmarkCityField));
editor->GetText(city);
// Fetch country
//.........这里部分代码省略.........