moved kdeaccessibility kdeaddons kdeadmin kdeartwork kdebindings kdeedu kdegames...
[kdeedu.git] / kstars / kstars / fitshistogram.h
blobdcc64409044638ff20d39f27fe5ec22800118ecc
1 /***************************************************************************
2 fitshistogram.h - FITS Historgram
3 ---------------
4 begin : Thu Mar 4th 2004
5 copyright : (C) 2004 by Jasem Mutlaq
6 email : mutlaqja@ikarustech.com
7 ***************************************************************************/
9 /***************************************************************************
10 * *
11 * This program is free software; you can redistribute it and/or modify *
12 * it under the terms of the GNU General Public License as published by *
13 * the Free Software Foundation; either version 2 of the License, or *
14 * (at your option) any later version. *
15 * *
16 ***************************************************************************/
18 #ifndef FITSHISTOGRAM
19 #define FITSHISTOGRAM
21 #include "histdialog.h"
22 #include <kcommand.h>
24 #define BARS 500
26 class FITSViewer;
27 class QPixmap;
29 class FITSHistogram : public histDialog
31 Q_OBJECT
33 public:
34 FITSHistogram(QWidget *parent, const char * name = 0);
35 ~FITSHistogram();
37 void constructHistogram(float *buffer);
38 int findMax();
39 int type;
40 int napply;
42 private:
43 int histArray[BARS];
44 double binSize;
46 FITSViewer * viewer;
47 QPixmap *histogram;
50 protected:
51 void paintEvent( QPaintEvent *e);
52 void mouseMoveEvent( QMouseEvent *e);
55 public slots:
56 void applyScale();
57 void updateBoxes();
58 void updateIntenFreq(int x);
63 class FITSHistogramCommand : public KCommand
65 public:
66 FITSHistogramCommand(QWidget * parent, FITSHistogram *inHisto, int newType, int lmin, int lmax);
67 ~FITSHistogramCommand();
69 void execute();
70 void unexecute();
71 QString name() const;
74 private:
75 FITSHistogram *histo;
76 int type;
77 int min, max;
78 float *buffer;
79 FITSViewer *viewer;
80 QImage *oldImage;
84 #endif