17#ifndef QGSLAYOUTVIEW_H 
   18#define QGSLAYOUTVIEW_H 
   27#include <QGraphicsView> 
   28#include <QGraphicsRectItem> 
   38class QgsLayoutViewSnapMarker;
 
   39class QgsLayoutReportSectionLabel;
 
   53    if ( qobject_cast<QgsLayoutView *>( sipCpp ) )
 
   54      sipType = sipType_QgsLayoutView;
 
   62    Q_PROPERTY( 
QgsLayout *currentLayout READ currentLayout WRITE setCurrentLayout NOTIFY layoutSet )
 
  136    void setPreviewModeEnabled( 
bool enabled );
 
  142    bool previewModeEnabled() 
const;
 
  164    void scaleSafe( 
double scale );
 
  169    void setZoomLevel( 
double level );
 
  207    QList<QgsLayoutItemPage *> visiblePages() 
const;
 
  213    QList<int> visiblePageNumbers() 
const;
 
  241    void copySelectedItems( ClipboardOperation operation );
 
  248    void copyItems( 
const QList<QgsLayoutItem *> &items, ClipboardOperation operation );
 
  258    QList<QgsLayoutItem *> pasteItems( PasteMode mode );
 
  269    QList<QgsLayoutItem *> pasteItems( QPointF layoutPoint );
 
  275    bool hasItemsInClipboard() 
const;
 
  281    QPointF deltaForKeyEvent( QKeyEvent *event );
 
  288    void setPaintingEnabled( 
bool enabled ) 
SIP_SKIP;
 
  294    void setSectionLabel( 
const QString &label );
 
  347    void emitZoomLevelChanged();
 
  376    void invertSelection();
 
  384    void selectNextItemAbove();
 
  392    void selectNextItemBelow();
 
  400    void raiseSelectedItems();
 
  408    void lowerSelectedItems();
 
  416    void moveSelectedItemsToTop();
 
  424    void moveSelectedItemsToBottom();
 
  431    void lockSelectedItems();
 
  437    void unlockAllItems();
 
  443    void deleteSelectedItems();
 
  449    void deleteItems( 
const QList<QgsLayoutItem *> &items );
 
  455    void groupSelectedItems();
 
  461    void ungroupSelectedItems();
 
  477    void pushStatusMessage( 
const QString &message );
 
  534    void mousePressEvent( QMouseEvent *event ) 
override;
 
  535    void mouseReleaseEvent( QMouseEvent *event ) 
override;
 
  536    void mouseMoveEvent( QMouseEvent *event ) 
override;
 
  537    void mouseDoubleClickEvent( QMouseEvent *event ) 
override;
 
  538    void wheelEvent( QWheelEvent *event ) 
override;
 
  539    void keyPressEvent( QKeyEvent *event ) 
override;
 
  540    void keyReleaseEvent( QKeyEvent *event ) 
override;
 
  541    void resizeEvent( QResizeEvent *event ) 
override;
 
  542    void scrollContentsBy( 
int dx, 
int dy ) 
override;
 
  543    void dragEnterEvent( QDragEnterEvent *e ) 
override;
 
  544    void paintEvent( QPaintEvent *event ) 
override;
 
  548    void invalidateCachedRenders();
 
  552    void wheelZoom( QWheelEvent *event );
 
  556    QPointer<QgsLayoutViewTool> mTool;
 
  562    QPoint mMouseCurrentXY;
 
  566    std::unique_ptr<QgsLayoutViewMenuProvider> mMenuProvider;
 
  568    QgsLayoutViewSnapMarker *mSnapMarker = 
nullptr;
 
  569    QgsLayoutReportSectionLabel *mSectionLabel = 
nullptr;
 
  571    QGraphicsLineItem *mHorizontalSnapLine = 
nullptr;
 
  572    QGraphicsLineItem *mVerticalSnapLine = 
nullptr;
 
  574    int mCurrentPage = 0;
 
  578    bool mPaintingEnabled = 
true;
 
  580    friend class TestQgsLayoutView;
 
  581    friend class QgsLayoutMouseHandles;
 
  583    QGraphicsLineItem *createSnapLine() 
const;
 
 
  615class GUI_EXPORT QgsLayoutViewSnapMarker : 
public QGraphicsRectItem
 
  618    QgsLayoutViewSnapMarker();
 
  620    void paint( QPainter *painter, 
const QStyleOptionGraphicsItem *option, QWidget *widget = 
nullptr ) 
override;
 
Alignment
Alignment options.
 
Distribution
Distribution options.
 
Base class for graphical items within a QgsLayout.
 
A custom ruler widget for use with QgsLayoutView, displaying the current zoom and position of the vis...
 
A graphical widget to display and interact with QgsLayouts.
 
void cursorPosChanged(QPointF layoutPoint)
Emitted when the mouse cursor coordinates change within the view.
 
@ PasteModeCenter
Paste items in center of view.
 
@ PasteModeInPlace
Paste items in place.
 
@ PasteModeCursor
Paste items at cursor position.
 
void zoomLevelChanged()
Emitted whenever the zoom level of the view is changed.
 
void willBeDeleted()
Emitted in the destructor when the view is about to be deleted, but is still in a perfectly valid sta...
 
QgsLayout * currentLayout()
Returns the current layout associated with the view.
 
void statusMessage(const QString &message)
Emitted when the view has a message for display in a parent window's status bar.
 
void itemFocused(QgsLayoutItem *item)
Emitted when an item is "focused" in the view, i.e.
 
void layoutSet(QgsLayout *layout)
Emitted when a layout is set for the view.
 
int currentPage() const
Returns the page visible in the view.
 
ClipboardOperation
Clipboard operations.
 
@ ClipboardCopy
Copy items.
 
QgsLayoutViewTool * tool()
Returns the currently active tool for the view.
 
void toolSet(QgsLayoutViewTool *tool)
Emitted when the current tool is changed.
 
void pageChanged(int page)
Emitted when the page visible in the view is changed.
 
Base class for layouts, which can contain items such as maps, labels, scalebars, etc.
 
A graphics effect which can be applied to a widget to simulate various printing and color blindness m...
 
A utility class for dynamic handling of changes to screen properties.
 
#define SIP_CONVERT_TO_SUBCLASS_CODE(code)
 
#define SIP_KEEPREFERENCE