C# Класс Plasma.SignalPlotter

Наследование: Qyoto.QGraphicsWidget, IDisposable
Показать файл Открыть проект

Private Properties

Свойство Тип Описание
Paint void
SetGeometry void

Открытые методы

Метод Описание
AddPlot ( QColor color ) : void Add a new line to the graph plotter, with the specified color. Note that the order you add the plots must be the same order that the same data is given in (unless you reorder the plots). name="color" the color to use for this plot
AddSample ( List samples ) : void Add data to the graph, and advance the graph by one time period. The data must be given as a list in the same order that the plots were added (or consequently reordered). name="samples" a list with the new value for each plot
Dispose ( ) : void
GetSnapshotImage ( uint width, uint height ) : QPixmap Render the graph to the specified width and height, and return it as an image. This is useful, for example, if you draw a small version of the graph, but then want to show a large version in a tooltip etc name="width" the width of the snapshot name="height" the height of the snapshot
LastValue ( uint i ) : double Return the last value that we have for plot i. Returns 0 if not known. name="i" the plot we like to have the last value from
LastValueAsString ( uint i ) : string Return a translated string like: "34 %" or "100 KB" for plot i name="i" the plot we like to have the value as string from
PlotColors ( ) : List Return the list of plot colors, in the order that the plots were added (or later reordered).
RemovePlot ( uint pos ) : void Removes the plot at the specified index. name="pos" the index of the plot to be removed
ReorderPlots ( List newOrder ) : void Reorder the plots into the order given. For example:
 KSignalPlotter s = KSignalPlotter(parent); s.AddPlot(Qt.Blue); s.AddPlot(Qt.Green); QList neworder; neworder << 1 << 0; reorderPlots(newOrder); //Now the order is Green then Blue 
name="newOrder" a list with the new position of each plot
SetVerticalRange ( double min, double max ) : void Change the minimum and maximum values drawn on the graph. Note that these values are sanitised. For example, if you set the minimum as 3, and the maximum as 97, then the graph would be drawn between 0 and 100. The algorithm to determine this "nice range" attempts to minimize the number of non-zero digits. Use setAutoRange instead to determine the range automatically from the data. name="min" the minimum value to use for the vertical axis name="max" the maximum value to use for the vertical axis
SignalPlotter ( ) : System
SignalPlotter ( IQGraphicsItem parent ) : System
VerticalMaxValue ( ) : double Get the max value of the vertical axis. @see changeRange
VerticalMinValue ( ) : double Get the min value of the vertical axis. @see changeRange

Защищенные методы

Метод Описание
CalculateNiceRange ( ) : void
CreateProxy ( ) : void
DrawAxisText ( QPainter p, int top, int h ) : void
DrawBackground ( QPainter p, int w, int h ) : void
DrawHorizontalLines ( QPainter p, int top, int w, int h ) : void
DrawPlots ( QPainter p, int top, int w, int h, int horizontalScale ) : void
DrawThinFrame ( QPainter p, int w, int h ) : void
DrawTopBarContents ( QPainter p, int x, int width, int height ) : void
DrawTopBarFrame ( QPainter p, int separatorX, int height ) : void
DrawVerticalLines ( QPainter p, int top, int w, int h ) : void
DrawWidget ( QPainter p, uint w, uint height, int horizontalScale ) : void
SignalPlotter ( Type dummy ) : System
UpdateDataBuffers ( ) : void

Приватные методы

Метод Описание
Paint ( QPainter painter, QStyleOptionGraphicsItem option, QWidget widget ) : void
SetGeometry ( Qyoto.QRectF geometry ) : void

Описание методов

AddPlot() публичный Метод

Add a new line to the graph plotter, with the specified color. Note that the order you add the plots must be the same order that the same data is given in (unless you reorder the plots). name="color" the color to use for this plot
public AddPlot ( QColor color ) : void
color Qyoto.QColor
Результат void

AddSample() публичный Метод

Add data to the graph, and advance the graph by one time period. The data must be given as a list in the same order that the plots were added (or consequently reordered). name="samples" a list with the new value for each plot
public AddSample ( List samples ) : void
samples List
Результат void

CalculateNiceRange() защищенный Метод

protected CalculateNiceRange ( ) : void
Результат void

CreateProxy() защищенный Метод

protected CreateProxy ( ) : void
Результат void

Dispose() публичный Метод

public Dispose ( ) : void
Результат void

DrawAxisText() защищенный Метод

