Commet for dicomimageview
This commit is contained in:
@@ -21,11 +21,13 @@
|
||||
DicomImageView::DicomImageView(QWidget* parent)
|
||||
: QFrame(parent)
|
||||
{
|
||||
|
||||
//main container
|
||||
QFrame *wrapper = new QFrame(this);
|
||||
wrapper->setObjectName("wrapper");
|
||||
|
||||
QGridLayout *view_layout = new QGridLayout(this);
|
||||
|
||||
//add container and title bar
|
||||
_titleBar = createMyTitleBar();
|
||||
view_layout->addWidget(_titleBar, 0, 0);
|
||||
view_layout->addWidget(wrapper, 1, 0);
|
||||
@@ -33,37 +35,31 @@ DicomImageView::DicomImageView(QWidget* parent)
|
||||
view_layout->setSpacing(0);
|
||||
this->setLayout(view_layout);
|
||||
|
||||
|
||||
// create layout for main container
|
||||
QGridLayout* controlLayout = new QGridLayout(wrapper);
|
||||
|
||||
_glWidt = new QVTKOpenGLNativeWidget(wrapper);
|
||||
|
||||
//add QVTKOpenGLNativeWidget to container
|
||||
m_glrenWin = vtkSmartPointer <vtkGenericOpenGLRenderWindow>::New();
|
||||
_glWidt->SetRenderWindow(m_glrenWin);//set up interacte
|
||||
|
||||
controlLayout->addWidget(_glWidt, 0, 0);
|
||||
|
||||
|
||||
//add scrollbar to container
|
||||
_scrollBar = new QScrollBar(Qt::Orientation::Vertical);
|
||||
_scrollBar->setFocusPolicy(Qt::StrongFocus);
|
||||
_scrollBar->setVisible(false);
|
||||
_scrollBar->setObjectName("scrollbar");
|
||||
|
||||
|
||||
|
||||
|
||||
controlLayout->addWidget(_scrollBar, 0, 1);
|
||||
|
||||
//config container UI
|
||||
controlLayout->setContentsMargins(0, 0, 0, 0);
|
||||
controlLayout->setSpacing(0);
|
||||
wrapper->setLayout(controlLayout);
|
||||
//this->setLayout(controlLayout);
|
||||
|
||||
setAutoFillBackground(true);
|
||||
|
||||
//config self
|
||||
QWidget::setAcceptDrops(true);
|
||||
this->setObjectName("dicomview");
|
||||
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
@@ -75,21 +71,26 @@ DicomImageView::~DicomImageView()
|
||||
}
|
||||
_thread.quit();//event loop
|
||||
_thread.wait(); //wait until return,block mode
|
||||
_vcr_toolbar->deleteLater();
|
||||
if (_vcr_toolbar){
|
||||
_vcr_toolbar->deleteLater();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
bool DicomImageView::isVCRVisible()
|
||||
{
|
||||
if (!_vcr_toolbar) return false;
|
||||
return _vcr_toolbar->isVisible();
|
||||
}
|
||||
|
||||
void DicomImageView::setVCRVisible(bool visible)
|
||||
{
|
||||
if (!_vcr_toolbar) return ;
|
||||
_vcr_toolbar->setVisible(visible);
|
||||
}
|
||||
void DicomImageView::cineModeOn()
|
||||
{
|
||||
if (!_vcr_toolbar) return;
|
||||
//updateVCRToolbarPos();
|
||||
int ax = (this->geometry().bottomLeft().x() + this->geometry().bottomRight().x()) / 2 + VCRHelper::getVCRXOffset();
|
||||
int ay = (this->geometry().bottomLeft().y() + this->geometry().bottomRight().y()) / 2 + VCRHelper::getVCRYOffset();
|
||||
|
||||
@@ -201,6 +201,11 @@ private:
|
||||
|
||||
|
||||
void initCineModeThread();
|
||||
|
||||
/**
|
||||
* create a TitleBar for this widget
|
||||
* @return
|
||||
*/
|
||||
MyTitleBar* createMyTitleBar();
|
||||
void orphanizeSeriesInstance();
|
||||
void ResetPanZoom();
|
||||
|
||||
Reference in New Issue
Block a user