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