Kstars

fitshistogramview.h
1/*
2 SPDX-FileCopyrightText: 2015 Jasem Mutlaq <mutlaqja@ikarustech.com>
3
4 SPDX-License-Identifier: GPL-2.0-or-later
5*/
6
7#pragma once
8
9#include "fitscommon.h"
10#include "fitsdata.h"
11#include "fitshistogramcommand.h"
12
13#include "qcustomplot.h"
14
15class QMouseEvent;
16
17class FITSHistogramView : public QCustomPlot
18{
20
21 Q_PROPERTY(bool axesLabelEnabled MEMBER m_AxesLabelEnabled)
22 Q_PROPERTY(bool linear MEMBER m_Linear)
23 friend class histDrawArea;
24
25 public:
26 explicit FITSHistogramView(QWidget *parent = nullptr);
27
28 void reset();
29 void setImageData(const QSharedPointer<FITSData> &data);
30 void syncGUI();
31
32 protected:
33 void showEvent(QShowEvent * event) override;
34 void driftMouseOverLine(QMouseEvent * event);
35
36 signals:
37 void constructed();
38
39 private slots:
40 void onXRangeChanged(const QCPRange &range);
41 void onYRangeChanged(const QCPRange &range);
42
43 public slots:
44 //void applyScale();
45 void resizePlot();
46
47 private:
48 void createNonLinearHistogram();
50 QVector<int> numDecimals;
51 bool isGUISynced { false};
52 bool m_AxesLabelEnabled {true};
53 bool m_Linear { true };
54 QSharedPointer<FITSData> m_ImageData;
55 QVector<QVector<double>> m_HistogramIntensity;
56 QVector<QVector<double>> m_HistogramFrequency;
57};
Represents the range an axis is encompassing.
The central class of the library. This is the QWidget which displays the plot and interacts with the ...
Q_OBJECTQ_OBJECT
Q_PROPERTY(...)
QObject * parent() const const
virtual bool event(QEvent *event) override
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Mon Nov 4 2024 16:38:43 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.