Module eagle :: Class Spin
[hide private]
[frames] | no frames]

Class Spin
source code

object --+                
         |                
 _EGObject --+            
             |            
     _EGWidget --+        
                 |        
     _EGDataWidget --+    
                     |    
      _EGWidLabelEntry --+
                         |
                        Spin
Known Subclasses:
IntSpin

Spin button entry.

Spin buttons are numeric user input that checks if value is inside a specified range. It also provides small buttons to help incrementing/ decrementing value.

Instance Methods [hide private]
  __init__(self, id, label="", value=None, min=None, max=None, step=None, digits=3, callback=None, persistent=False)
Spin constructor.
  __setup_gui__(self)
  __setup_connections__(self)
  set_value(self, value)
Set data to this widget.

Inherited from _EGWidLabelEntry: __repr__, __str__, get_value

Inherited from _EGWidget: __get_resize_mode__, __get_widgets__, hide, set_active, set_inactive, show

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


Class Variables [hide private]
default_min  
default_max  

Inherited from _EGDataWidget: persistent

Inherited from object: __class__


Properties [hide private]
value  
min  
max  
step  
digits  
callback  

Inherited from _EGWidLabelEntry: label

Inherited from _EGWidget: app

Inherited from _EGObject: id


Method Details [hide private]

__init__(self, id, label="", value=None, min=None, max=None, step=None, digits=3, callback=None, persistent=False)
(Constructor)

source code 
Spin constructor.
Parameters:
  • id - unique identifier.
  • label - what to show on a label on the left side of the widget.
  • value - initial content.
  • min - minimum value. If None, default_min will be used.
  • max - maximum value. If None, default_max will be used.
  • step - step to use to decrement/increment using buttons.
  • digits - how many digits to show.
  • callback - function (or list of functions) that will be called when this widget have its data changed. Function will receive as parameters:
    • App reference
    • Widget reference
    • new value
  • persistent - if this widget should save its data between sessions.
Overrides: _EGWidLabelEntry.__init__

__setup_gui__(self)

source code 
Overrides: _EGWidLabelEntry.__setup_gui__

__setup_connections__(self)

source code 

set_value(self, value)

source code 
Set data to this widget.
Overrides: _EGWidLabelEntry.set_value

Class Variable Details [hide private]

default_min

Value:
-9.9999999999999995e+59                                               
      

default_max

Value:
9.9999999999999995e+59                                                
      

Property Details [hide private]

value

Get Method:
unreachable.get(self)
Set Method:
unreachable.set(self, value)
Delete Method:
None

min

Get Method:
unreachable.get(self)
Set Method:
unreachable.set(self, value)
Delete Method:
None

max

Get Method:
unreachable.get(self)
Set Method:
unreachable.set(self, value)
Delete Method:
None

step

Get Method:
unreachable.get(self)
Set Method:
unreachable.set(self, value)
Delete Method:
None

digits

Get Method:
unreachable.get(self)
Set Method:
unreachable.set(self, value)
Delete Method:
None

callback

Get Method:
unreachable.get(self)
Set Method:
unreachable.set(self, value)
Delete Method:
None