00001 #include <QtDebug> 00002 #include <QScrollBar> 00003 #include <QAbstractSlider> 00004 00005 #include "ScrollAreaTransferFunction.h" 00006 00007 ScrollAreaTransferFunction::ScrollAreaTransferFunction(void) 00008 { 00009 } 00010 00011 ScrollAreaTransferFunction::~ScrollAreaTransferFunction(void) 00012 { 00013 } 00014 00015 QSize ScrollAreaTransferFunction::sizeHint() const 00016 { 00017 return QSize(1000, 290); 00018 } 00019 00020 void ScrollAreaTransferFunction::resizeEvent(QResizeEvent *event) 00021 { 00022 QScrollArea::resizeEvent(event); 00023 00024 if(verticalScrollBar()->isVisible()) 00025 { 00026 verticalScrollBar()->setSliderPosition(verticalScrollBar()->maximum()); 00027 } 00028 00029 if(widget() != 0) 00030 { 00031 ((TransferFunction*)widget())->updateSize(); 00032 } 00033 00034 }