Kstars

fitshistogramview.h
1 /*
2  SPDX-FileCopyrightText: 2015 Jasem Mutlaq <[email protected]>
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 
15 class QMouseEvent;
16 
17 class FITSHistogramView : public QCustomPlot
18 {
19  Q_OBJECT
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  public slots:
40  //void applyScale();
41  void resizePlot();
42 
43  private:
44  void createNonLinearHistogram();
45  QVector<QCPGraph *> graphs;
46  QVector<int> numDecimals;
47  bool isGUISynced { false};
48  bool m_AxesLabelEnabled {true};
49  bool m_Linear { true };
50  QSharedPointer<FITSData> m_ImageData;
51  QVector<QVector<double>> m_HistogramIntensity;
52  QVector<QVector<double>> m_HistogramFrequency;
53 };
Q_OBJECTQ_OBJECT
Q_PROPERTY(...)
virtual void showEvent(QShowEvent *event)
The central class of the library. This is the QWidget which displays the plot and interacts with the ...
Definition: qcustomplot.h:3735
KGuiItem reset()
This file is part of the KDE documentation.
Documentation copyright © 1996-2022 The KDE developers.
Generated on Fri Aug 19 2022 03:57:50 by doxygen 1.8.17 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.