summaryrefslogtreecommitdiffstats
path: root/clients/tde/src/widgets/tracewidget.h
diff options
context:
space:
mode:
Diffstat (limited to 'clients/tde/src/widgets/tracewidget.h')
-rw-r--r--clients/tde/src/widgets/tracewidget.h41
1 files changed, 31 insertions, 10 deletions
diff --git a/clients/tde/src/widgets/tracewidget.h b/clients/tde/src/widgets/tracewidget.h
index 21cced7..c2a4c1d 100644
--- a/clients/tde/src/widgets/tracewidget.h
+++ b/clients/tde/src/widgets/tracewidget.h
@@ -7,6 +7,25 @@
class TQPixmap;
+class TraceData
+{
+ public:
+ TraceData();
+ void drawTrace(TQPainter* p, int graticule_width, int graticule_height);
+
+ public:
+ TQDoubleArray sampleArray;
+ unsigned int numberOfSamples;
+ TQColor color;
+ bool enabled;
+ double leftEdge;
+ double rightEdge;
+ double topEdge;
+ double bottomEdge;
+};
+
+typedef TQMemArray<TraceData*> TraceList;
+
class TraceWidget : public TQWidget
{
Q_OBJECT
@@ -15,13 +34,17 @@ class TraceWidget : public TQWidget
TraceWidget(TQWidget* = 0, const char* = 0);
~TraceWidget();
- void setNumberOfSamples(unsigned int samples);
+ void setNumberOfSamples(unsigned int samples, uint traceNumber);
void setNumberOfHorizontalDivisions(unsigned int divisions);
void setNumberOfVerticalDivisions(unsigned int divisions);
- void setDisplayLimits(double x, double y, double w, double h);
+ void setDisplayLimits(double x, double y, double w, double h, uint traceNumber);
- TQDoubleArray& samples();
- void setSamples(TQDoubleArray&);
+ TQDoubleArray& samples(uint traceNumber);
+ void setSamples(TQDoubleArray&, uint traceNumber);
+ TQColor& traceColor(uint traceNumber);
+ void setTraceColor(TQColor&, uint traceNumber);
+ bool traceEnabled(uint traceNumber);
+ void setTraceEnabled(bool enabled, uint traceNumber);
protected:
virtual void paintEvent(TQPaintEvent*);
@@ -31,13 +54,11 @@ class TraceWidget : public TQWidget
void updateGraticule();
private:
- unsigned int m_samples;
+ void resizeTraceArray(uint newsize);
+
+ private:
unsigned int m_horizDivs;
unsigned int m_vertDivs;
- double m_leftEdge;
- double m_rightEdge;
- double m_topEdge;
- double m_bottomEdge;
- TQDoubleArray m_sampleArray;
+ TraceList m_traceArray;
TQPixmap* m_graticulePixmap;
}; \ No newline at end of file