Module PeakMeterCtrl :: Class PeakMeterCtrl
[hide private]
[frames] | no frames]

Class PeakMeterCtrl

source code

     object --+                    
              |                    
wx._core.Object --+                
                  |                
wx._core.EvtHandler --+            
                      |            
        wx._core.Window --+        
                          |        
           wx._core.Control --+    
                              |    
         wx._controls.PyControl --+
                                  |
                                 PeakMeterCtrl

The main PeakMeterCtrl implementation.

Instance Methods [hide private]
EvtHandler
__init__(self, parent, id=-1, pos=wx.Point(-1, -1), size=wx.Size(-1, -1), style=1)
Default class constructor.
source code
 
InitData(self)
Initializes the control.
source code
 
ResetControl(self)
Resets the PeakMeterCtrl.
source code
 
SetBackgroundColor(self, colorBgnd)
Set background color for PeakMeterCtrl.
source code
 
SetBandsColor(self, colorNormal, colorMedium, colorHigh)
Set bands color for PeakMeterCtrl.
source code
 
SetMeterBands(self, numBands, ledBands)
Set number of Vertical or Horizontal bands to display.
source code
 
SetRangeValue(self, minVal, medVal, maxVal)
Sets the ranges for low, medium and high bands.
source code
 
GetRangeValue(self)
Get Range value of PeakMeterCtrl.
source code
 
SetFalloffDelay(self, speed)
Set Peak value speed before falling off.
source code
 
SetFalloffEffect(self, falloffEffect)
Set falloff effect flag.
source code
 
GetFalloffEffect(self)
Read falloff effect flag.
source code
 
ShowGrid(self, showGrid)
Request to have gridlines visible or not.
source code
 
IsGridVisible(self)
Returns if gridlines are visible.
source code
 
SetData(self, arrayValue, offset, size)
Change data value.
source code
 
IsStarted(self)
Check if animation is active.
source code
 
Start(self, delay)
Start the timer and animation effect.
source code
 
Stop(self)
Stop the timer and animation effect.
source code
 
DoTimerProcessing(self)
PeakMeterCtrl animation, does the wx.EVT_TIMER processing.
source code
Size
DoGetBestSize(self)
Returns the best size for PeakMeterCtrl (arbitrary).
source code
 
OnPaint(self, event)
Handles the wx.EVT_PAINT event for PeakMeterCtrl.
source code
 
OnEraseBackground(self, event)
Handles the wx.EVT_ERASE_BACKGROUND event for PeakMeterCtrl.
source code
 
OnSize(self, event)
Handles the wx.EVT_SIZE event for PeakMeterCtrl.
source code
 
OnTimer(self, event)
Handles the wx.EVT_TIMER events for PeakMeterCtrl.
source code
 
DrawHorzBand(self, dc, rect)
Draw Vertical bands - No falloff effect for vertical bands.
source code
 
DrawVertBand(self, dc, rect)
Draw Horizontal bands - with Falloff effect.
source code

Inherited from wx._controls.PyControl: DoEraseBackground, DoGetClientSize, DoGetPosition, DoGetSize, DoGetVirtualSize, DoMoveWindow, DoSetClientSize, DoSetSize, DoSetVirtualSize, GetDefaultAttributes, OnInternalIdle, SetBestSize, __repr__, base_AcceptsFocus, base_AcceptsFocusFromKeyboard, base_AddChild, base_DoGetBestSize, base_DoGetClientSize, base_DoGetPosition, base_DoGetSize, base_DoGetVirtualSize, base_DoMoveWindow, base_DoSetClientSize, base_DoSetSize, base_DoSetVirtualSize, base_GetDefaultAttributes, base_GetMaxSize, base_InitDialog, base_OnInternalIdle, base_RemoveChild, base_ShouldInheritColours, base_TransferDataFromWindow, base_TransferDataToWindow, base_Validate

Inherited from wx._controls.PyControl (private): _setCallbackInfo

Inherited from wx._core.Control: Command, Create, GetAlignment, GetLabelText

