1 #include "MosaicGraphicsView.h" 5 #include <QResizeEvent> 11 setHorizontalScrollBarPolicy(Qt::ScrollBarAlwaysOn);
12 setVerticalScrollBarPolicy(Qt::ScrollBarAlwaysOn);
14 p_resizeZooming =
true;
21 setCacheMode(QGraphicsView::CacheBackground);
24 MosaicGraphicsView::~MosaicGraphicsView() {
28 void MosaicGraphicsView::contextMenuEvent(QContextMenuEvent *event) {
29 QGraphicsView::contextMenuEvent(event);
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();
40 QGraphicsView::resizeEvent(event);
Namespace for ISIS/Bullet specific routines.