protected DrawAxisText ( QPainter p, int top, int h ) : void
p Qyoto.QPainter
top int
h int
Результат void

DrawBackground() защищенный Метод

protected DrawBackground ( QPainter p, int w, int h ) : void
p Qyoto.QPainter
w int
h int
Результат void

DrawHorizontalLines() защищенный Метод

protected DrawHorizontalLines ( QPainter p, int top, int w, int h ) : void
p Qyoto.QPainter
top int
w int
h int
Результат void

DrawPlots() защищенный Метод

protected DrawPlots ( QPainter p, int top, int w, int h, int horizontalScale ) : void
p Qyoto.QPainter
top int
w int
h int
horizontalScale int
Результат void

DrawThinFrame() защищенный Метод

protected DrawThinFrame ( QPainter p, int w, int h ) : void
p Qyoto.QPainter
w int
h int
Результат void

DrawTopBarContents() защищенный Метод

protected DrawTopBarContents ( QPainter p, int x, int width, int height ) : void
p Qyoto.QPainter
x int
width int
height int
Результат void

DrawTopBarFrame() защищенный Метод

protected DrawTopBarFrame ( QPainter p, int separatorX, int height ) : void
p Qyoto.QPainter
separatorX int
height int
Результат void

DrawVerticalLines() защищенный Метод

protected DrawVerticalLines ( QPainter p, int top, int w, int h ) : void
p Qyoto.QPainter
top int
w int
h int
Результат void

DrawWidget() защищенный Метод

protected DrawWidget ( QPainter p, uint w, uint height, int horizontalScale ) : void
p Qyoto.QPainter
w uint
height uint
horizontalScale int
Результат void

GetSnapshotImage() публичный Метод

Render the graph to the specified width and height, and return it as an image. This is useful, for example, if you draw a small version of the graph, but then want to show a large version in a tooltip etc name="width" the width of the snapshot name="height" the height of the snapshot
public GetSnapshotImage ( uint width, uint height ) : QPixmap
width uint
height uint
Результат Qyoto.QPixmap

LastValue() публичный Метод

Return the last value that we have for plot i. Returns 0 if not known. name="i" the plot we like to have the last value from
public LastValue ( uint i ) : double
i uint
Результат double

LastValueAsString() публичный Метод

Return a translated string like: "34 %" or "100 KB" for plot i name="i" the plot we like to have the value as string from
public LastValueAsString ( uint i ) : string
i uint
Результат string

PlotColors() публичный Метод

Return the list of plot colors, in the order that the plots were added (or later reordered).
public PlotColors ( ) : List
Результат List

RemovePlot() публичный Метод

Removes the plot at the specified index. name="pos" the index of the plot to be removed
public RemovePlot ( uint pos ) : void
pos uint
Результат void

ReorderPlots() публичный Метод

Reorder the plots into the order given. For example:
 KSignalPlotter s = KSignalPlotter(parent); s.AddPlot(Qt.Blue); s.AddPlot(Qt.Green); QList neworder; neworder << 1 << 0; reorderPlots(newOrder); //Now the order is Green then Blue 
name="newOrder" a list with the new position of each plot
public ReorderPlots ( List newOrder ) : void
newOrder List
Результат void

SetVerticalRange() публичный Метод

Change the minimum and maximum values drawn on the graph. Note that these values are sanitised. For example, if you set the minimum as 3, and the maximum as 97, then the graph would be drawn between 0 and 100. The algorithm to determine this "nice range" attempts to minimize the number of non-zero digits. Use setAutoRange instead to determine the range automatically from the data. name="min" the minimum value to use for the vertical axis name="max" the maximum value to use for the vertical axis
public SetVerticalRange ( double min, double max ) : void
min double
max double
Результат void

SignalPlotter() публичный Метод

public SignalPlotter ( ) : System
Результат System

SignalPlotter() публичный Метод

public SignalPlotter ( IQGraphicsItem parent ) : System
parent IQGraphicsItem
Результат System

SignalPlotter() защищенный Метод

protected SignalPlotter ( Type dummy ) : System
dummy System.Type
Результат System

UpdateDataBuffers() защищенный Метод

protected UpdateDataBuffers ( ) : void
Результат void

VerticalMaxValue() публичный Метод

Get the max value of the vertical axis. @see changeRange
public VerticalMaxValue ( ) : double
Результат double

VerticalMinValue() публичный Метод

Get the min value of the vertical axis. @see changeRange
public VerticalMinValue ( ) : double
Результат double