Add some documentation to layout classes moved to GUI

This commit is contained in:
Sandro Mani 2020-01-17 22:40:30 +01:00
parent 509ba6c919
commit 6e7009ab2a
27 changed files with 327 additions and 71 deletions

View File

@ -28,11 +28,19 @@ class QgsMapCanvas;
class QgsProject; class QgsProject;
/**
* \ingroup gui
* Layer tree model for Geo-PDF layers
*
* \note This class is not a part of public API
* \since QGIS 3.12
*/
class GUI_EXPORT QgsGeoPdfLayerTreeModel : public QgsLayerTreeModel class GUI_EXPORT QgsGeoPdfLayerTreeModel : public QgsLayerTreeModel
{ {
Q_OBJECT Q_OBJECT
public: public:
//! constructor
QgsGeoPdfLayerTreeModel( QgsLayerTree *rootNode, QObject *parent = nullptr ); QgsGeoPdfLayerTreeModel( QgsLayerTree *rootNode, QObject *parent = nullptr );
int columnCount( const QModelIndex &parent ) const override; int columnCount( const QModelIndex &parent ) const override;

View File

@ -29,7 +29,11 @@
#include "qgslayoutmeasurementconverter.h" #include "qgslayoutmeasurementconverter.h"
/** /**
* \ingroup gui
* A dialog for configuring properties of new pages to be added to a layout * A dialog for configuring properties of new pages to be added to a layout
*
* \note This class is not a part of public API
* \since QGIS 3.12
*/ */
class GUI_EXPORT QgsLayoutAddPagesDialog : public QDialog, private Ui::QgsLayoutNewPageDialog class GUI_EXPORT QgsLayoutAddPagesDialog : public QDialog, private Ui::QgsLayoutNewPageDialog
{ {
@ -37,6 +41,7 @@ class GUI_EXPORT QgsLayoutAddPagesDialog : public QDialog, private Ui::QgsLayout
public: public:
//! Page insertion positions
enum PagePosition enum PagePosition
{ {
BeforePage, BeforePage,

View File

@ -28,14 +28,19 @@ class QgsLayoutAtlas;
class QgsMessageBar; class QgsMessageBar;
/** /**
* \ingroup app * \ingroup gui
* A widget for layout atlas settings. * Widget for configuring the properties of a layout atlas.
*/ *
* \note This class is not a part of public API
* \since QGIS 3.12
*/
class GUI_EXPORT QgsLayoutAtlasWidget: public QWidget, private Ui::QgsLayoutAtlasWidgetBase class GUI_EXPORT QgsLayoutAtlasWidget: public QWidget, private Ui::QgsLayoutAtlasWidgetBase
{ {
Q_OBJECT Q_OBJECT
public: public:
//! Constructor
QgsLayoutAtlasWidget( QWidget *parent, QgsPrintLayout *layout ); QgsLayoutAtlasWidget( QWidget *parent, QgsPrintLayout *layout );
//! Sets the message bar to which to emit messages
void setMessageBar( QgsMessageBar *bar ); void setMessageBar( QgsMessageBar *bar );
private slots: private slots:

View File

@ -42,11 +42,13 @@ class QgsLayoutTableAvailableSortProxyModel;
class QgsLayoutObject; class QgsLayoutObject;
class QgsLayoutTableColumn; class QgsLayoutTableColumn;
//QgsLayoutAttributeTableColumnModel
/** /**
* \ingroup gui
* A model for displaying columns shown in a QgsLayoutAttributeTable * A model for displaying columns shown in a QgsLayoutAttributeTable
*/ *
* \note This class is not a part of public API
* \since QGIS 3.12
*/
class GUI_EXPORT QgsLayoutAttributeTableColumnModel: public QAbstractTableModel class GUI_EXPORT QgsLayoutAttributeTableColumnModel: public QAbstractTableModel
{ {
Q_OBJECT Q_OBJECT
@ -110,7 +112,6 @@ class GUI_EXPORT QgsLayoutAttributeTableColumnModel: public QAbstractTableModel
/** /**
* Sets a specified column as a sorted column in the QgsLayoutItemAttributeTable. The column will be * Sets a specified column as a sorted column in the QgsLayoutItemAttributeTable. The column will be
* added to the end of the sort rank list, ie it will take the next largest available sort rank. * added to the end of the sort rank list, ie it will take the next largest available sort rank.
* \see removeColumnFromSort()
* \see moveColumnInSortRank() * \see moveColumnInSortRank()
*/ */
void setColumnAsSorted( QgsLayoutTableColumn *column, Qt::SortOrder order ); void setColumnAsSorted( QgsLayoutTableColumn *column, Qt::SortOrder order );
@ -133,12 +134,13 @@ class GUI_EXPORT QgsLayoutAttributeTableColumnModel: public QAbstractTableModel
}; };
//QgsLayoutTableSortColumnsProxyModel
/** /**
* \ingroup gui
* Allows for filtering QgsComposerAttributeTable columns by columns which are sorted or unsorted * Allows for filtering QgsComposerAttributeTable columns by columns which are sorted or unsorted
*/ *
* \note This class is not a part of public API
* \since QGIS 3.12
*/
class GUI_EXPORT QgsLayoutTableSortColumnsProxyModel: public QSortFilterProxyModel class GUI_EXPORT QgsLayoutTableSortColumnsProxyModel: public QSortFilterProxyModel
{ {
Q_OBJECT Q_OBJECT
@ -209,14 +211,19 @@ class GUI_EXPORT QgsLayoutTableSortColumnsProxyModel: public QSortFilterProxyMod
}; };
// QgsLayoutColumnAlignmentDelegate /**
* \ingroup gui
//! A delegate for showing column alignment as a combo box * A delegate for showing column alignment as a combo box
*
* \note This class is not a part of public API
* \since QGIS 3.12
*/
class GUI_EXPORT QgsLayoutColumnAlignmentDelegate : public QItemDelegate class GUI_EXPORT QgsLayoutColumnAlignmentDelegate : public QItemDelegate
{ {
Q_OBJECT Q_OBJECT
public: public:
//! constructor
explicit QgsLayoutColumnAlignmentDelegate( QObject *parent = nullptr ); explicit QgsLayoutColumnAlignmentDelegate( QObject *parent = nullptr );
QWidget *createEditor( QWidget *parent, const QStyleOptionViewItem &option, const QModelIndex &index ) const override; QWidget *createEditor( QWidget *parent, const QStyleOptionViewItem &option, const QModelIndex &index ) const override;
void setEditorData( QWidget *editor, const QModelIndex &index ) const override; void setEditorData( QWidget *editor, const QModelIndex &index ) const override;
@ -225,21 +232,25 @@ class GUI_EXPORT QgsLayoutColumnAlignmentDelegate : public QItemDelegate
}; };
/**
// QgsLayoutColumnSourceDelegate * \ingroup gui
* A delegate for showing column attribute source as a QgsFieldExpressionWidget
//! A delegate for showing column attribute source as a QgsFieldExpressionWidget *
* \note This class is not a part of public API
* \since QGIS 3.12
*/
class GUI_EXPORT QgsLayoutColumnSourceDelegate : public QItemDelegate, private QgsExpressionContextGenerator class GUI_EXPORT QgsLayoutColumnSourceDelegate : public QItemDelegate, private QgsExpressionContextGenerator
{ {
Q_OBJECT Q_OBJECT
public: public:
//! constructor
QgsLayoutColumnSourceDelegate( QgsVectorLayer *vlayer, QObject *parent = nullptr, const QgsLayoutObject *layoutObject = nullptr ); QgsLayoutColumnSourceDelegate( QgsVectorLayer *vlayer, QObject *parent = nullptr, const QgsLayoutObject *layoutObject = nullptr );
QWidget *createEditor( QWidget *parent, const QStyleOptionViewItem &option, const QModelIndex &index ) const override; QWidget *createEditor( QWidget *parent, const QStyleOptionViewItem &option, const QModelIndex &index ) const override;
void setEditorData( QWidget *editor, const QModelIndex &index ) const override; void setEditorData( QWidget *editor, const QModelIndex &index ) const override;
void setModelData( QWidget *editor, QAbstractItemModel *model, const QModelIndex &index ) const override; void setModelData( QWidget *editor, QAbstractItemModel *model, const QModelIndex &index ) const override;
void updateEditorGeometry( QWidget *editor, const QStyleOptionViewItem &option, const QModelIndex &index ) const override; void updateEditorGeometry( QWidget *editor, const QStyleOptionViewItem &option, const QModelIndex &index ) const override;
public slots: private slots:
void commitAndCloseEditor(); void commitAndCloseEditor();
private: private:
QgsVectorLayer *mVectorLayer = nullptr; QgsVectorLayer *mVectorLayer = nullptr;
@ -247,14 +258,19 @@ class GUI_EXPORT QgsLayoutColumnSourceDelegate : public QItemDelegate, private Q
QgsExpressionContext createExpressionContext() const override; QgsExpressionContext createExpressionContext() const override;
}; };
// QgsLayoutColumnWidthDelegate /**
* \ingroup gui
//! A delegate for showing column width as a spin box * A delegate for showing column width as a spin box
*
* \note This class is not a part of public API
* \since QGIS 3.12
*/
class GUI_EXPORT QgsLayoutColumnWidthDelegate : public QItemDelegate class GUI_EXPORT QgsLayoutColumnWidthDelegate : public QItemDelegate
{ {
Q_OBJECT Q_OBJECT
public: public:
//! constructor
explicit QgsLayoutColumnWidthDelegate( QObject *parent = nullptr ); explicit QgsLayoutColumnWidthDelegate( QObject *parent = nullptr );
QWidget *createEditor( QWidget *parent, const QStyleOptionViewItem &option, const QModelIndex &index ) const override; QWidget *createEditor( QWidget *parent, const QStyleOptionViewItem &option, const QModelIndex &index ) const override;
void setEditorData( QWidget *editor, const QModelIndex &index ) const override; void setEditorData( QWidget *editor, const QModelIndex &index ) const override;
@ -263,15 +279,19 @@ class GUI_EXPORT QgsLayoutColumnWidthDelegate : public QItemDelegate
}; };
/**
// QgsLayoutColumnSortOrderDelegate * \ingroup gui
* A delegate for showing column sort order as a combo box
//! A delegate for showing column sort order as a combo box *
* \note This class is not a part of public API
* \since QGIS 3.12
*/
class GUI_EXPORT QgsLayoutColumnSortOrderDelegate : public QItemDelegate class GUI_EXPORT QgsLayoutColumnSortOrderDelegate : public QItemDelegate
{ {
Q_OBJECT Q_OBJECT
public: public:
//! constructor
explicit QgsLayoutColumnSortOrderDelegate( QObject *parent = nullptr ); explicit QgsLayoutColumnSortOrderDelegate( QObject *parent = nullptr );
QWidget *createEditor( QWidget *parent, const QStyleOptionViewItem &option, const QModelIndex &index ) const override; QWidget *createEditor( QWidget *parent, const QStyleOptionViewItem &option, const QModelIndex &index ) const override;
void setEditorData( QWidget *editor, const QModelIndex &index ) const override; void setEditorData( QWidget *editor, const QModelIndex &index ) const override;
@ -281,13 +301,18 @@ class GUI_EXPORT QgsLayoutColumnSortOrderDelegate : public QItemDelegate
}; };
// QgsLayoutAttributeSelectionDialog /**
* \ingroup gui
//! A dialog to select what attributes to display (in the table item), set the column properties and specify a sort order * A dialog to select what attributes to display (in the table item), set the column properties and specify a sort order
*
* \note This class is not a part of public API
* \since QGIS 3.12
*/
class GUI_EXPORT QgsLayoutAttributeSelectionDialog: public QDialog, private Ui::QgsLayoutAttributeSelectionDialogBase class GUI_EXPORT QgsLayoutAttributeSelectionDialog: public QDialog, private Ui::QgsLayoutAttributeSelectionDialogBase
{ {
Q_OBJECT Q_OBJECT
public: public:
//! constructor
QgsLayoutAttributeSelectionDialog( QgsLayoutItemAttributeTable *table, QgsVectorLayer *vLayer, QWidget *parent = nullptr, Qt::WindowFlags f = nullptr ); QgsLayoutAttributeSelectionDialog( QgsLayoutItemAttributeTable *table, QgsVectorLayer *vLayer, QWidget *parent = nullptr, Qt::WindowFlags f = nullptr );
private slots: private slots:

View File

@ -28,10 +28,18 @@
class QgsLayoutItemAttributeTable; class QgsLayoutItemAttributeTable;
class QgsLayoutFrame; class QgsLayoutFrame;
/**
* \ingroup gui
* A widget for configuring layout attribute table items.
*
* \note This class is not a part of public API
* \since QGIS 3.12
*/
class GUI_EXPORT QgsLayoutAttributeTableWidget: public QgsLayoutItemBaseWidget, private Ui::QgsLayoutAttributeTableWidgetBase class GUI_EXPORT QgsLayoutAttributeTableWidget: public QgsLayoutItemBaseWidget, private Ui::QgsLayoutAttributeTableWidgetBase
{ {
Q_OBJECT Q_OBJECT
public: public:
//! constructor
QgsLayoutAttributeTableWidget( QgsLayoutFrame *frame ); QgsLayoutAttributeTableWidget( QgsLayoutFrame *frame );
void setReportTypeString( const QString &string ) override; void setReportTypeString( const QString &string ) override;

View File

@ -30,10 +30,18 @@ class QgsLayoutView;
class QgsLayout; class QgsLayout;
class QgsLayoutGuideProxyModel; class QgsLayoutGuideProxyModel;
/**
* \ingroup gui
* Widget for managing the layout guides
*
* \note This class is not a part of public API
* \since QGIS 3.12
*/
class GUI_EXPORT QgsLayoutGuideWidget: public QgsPanelWidget, private Ui::QgsLayoutGuideWidgetBase class GUI_EXPORT QgsLayoutGuideWidget: public QgsPanelWidget, private Ui::QgsLayoutGuideWidgetBase
{ {
Q_OBJECT Q_OBJECT
public: public:
//! constructor
QgsLayoutGuideWidget( QWidget *parent, QgsLayout *layout, QgsLayoutView *layoutView ); QgsLayoutGuideWidget( QWidget *parent, QgsLayout *layout, QgsLayoutView *layoutView );
public slots: public slots:
@ -66,13 +74,20 @@ class GUI_EXPORT QgsLayoutGuideWidget: public QgsPanelWidget, private Ui::QgsLay
}; };
/**
* \ingroup gui
* View delegate displaying a QgsDoubleSpinBox for the layout guide position
*
* \note This class is not a part of public API
* \since QGIS 3.12
*/
class GUI_EXPORT QgsLayoutGuidePositionDelegate : public QStyledItemDelegate class GUI_EXPORT QgsLayoutGuidePositionDelegate : public QStyledItemDelegate
{ {
Q_OBJECT Q_OBJECT
public: public:
//! constructor
QgsLayoutGuidePositionDelegate( QObject *parent ); QgsLayoutGuidePositionDelegate( QObject *parent );
protected: protected:
@ -81,12 +96,20 @@ class GUI_EXPORT QgsLayoutGuidePositionDelegate : public QStyledItemDelegate
}; };
/**
* \ingroup gui
* View delegate displaying a QgsLayoutUnitsComboBox for the layout guide unit
*
* \note This class is not a part of public API
* \since QGIS 3.12
*/
class GUI_EXPORT QgsLayoutGuideUnitDelegate : public QStyledItemDelegate class GUI_EXPORT QgsLayoutGuideUnitDelegate : public QStyledItemDelegate
{ {
Q_OBJECT Q_OBJECT
public: public:
//! constructor
QgsLayoutGuideUnitDelegate( QObject *parent ); QgsLayoutGuideUnitDelegate( QObject *parent );
protected: protected:

View File

@ -24,7 +24,11 @@
class QgsMapCanvas; class QgsMapCanvas;
/** /**
* \ingroup gui
* Utils for layout handling from app. * Utils for layout handling from app.
*
* \note This class is not a part of public API
* \since QGIS 3.12
*/ */
class GUI_EXPORT QgsLayoutGuiUtils class GUI_EXPORT QgsLayoutGuiUtils
{ {

View File

@ -28,14 +28,19 @@ class QgsCodeEditorHTML;
class QgsCodeEditorCSS; class QgsCodeEditorCSS;
/** /**
* \ingroup app * \ingroup gui
* Input widget for the configuration of QgsLayoutItemHtml * A widget for configuring layout html items.
*/ *
* \note This class is not a part of public API
* \since QGIS 3.12
*/
class GUI_EXPORT QgsLayoutHtmlWidget: public QgsLayoutItemBaseWidget, private Ui::QgsLayoutHtmlWidgetBase class GUI_EXPORT QgsLayoutHtmlWidget: public QgsLayoutItemBaseWidget, private Ui::QgsLayoutHtmlWidgetBase
{ {
Q_OBJECT Q_OBJECT
public: public:
//! constructor
QgsLayoutHtmlWidget() = delete; QgsLayoutHtmlWidget() = delete;
//! constructor
QgsLayoutHtmlWidget( QgsLayoutFrame *frame ); QgsLayoutHtmlWidget( QgsLayoutFrame *frame );
void setMasterLayout( QgsMasterLayoutInterface *masterLayout ) override; void setMasterLayout( QgsMasterLayoutInterface *masterLayout ) override;

View File

@ -27,7 +27,10 @@
/** /**
* \ingroup gui
* A dialog for customizing the properties of an exported image file. * A dialog for customizing the properties of an exported image file.
*
* \note This class is not a part of public API
* \since QGIS 3.0 * \since QGIS 3.0
*/ */
class GUI_EXPORT QgsLayoutImageExportOptionsDialog: public QDialog, private Ui::QgsLayoutImageExportOptionsDialog class GUI_EXPORT QgsLayoutImageExportOptionsDialog: public QDialog, private Ui::QgsLayoutImageExportOptionsDialog

View File

@ -29,31 +29,43 @@ class QgsLayoutDesignerInterface;
class QgsLayoutModel; class QgsLayoutModel;
class QgsLayoutItem; class QgsLayoutItem;
/**
* \ingroup gui
* Model for the layout items list view.
* \see QgsLayoutItemsListView
*
* \note This class is not a part of public API
* \since QGIS 3.12
*/
class GUI_EXPORT QgsLayoutItemsListViewModel : public QSortFilterProxyModel class GUI_EXPORT QgsLayoutItemsListViewModel : public QSortFilterProxyModel
{ {
Q_OBJECT Q_OBJECT
public: public:
//! constructor
QgsLayoutItemsListViewModel( QgsLayoutModel *model, QObject *parent ); QgsLayoutItemsListViewModel( QgsLayoutModel *model, QObject *parent );
//! Returns the layout item listed at the specified index
QgsLayoutItem *itemFromIndex( const QModelIndex &index ) const; QgsLayoutItem *itemFromIndex( const QModelIndex &index ) const;
QVariant data( const QModelIndex &index, int role = Qt::DisplayRole ) const override; QVariant data( const QModelIndex &index, int role = Qt::DisplayRole ) const override;
public slots: public slots:
//! Sets the selected index
void setSelected( const QModelIndex &index ); void setSelected( const QModelIndex &index );
protected: protected:
bool filterAcceptsRow( int sourceRow, const QModelIndex &sourceParent ) const override; bool filterAcceptsRow( int sourceRow, const QModelIndex &sourceParent ) const override;
private: private:
QgsLayoutModel *mModel = nullptr; QgsLayoutModel *mModel = nullptr;
}; };
/** /**
* \ingroup gui
* A list view for showing items in a layout * A list view for showing items in a layout
*
* \note This class is not a part of public API
* \since QGIS 3.12
*/ */
class GUI_EXPORT QgsLayoutItemsListView : public QTreeView class GUI_EXPORT QgsLayoutItemsListView : public QTreeView
{ {
@ -66,6 +78,7 @@ class GUI_EXPORT QgsLayoutItemsListView : public QTreeView
*/ */
QgsLayoutItemsListView( QWidget *parent, QgsLayoutDesignerInterface *designer ); QgsLayoutItemsListView( QWidget *parent, QgsLayoutDesignerInterface *designer );
//! Sets the current layout
void setCurrentLayout( QgsLayout *layout ); void setCurrentLayout( QgsLayout *layout );
private slots: private slots:

View File

@ -27,13 +27,17 @@
#include "qgslayoutitemlabel.h" #include "qgslayoutitemlabel.h"
/** /**
* \ingroup app * \ingroup gui
* A widget for layout item settings. * A widget for layout item settings.
*/ *
* \note This class is not a part of public API
* \since QGIS 3.12
*/
class GUI_EXPORT QgsLayoutLabelWidget: public QgsLayoutItemBaseWidget, private Ui::QgsLayoutLabelWidgetBase class GUI_EXPORT QgsLayoutLabelWidget: public QgsLayoutItemBaseWidget, private Ui::QgsLayoutLabelWidgetBase
{ {
Q_OBJECT Q_OBJECT
public: public:
//! constructor
explicit QgsLayoutLabelWidget( QgsLayoutItemLabel *label ); explicit QgsLayoutLabelWidget( QgsLayoutItemLabel *label );
void setMasterLayout( QgsMasterLayoutInterface *masterLayout ) override; void setMasterLayout( QgsMasterLayoutInterface *masterLayout ) override;

View File

@ -25,14 +25,18 @@ class QgsMapLayer;
class QgsMapLayerProxyModel; class QgsMapLayerProxyModel;
/** /**
* \ingroup app * \ingroup gui
* A dialog to add new layers to the legend. * A dialog to add new layers to the legend.
* */ *
* \note This class is not a part of public API
* \since QGIS 3.12
*/
class GUI_EXPORT QgsLayoutLegendLayersDialog: public QDialog, private Ui::QgsLayoutLegendLayersDialogBase class GUI_EXPORT QgsLayoutLegendLayersDialog: public QDialog, private Ui::QgsLayoutLegendLayersDialogBase
{ {
Q_OBJECT Q_OBJECT
public: public:
//! constructor
QgsLayoutLegendLayersDialog( QWidget *parent = nullptr ); QgsLayoutLegendLayersDialog( QWidget *parent = nullptr );
/** /**
@ -40,6 +44,7 @@ class GUI_EXPORT QgsLayoutLegendLayersDialog: public QDialog, private Ui::QgsLay
*/ */
void setVisibleLayers( const QList<QgsMapLayer *> &layers ); void setVisibleLayers( const QList<QgsMapLayer *> &layers );
//! Returns the list of selected layers
QList< QgsMapLayer * > selectedLayers() const; QList< QgsMapLayer * > selectedLayers() const;
private slots: private slots:

View File

@ -29,28 +29,43 @@
#include <QItemDelegate> #include <QItemDelegate>
/** /**
* \ingroup app * \ingroup gui
* A widget for setting properties relating to a layout legend. * A widget for setting properties relating to a layout legend.
*
* \note This class is not a part of public API
* \since QGIS 3.12
*/ */
class GUI_EXPORT QgsLayoutLegendWidget: public QgsLayoutItemBaseWidget, private Ui::QgsLayoutLegendWidgetBase class GUI_EXPORT QgsLayoutLegendWidget: public QgsLayoutItemBaseWidget, private Ui::QgsLayoutLegendWidgetBase
{ {
Q_OBJECT Q_OBJECT
public: public:
//! constructor
explicit QgsLayoutLegendWidget( QgsLayoutItemLegend *legend, QgsMapCanvas *mapCanvas ); explicit QgsLayoutLegendWidget( QgsLayoutItemLegend *legend, QgsMapCanvas *mapCanvas );
void setMasterLayout( QgsMasterLayoutInterface *masterLayout ) override; void setMasterLayout( QgsMasterLayoutInterface *masterLayout ) override;
//! Updates the legend layers and groups //! Updates the legend layers and groups
void updateLegend(); void updateLegend();
//! Returns the legend item associated to this widget
QgsLayoutItemLegend *legend() { return mLegend; } QgsLayoutItemLegend *legend() { return mLegend; }
void setReportTypeString( const QString &string ) override; void setReportTypeString( const QString &string ) override;
public slots:
//! Reset a layer node to the default settings
void resetLayerNodeToDefaults();
/**
* Sets the current node style from the data of the action which invokes this slot
* \see QgsLayoutLegendMenuProvider::createContextMenu
*/
void setCurrentNodeStyleFromAction();
protected: protected:
bool setNewItem( QgsLayoutItem *item ) override; bool setNewItem( QgsLayoutItem *item ) override;
public slots: private slots:
void mWrapCharLineEdit_textChanged( const QString &text ); void mWrapCharLineEdit_textChanged( const QString &text );
void mTitleLineEdit_textChanged( const QString &text ); void mTitleLineEdit_textChanged( const QString &text );
@ -87,7 +102,6 @@ class GUI_EXPORT QgsLayoutLegendWidget: public QgsLayoutItemBaseWidget, private
void mCountToolButton_clicked( bool checked ); void mCountToolButton_clicked( bool checked );
void mExpressionFilterButton_toggled( bool checked ); void mExpressionFilterButton_toggled( bool checked );
void mFilterByMapCheckBox_toggled( bool checked ); void mFilterByMapCheckBox_toggled( bool checked );
void resetLayerNodeToDefaults();
void mUpdateAllPushButton_clicked(); void mUpdateAllPushButton_clicked();
void mAddGroupToolButton_clicked(); void mAddGroupToolButton_clicked();
void mLayerExpressionButton_clicked(); void mLayerExpressionButton_clicked();
@ -96,8 +110,6 @@ class GUI_EXPORT QgsLayoutLegendWidget: public QgsLayoutItemBaseWidget, private
void selectedChanged( const QModelIndex &current, const QModelIndex &previous ); void selectedChanged( const QModelIndex &current, const QModelIndex &previous );
void setCurrentNodeStyleFromAction();
void setLegendMapViewData(); void setLegendMapViewData();
private slots: private slots:
@ -131,11 +143,18 @@ class GUI_EXPORT QgsLayoutLegendWidget: public QgsLayoutItemBaseWidget, private
QgsLayoutItemPropertiesWidget *mItemPropertiesWidget = nullptr; QgsLayoutItemPropertiesWidget *mItemPropertiesWidget = nullptr;
}; };
/**
* \ingroup gui
* Layout legend menu provider
*
* \note This class is not a part of public API
* \since QGIS 3.12
*/
class GUI_EXPORT QgsLayoutLegendMenuProvider : public QgsLayerTreeViewMenuProvider class GUI_EXPORT QgsLayoutLegendMenuProvider : public QgsLayerTreeViewMenuProvider
{ {
public: public:
//! constructor
QgsLayoutLegendMenuProvider( QgsLayerTreeView *view, QgsLayoutLegendWidget *w ); QgsLayoutLegendMenuProvider( QgsLayerTreeView *view, QgsLayoutLegendWidget *w );
QMenu *createContextMenu() override; QMenu *createContextMenu() override;

View File

@ -29,10 +29,18 @@
class QgsLayoutItemManualTable; class QgsLayoutItemManualTable;
class QgsLayoutFrame; class QgsLayoutFrame;
/**
* \ingroup gui
* A widget for configuring layout manual table items.
*
* \note This class is not a part of public API
* \since QGIS 3.12
*/
class GUI_EXPORT QgsLayoutManualTableWidget: public QgsLayoutItemBaseWidget, private Ui::QgsLayoutManualTableWidgetBase class GUI_EXPORT QgsLayoutManualTableWidget: public QgsLayoutItemBaseWidget, private Ui::QgsLayoutManualTableWidgetBase
{ {
Q_OBJECT Q_OBJECT
public: public:
//! constructor
QgsLayoutManualTableWidget( QgsLayoutFrame *frame ); QgsLayoutManualTableWidget( QgsLayoutFrame *frame );
void setMasterLayout( QgsMasterLayoutInterface *masterLayout ) override; void setMasterLayout( QgsMasterLayoutInterface *masterLayout ) override;

View File

@ -27,17 +27,21 @@
#include "qgslayoutitemmapgrid.h" #include "qgslayoutitemmapgrid.h"
/** /**
* \ingroup app * \ingroup gui
* Input widget for the configuration of QgsLayoutItemMapGrids * A widget for configuring layout map grid items.
* */ *
* \note This class is not a part of public API
* \since QGIS 3.12
*/
class GUI_EXPORT QgsLayoutMapGridWidget: public QgsLayoutItemBaseWidget, private Ui::QgsLayoutMapGridWidgetBase class GUI_EXPORT QgsLayoutMapGridWidget: public QgsLayoutItemBaseWidget, private Ui::QgsLayoutMapGridWidgetBase
{ {
Q_OBJECT Q_OBJECT
public: public:
//! constructor
explicit QgsLayoutMapGridWidget( QgsLayoutItemMapGrid *mapGrid, QgsLayoutItemMap *map ); explicit QgsLayoutMapGridWidget( QgsLayoutItemMapGrid *mapGrid, QgsLayoutItemMap *map );
public slots: private slots:
void setGridItems(); void setGridItems();
void mIntervalXSpinBox_editingFinished(); void mIntervalXSpinBox_editingFinished();

View File

@ -34,21 +34,25 @@ class QgsLayoutMapLabelingWidget;
class QgsBookmarkManagerProxyModel; class QgsBookmarkManagerProxyModel;
/** /**
* \ingroup app * \ingroup gui
* Input widget for the configuration of QgsLayoutItemMap * Input widget for the configuration of QgsLayoutItemMap
*/ *
* \note This class is not a part of public API
* \since QGIS 3.12
*/
class GUI_EXPORT QgsLayoutMapWidget: public QgsLayoutItemBaseWidget, private Ui::QgsLayoutMapWidgetBase class GUI_EXPORT QgsLayoutMapWidget: public QgsLayoutItemBaseWidget, private Ui::QgsLayoutMapWidgetBase
{ {
Q_OBJECT Q_OBJECT
public: public:
//! constructor
explicit QgsLayoutMapWidget( QgsLayoutItemMap *item, QgsMapCanvas *mapCanvas ); explicit QgsLayoutMapWidget( QgsLayoutItemMap *item, QgsMapCanvas *mapCanvas );
void setMasterLayout( QgsMasterLayoutInterface *masterLayout ) override; void setMasterLayout( QgsMasterLayoutInterface *masterLayout ) override;
void setReportTypeString( const QString &string ) override; void setReportTypeString( const QString &string ) override;
void setDesignerInterface( QgsLayoutDesignerInterface *iface ) override; void setDesignerInterface( QgsLayoutDesignerInterface *iface ) override;
public slots: private slots:
void mScaleLineEdit_editingFinished(); void mScaleLineEdit_editingFinished();
void setToMapCanvasExtent(); void setToMapCanvasExtent();
void setToMapCanvasScale(); void setToMapCanvasScale();
@ -176,13 +180,19 @@ class GUI_EXPORT QgsLayoutMapWidget: public QgsLayoutItemBaseWidget, private Ui:
}; };
/**
* \ingroup gui
* Model for label blocking items
*
* \note This class is not a part of public API
* \since QGIS 3.12
*/
class GUI_EXPORT QgsLayoutMapItemBlocksLabelsModel : public QSortFilterProxyModel class GUI_EXPORT QgsLayoutMapItemBlocksLabelsModel : public QSortFilterProxyModel
{ {
Q_OBJECT Q_OBJECT
public: public:
//! constructor
explicit QgsLayoutMapItemBlocksLabelsModel( QgsLayoutItemMap *map, QgsLayoutModel *layoutModel, QObject *parent = nullptr ); explicit QgsLayoutMapItemBlocksLabelsModel( QgsLayoutItemMap *map, QgsLayoutModel *layoutModel, QObject *parent = nullptr );
int columnCount( const QModelIndex &parent = QModelIndex() ) const override; int columnCount( const QModelIndex &parent = QModelIndex() ) const override;
@ -201,14 +211,18 @@ class GUI_EXPORT QgsLayoutMapItemBlocksLabelsModel : public QSortFilterProxyMode
}; };
/** /**
* \ingroup app * \ingroup gui
* Allows configuration of layout map labeling settings. * Allows configuration of layout map labeling settings.
* */ *
* \note This class is not a part of public API
* \since QGIS 3.12
*/
class GUI_EXPORT QgsLayoutMapLabelingWidget: public QgsLayoutItemBaseWidget, private Ui::QgsLayoutMapLabelingWidgetBase class GUI_EXPORT QgsLayoutMapLabelingWidget: public QgsLayoutItemBaseWidget, private Ui::QgsLayoutMapLabelingWidgetBase
{ {
Q_OBJECT Q_OBJECT
public: public:
//! constructor
explicit QgsLayoutMapLabelingWidget( QgsLayoutItemMap *map ); explicit QgsLayoutMapLabelingWidget( QgsLayoutItemMap *map );
protected: protected:

View File

@ -33,7 +33,11 @@ class QgsLayoutItem;
class QgsLayoutItemPage; class QgsLayoutItemPage;
/** /**
* \ingroup gui
* A widget for configuring properties of pages in a layout * A widget for configuring properties of pages in a layout
*
* \note This class is not a part of public API
* \since QGIS 3.12
*/ */
class GUI_EXPORT QgsLayoutPagePropertiesWidget : public QgsLayoutItemBaseWidget, private Ui::QgsLayoutPagePropertiesWidget class GUI_EXPORT QgsLayoutPagePropertiesWidget : public QgsLayoutItemBaseWidget, private Ui::QgsLayoutPagePropertiesWidget
{ {

View File

@ -28,8 +28,12 @@
#include "qgsrendercontext.h" #include "qgsrendercontext.h"
/** /**
* \ingroup gui
* A dialog for customizing the properties of an exported PDF file from a layout. * A dialog for customizing the properties of an exported PDF file from a layout.
*/ *
* \note This class is not a part of public API
* \since QGIS 3.12
*/
class GUI_EXPORT QgsLayoutPdfExportOptionsDialog: public QDialog, private Ui::QgsPdfExportOptionsDialog class GUI_EXPORT QgsLayoutPdfExportOptionsDialog: public QDialog, private Ui::QgsPdfExportOptionsDialog
{ {
Q_OBJECT Q_OBJECT
@ -43,29 +47,51 @@ class GUI_EXPORT QgsLayoutPdfExportOptionsDialog: public QDialog, private Ui::Qg
*/ */
QgsLayoutPdfExportOptionsDialog( QWidget *parent = nullptr, Qt::WindowFlags flags = nullptr ); QgsLayoutPdfExportOptionsDialog( QWidget *parent = nullptr, Qt::WindowFlags flags = nullptr );
//! Sets the text render format
void setTextRenderFormat( QgsRenderContext::TextRenderFormat format ); void setTextRenderFormat( QgsRenderContext::TextRenderFormat format );
//! Returns the current text render format
QgsRenderContext::TextRenderFormat textRenderFormat() const; QgsRenderContext::TextRenderFormat textRenderFormat() const;
//! Set whether to force vector output
void setForceVector( bool force ); void setForceVector( bool force );
//! Returns whether vector output is being forced
bool forceVector() const; bool forceVector() const;
//! Sets whether to enable georeferencing options
void enableGeoreferencingOptions( bool enabled ); void enableGeoreferencingOptions( bool enabled );
//! Sets whether to enable georeferencing
void setGeoreferencingEnabled( bool enabled ); void setGeoreferencingEnabled( bool enabled );
//! Returns whether georeferencing is enabled
bool georeferencingEnabled() const; bool georeferencingEnabled() const;
//! Sets whether to enable metadata
void setMetadataEnabled( bool enabled ); void setMetadataEnabled( bool enabled );
//! Returns whether metadata is enabled
bool metadataEnabled() const; bool metadataEnabled() const;
//! Sets whether to disable raster tiling
void setRasterTilingDisabled( bool disabled ); void setRasterTilingDisabled( bool disabled );
//! Returns whether raster tiling is disabled
bool rasterTilingDisabled() const; bool rasterTilingDisabled() const;
//! Sets whether to simplify geometries
void setGeometriesSimplified( bool enabled ); void setGeometriesSimplified( bool enabled );
//! Returns whether geometry simplification is enabled
bool geometriesSimplified() const; bool geometriesSimplified() const;
//! Sets whether to export a Geo-PDF
void setExportGeoPdf( bool enabled ); void setExportGeoPdf( bool enabled );
//! Returns whether Geo-PDF export is enabled
bool exportGeoPdf() const; bool exportGeoPdf() const;
//! Sets whether to use OGC best-practice format
void setUseOgcBestPracticeFormat( bool enabled ); void setUseOgcBestPracticeFormat( bool enabled );
//! Returns whether use of OGC best-practice format is enabled
bool useOgcBestPracticeFormat() const; bool useOgcBestPracticeFormat() const;
//! Sets whether to export Geo-PDF features
void setExportGeoPdfFeatures( bool enabled ); void setExportGeoPdfFeatures( bool enabled );
//! Returns whether export of Geo-PDF features is enabled
bool exportGeoPdfFeatures() const; bool exportGeoPdfFeatures() const;
//! Sets the list of export themes
void setExportThemes( const QStringList &themes ); void setExportThemes( const QStringList &themes );
//! Returns the list of export themes
QStringList exportThemes() const; QStringList exportThemes() const;
private slots: private slots:

View File

@ -28,21 +28,25 @@
class QgsLayoutItemPicture; class QgsLayoutItemPicture;
/** /**
* \ingroup app * \ingroup gui
* A widget for configuring layout picture items. * A widget for configuring layout picture items.
*
* \note This class is not a part of public API
* \since QGIS 3.12
*/ */
class GUI_EXPORT QgsLayoutPictureWidget: public QgsLayoutItemBaseWidget, private Ui::QgsLayoutPictureWidgetBase class GUI_EXPORT QgsLayoutPictureWidget: public QgsLayoutItemBaseWidget, private Ui::QgsLayoutPictureWidgetBase
{ {
Q_OBJECT Q_OBJECT
public: public:
//! constructor
explicit QgsLayoutPictureWidget( QgsLayoutItemPicture *picture ); explicit QgsLayoutPictureWidget( QgsLayoutItemPicture *picture );
void setMasterLayout( QgsMasterLayoutInterface *masterLayout ) override; void setMasterLayout( QgsMasterLayoutInterface *masterLayout ) override;
//! Add the icons of the standard directories to the preview //! Add the icons of the standard directories to the preview
void addStandardDirectoriesToPreview(); void addStandardDirectoriesToPreview();
public slots: private slots:
void mPictureBrowseButton_clicked(); void mPictureBrowseButton_clicked();
void mPictureLineEdit_editingFinished(); void mPictureLineEdit_editingFinished();
void mPictureRotationSpinBox_valueChanged( double d ); void mPictureRotationSpinBox_valueChanged( double d );

View File

@ -26,12 +26,17 @@
#include "qgslayoutitempolygon.h" #include "qgslayoutitempolygon.h"
/** /**
* \ingroup gui
* Input widget for QgsLayoutItemPolygon * Input widget for QgsLayoutItemPolygon
*
* \note This class is not a part of public API
* \since QGIS 3.12
*/ */
class GUI_EXPORT QgsLayoutPolygonWidget: public QgsLayoutItemBaseWidget, private Ui::QgsLayoutPolygonWidgetBase class GUI_EXPORT QgsLayoutPolygonWidget: public QgsLayoutItemBaseWidget, private Ui::QgsLayoutPolygonWidgetBase
{ {
Q_OBJECT Q_OBJECT
public: public:
//! constructor
explicit QgsLayoutPolygonWidget( QgsLayoutItemPolygon *polygon ); explicit QgsLayoutPolygonWidget( QgsLayoutItemPolygon *polygon );
void setMasterLayout( QgsMasterLayoutInterface *masterLayout ) override; void setMasterLayout( QgsMasterLayoutInterface *masterLayout ) override;

View File

@ -26,12 +26,17 @@
#include "qgslayoutitempolyline.h" #include "qgslayoutitempolyline.h"
/** /**
* \ingroup gui
* Input widget for QgsLayoutItemPolyline * Input widget for QgsLayoutItemPolyline
*
* \note This class is not a part of public API
* \since QGIS 3.12
*/ */
class GUI_EXPORT QgsLayoutPolylineWidget: public QgsLayoutItemBaseWidget, private Ui::QgsLayoutPolylineWidgetBase class GUI_EXPORT QgsLayoutPolylineWidget: public QgsLayoutItemBaseWidget, private Ui::QgsLayoutPolylineWidgetBase
{ {
Q_OBJECT Q_OBJECT
public: public:
//! constructor
explicit QgsLayoutPolylineWidget( QgsLayoutItemPolyline *polyline ); explicit QgsLayoutPolylineWidget( QgsLayoutItemPolyline *polyline );
void setMasterLayout( QgsMasterLayoutInterface *masterLayout ) override; void setMasterLayout( QgsMasterLayoutInterface *masterLayout ) override;

View File

@ -27,12 +27,21 @@
class QgsLayout; class QgsLayout;
class QgsMasterLayoutInterface; class QgsMasterLayoutInterface;
/**
* \ingroup gui
* Widget for configuring the properties of a layout.
*
* \note This class is not a part of public API
* \since QGIS 3.12
*/
class GUI_EXPORT QgsLayoutPropertiesWidget: public QgsPanelWidget, private Ui::QgsLayoutWidgetBase class GUI_EXPORT QgsLayoutPropertiesWidget: public QgsPanelWidget, private Ui::QgsLayoutWidgetBase
{ {
Q_OBJECT Q_OBJECT
public: public:
//! constructor
QgsLayoutPropertiesWidget( QWidget *parent, QgsLayout *layout ); QgsLayoutPropertiesWidget( QWidget *parent, QgsLayout *layout );
//! Sets the master layout
void setMasterLayout( QgsMasterLayoutInterface *masterLayout ); void setMasterLayout( QgsMasterLayoutInterface *masterLayout );
public slots: public slots:

View File

@ -22,12 +22,20 @@
#include "qgis_gui.h" #include "qgis_gui.h"
#include "qgslayoutcustomdrophandler.h" #include "qgslayoutcustomdrophandler.h"
/**
* \ingroup gui
* Layout drop handler for handling QPT files
*
* \note This class is not a part of public API
* \since QGIS 3.12
*/
class GUI_EXPORT QgsLayoutQptDropHandler : public QgsLayoutCustomDropHandler class GUI_EXPORT QgsLayoutQptDropHandler : public QgsLayoutCustomDropHandler
{ {
Q_OBJECT Q_OBJECT
public: public:
//! constructor
QgsLayoutQptDropHandler( QObject *parent = nullptr ); QgsLayoutQptDropHandler( QObject *parent = nullptr );
bool handleFileDrop( QgsLayoutDesignerInterface *iface, QPointF point, const QString &file ) override; bool handleFileDrop( QgsLayoutDesignerInterface *iface, QPointF point, const QString &file ) override;

View File

@ -29,23 +29,27 @@
class QgsLayoutItemScaleBar; class QgsLayoutItemScaleBar;
/** /**
* \ingroup app * \ingroup gui
* A widget to define the properties of a QgsLayoutItemScaleBar. * A widget to define the properties of a QgsLayoutItemScaleBar.
*
* \note This class is not a part of public API
* \since QGIS 3.12
*/ */
class GUI_EXPORT QgsLayoutScaleBarWidget: public QgsLayoutItemBaseWidget, public QgsExpressionContextGenerator, private Ui::QgsLayoutScaleBarWidgetBase class GUI_EXPORT QgsLayoutScaleBarWidget: public QgsLayoutItemBaseWidget, public QgsExpressionContextGenerator, private Ui::QgsLayoutScaleBarWidgetBase
{ {
Q_OBJECT Q_OBJECT
public: public:
//! constructor
explicit QgsLayoutScaleBarWidget( QgsLayoutItemScaleBar *scaleBar ); explicit QgsLayoutScaleBarWidget( QgsLayoutItemScaleBar *scaleBar );
void setMasterLayout( QgsMasterLayoutInterface *masterLayout ) override; void setMasterLayout( QgsMasterLayoutInterface *masterLayout ) override;
QgsExpressionContext createExpressionContext() const override; QgsExpressionContext createExpressionContext() const override;
protected:
protected:
bool setNewItem( QgsLayoutItem *item ) override; bool setNewItem( QgsLayoutItem *item ) override;
public slots: private slots:
void mHeightSpinBox_valueChanged( double d ); void mHeightSpinBox_valueChanged( double d );
void mLineWidthSpinBox_valueChanged( double d ); void mLineWidthSpinBox_valueChanged( double d );

View File

@ -27,13 +27,17 @@
#include "qgslayoutitemshape.h" #include "qgslayoutitemshape.h"
/** /**
* \ingroup app * \ingroup gui
* Input widget for the configuration of QgsLayoutItemShape * A widget for configuring layout shape items.
*/ *
* \note This class is not a part of public API
* \since QGIS 3.12
*/
class GUI_EXPORT QgsLayoutShapeWidget: public QgsLayoutItemBaseWidget, private Ui::QgsLayoutShapeWidgetBase class GUI_EXPORT QgsLayoutShapeWidget: public QgsLayoutItemBaseWidget, private Ui::QgsLayoutShapeWidgetBase
{ {
Q_OBJECT Q_OBJECT
public: public:
//! constructor
explicit QgsLayoutShapeWidget( QgsLayoutItemShape *shape ); explicit QgsLayoutShapeWidget( QgsLayoutItemShape *shape );
void setMasterLayout( QgsMasterLayoutInterface *masterLayout ) override; void setMasterLayout( QgsMasterLayoutInterface *masterLayout ) override;

View File

@ -30,7 +30,10 @@ class QCheckBox;
class QgsColorButton; class QgsColorButton;
/** /**
* \ingroup gui
* A dialog for customization of the cell background colors for a QgsLayoutTable * A dialog for customization of the cell background colors for a QgsLayoutTable
*
* \note This class is not a part of public API
* \since QGIS 3.0 * \since QGIS 3.0
*/ */
class GUI_EXPORT QgsLayoutTableBackgroundColorsDialog: public QDialog, private Ui::QgsLayoutTableBackgroundDialog class GUI_EXPORT QgsLayoutTableBackgroundColorsDialog: public QDialog, private Ui::QgsLayoutTableBackgroundDialog

View File

@ -23,10 +23,17 @@
#include "qgis_gui.h" #include "qgis_gui.h"
#include "qgsabstractvaliditycheck.h" #include "qgsabstractvaliditycheck.h"
/**
* \ingroup gui
* Layout scalebar validity check
*
* \note This class is not a part of public API
* \since QGIS 3.12
*/
class GUI_EXPORT QgsLayoutScaleBarValidityCheck : public QgsAbstractValidityCheck class GUI_EXPORT QgsLayoutScaleBarValidityCheck : public QgsAbstractValidityCheck
{ {
public: public:
//! constructor
QgsLayoutScaleBarValidityCheck *create() const override; QgsLayoutScaleBarValidityCheck *create() const override;
QString id() const override; QString id() const override;
int checkType() const override; int checkType() const override;
@ -37,10 +44,18 @@ class GUI_EXPORT QgsLayoutScaleBarValidityCheck : public QgsAbstractValidityChec
QList<QgsValidityCheckResult> mResults; QList<QgsValidityCheckResult> mResults;
}; };
/**
* \ingroup gui
* Layout north arrow validity check
*
* \note This class is not a part of public API
* \since QGIS 3.12
*/
class GUI_EXPORT QgsLayoutNorthArrowValidityCheck : public QgsAbstractValidityCheck class GUI_EXPORT QgsLayoutNorthArrowValidityCheck : public QgsAbstractValidityCheck
{ {
public: public:
//! constructor
QgsLayoutNorthArrowValidityCheck *create() const override; QgsLayoutNorthArrowValidityCheck *create() const override;
QString id() const override; QString id() const override;
int checkType() const override; int checkType() const override;
@ -51,10 +66,18 @@ class GUI_EXPORT QgsLayoutNorthArrowValidityCheck : public QgsAbstractValidityCh
QList<QgsValidityCheckResult> mResults; QList<QgsValidityCheckResult> mResults;
}; };
/**
* \ingroup gui
* Layout overview validity check
*
* \note This class is not a part of public API
* \since QGIS 3.12
*/
class GUI_EXPORT QgsLayoutOverviewValidityCheck : public QgsAbstractValidityCheck class GUI_EXPORT QgsLayoutOverviewValidityCheck : public QgsAbstractValidityCheck
{ {
public: public:
//! constructor
QgsLayoutOverviewValidityCheck *create() const override; QgsLayoutOverviewValidityCheck *create() const override;
QString id() const override; QString id() const override;
int checkType() const override; int checkType() const override;
@ -65,10 +88,18 @@ class GUI_EXPORT QgsLayoutOverviewValidityCheck : public QgsAbstractValidityChec
QList<QgsValidityCheckResult> mResults; QList<QgsValidityCheckResult> mResults;
}; };
/**
* \ingroup gui
* Layout picture source validity check
*
* \note This class is not a part of public API
* \since QGIS 3.12
*/
class GUI_EXPORT QgsLayoutPictureSourceValidityCheck : public QgsAbstractValidityCheck class GUI_EXPORT QgsLayoutPictureSourceValidityCheck : public QgsAbstractValidityCheck
{ {
public: public:
//! constructor
QgsLayoutPictureSourceValidityCheck *create() const override; QgsLayoutPictureSourceValidityCheck *create() const override;
QString id() const override; QString id() const override;
int checkType() const override; int checkType() const override;