Back to index

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

List of all members.

Public Member Functions

def __init__
def collect_answer
def display
def connect_signals
def disconnect_signals
def can_click_forward
def cancel_operation
def initial_vbox
 Helper functions.

Public Attributes

 question_tag
 widgets
 troubleshooter

Detailed Description

Definition at line 82 of file base.py.


Constructor & Destructor Documentation

def troubleshoot.base.Multichoice.__init__ (   self,
  troubleshooter,
  question_tag,
  question_title,
  question_text,
  choices,
  name = None 
)

Definition at line 84 of file base.py.

00084 
00085                   question_text, choices, name=None):
00086         Question.__init__ (self, troubleshooter, name)
00087         page = self.initial_vbox (question_title, question_text)
00088         choice_vbox = gtk.VBox ()
00089         choice_vbox.set_spacing (6)
00090         page.pack_start (choice_vbox, False, False, 0)
00091         self.question_tag = question_tag
00092         self.widgets = []
00093         for choice, tag in choices:
00094             button = gtk.RadioButton (label=choice)
00095             if len (self.widgets) > 0:
00096                 button.set_group (self.widgets[0][0])
00097             choice_vbox.pack_start (button, False, False, 0)
00098             self.widgets.append ((button, tag))
00099 
00100         troubleshooter.new_page (page, self)

Here is the call graph for this function:


Member Function Documentation

def troubleshoot.base.Question.cancel_operation (   self) [inherited]

Reimplemented from troubleshoot.base.Question.

Definition at line 101 of file base.py.

00101 
00102     def collect_answer (self):
00103         for button, answer_tag in self.widgets:
00104             if button.get_active ():
00105                 return { self.question_tag: answer_tag }
def troubleshoot.base.Question.connect_signals (   self,
  handler 
) [inherited]
def troubleshoot.base.Question.display (   self) [inherited]
def troubleshoot.base.Question.initial_vbox (   self,
  title = '',
  text = '' 
) [inherited]

Helper functions.

Definition at line 66 of file base.py.

00066 
00067     def initial_vbox (self, title='', text=''):
00068         vbox = gtk.VBox ()
00069         vbox.set_border_width (12)
00070         vbox.set_spacing (12)
00071         if title:
00072             s = '<span weight="bold" size="larger">' + title + '</span>\n\n'
00073         else:
00074             s = ''
00075         s += text
00076         label = gtk.Label (s)
00077         label.set_alignment (0, 0)
00078         label.set_line_wrap (True)
00079         label.set_use_markup (True)
00080         vbox.pack_start (label, False, False, 0)
00081         return vbox

Here is the caller graph for this function:


Member Data Documentation

Definition at line 90 of file base.py.

Reimplemented in troubleshoot.CheckPrinterSanity.CheckPrinterSanity.

Definition at line 41 of file base.py.

Definition at line 91 of file base.py.


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