Inherited from wx._core.Window: AcceptsFocus, AcceptsFocusFromKeyboard, AddChild, AdjustForLayoutDirection, AssociateHandle, CacheBestSize, CanSetTransparent, CaptureMouse, Center, CenterOnParent, Centre, CentreOnParent, ClearBackground, ClientToScreen, ClientToScreenXY, ClientToWindowSize, Close, ConvertDialogPointToPixels, ConvertDialogSizeToPixels, ConvertPixelPointToDialog, ConvertPixelSizeToDialog, DLG_PNT, DLG_SZE, Destroy, DestroyChildren, Disable, DissociateHandle, DragAcceptFiles, Enable, FindWindowById, FindWindowByLabel, FindWindowByName, Fit, FitInside, Freeze, GetAcceleratorTable, GetAdjustedBestSize, GetAutoLayout, GetBackgroundColour, GetBackgroundStyle, GetBestFittingSize, GetBestSize, GetBestSizeTuple, GetBestVirtualSize, GetBorder, GetCaret, GetCharHeight, GetCharWidth, GetChildren, GetClientAreaOrigin, GetClientRect, GetClientSize, GetClientSizeTuple, GetConstraints, GetContainingSizer, GetCursor, GetDropTarget, GetEffectiveMinSize, GetEventHandler, GetExtraStyle, GetFont, GetForegroundColour, GetFullTextExtent, GetGrandParent, GetGtkWidget, GetHandle, GetHelpText, GetHelpTextAtPoint, GetId, GetLabel, GetLayoutDirection, GetMaxHeight, GetMaxSize, GetMaxWidth, GetMinHeight, GetMinSize, GetMinWidth, GetName, GetParent, GetPosition, GetPositionTuple, GetRect, GetScreenPosition, GetScreenPositionTuple, GetScreenRect, GetScrollPos, GetScrollRange, GetScrollThumb, GetSize, GetSizeTuple, GetSizer, GetTextExtent, GetThemeEnabled, GetToolTip, GetTopLevelParent, GetUpdateClientRect, GetUpdateRegion, GetValidator, GetVirtualSize, GetVirtualSizeTuple, GetWindowBorderSize, GetWindowStyle, GetWindowStyleFlag, GetWindowVariant, HasCapture, HasFlag, HasMultiplePages, HasScrollbar, HasTransparentBackground, Hide, HitTest, HitTestXY, InheritAttributes, InheritsBackgroundColour, InitDialog, InvalidateBestSize, IsBeingDeleted, IsDoubleBuffered, IsEnabled, IsExposed, IsExposedPoint, IsExposedRect, IsFrozen, IsRetained, IsShown, IsShownOnScreen, IsTopLevel, Layout, LineDown, LineUp, Lower, MakeModal, Move, MoveAfterInTabOrder, MoveBeforeInTabOrder, MoveXY, Navigate, PageDown, PageUp, PopEventHandler, PopupMenu, PopupMenuXY, PostCreate, PrepareDC, PushEventHandler, Raise, Refresh, RefreshRect, RegisterHotKey, ReleaseMouse, RemoveChild, RemoveEventHandler, Reparent, ScreenToClient, ScreenToClientXY, ScrollLines, ScrollPages, ScrollWindow, SendSizeEvent, SetAcceleratorTable, SetAutoLayout, SetBackgroundColour, SetBackgroundStyle, SetBestFittingSize, SetCaret, SetClientRect, SetClientSize, SetClientSizeWH, SetConstraints, SetContainingSizer, SetCursor, SetDimensions, SetDoubleBuffered, SetDropTarget, SetEventHandler, SetExtraStyle, SetFocus, SetFocusFromKbd, SetFont, SetForegroundColour, SetHelpText, SetHelpTextForId, SetId, SetInitialSize, SetLabel, SetLayoutDirection, SetMaxSize, SetMinSize, SetName, SetOwnBackgroundColour, SetOwnFont, SetOwnForegroundColour, SetPosition, SetRect, SetScrollPos, SetScrollbar, SetSize, SetSizeHints, SetSizeHintsSz, SetSizeWH, SetSizer, SetSizerAndFit, SetThemeEnabled, SetToolTip, SetToolTipString, SetTransparent, SetValidator, SetVirtualSize, SetVirtualSizeHints, SetVirtualSizeHintsSz, SetVirtualSizeWH, SetWindowStyle, SetWindowStyleFlag, SetWindowVariant, ShouldInheritColours, Show, Thaw, ToggleWindowStyle, TransferDataFromWindow, TransferDataToWindow, UnregisterHotKey, Update, UpdateWindowUI, UseBgCol, Validate, WarpPointer, WindowToClientSize

