Fixed text file permissions
[snark14.git] / tools / Display / line_window_onevar_t.hpp
1 /** @file line_window_onevar_t.hpp
2     @author Deniz
3     @description class line_window_onevar_t is defined
4     licensed under (open-source) QPL v1.0
5     which accompanies this distribution in the file QPL
6 */
7
8 #ifndef _LINE_WINDOW_ONEVAR_T
9 #define _LINE_WINDOW_ONEVAR_T
10
11 #include <list>
12 #include <qstring.h>
13
14 #include <q3canvas.h>
15 class QColor;
16 #include "line_window_t.hpp"
17 class line_real_t;
18 typedef std::list<line_window_t> data_onevar_t;
19
20 /* This corresponds to a set of maybe disconnected (due to falling out of window boundaries)
21    segments for a single variable, due to single execution
22    All these hacks are due to a bug i found in QT API (both versions)
23    when plotting big numbers: now being superparanoid to drawLine() ONLY within the window, 
24    which is not necessarily as precise but at least guarantees that 
25    there will be lines when there should be. 
26 */
27 class line_window_onevar_t
28 {
29   data_onevar_t data;
30   QString plotname;
31   friend class plot_t;
32 public:
33   /** constuctor/1 takes one line with real coords, potentially makes many point sets from it    *
34    *  pre: line_real has at least 1 point                                                        *
35    *  pre: x values in line_real are strictly increasing (as is the case in snark14 eval output) *
36    *  (as well as in column/row profiles?) i believe those are not even given as (x,y)  (yet)    *
37    *  trusts Painter::drawLine() with between interior and JUST outside the paint window.        *
38    */
39   line_window_onevar_t(line_real_t& line_real);
40   bool empty();
41   QString getName();
42   void plot(QPainter& P, QColor& C, Qt::PenStyle & Ps);
43   void show();
44 }; // -- class line_window_onevar_t
45 #endif