QGIS API Documentation 3.41.0-Master (45a0abf3bec)
Loading...
Searching...
No Matches
Public Member Functions | Protected Attributes | List of all members
QgsStackedDiagramPropertiesModel Class Reference

Model for sub diagrams in a stacked diagram view. More...

#include <qgsstackeddiagramproperties.h>

Inheritance diagram for QgsStackedDiagramPropertiesModel:
Inheritance graph
[legend]

Public Member Functions

 QgsStackedDiagramPropertiesModel (QObject *parent=nullptr)
 constructor
 
 ~QgsStackedDiagramPropertiesModel () override
 
int columnCount (const QModelIndex &=QModelIndex()) const override
 
QVariant data (const QModelIndex &index, int role=Qt::DisplayRole) const override
 
QgsDiagramLayerSettings diagramLayerSettings () const
 Returns the diagram layer settings from the model.
 
Qt::ItemFlags flags (const QModelIndex &index) const override
 
QVariant headerData (int section, Qt::Orientation orientation, int role=Qt::DisplayRole) const override
 
void insertSubDiagram (const int index, QgsDiagramRenderer *newSubDiagram)
 Inserts a new diagram at the specified position. Takes ownership.
 
bool removeRows (int row, int count, const QModelIndex &parent=QModelIndex()) override
 
int rowCount (const QModelIndex &=QModelIndex()) const override
 
bool setData (const QModelIndex &index, const QVariant &value, int role=Qt::EditRole) override
 
QgsDiagramRenderersubDiagramForIndex (const QModelIndex &index) const
 Returns the diagram renderer at the specified index. Does not transfer ownership.
 
QList< QgsDiagramRenderer * > subRenderers () const
 Returns the list of diagram renderers from the model. Does not transfer ownership.
 
void updateDiagramLayerSettings (QgsDiagramLayerSettings dls)
 Sets the diagram layer settings for the model.
 
void updateSubDiagram (const QModelIndex &index, QgsDiagramRenderer *dr)
 Replaces the diagram located at index by dr. Takes ownership.
 

Protected Attributes

QgsDiagramLayerSettings mDiagramLayerSettings
 
QList< QgsDiagramRenderer * > mRenderers
 

Detailed Description

Model for sub diagrams in a stacked diagram view.

Note
This class is not a part of public API
Since
QGIS 3.40

Definition at line 45 of file qgsstackeddiagramproperties.h.

Constructor & Destructor Documentation

◆ QgsStackedDiagramPropertiesModel()

QgsStackedDiagramPropertiesModel::QgsStackedDiagramPropertiesModel ( QObject *  parent = nullptr)

constructor

Definition at line 368 of file qgsstackeddiagramproperties.cpp.

◆ ~QgsStackedDiagramPropertiesModel()

QgsStackedDiagramPropertiesModel::~QgsStackedDiagramPropertiesModel ( )
override

Definition at line 373 of file qgsstackeddiagramproperties.cpp.

Member Function Documentation

◆ columnCount()

int QgsStackedDiagramPropertiesModel::columnCount ( const QModelIndex &  = QModelIndex()) const
override

Definition at line 500 of file qgsstackeddiagramproperties.cpp.

◆ data()

QVariant QgsStackedDiagramPropertiesModel::data ( const QModelIndex &  index,
int  role = Qt::DisplayRole 
) const
override

Definition at line 385 of file qgsstackeddiagramproperties.cpp.

◆ diagramLayerSettings()

QgsDiagramLayerSettings QgsStackedDiagramPropertiesModel::diagramLayerSettings ( ) const

Returns the diagram layer settings from the model.

Definition at line 584 of file qgsstackeddiagramproperties.cpp.

◆ flags()

Qt::ItemFlags QgsStackedDiagramPropertiesModel::flags ( const QModelIndex &  index) const
override

Definition at line 378 of file qgsstackeddiagramproperties.cpp.

◆ headerData()

QVariant QgsStackedDiagramPropertiesModel::headerData ( int  section,
Qt::Orientation  orientation,
int  role = Qt::DisplayRole 
) const
override

Definition at line 483 of file qgsstackeddiagramproperties.cpp.

◆ insertSubDiagram()

void QgsStackedDiagramPropertiesModel::insertSubDiagram ( const int  index,
QgsDiagramRenderer newSubDiagram 
)

Inserts a new diagram at the specified position. Takes ownership.

Definition at line 557 of file qgsstackeddiagramproperties.cpp.

◆ removeRows()

bool QgsStackedDiagramPropertiesModel::removeRows ( int  row,
int  count,
const QModelIndex &  parent = QModelIndex() 
)
override

Definition at line 537 of file qgsstackeddiagramproperties.cpp.

◆ rowCount()

int QgsStackedDiagramPropertiesModel::rowCount ( const QModelIndex &  = QModelIndex()) const
override

Definition at line 495 of file qgsstackeddiagramproperties.cpp.

◆ setData()

bool QgsStackedDiagramPropertiesModel::setData ( const QModelIndex &  index,
const QVariant &  value,
int  role = Qt::EditRole 
)
override

Definition at line 505 of file qgsstackeddiagramproperties.cpp.

◆ subDiagramForIndex()

QgsDiagramRenderer * QgsStackedDiagramPropertiesModel::subDiagramForIndex ( const QModelIndex &  index) const

Returns the diagram renderer at the specified index. Does not transfer ownership.

Definition at line 550 of file qgsstackeddiagramproperties.cpp.

◆ subRenderers()

QList< QgsDiagramRenderer * > QgsStackedDiagramPropertiesModel::subRenderers ( ) const

Returns the list of diagram renderers from the model. Does not transfer ownership.

Definition at line 574 of file qgsstackeddiagramproperties.cpp.

◆ updateDiagramLayerSettings()

void QgsStackedDiagramPropertiesModel::updateDiagramLayerSettings ( QgsDiagramLayerSettings  dls)

Sets the diagram layer settings for the model.

Definition at line 579 of file qgsstackeddiagramproperties.cpp.

◆ updateSubDiagram()

void QgsStackedDiagramPropertiesModel::updateSubDiagram ( const QModelIndex &  index,
QgsDiagramRenderer dr 
)

Replaces the diagram located at index by dr. Takes ownership.

Definition at line 564 of file qgsstackeddiagramproperties.cpp.

Member Data Documentation

◆ mDiagramLayerSettings

QgsDiagramLayerSettings QgsStackedDiagramPropertiesModel::mDiagramLayerSettings
protected

Definition at line 89 of file qgsstackeddiagramproperties.h.

◆ mRenderers

QList< QgsDiagramRenderer *> QgsStackedDiagramPropertiesModel::mRenderers
protected

Definition at line 88 of file qgsstackeddiagramproperties.h.


The documentation for this class was generated from the following files: