1#include "MatrixGraphicsView.h" 
   11    setHorizontalScrollBarPolicy(Qt::ScrollBarAlwaysOn);
 
   12    setVerticalScrollBarPolicy(Qt::ScrollBarAlwaysOn);
 
   14    p_resizeZooming = 
true;
 
   20    setCacheMode(QGraphicsView::CacheBackground);
 
   23  MatrixGraphicsView::~MatrixGraphicsView() {
 
   27  void MatrixGraphicsView::contextMenuEvent(QContextMenuEvent *event) {
 
   28    QGraphicsView::contextMenuEvent(event);
 
   32  void MatrixGraphicsView::resizeEvent(QResizeEvent *event) {
 
   33    if(event->oldSize().isEmpty() || p_resizeZooming) {
 
   34      QRectF sceneRect(scene()->itemsBoundingRect());
 
   35      fitInView(sceneRect, Qt::KeepAspectRatio);
 
   38    QGraphicsView::resizeEvent(event);
 
This is free and unencumbered software released into the public domain.