Kstars

fitshistogramcommand.h
1 /*
2  SPDX-FileCopyrightText: 2021 Jasem Mutlaq <[email protected]>
3 
4  SPDX-License-Identifier: GPL-2.0-or-later
5 */
6 
7 #pragma once
8 
9 #include <QUndoCommand>
10 #include "fitsdata.h"
11 
12 class FITSData;
13 class FITSHistogramEditor;
14 
15 class FITSHistogramCommand : public QUndoCommand
16 {
17  public:
18  FITSHistogramCommand(const QSharedPointer<FITSData> &data, FITSHistogramEditor * inHisto, FITSScale newType,
19  const QVector<double> &lmin,
20  const QVector<double> &lmax);
21  virtual ~FITSHistogramCommand();
22 
23  virtual void redo() override;
24  virtual void undo() override;
25  virtual QString text() const;
26 
27  private:
28  bool calculateDelta(const uint8_t * buffer);
29  bool reverseDelta();
30 
31  FITSImage::Statistic stats;
32 
33  QSharedPointer<FITSData> m_ImageData;
34  FITSHistogramEditor * histogram { nullptr };
35  FITSScale type;
36  QVector<double> min, max;
37 
38  unsigned char * delta { nullptr };
39  unsigned long compressedBytes { 0 };
40 
41 };
virtual void redo()
Type type(const QSqlDatabase &db)
QString text() const const
virtual void undo()
This file is part of the KDE documentation.
Documentation copyright © 1996-2022 The KDE developers.
Generated on Fri Aug 12 2022 04:00:53 by doxygen 1.8.17 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.