C# 클래스 Plasma.SignalPlotter

상속: Qyoto.QGraphicsWidget, IDisposable
파일 보기 프로젝트 열기: 0xd34df00d/Qross

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