File failed to load: https://isis.astrogeology.usgs.gov/6.0.0/Object/assets/jax/output/NativeMML/config.js
Isis 3 Programmer Reference
MosaicGraphicsView.cpp
1 #include "MosaicGraphicsView.h"
2 
3 #include <iostream>
4 
5 #include <QResizeEvent>
6 #include <QScrollBar>
7 
8 namespace Isis {
9  MosaicGraphicsView::MosaicGraphicsView(QGraphicsScene *scene,
10  QWidget *parent) : QGraphicsView(scene, parent) {
11  setHorizontalScrollBarPolicy(Qt::ScrollBarAlwaysOn);
12  setVerticalScrollBarPolicy(Qt::ScrollBarAlwaysOn);
13 
14  p_resizeZooming = true;
15 
16 // setRenderHint(QPainter::SmoothPixmapTransform,false);
17 // setRenderHint(QPainter::HighQualityAntialiasing,false);
18 // setRenderHint(QPainter::NonCosmeticDefaultPen,true);
19 // setOptimizationFlag(QGraphicsView::DontSavePainterState);
20 // setRenderHint(QPainter::Qt4CompatiblePainting, true);
21  setCacheMode(QGraphicsView::CacheBackground);
22  }
23 
24  MosaicGraphicsView::~MosaicGraphicsView() {
25  }
26 
27 
28  void MosaicGraphicsView::contextMenuEvent(QContextMenuEvent *event) {
29  QGraphicsView::contextMenuEvent(event);
30  }
31 
32 
33  void MosaicGraphicsView::resizeEvent(QResizeEvent *event) {
34  if(m_oldSize.isEmpty() || p_resizeZooming) {
35  QRectF sceneRect(scene()->itemsBoundingRect());
36  fitInView(sceneRect, Qt::KeepAspectRatio);
37  m_oldSize = event->size();
38  }
39 
40  QGraphicsView::resizeEvent(event);
41  }
42 }
43 
QWidget
QGraphicsView
QGraphicsScene
Isis
This is free and unencumbered software released into the public domain.
Definition: Apollo.h:16

U.S. Department of the Interior | U.S. Geological Survey
ISIS | Privacy & Disclaimers | Astrogeology Research Program
To contact us, please post comments and questions on the USGS Astrogeology Discussion Board
To report a bug, or suggest a feature go to: ISIS Github
File Modified: 07/13/2023 15:16:53