コード例 #1
0
void MyWidgetAction::propagate_enabled(bool b) {
	QList<QWidget *> l = createdWidgets();
	for (int n=0; n < l.count(); n++) {
		TimeSlider *s = (TimeSlider*) l[n];
		s->setEnabled(b);;
	}
	setEnabled(b);
}
コード例 #2
0
QWidget * TimeSliderAction::createWidget ( QWidget * parent ) {
	TimeSlider *t = new TimeSlider(parent);
	t->setEnabled( isEnabled() );

	if (custom_style) t->setStyle(custom_style);
	if (!custom_stylesheet.isEmpty()) t->setStyleSheet(custom_stylesheet);

	connect( t,    SIGNAL(posChanged(int)), 
             this, SIGNAL(posChanged(int)) );
	connect( t,    SIGNAL(draggingPos(int)),
             this, SIGNAL(draggingPos(int)) );
#if ENABLE_DELAYED_DRAGGING
	t->setDragDelay(drag_delay);

	connect( t,    SIGNAL(delayedDraggingPos(int)),
	         this, SIGNAL(delayedDraggingPos(int)) );
#endif

	return t;
}