Back to index

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

List of all members.

Public Member Functions

def __init__
def get_current_value
def is_changed
def changed
def get_default

Public Attributes


Static Public Attributes

 conflicts = None

Detailed Description

Definition at line 444 of file

Constructor & Destructor Documentation

def options.OptionSelectMany.__init__ (   self,

Reimplemented from options.Option.

Definition at line 446 of file

00447     def __init__(self, name, value, supported, on_change):
00448         Option.__init__(self, name, value, supported, on_change)
00449         self.checkboxes = []
00450         vbox = gtk.VBox()
00452         for s in supported:
00453             checkbox = gtk.CheckButton(label=s)
00454             checkbox.set_active(s in value)
00455             vbox.add(checkbox)
00456             checkbox.connect("toggled", self.changed)
00457             self.checkboxes.append(checkbox)
00458         self.selector = vbox

Member Function Documentation

def options.Option.changed (   self,
) [inherited]

Definition at line 378 of file

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

Reimplemented from options.Option.

Definition at line 459 of file

00460     def get_current_value(self):
00461         return[s for s, chk in zip(self.supported, self.checkboxes)
00462                if chk.get_active()]
00464 # ---------------------------------------------------------------------------

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

00110     def get_default(self):
00111         return None

def options.Option.is_changed (   self) [inherited]

Reimplemented from options.OptionInterface.

Definition at line 374 of file

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

Definition at line 448 of file

options.Option.conflicts = None [static, inherited]

Definition at line 356 of file

options.Option.is_new [inherited]

Definition at line 363 of file

options.Option.label [inherited]

Definition at line 368 of file [inherited]

Definition at line 359 of file

Definition at line 362 of file

Definition at line 457 of file

Definition at line 361 of file

options.Option.value [inherited]

Definition at line 360 of file

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