View click highlight.
This commit is contained in:
@@ -1,4 +1,4 @@
|
|||||||
#include "view/dicomimageview.h"
|
#include "view/dicomimageview.h"
|
||||||
#include <QMessageBox>
|
#include <QMessageBox>
|
||||||
#include <QDebug>
|
#include <QDebug>
|
||||||
#include <QMimeData>
|
#include <QMimeData>
|
||||||
@@ -42,11 +42,12 @@ DicomImageView::DicomImageView(QWidget* parent)
|
|||||||
controlLayout->addWidget(_glWidt, 0, 0);
|
controlLayout->addWidget(_glWidt, 0, 0);
|
||||||
|
|
||||||
//add scrollbar to container
|
//add scrollbar to container
|
||||||
_scrollBar = new QScrollBar(Qt::Orientation::Vertical);
|
_scrollBar = new ClickableScrollBar(Qt::Orientation::Vertical, this);
|
||||||
_scrollBar->setFocusPolicy(Qt::StrongFocus);
|
_scrollBar->setFocusPolicy(Qt::StrongFocus);
|
||||||
_scrollBar->setVisible(false);
|
_scrollBar->setVisible(false);
|
||||||
_scrollBar->setObjectName("scrollbar");
|
_scrollBar->setObjectName("scrollbar");
|
||||||
controlLayout->addWidget(_scrollBar, 0, 1);
|
controlLayout->addWidget(_scrollBar, 0, 1);
|
||||||
|
connect(_scrollBar, &ClickableScrollBar::clicked,this,&DicomImageView::viewerClicked);
|
||||||
|
|
||||||
//config container UI
|
//config container UI
|
||||||
controlLayout->setContentsMargins(0, 0, 0, 0);
|
controlLayout->setContentsMargins(0, 0, 0, 0);
|
||||||
@@ -379,6 +380,7 @@ void DicomImageView::LoadSeries(SeriesImageSet *series)
|
|||||||
//目前 替换了一部分包括SlicedEvent,EndDollyEvent,EndWindowLevelEvent,EndPanEvent,主要关联到sync
|
//目前 替换了一部分包括SlicedEvent,EndDollyEvent,EndWindowLevelEvent,EndPanEvent,主要关联到sync
|
||||||
|
|
||||||
ActorDraggableInteractorStyle *style = _ImageViewer->GetInteractorStyle();
|
ActorDraggableInteractorStyle *style = _ImageViewer->GetInteractorStyle();
|
||||||
|
style->AddObserver(ActorDraggableInteractorStyle::AfterViewerClicked, this, &DicomImageView::viewerClicked);
|
||||||
style->AddObserver(vtkCommand::EventIds::WindowLevelEvent, this, &DicomImageView::updateWindowLevelCb);
|
style->AddObserver(vtkCommand::EventIds::WindowLevelEvent, this, &DicomImageView::updateWindowLevelCb);
|
||||||
style->AddObserver(ActorDraggableInteractorStyle::DoubleClickEvent, this, &DicomImageView::doubleclickedEventCb);
|
style->AddObserver(ActorDraggableInteractorStyle::DoubleClickEvent, this, &DicomImageView::doubleclickedEventCb);
|
||||||
style->AddObserver(ActorDraggableInteractorStyle::ScalarOpacityEvent, this, &DicomImageView::scalarEventCb);
|
style->AddObserver(ActorDraggableInteractorStyle::ScalarOpacityEvent, this, &DicomImageView::scalarEventCb);
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
#pragma once
|
#pragma once
|
||||||
#include <QFrame>
|
#include <QFrame>
|
||||||
#include <QOpenGLWidget>
|
#include <QOpenGLWidget>
|
||||||
#include <QScrollBar>
|
#include "ClickableScrollBar.h"
|
||||||
#include <QGridLayout>
|
#include <QGridLayout>
|
||||||
#include "base/SeriesImageSet.h"
|
#include "base/SeriesImageSet.h"
|
||||||
|
|
||||||
@@ -147,6 +147,7 @@ public slots:
|
|||||||
void Slot_scrollValueChanged(int);
|
void Slot_scrollValueChanged(int);
|
||||||
void Slot_WindowLevelEventForFusion(double level, double width);
|
void Slot_WindowLevelEventForFusion(double level, double width);
|
||||||
void Slot_UpdateOrienInfo(TransFormType);
|
void Slot_UpdateOrienInfo(TransFormType);
|
||||||
|
void viewerClicked();
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
/**
|
/**
|
||||||
@@ -214,7 +215,7 @@ private:
|
|||||||
|
|
||||||
infinitiViewer* _ImageViewer = nullptr;
|
infinitiViewer* _ImageViewer = nullptr;
|
||||||
SeriesImageSet* _Series = nullptr;
|
SeriesImageSet* _Series = nullptr;
|
||||||
QScrollBar* _scrollBar =nullptr;
|
ClickableScrollBar* _scrollBar =nullptr;
|
||||||
MyTitleBar *_titleBar =nullptr;
|
MyTitleBar *_titleBar =nullptr;
|
||||||
QVTKOpenGLNativeWidget* _glWidt = nullptr;
|
QVTKOpenGLNativeWidget* _glWidt = nullptr;
|
||||||
pqVCRToolbar* _vcr_toolbar = nullptr;
|
pqVCRToolbar* _vcr_toolbar = nullptr;
|
||||||
|
|||||||
@@ -209,6 +209,7 @@ void MyTitleBar::SetHighlight(bool yes) {
|
|||||||
//setBackgroundColor(UnpickTitleRGB);
|
//setBackgroundColor(UnpickTitleRGB);
|
||||||
//setStyleSheet(QString::fromUtf8("border:10px solid red"));
|
//setStyleSheet(QString::fromUtf8("border:10px solid red"));
|
||||||
}
|
}
|
||||||
|
this->update();
|
||||||
}
|
}
|
||||||
//void MyTitleBar::mouseMoveEvent(QMouseEvent *event)
|
//void MyTitleBar::mouseMoveEvent(QMouseEvent *event)
|
||||||
//{
|
//{
|
||||||
|
|||||||
Reference in New Issue
Block a user