void CAknInputBlock::FocusChanged(TDrawNow /*aDrawNow*/)
	{
	if (IsFocused())
		{
		SetPointerCapture(ETrue);
		ClaimPointerGrab(ETrue);
		}
	else
		{
		SetPointerCapture(EFalse);
		}
	}
EXPORT_C CAknInputBlock::~CAknInputBlock()
	{
	iAppUi->RemoveFromStack(this);
	if (CapturesPointer())
		SetPointerCapture(EFalse);
	delete iCba;
	Cancel();
	}
Example #3
0
void CWindowMover::ConstructL(MWindowMover* m,QmlApplicationViewer* v,RWsSession* aWs)
    {

    iWinGroup=new (ELeave) RWindowGroup(*aWs);
    iWinGroup->Construct((TUint32)&iWinGroup, EFalse);
    iWinGroup->EnableReceiptOfFocus(EFalse); // Don't capture any key events.
    iWinGroup->SetOrdinalPosition(0, ECoeWinPriorityAlwaysAtFront+KAddPriority+1);

    CApaWindowGroupName* wn=CApaWindowGroupName::NewL(*aWs);
    wn->SetHidden(ETrue);
    wn->SetSystem(ETrue);
    wn->SetWindowGroupName(*iWinGroup);
    delete wn;

    iCallBack=m;
    viewer=v;
    iDragged=EFalse;
    CreateWindowL(iWinGroup);
    SetPointerCapture(ETrue);
    EnableDragEvents();
    // for transparency
    TRgb backgroundColour = KRgbWhite; // for example
//#ifndef _DEBUG
    if(KErrNone == Window().SetTransparencyAlphaChannel())
        {backgroundColour.SetAlpha(0);}
//#endif
    Window().SetBackgroundColor(backgroundColour);
    //SetSize(TSize(1,1));
    MakeVisible(EFalse);
    SetExtentToWholeScreen();

    settings=new QSettings(KConfigFile,QSettings::IniFormat);

    xAnim=new MyAnimation();
    yAnim=new MyAnimation();
    //QEasingCurve curve=new QEasingCurve(QEasingCurve::OutQuad);
    xAnim->setEasingCurve(QEasingCurve::OutQuad);
    yAnim->setEasingCurve(QEasingCurve::OutQuad);
    xAnim->setDuration(200);
    yAnim->setDuration(200);
    connect(xAnim,SIGNAL(valueChanged(QVariant)),this,SLOT(xAnimChanged(QVariant)));
    connect(yAnim,SIGNAL(valueChanged(QVariant)),this,SLOT(yAnimChanged(QVariant)));
    connect(yAnim,SIGNAL(finished()),this,SLOT(finished()));
    connect(xAnim,SIGNAL(finished()),this,SLOT(finished()));
    iTimer=new QTimer();
    iTimer->setInterval(400);
    iTimer->setSingleShot(false);
    connect(iTimer,SIGNAL(timeout()),this,SLOT(checkLaunchArea()));
    ActivateL();
    int gest=settings->value("settings/gesture").toInt();
    if (gest==0) axisSet=false;
    else if (gest==1) {axisX=1;axisY=0; axisSet=true;}
    else if (gest==2) {axisX=0;axisY=1; axisSet=true;}
    }
Example #4
0
void CContainerButton::ConstructL(RWindowGroup* aWg)
	{
	CreateWindowL(aWg);
	TRgb col(0,0,0,0);
	Window().SetTransparencyAlphaChannel();
	Window().SetBackgroundColor(col);
	MakeVisible(ETrue);
	SetPointerCapture(ETrue);
	EnableDragEvents();
	iTimer=CPeriodic::NewL(CActive::EPriorityHigh);
	iTimeUp.HomeTime();
	iTimeDown.HomeTime();
	ActivateL();
	}
// -----------------------------------------------------------------------------
// CAknInfoPopupNote::HandlePointerEventL
// 
// -----------------------------------------------------------------------------
//
void CAknInfoPopupNote::HandlePointerEventL( const TPointerEvent& aPointerEvent )
    {
    if ( AknLayoutUtils::PenEnabled() )
        {
        SetPointerCapture( ETrue );

        if ( aPointerEvent.iType == TPointerEvent::EButton1Down
             || aPointerEvent.iType == TPointerEvent::EButton1Up
             || aPointerEvent.iType == TPointerEvent::EDrag )
            {
            if ( aPointerEvent.iType == TPointerEvent::EButton1Up )
                {
                MTouchFeedback* feedback = MTouchFeedback::Instance();
                if ( feedback )
                    {
                    feedback->InstantFeedback( ETouchFeedbackPopUp );
                    }
                }

            Hide();
            SetPointerCapture( EFalse ); 
            }
        }
    }
Example #6
0
void CSliderForDialog :: ConstructL(CCoeControl* aParent )
{	   
	// ��� ����������� ����� ������������ ���� �� ��������� �������
    font = CEikonEnv::Static()->NormalFont();    
 iParent=aParent;
    // ������ ������������ ����� �������� ����� 
    TBuf<50> tmpLabel;		
    tmpLabel.Num(iMaxVal);
    iMaxLbWidth = font->TextWidthInPixels( tmpLabel);
    SetContainerWindowL(*aParent);
    SetPointerCapture(ETrue);
    EnableDragEvents();
    ActivateL();
    iBgColor=KRgbBlack;
    iBgColor.SetAlpha(255);
}