Skip to content
Permalink
Browse files

Add some documentation to layout classes moved to GUI

  • Loading branch information
manisandro committed Jan 17, 2020
1 parent 509ba6c commit 6e7009ab2ae89ad102ca518e348082c96119454d
@@ -28,11 +28,19 @@ class QgsMapCanvas;
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
{
Q_OBJECT

public:
//! constructor
QgsGeoPdfLayerTreeModel( QgsLayerTree *rootNode, QObject *parent = nullptr );

int columnCount( const QModelIndex &parent ) const override;
@@ -29,14 +29,19 @@
#include "qgslayoutmeasurementconverter.h"

/**
* \ingroup gui
* 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
{
Q_OBJECT

public:

//! Page insertion positions
enum PagePosition
{
BeforePage,
@@ -28,14 +28,19 @@ class QgsLayoutAtlas;
class QgsMessageBar;

/**
* \ingroup app
* A widget for layout atlas settings.
*/
* \ingroup gui
* 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
{
Q_OBJECT
public:
//! Constructor
QgsLayoutAtlasWidget( QWidget *parent, QgsPrintLayout *layout );
//! Sets the message bar to which to emit messages
void setMessageBar( QgsMessageBar *bar );

private slots:
@@ -42,11 +42,13 @@ class QgsLayoutTableAvailableSortProxyModel;
class QgsLayoutObject;
class QgsLayoutTableColumn;

//QgsLayoutAttributeTableColumnModel

/**
* \ingroup gui
* 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
{
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
* added to the end of the sort rank list, ie it will take the next largest available sort rank.
* \see removeColumnFromSort()
* \see moveColumnInSortRank()
*/
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
*/
*
* \note This class is not a part of public API
* \since QGIS 3.12
*/
class GUI_EXPORT QgsLayoutTableSortColumnsProxyModel: public QSortFilterProxyModel
{
Q_OBJECT
@@ -209,14 +211,19 @@ class GUI_EXPORT QgsLayoutTableSortColumnsProxyModel: public QSortFilterProxyMod

};

// QgsLayoutColumnAlignmentDelegate

//! A delegate for showing column alignment as a combo box
/**
* \ingroup gui
* 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
{
Q_OBJECT

public:
//! constructor
explicit QgsLayoutColumnAlignmentDelegate( QObject *parent = nullptr );
QWidget *createEditor( QWidget *parent, const QStyleOptionViewItem &option, const QModelIndex &index ) const override;
void setEditorData( QWidget *editor, const QModelIndex &index ) const override;
@@ -225,36 +232,45 @@ class GUI_EXPORT QgsLayoutColumnAlignmentDelegate : public QItemDelegate

};


// QgsLayoutColumnSourceDelegate

//! A delegate for showing column attribute source as a QgsFieldExpressionWidget
/**
* \ingroup gui
* 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
{
Q_OBJECT

public:
//! constructor
QgsLayoutColumnSourceDelegate( QgsVectorLayer *vlayer, QObject *parent = nullptr, const QgsLayoutObject *layoutObject = nullptr );
QWidget *createEditor( QWidget *parent, const QStyleOptionViewItem &option, 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 updateEditorGeometry( QWidget *editor, const QStyleOptionViewItem &option, const QModelIndex &index ) const override;
public slots:
private slots:
void commitAndCloseEditor();
private:
QgsVectorLayer *mVectorLayer = nullptr;
const QgsLayoutObject *mLayoutObject = nullptr;
QgsExpressionContext createExpressionContext() const override;
};

// QgsLayoutColumnWidthDelegate

//! A delegate for showing column width as a spin box
/**
* \ingroup gui
* 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
{
Q_OBJECT

public:
//! constructor
explicit QgsLayoutColumnWidthDelegate( QObject *parent = nullptr );
QWidget *createEditor( QWidget *parent, const QStyleOptionViewItem &option, 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

//! A delegate for showing column sort order as a combo box
/**
* \ingroup gui
* 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
{
Q_OBJECT

public:
//! constructor
explicit QgsLayoutColumnSortOrderDelegate( QObject *parent = nullptr );
QWidget *createEditor( QWidget *parent, const QStyleOptionViewItem &option, 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

//! A dialog to select what attributes to display (in the table item), set the column properties and specify a sort order
/**
* \ingroup gui
* 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
{
Q_OBJECT
public:
//! constructor
QgsLayoutAttributeSelectionDialog( QgsLayoutItemAttributeTable *table, QgsVectorLayer *vLayer, QWidget *parent = nullptr, Qt::WindowFlags f = nullptr );

private slots:
@@ -28,10 +28,18 @@
class QgsLayoutItemAttributeTable;
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
{
Q_OBJECT
public:
//! constructor
QgsLayoutAttributeTableWidget( QgsLayoutFrame *frame );

void setReportTypeString( const QString &string ) override;
@@ -30,10 +30,18 @@ class QgsLayoutView;
class QgsLayout;
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
{
Q_OBJECT
public:
//! constructor
QgsLayoutGuideWidget( QWidget *parent, QgsLayout *layout, QgsLayoutView *layoutView );

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
{
Q_OBJECT

public:

//! constructor
QgsLayoutGuidePositionDelegate( QObject *parent );

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
{
Q_OBJECT

public:

//! constructor
QgsLayoutGuideUnitDelegate( QObject *parent );

protected:
@@ -24,7 +24,11 @@
class QgsMapCanvas;

/**
* \ingroup gui
* Utils for layout handling from app.
*
* \note This class is not a part of public API
* \since QGIS 3.12
*/
class GUI_EXPORT QgsLayoutGuiUtils
{
@@ -28,14 +28,19 @@ class QgsCodeEditorHTML;
class QgsCodeEditorCSS;

/**
* \ingroup app
* Input widget for the configuration of QgsLayoutItemHtml
*/
* \ingroup gui
* 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
{
Q_OBJECT
public:
//! constructor
QgsLayoutHtmlWidget() = delete;
//! constructor
QgsLayoutHtmlWidget( QgsLayoutFrame *frame );
void setMasterLayout( QgsMasterLayoutInterface *masterLayout ) override;

@@ -27,7 +27,10 @@


/**
* \ingroup gui
* 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
*/
class GUI_EXPORT QgsLayoutImageExportOptionsDialog: public QDialog, private Ui::QgsLayoutImageExportOptionsDialog

0 comments on commit 6e7009a

Please sign in to comment.
You can’t perform that action at this time.