File: PlotLister.h

package info (click to toggle)
quickplot 0.8.6-1.1
  • links: PTS
  • area: main
  • in suites: etch, etch-m68k
  • size: 1,548 kB
  • ctags: 1,019
  • sloc: cpp: 10,052; sh: 7,597; makefile: 176
file content (119 lines) | stat: -rw-r--r-- 2,061 bytes parent folder | download | duplicates (3)
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
/* Copyright (c) 1998, 1999, 2003, 2004  Lance Arsenault, (GNU GPL (v2+))
 */

class MainWindow;
class Plot;
class Graph;

class Picture:  public DrawingArea
{
public:
  
  Picture(Plot *plot=NULL, bool limit_size=false);
  
  bool on_expose_event(GdkEventExpose *);

  void queueRedraw(void);
  void setPlot(Plot *p);
  
private:
  
  Plot *plot;
  bool limitSize;
  
  Glib::RefPtr<Gdk::Window> win;
  Glib::RefPtr<Gdk::GC> gc;

  SigC::Connection plotChangeConnection, bgConnection;
};



class Row
{
public:
  
  Row(MainWindow *mainWindow, Table *table_in, int row_in, Plot *plot);
  ~Row(void);

  void on_valueDisplay(value_t x, value_t y);
  void printStdout(void);
  
private:

  Button plotConfigB;
  Entry labelE, valueE;
  Label xMinE, xMaxE, yMinE, yMaxE;


  Picture picture;
  
  int row;
  Table *table;
  MainWindow *mainWindow;
  Plot *plot;
  SigC::Connection valueDisplay_connection, makePlotConfig_connection;
  
  void add(Widget &w, int col);
  void makePlotConfig(void);
  //void setLabelSize(Entry &l);
  //void afterRealize(void);

  //SigC::Connection afterRealizeConnection;
};



class PlotLister : public Window
{

public:
  PlotLister(MainWindow *mainWindow_in);
  ~PlotLister(void);

  void show(void);
  void on_unmap(void);
  void setTitle(void);

private:
  MainWindow *mainWindow;


  void on_notebookFlip(GtkNotebookPage* , guint );


  void setValuesFromGraph(void);

  void addHeaderLabel(Widget &w, int col);

  void on_addedPlot(Graph *graph);

  void on_removedPlot(Graph *graph, Plot *plot);

  void on_interpolated(void);
  void on_noninterpolated(void);
  void on_offPlot(void);

  int x, y;

private:

  void on_printToStdout(void);

  Row **row;
  unsigned int  numRows, rowArraySize;

  VBox vBox;
  HBox hBox;
  OptionMenu pickerTypeOM;
  Menu pickerTypeM;
  MenuItem  offPlotMI, interpolatedMI, noninterpolatedMI;

  Button printToStdoutB;
  ScrolledWindow scrolledWindow;
  Table table;

  Label plotLabelL, plotPictureL, valuesL, xMinL, xMaxL, yMinL, yMaxL;

  bool on_key_press_event(GdkEventKey* event);
};