-// Copyright (C) 2013-2016 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2013-2024 CEA, EDF, OPEN CASCADE
//
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
#include "GraphicsView_Defs.h"
#include <QGraphicsView>
+#include <QPainterPath>
class QGridLayout;
class QRubberBand;
DraggingByMiddleButton = 0x0010,
ImmediateContextMenu = 0x0020,
ImmediateSelection = 0x0040,
- Sketching = 0x0080
+ Sketching = 0x0080,
+
+ GlobalWheelScaling = 0x0100
};
Q_DECLARE_FLAGS( InteractionFlags, InteractionFlag )
QImage dumpView( bool theWholeScene = false,
QSizeF theSize = QSizeF() );
- bool dumpViewToPSFormat(const QString& fileName);
+ bool dumpViewToFormat(const QString& fileName, const QString& format);
public:
// scene
void applyTransform();
+ int zoomCoeff() const { return myZoomCoeff; }
+ void setZoomCoeff( const int& theZoomCoeff );
+
+ bool isUnlimitedPanning() const { return myUnlimitedPanning; }
+ void setUnlimitedPanning( const bool& theValue );
+
// block status
BlockStatus currentBlock();
// dragging
bool isDragging() { return myIsDragging; }
+ bool isDraggingSelectedByLeftButton() const { return myDraggingSelectedByLeftButton; }
+ void setDraggingSelectedByLeftButton( const bool& theValue );
+
// pulling
bool startPulling( const QPointF& );
void drawPulling( const QPointF& );
bool myIsTransforming;
QTransform myCurrentTransform;
+ bool myUnlimitedPanning;
+ Qt::ScrollBarPolicy myHBarPolicy;
+ Qt::ScrollBarPolicy myVBarPolicy;
+
// highlighting
GraphicsView_Object* myHighlightedObject;
double myHighlightX;
int myIsDragging;
QPointF myDragPosition;
bool myIsDragPositionInitialized;
+ bool myDraggingSelectedByLeftButton;
// pulling
bool myIsPulling;
// cursor
QCursor myStoredCursor;
+
+ // zoom diagonal coefficient
+ int myZoomCoeff;
};
Q_DECLARE_OPERATORS_FOR_FLAGS( GraphicsView_ViewPort::InteractionFlags )