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

Class IntSpin
source code

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

Integer-only Spin button.

Convenience widget that behaves like Spin with digits set to zero and also ensure set_value and get_value operates on integers.

Instance Methods [hide private]
  __init__(self, id, label="", value=None, min=None, max=None, step=None, callback=None, persistent=False, expand_policy=None)
Integer Spin constructor.
  __setup_gui__(self)
  __setup_connections__(self)
  get_value(self)
  set_value(self, value)

Inherited from _EGWidLabelEntry: __configure_orientation__, __repr__, __str__, get_label, set_label

Inherited from _EGWidget: __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 Spin: callback, digits, max, min, step, value

Inherited from _EGWidLabelEntry: label

Inherited from _EGDataWidget: persistent

Inherited from _EGWidget: ORIENTATION_HORIZONTAL, ORIENTATION_VERTICAL, app

Inherited from _EGObject: id

Inherited from object: __class__


Method Details [hide private]

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

source code 
Integer 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.
  • 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.
  • expand_policy - how this widget should fit space, see ExpandPolicy.Policy.Rule.
Overrides: Spin.__init__

__setup_gui__(self)

source code 
Overrides: Spin.__setup_gui__

__setup_connections__(self)

source code 
Overrides: Spin.__setup_connections__

get_value(self)

source code 
Overrides: _EGWidLabelEntry.get_value

set_value(self, value)

source code 
Overrides: Spin.set_value

Class Variable Details [hide private]

default_min

Value:
-sys.maxint                                                            
      

default_max

Value:
sys.maxint