Main Page Class Hierarchy Alphabetical List Compound List File List Compound Members Related Pages Search
statplotgraph.h00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018 #ifndef STATPLOTGRAPH_H
00019 #define STATPLOTGRAPH_H
00020
00021 #include <vector>
00022
00023 #include "basicgraph.h"
00024
00025 class PlotModule;
00026
00032 class StatPlotGraph : public BasicGraph
00033 {
00034 Q_OBJECT
00035 public:
00036 StatPlotGraph(QWidget *parent=0, const char *name=0);
00037 ~StatPlotGraph();
00038 static const unsigned int ERROR_EMPTY_XLIST = 0;
00039 static const unsigned int ERROR_EMPTY_YLIST = 1;
00040
00041 inline unsigned int getCurrentPlotIndex() const{return plotIndex;}
00042
00043 #ifdef KDE_APP
00044 virtual void print(KPrinter *);
00045 #else
00046 virtual void print(QPrinter *);
00047 #endif //KDE_APP
00048
00049 void exportAsImage(const QString&,const QString&);
00050 void getPixmap(QPixmap &pm);
00051
00052 public slots:
00053 void nextPlot();
00054 void prevPlot();
00055 void zoomStat();
00056 void setTrace(bool b){doTrace = b;}
00057 bool isTracing() const{return doTrace;}
00058 virtual inline int getGraphType() const{return STATGRAPH;}
00059 void addPlot(unsigned int index, PlotModule *);
00060 void removePlot(unsigned int index);
00061 inline void setActivePlot(unsigned int plot){plotIndex = plot; repaint(false);}
00062 void setShowCurrentPlot(bool show);
00063 QColor getColor(unsigned int i) const;
00064
00065 protected:
00066 friend class PlotModule;
00067
00068 void updateCoords();
00069
00070
00071 void paintEvent(QPaintEvent*);
00072 void mouseMoveEvent(QMouseEvent *m);
00073
00074 private:
00075 unsigned int plotIndex;
00076
00077 std::vector<PlotModule*> plots;
00078 void drawPlots(QPainter*);
00079 bool doTrace;
00080 };
00081
00082 #endif
|