Back to index

system-config-printer  1.3.9+20120706
Public Member Functions | Public Attributes | Static Public Attributes
options.Option Class Reference
Inheritance diagram for options.Option:
Inheritance graph
[legend]
Collaboration diagram for options.Option:
Collaboration graph
[legend]

List of all members.

Public Member Functions

def __init__
def get_current_value
def is_changed
def changed
def get_default

Public Attributes

 name
 value
 supported
 on_change
 is_new
 label

Static Public Attributes

 conflicts = None

Detailed Description

Definition at line 354 of file options.py.


Constructor & Destructor Documentation

def options.Option.__init__ (   self,
  name,
  value,
  supported,
  on_change 
)

Reimplemented in options.OptionText, options.OptionNumeric, options.OptionSelectMany, options.OptionSelectOneResolution, and options.OptionSelectOne.

Definition at line 358 of file options.py.

00358 
00359     def __init__(self, name, value, supported, on_change):
00360         self.name = name
00361         self.value = value
00362         self.supported = supported
00363         self.on_change = on_change
00364         self.is_new = False
00365 
00366         label = name
00367         if not label.endswith (':'):
00368             label += ':'
00369         self.label = gtk.Label(label)
00370         self.label.set_alignment(0.0, 0.5)


Member Function Documentation

def options.Option.changed (   self,
  widget,
  args 
)

Definition at line 378 of file options.py.

00378 
00379     def changed(self, widget, *args):
00380         self.on_change(self)
00381     
00382 # ---------------------------------------------------------------------------

Reimplemented from options.OptionInterface.

Reimplemented in options.OptionText, options.OptionNumeric, options.OptionSelectMany, options.OptionSelectOneNumber, options.OptionSelectOneResolution, and options.OptionSelectOne.

Definition at line 371 of file options.py.

00371 
00372     def get_current_value(self):
00373         raise NotImplemented

Here is the caller graph for this function:

def options.OptionInterface.get_default (   self) [inherited]

Reimplemented in options.OptionAlwaysShown.

Definition at line 109 of file options.py.

00109 
00110     def get_default(self):
00111         return None

def options.Option.is_changed (   self)

Reimplemented from options.OptionInterface.

Definition at line 374 of file options.py.

00374 
00375     def is_changed(self):
00376         return (self.is_new or
00377                 str (self.get_current_value()) != str (self.value))

Here is the call graph for this function:


Member Data Documentation

options.Option.conflicts = None [static]

Definition at line 356 of file options.py.

Definition at line 363 of file options.py.

Definition at line 368 of file options.py.

Definition at line 359 of file options.py.

Definition at line 362 of file options.py.

Definition at line 361 of file options.py.

Definition at line 360 of file options.py.


The documentation for this class was generated from the following file: