18#ifndef QGSRASTERLAYERTEMPORALPROPERTIESWIDGET_H
19#define QGSRASTERLAYERTEMPORALPROPERTIESWIDGET_H
21#include "ui_qgsrasterlayertemporalpropertieswidgetbase.h"
24#include <QStyledItemDelegate>
32class QgsRasterBandFixedTemporalRangeModel :
public QAbstractItemModel
38 QgsRasterBandFixedTemporalRangeModel( QObject *parent );
39 int columnCount(
const QModelIndex &parent = QModelIndex() )
const override;
40 int rowCount(
const QModelIndex &parent = QModelIndex() )
const override;
41 QModelIndex index(
int row,
int column,
const QModelIndex &parent = QModelIndex() )
const override;
42 QModelIndex parent(
const QModelIndex &child )
const override;
43 Qt::ItemFlags flags(
const QModelIndex &index )
const override;
44 QVariant data(
const QModelIndex &index,
int role )
const override;
45 QVariant headerData(
int section, Qt::Orientation orientation,
int role = Qt::DisplayRole )
const override;
46 bool setData(
const QModelIndex &index,
const QVariant &value,
int role )
override;
48 void setLayerData(
QgsRasterLayer *layer,
const QMap<int, QgsDateTimeRange > &ranges );
49 QMap<int, QgsDateTimeRange > rangeData()
const {
return mRanges; }
54 QMap<int, QString > mBandNames;
55 QMap<int, QgsDateTimeRange > mRanges;
58class QgsFixedTemporalRangeDelegate :
public QStyledItemDelegate
64 QgsFixedTemporalRangeDelegate( QObject *parent );
67 QWidget *createEditor( QWidget *parent,
const QStyleOptionViewItem & ,
const QModelIndex &index )
const override;
68 void setModelData( QWidget *editor, QAbstractItemModel *model,
const QModelIndex &index )
const override;
95 void saveTemporalProperties();
110 void temporalGroupBoxChecked(
bool checked );
112 void calculateRangeByExpression(
bool isUpper );
121 QVBoxLayout *mExtraWidgetLayout =
nullptr;
123 QList< QgsMapLayerConfigWidget * > mExtraWidgets;
125 QgsRasterBandFixedTemporalRangeModel *mFixedRangePerBandModel =
nullptr;
126 QString mFixedRangeLowerExpression;
127 QString mFixedRangeUpperExpression;
Expression contexts are used to encapsulate the parameters around which a QgsExpression should be eva...
Represents a raster layer.