-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdensityhisto.h
51 lines (42 loc) · 1.66 KB
/
densityhisto.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
// ============================================================================
// Copyright Jean-Charles LAMBERT - 2007-2023
// e-mail: [email protected]
// address: Centre de donneeS Astrophysique de Marseille (CeSAM)
// Laboratoire d'Astrophysique de Marseille
// Pôle de l'Etoile, site de Château-Gombert
// 38, rue Frédéric Joliot-Curie
// 13388 Marseille cedex 13 France
// CNRS U.M.R 7326
// ============================================================================
// See the complete license in LICENSE and/or "http://www.cecill.info".
// ============================================================================
#ifndef GLNEMODENSITYHISTO_H
#define GLNEMODENSITYHISTO_H
#include <QGraphicsScene>
#include <QWidget>
#include <QResizeEvent>
#include <vector>
/**
@author Jean-Charles Lambert <[email protected]>
*/
namespace glnemo {
class DensityHisto : public QGraphicsScene {
Q_OBJECT
public:
DensityHisto(QWidget *parent = 0);
~DensityHisto();
void drawDensity(const std::vector<int> _d); // _d[100]);
void resizeEvent ( QResizeEvent * event );
public slots:
void drawDensity(int _min=0, int _max=100);
void clearScene();
private:
const int nhisto;
void drawGrid();
const QWidget * parent;
const int border;
std::vector <int> density_histo;
int maxhisto;
};
}
#endif