Ksetiwatch API Documentation


TripletPlot Class Reference

Displays a triplet profile. More...

#include <tripletplot.h>

Inherits SetiGraph.

Inheritance diagram for TripletPlot:

Inheritance graph
[legend]
Collaboration diagram for TripletPlot:

Collaboration graph
[legend]
List of all members.

Public Slots

void showNewTripletData (TripletScore score)

Public Methods

 TripletPlot (QWidget *parent=0, const char *name=0)
 TripletPlot (SetiLoc *loc, QWidget *parent=0, const char *name=0)
 ~TripletPlot ()

Protected Methods

virtual void paintWidget (QPaintDevice *pd)
void drawPulseMarker (int index, QPainter *p)
void init ()

Protected Attributes

QArray< double > tripletData
TripletScore triplet
bool dataLoaded

Detailed Description

Displays a triplet profile.

This object can be constructed in two ways: either with or without specifying a S@h location. If a SetiLoc object is passed to the constructor of this class, the triplet profile shown in the widget always represents the best triplet the S@h client has found in the work unit it processes at that time. The triplet profile is automatically updated whenever the client finds a new and better triplet signal.

If this widget is created without a S@h location, the triplet data have to be explicitly passed with the showNewTripletData() method.

Definition at line 33 of file tripletplot.h.


Constructor & Destructor Documentation

TripletPlot::TripletPlot QWidget   parent = 0,
const char *    name = 0
 

The constructor.

Parameters:
parent  The parent widget. If 0, this widget becomes a top-level widget.
name  A text that can be used to identify this widget.

Definition at line 30 of file tripletplot.cpp.

References init().

TripletPlot::TripletPlot SetiLoc   loc,
QWidget   parent = 0,
const char *    name = 0
 

The constructor.

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

Parameters:
loc  The S@h location for which the best triplet (found in the currently processed work unit) shall be shown.
parent  The parent widget. If 0, this widget becomes a top-level widget.
name  A text that can be used to identify this widget.

Definition at line 23 of file tripletplot.cpp.

References init().

TripletPlot::~TripletPlot  
 

The destructor.

Definition at line 37 of file tripletplot.cpp.


Member Function Documentation

void TripletPlot::showNewTripletData TripletScore    score [slot]
 

Updates the widget with new triplet data.

Parameters:
score  A structure containing the parameters of the new triplet to be shown.

Definition at line 102 of file tripletplot.cpp.

References TripletScore::data, TripletScore::data_len, dataLoaded, TripletScore::mean, TripletScore::period, TripletScore::power, QWidget::repaint(), QArray< double >::resize(), SetiGraph::setCurve(), SetiGraph::setInfoText(), QString::sprintf(), triplet, and tripletData.

Referenced by init(), SigMsg::SigMsg(), LoggedSigs::slotFirstSignal(), LoggedSigs::slotLastSignal(), LoggedSigs::slotNextSignal(), LoggedSigs::slotPreviousSignal(), LoggedSigs::slotSave(), and LoggedSigs::slotShowFirstSignals().

void TripletPlot::paintWidget QPaintDevice   pd [protected, virtual]
 

Paints the widget.

Reimplemented for customized painting of this widget (drawing green markers indicating the triplet).

Parameters:
pd  A pointer to the object that shall be painted.

Reimplemented from SetiGraph.

Definition at line 72 of file tripletplot.cpp.

References SetiGraph::arraySize(), QPainter::begin(), drawPulseMarker(), QPainter::end(), SetiGraph::paintWidget(), QWidget::rect(), QPainter::setBrush(), QPen::setColor(), QBrush::setColor(), QPainter::setPen(), QBrush::setStyle(), TripletScore::tpotind0_0, TripletScore::tpotind1_0, TripletScore::tpotind2_0, QPainter::translate(), and triplet.

void TripletPlot::drawPulseMarker int    index,
QPainter   p
[protected]
 

Draws a marker.

A green marker indicating the position of a spike of the triplet is drawn at position index.

Parameters:
index  The position of the marker in the data array. An integer between 0 and 256.
p  A QPainter object open on the relevant paint device.

Definition at line 129 of file tripletplot.cpp.

References SetiGraph::arraySize(), QPainter::drawPolygon(), QWidget::height(), QPointArray::setPoints(), QWidget::width(), QWidget::x(), and QWidget::y().

Referenced by paintWidget().

void TripletPlot::init   [protected]
 

Initializes the widget.

If a S@h location is given, the triplet profile is painted, and a connection is made to the SetiLoc::newTriplet signal of the corresponding SetiLoc object.

Definition at line 42 of file tripletplot.cpp.

References QString::arg(), QObject::connect(), dataLoaded, SetiLoc::description(), QWidget::resize(), QArray< double >::resize(), QWidget::setBackgroundColor(), QWidget::setCaption(), QWidget::setMinimumSize(), showNewTripletData(), tripletData, and SetiContainer::tripletScore().

Referenced by TripletPlot().


Member Data Documentation

QArray<double> TripletPlot::tripletData [protected]
 

This array stores the triplet data.

Definition at line 96 of file tripletplot.h.

Referenced by init(), and showNewTripletData().

TripletScore TripletPlot::triplet [protected]
 

A structure containing the triplet parameters.

Definition at line 98 of file tripletplot.h.

Referenced by paintWidget(), and showNewTripletData().

bool TripletPlot::dataLoaded [protected]
 

Indicates if the data of a triplet is loaded.

Definition at line 100 of file tripletplot.h.

Referenced by init(), and showNewTripletData().


The documentation for this class was generated from the following files:
KDE Logo
This file is part of the documentation for Ksetiwatch API Version 2.6.1.
Documentation copyright © 2000-2003 Gordon Machel.
Generated on Fri Jun 6 00:29:05 2003 by doxygen 1.2.18, written by Dimitri van Heesch, © 1997-2002