#pragma once

#include <QDialog>
#include <QApplication>
#include <QMainWindow>
#include <QVBoxLayout>
#include <QWidget>
//#include <matplot/matplot.h>
#include <memory>
#include <qtextedit.h>
#include <qgsrasteridentifyresult.h>
#include <qgsmaptoolidentify.h>
#include <qgsmaptoolidentifyfeature.h>
#include <QTreeWidget>
#include <QTreeWidgetItem>
#include <qwt_polar.h>
#include <qwt_plot_curve.h>
#include <QMap>

class QCheckBox;
class QTreeView;
class QTreeWidgetItem;
class QgsHighlight;







class QImageCursorWidget : public QDialog
{
	Q_OBJECT

public:
	QImageCursorWidget(QWidget *parent = nullptr);
	~QImageCursorWidget();

	void initUi();

public slots:
	void showCursor(QList<QgsMapToolIdentify::IdentifyResult> result);
	void populateTreeWidget(const QList<QgsMapToolIdentify::IdentifyResult>& results);
	void addKeyValuePair(QTreeWidgetItem* parent, const QString& key, const QString& value);
 
public:
	void addFeature(QgsMeshLayer* layer, const QString& label, const QMap<QString, QString>& attributes, const QMap<QString, QString>& derivedAttributes);
	void addFeature(QgsRasterLayer* layer, const QString& label, const QMap<QString, QString>& attributes, const QMap<QString, QString>& derivedAttributes, const QgsFields& fields = QgsFields(), const QgsFeature& feature = QgsFeature(), const QMap<QString, QVariant>& params = (QMap<QString, QVariant>()));
	QTreeWidgetItem* layerItem(QgsMapLayer* object);

private:
	QCheckBox* checkBoxTimeSeries;
	QCheckBox* checkBoxDirection;
	QTreeWidget* treewidgetResults;
	QHash<QgsMapLayer*, QTreeWidgetItem*> maplayer_treewidgetItem;
	
};
 