Make viewer transparency respond faster and add to combo viewer (#172)
This commit is contained in:
parent
de24d9092c
commit
1e645cf022
4 changed files with 16 additions and 7 deletions
|
@ -475,12 +475,15 @@ void ComboViewerPanel::initializeTitleBar(TPanelTitleBar *titleBar) {
|
|||
titleBar->add(QPoint(x, 0), button);
|
||||
button->setButtonSet(viewModeButtonSet, SceneViewer::CAMERA3D_REFERENCE);
|
||||
|
||||
button = new TPanelTitleBarButton(
|
||||
titleBar, getIconThemePath("actions/18/pane_cam.svg"));
|
||||
button->setToolTip(tr("Camera View"));
|
||||
TPanelTitleBarButtonForCameraView* camButton =
|
||||
new TPanelTitleBarButtonForCameraView(
|
||||
titleBar, getIconThemePath("actions/18/pane_cam.svg"));
|
||||
camButton->setToolTip(tr("Camera View"));
|
||||
x += +1 + iconWidth;
|
||||
titleBar->add(QPoint(x, 0), button);
|
||||
button->setButtonSet(viewModeButtonSet, SceneViewer::CAMERA_REFERENCE);
|
||||
titleBar->add(QPoint(x, 0), camButton);
|
||||
camButton->setButtonSet(viewModeButtonSet, SceneViewer::CAMERA_REFERENCE);
|
||||
connect(camButton, &TPanelTitleBarButtonForCameraView::updateViewer,
|
||||
[=]() { m_sceneViewer->update(); });
|
||||
ret = ret && connect(viewModeButtonSet, SIGNAL(selected(int)), m_sceneViewer,
|
||||
SLOT(setReferenceMode(int)));
|
||||
|
||||
|
|
|
@ -394,8 +394,10 @@ void TPanelTitleBarButtonForCameraView::contextMenuEvent(QContextMenuEvent *e) {
|
|||
transparencySlider->setRange(20, 100);
|
||||
transparencySlider->setValue(CameraViewTransparency);
|
||||
transparencySlider->setOrientation(Qt::Horizontal);
|
||||
connect(transparencySlider, &QSlider::valueChanged,
|
||||
[=](int value) { CameraViewTransparency = value; });
|
||||
connect(transparencySlider, &QSlider::valueChanged, [=](int value) {
|
||||
CameraViewTransparency = value;
|
||||
emit updateViewer();
|
||||
});
|
||||
sliderAction->setDefaultWidget(transparencySlider);
|
||||
menu.addAction(sliderAction);
|
||||
menu.exec(e->globalPos());
|
||||
|
|
|
@ -107,6 +107,8 @@ public:
|
|||
|
||||
protected:
|
||||
void contextMenuEvent(QContextMenuEvent *event) override;
|
||||
signals:
|
||||
void updateViewer();
|
||||
};
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
|
|
|
@ -483,6 +483,8 @@ void SceneViewerPanel::initializeTitleBar(TPanelTitleBar *titleBar) {
|
|||
x += +1 + iconWidth;
|
||||
titleBar->add(QPoint(x, 0), camButton);
|
||||
camButton->setButtonSet(viewModeButtonSet, SceneViewer::CAMERA_REFERENCE);
|
||||
connect(camButton, &TPanelTitleBarButtonForCameraView::updateViewer,
|
||||
[=]() { m_sceneViewer->update(); });
|
||||
|
||||
ret = ret && connect(viewModeButtonSet, SIGNAL(selected(int)), m_sceneViewer,
|
||||
SLOT(setReferenceMode(int)));
|
||||
|
|
Loading…
Reference in a new issue