Ejemplo n.º 1
0
bool TouchMouseControl::startMouseAction( int x, int y, Qt::MouseButton button )
{
	// don't start mouse action if touch action is active
    if ( !m_touch_started
        && (!g_config.multitouch || abs_i(x-m_x) > 1 || abs_i(y-m_y) > 1 ) )
	{
        m_mouse_started = button;
	} else {
        m_mouse_started = Qt::NoButton;
	}

    // Block mouse events for a bit after touch action has started.
    qint64 time_diff = m_last_touch_release_time.elapsed();
	if ( time_diff < 40 )
        m_mouse_started = Qt::NoButton;

    return m_mouse_started != Qt::NoButton;
}
int main(void) {
    int a;
    float b;
    
    printf("mutlak degerini ogrenmek istediginiz tam sayiyi giriniz:\n");
    scanf("%d",&a);
    printf("Mutlak deger %d 'dir.\n\n", abs_i(a));
    
    printf("mutlak degerini ogranmak istediginiz ondalik sayiyi giriniz:\n");
    scanf("%f",&b);
    printf("Mutlak deger %f 'dir.\n", abs_f(b));
    
    getch();
    return 0;
}