5 ScrollBar::ScrollBar( QGraphicsItem
*parent
)
6 : QGraphicsProxyWidget( parent
)
8 QScrollBar
*scrollbar
= new QScrollBar
;
10 connect( scrollbar
, SIGNAL( valueChanged( int ) ), this, SLOT( setValueChanged( int ) ) );
12 setWidget( scrollbar
);
15 ScrollBar::~ScrollBar()
19 void ScrollBar::setValueChanged( int value
)
21 emit
valueChanged( value
);
24 void ScrollBar::setMaximum( int max
)
26 QScrollBar
*scrollbar
= static_cast<QScrollBar
*>( widget() );
27 scrollbar
->setMaximum( max
);
30 void ScrollBar::setValue( int value
)
32 QScrollBar
*scrollbar
= static_cast<QScrollBar
*>( widget() );
33 scrollbar
->setValue( -value
);