File: gnuPlotFunction.h

package info (click to toggle)
qgfe 1.0-1.1
  • links: PTS
  • area: main
  • in suites: lenny, squeeze
  • size: 964 kB
  • ctags: 1,550
  • sloc: cpp: 14,426; makefile: 48; sh: 23
file content (107 lines) | stat: -rw-r--r-- 3,094 bytes parent folder | download
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
/* -------------------------- gnuPlotFunction class --------------------------
   
   This is a class to create an object to plot functions. It contains all
   variables necessary for plotting functions and knows how to issue the correct
   command to gnuPlot to plot the function with its options. 

   This file is part of Xgfe: X Windows GUI front end to Gnuplot
   Copyright (C) 1998 David Ishee

   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
   any later version.

   This program is distributed in the hope that it will be useful,
   but WITHOUT ANY WARRANTY; without even the implied warranty of
   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
   GNU General Public License for more details.

   You should have received a copy of the GNU General Public License
   along with this program; if not, write to the Free Software
   Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.

   ------------------------------------------------------------------------*/

#ifndef gnuPlotFunction_included
#define gnuPlotFunction_included

using namespace std;

#include <qstring.h>
#include <iostream>

class gnuPlotFunction
{
public:
  gnuPlotFunction();
  /* Description:
       Constructor function */

  QString getPlotCmd();
  /* Incoming arguments:
       none
     Outgoing arguments:
       QString: plotting command for the function
     Description:
       Builds a QString to plot the function */

  void setFunction(QString func);
  /* Incoming arguments:
       QString function: Function to plot
     Outgoing arguments:
       none
     Description:
       Sets the function to plot */

  QString getFunction();
  /* Incoming arguments:
       none
     Outgoing arguments:
       QString: current function
     Description:
       Gets the function to plot */

  void setFunctionStyleType(QString type);
  /* Incoming arguments:
       QString type: style of plotting. With Gnuplot 3.5 the following types
       are supported: points, lines, linespoints, impulses, dots, steps,
       errorbars, and boxes. Others can be specified if Gnuplot will
       understand it.
     Outgoing arguments:
       none
     Description:
       Sets the style of plotting the function */

QString getFunctionStyleType();
  /* Incoming arguments:
       none
     Outgoing arguments:
       QString: function style option
     Description:
       Gets the style of plotting the function */

  void setLegendTitle(QString title);
  /* Incoming arguments:
       title: title for legend
     Outgoing arguments:
       none
     Description:
       Sets title to be used in legend */

  QString getLegendTitle();
  /* Incoming arguments:
       none
     Outgoing arguments:
       QString: title for current function
     Description:
       Gets title to be used in legend for the function */

private:

  QString function;
  QString styleType;
  QString legendTitle;
};

#endif // gnuPlotFunction_included