00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
#ifndef _PLOT_H_
00025
#define _PLOT_H_
00026
00027 class _PlotDlg
00028 {
00029
private:
00030
int items;
00031
public:
00032
virtual int getBuffersize()=0;
00033
virtual void show(
int)=0;
00034
virtual void plot()=0;
00035
virtual void hide(
int)=0;
00036
virtual void setStart(
int)=0;
00037
virtual void setEnd(
int)=0;
00038
virtual QStringList
getNames()=0;
00039 virtual ~_PlotDlg(){};
00040 };
00041
00042
#endif
00043
00044
#ifndef _PLOTDLG_H_
00045
#define _PLOTDLG_H_
00046
00047
00048
#include "gnuplot.h"
00049
#include "gnuplotdlg.h"
00050
00052
00055 template <
class T>
class PlotDlg :
public _PlotDlg
00056 {
00057
public:
00058 Gnuplot<T> *
gg;
00059 typename Gnuplot<T>::nameslist
names;
00060
00061 GnuplotDlg *
p;
00062
00063 PlotDlg(
Gnuplot<T>* g){
00064
gg=g;
00065
names=
gg->getNames();
00066
00067
p =
new GnuplotDlg(
this);
00068
p->show();
00069 };
00070
00072 int getBuffersize(){
00073
return gg->getBuffersize();
00074 };
00075
00077 QStringList
getNames(){
00078 QStringList list;
00079
for(
typename Gnuplot<T>::nameslist::iterator i=
names.begin();i!=
names.end();++i)
00080 list+=(QString)(*i);
00081
return list;
00082 }
00083
00085 void plot(){
00086
gg->plot();
00087 };
00088
00090 void show(
int n){
00091
typename Gnuplot<T>::nameslist::iterator i;
00092 i=
names.begin();
00093
for(
int a=0;a<n;a++,i++)
00094 ;
00095
gg->show(*i);
00096 };
00097
00099 void hide(
int n){
00100
typename Gnuplot<T>::nameslist::iterator i;
00101 i=
names.begin();
00102
for(
int a=0;a<n;a++,i++)
00103 ;
00104
gg->hide(*i);
00105 };
00106
00108 void setStart(
int n){
00109
gg->setStart(n);
00110 };
00111
00113 void setEnd(
int n){
00114
gg->setEnd(n);
00115 };
00116
00117 };
00118
#endif