TimeSlider::TimeSlider( QWidget * parent ) : MySlider(parent) { dont_update = FALSE; setMinimum(0); #ifdef SEEKBAR_RESOLUTION setMaximum(SEEKBAR_RESOLUTION); #else setMaximum(100); #endif setFocusPolicy( Qt::NoFocus ); setSizePolicy( QSizePolicy::Expanding , QSizePolicy::Fixed ); connect( this, SIGNAL( sliderPressed() ), this, SLOT( stopUpdate() ) ); connect( this, SIGNAL( sliderReleased() ), this, SLOT( resumeUpdate() ) ); connect( this, SIGNAL( sliderReleased() ), this, SLOT( mouseReleased() ) ); connect( this, SIGNAL( valueChanged(int) ), this, SLOT( valueChanged_slot(int) ) ); #if ENABLE_DELAYED_DRAGGING connect( this, SIGNAL(draggingPos(int) ), this, SLOT(checkDragging(int)) ); last_pos_to_send = -1; timer = new QTimer(this); connect( timer, SIGNAL(timeout()), this, SLOT(sendDelayedPos()) ); timer->start(200); #endif }
TimeSlider::TimeSlider( QWidget * parent ) : MySlider(parent) { dont_update = false; setMinimum(0); setMaximum(100); setFocusPolicy( Qt::NoFocus ); setSizePolicy( QSizePolicy::Expanding , QSizePolicy::Fixed ); connect( this, SIGNAL( sliderPressed() ), this, SLOT( stopUpdate() ) ); connect( this, SIGNAL( sliderReleased() ), this, SLOT( resumeUpdate() ) ); connect( this, SIGNAL( sliderReleased() ), this, SLOT( mouseReleased() ) ); connect( this, SIGNAL( valueChanged(int) ), this, SLOT( valueChanged_slot(int) ) ); connect( this, SIGNAL(draggingPos(int) ), this, SLOT(checkDragging(int)) ); last_pos_to_send = -1; timer = new QTimer(this); connect( timer, SIGNAL(timeout()), this, SLOT(sendDelayedPos()) ); timer->start(200); }