/usr/include/odinqt/float2d.h is in libodin-dev 1.8.4-1ubuntu2.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
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 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 | /***************************************************************************
float2d.h - description
-------------------
begin : Sun Aug 27 2000
copyright : (C) 2000 by Thies Jochimsen
email : jochimse@cns.mpg.de
***************************************************************************/
/***************************************************************************
* *
* This program is free software; you can redistribute it and/or modify *
* it under the terms of the GNU General Public License as published by *
* the Free Software Foundation; either version 2 of the License, or *
* (at your option) any later version. *
* *
***************************************************************************/
#ifndef FLOAT2D_H
#define FLOAT2D_H
#include <qlabel.h>
#include "odinqt.h"
#include "plot.h"
class QPixmap; // forward declaration
/**
* QLabel containing a QPixmap to draw 2D float array
*/
class floatLabel2D : public QLabel {
Q_OBJECT
public:
floatLabel2D(const float *data, float lowbound, float uppbound, unsigned int nx, unsigned int ny, unsigned int coarseFactor,
QWidget *parent, const char *name,
const float *overlay_map, float lowbound_map, float uppbound_map, unsigned int nx_map, unsigned int ny_map, bool map_firescale, float map_rectsize,
bool colormap);
~floatLabel2D();
int xpos2labelxpos(int pos);
int ypos2labelypos(int pos);
int labelxpos2xpos(int pos);
int labelypos2ypos(int pos);
int xypos2index(int xpos,int ypos);
unsigned int get_nx() const {return nx_cache;}
unsigned int get_ny() const {return ny_cache;}
void init_pixmap(bool clear=true);
void set_pixmap();
void write_pixmap(const char* fname, const char* format) const;
QLabel* get_map_legend(QWidget *parent) const;
void write_map_legend(const char* fname, const char* format) const;
QPixmap *pixmap;
protected:
void mousePressEvent (QMouseEvent *);
void mouseReleaseEvent (QMouseEvent *);
void mouseMoveEvent ( QMouseEvent * );
public slots:
void refresh(const float *data, float lowbound, float uppbound);
void refreshMap(const float *map, float map_lowbound, float map_uppbound, float rectsize);
private slots:
void drawprofil(int position,int direction);
void drawcross(int xposition,int yposition);
void drawroi();
signals:
void clicked(int xposition,int yposition);
void newProfile(const float *data, int npts, bool horizontal, int position);
void newMask(const float *data);
private:
static int scale_width(float lowbound, float uppbound);
void draw_text(GuiPainter& gp, int xpos, int ypos, const char* txt) const;
void draw_scale_text(GuiPainter& gp, int ypos, float val) const;
static int check_range(int val, int min, int max);
int get_map_hue(float relval) const;
int get_map_value(float relval) const;
int get_map_saturation(float relval) const;
int scalespace_cache;
GuiPainter* roi_painter;
mutable QPixmap* legend_pixmap;
unsigned char* imagebuff;
unsigned int len;
const float* data_cache;
unsigned int nx_cache;
unsigned int ny_cache;
float lowbound_cache;
float uppbound_cache;
unsigned int nx_map_cache;
unsigned int ny_map_cache;
float lowbound_map_cache;
float uppbound_map_cache;
bool fire_map_cache;
float *profile_x;
float *profile_y;
unsigned int coarseFactor_cache;
bool colormap_cache;
long unsigned int i;
STD_list<QPoint> roi_polygon;
float* roi_mask;
bool mouse_moved;
};
#endif
|