Inherited from wx._core.EvtHandler: AddPendingEvent, Bind, Connect, Disconnect, GetEvtHandlerEnabled, GetNextHandler, GetPreviousHandler, ProcessEvent, ProcessPendingEvents, SetEvtHandlerEnabled, SetNextHandler, SetPreviousHandler, Unbind

Inherited from wx._core.EvtHandler (private): _setOORInfo

Inherited from wx._core.Object: GetClassName, IsSameAs

Inherited from object: __delattr__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __setattr__, __str__

Static Methods [hide private]

Inherited from wx._core.Control: GetClassDefaultAttributes

Inherited from wx._core.Window: FindFocus, GetCapture, NewControlId, NextControlId, PrevControlId

Properties [hide private]

Inherited from wx._controls.PyControl: thisown

Inherited from wx._core.Control: Alignment, LabelText

Inherited from wx._core.Window: AcceleratorTable, AutoLayout, BackgroundColour, BackgroundStyle, BestSize, BestVirtualSize, Border, Caret, CharHeight, CharWidth, Children, ClientAreaOrigin, ClientRect, ClientSize, Constraints, ContainingSizer, Cursor, DefaultAttributes, DropTarget, EffectiveMinSize, Enabled, EventHandler, ExtraStyle, Font, ForegroundColour, GrandParent, GtkWidget, Handle, HelpText, Id, Label, LayoutDirection, MaxHeight, MaxSize, MaxWidth, MinHeight, MinSize, MinWidth, Name, Parent, Position, Rect, ScreenPosition, ScreenRect, Shown, Size, Sizer, ThemeEnabled, ToolTip, TopLevel, TopLevelParent, UpdateClientRect, UpdateRegion, Validator, VirtualSize, WindowStyle, WindowStyleFlag, WindowVariant

Inherited from wx._core.EvtHandler: EvtHandlerEnabled, NextHandler, PreviousHandler

Inherited from wx._core.Object: ClassName

Inherited from object: __class__

Method Details [hide private]

__init__(self, parent, id=-1, pos=wx.Point(-1, -1), size=wx.Size(-1, -1), style=1)
(Constructor)

source code 

Default class constructor.

Parameters:
  • parent - the PeakMeterCtrl parent;
  • id - the widget id;
  • pos - the control position;
  • size - the PeakMeterCtrl size;
  • style - the widget style, which can be PM_VERTICAL for a vertical PeakMeterCtrl or PM_HORIZONTAL for an horizontal one.
Returns: EvtHandler
Overrides: object.__init__

SetBackgroundColor(self, colorBgnd)

source code 

Set background color for PeakMeterCtrl.

Parameters:
  • colorBgnd - the background colour to apply.

SetBandsColor(self, colorNormal, colorMedium, colorHigh)

source code 

Set bands color for PeakMeterCtrl.

Parameters:
  • colorNormal - the color for normal (low) bands;
  • colorMedium - the color for medium bands;
  • colorHigh - the color for high bands.

SetMeterBands(self, numBands, ledBands)

source code 

Set number of Vertical or Horizontal bands to display.

Note: obtain smooth effect by setting nHorz or nVert to "1", these cannot be 0.

SetRangeValue(self, minVal, medVal, maxVal)

source code 

Sets the ranges for low, medium and high bands.

Note: condition to be satisfied is that: Min: [0 - nMin[, Med: [nMin - nMed[, Max: [nMed - nMax]

SetData(self, arrayValue, offset, size)

source code 

Change data value. Use this function to change only a set of values. All bands can be changed or only 1 band, depending on the application.

DoGetBestSize(self)

source code 

Returns the best size for PeakMeterCtrl (arbitrary).

Returns: Size
Overrides: wx._controls.PyControl.DoGetBestSize

OnPaint(self, event)

source code 

Handles the wx.EVT_PAINT event for PeakMeterCtrl.

Overrides: wx._core.Window.OnPaint