16#ifndef QGSLAYOUTGUIDECOLLECTION_H
17#define QGSLAYOUTGUIDECOLLECTION_H
25#include <QAbstractListModel>
26#include <QSortFilterProxyModel>
27#include <QGraphicsLineItem>
79 Qt::Orientation orientation()
const;
123 QGraphicsLineItem *item();
129 double layoutPosition()
const;
135 void setLayoutPosition(
double position );
146 Qt::Orientation mOrientation = Qt::Vertical;
152 QPointer< QgsLayoutItemPage > mPage;
154 QPointer< QgsLayout > mLayout;
157 QGraphicsLineItem *mLineItem =
nullptr;
201 QString
stringType()
const override {
return QStringLiteral(
"LayoutGuideCollection" ); }
204 int rowCount(
const QModelIndex & )
const override;
205 int columnCount(
const QModelIndex & )
const override;
206 QVariant data(
const QModelIndex &index,
int role )
const override;
207 bool setData(
const QModelIndex &index,
const QVariant &value,
int role )
override;
208 Qt::ItemFlags flags(
const QModelIndex &index )
const override;
209 QVariant headerData(
int section, Qt::Orientation orientation,
210 int role = Qt::DisplayRole )
const override;
211 bool removeRows(
int row,
int count,
const QModelIndex &parent = QModelIndex() )
override;
229 void setGuideLayoutPosition(
QgsLayoutGuide *guide,
double position );
240 void applyGuidesToAllOtherPages(
int sourcePage );
250 QList< QgsLayoutGuide * > guides();
258 QList< QgsLayoutGuide * > guides( Qt::Orientation orientation,
int page = -1 );
264 QList< QgsLayoutGuide * > guidesOnPage(
int page );
270 bool visible()
const;
276 void setVisible(
bool visible );
282 bool writeXml( QDomElement &parentElement, QDomDocument &document,
const QgsReadWriteContext &context )
const override;
288 bool readXml(
const QDomElement &collectionElement,
const QDomDocument &document,
const QgsReadWriteContext &context )
override;
292 void pageAboutToBeRemoved(
int pageNumber );
305 QList< QgsLayoutGuide * > mGuides;
308 bool mGuidesVisible =
true;
309 bool mBlockUndoCommands =
false;
311 friend class QgsLayoutGuideCollectionUndoCommand;
337 void setPage(
int page );
339 bool filterAcceptsRow(
int sourceRow,
const QModelIndex &sourceParent )
const override;
340 bool lessThan(
const QModelIndex &left,
const QModelIndex &right )
const override;
343 Qt::Orientation mOrientation = Qt::Horizontal;
Stores and manages the snap guides used by a layout.
QString stringType() const override
Returns the object type as a string.
Filters QgsLayoutGuideCollection models to guides of a single orientation (horizontal or vertical).
Contains the configuration for a single snap guide used by a layout.
void positionChanged()
Emitted when the guide's position is changed.
Item representing the paper in a layout.
This class provides a method of storing measurements for use in QGIS layouts using a variety of diffe...
A manager for a collection of pages in a layout.
An interface for layout objects which can be stored and read from DOM elements.
Base class for layouts, which can contain items such as maps, labels, scalebars, etc.
The class is used as a container of context for various read/write operations on other objects.
#define SIP_MONKEYPATCH_SCOPEENUM_UNNEST(OUTSIDE_CLASS, FORMERNAME)
#define SIP_MONKEYPATCH_COMPAT_NAME(FORMERNAME)