skeinforge_tools.skeinforge_utilities.preferences ($Date: 2008/23/04 $)
index
/home/enrique/Desktop/backup/babbleold/script/reprap/pyRepRap/skeinforge_tools/skeinforge_utilities/preferences.py

Preferences is a collection of utilities to display, read & write preferences.

 
Modules
       
Tkinter
__init__
cStringIO
skeinforge_tools.skeinforge_utilities.gcodec
os
webbrowser

 
Classes
       
AddListboxSelection
DeleteListboxSelection
BooleanPreference
Filename
FloatPreference
IntPreference
ListPreference
ListboxPreference
Radio
RadioCapitalized
StringPreference
DisplayToolButton
DisplayToolButtonBesidePrevious
LabelDisplay
PreferencesDialog

 
class AddListboxSelection
    A class to add the selection of a listbox preference.
 
  Methods defined here:
addSelection(self)
Add the selection of a listbox preference.
addSelectionWithEvent(self, event)
Add the selection of a listbox preference, given an event.
addToDialog(self, preferencesDialog)
Add this to the dialog.
addToPreferenceTable(self, preferenceTable)
Do nothing because the add listbox selection is not archivable.
getFromListboxPreference(self, listboxPreference)
Initialize.
setToDisplay(self)
Do nothing because the add listbox selection is not archivable.
writeToArchiveWriter(self, archiveWriter)
Do nothing because the add listbox selection is not archivable.

 
class BooleanPreference
    A class to display, read & write a boolean.
 
  Methods defined here:
addToDialog(self, preferencesDialog)
Add this to the dialog.
addToPreferenceTable(self, preferenceTable)
Add this to the preference table.
getFromValue(self, name, value)
Initialize.
setStateToValue(self)
Set the checkbox to the boolean.
setToDisplay(self)
Do nothing because toggleCheckbox is handling the value.
setValueToSplitLine(self, lineIndex, lines, splitLine)
Set the value to the second word of a split line.
setValueToString(self, valueString)
Set the boolean to the string.
toggleCheckbox(self)
Workaround for Tkinter bug, toggle the value.
writeToArchiveWriter(self, archiveWriter)
Write tab separated name and value to the archive writer.

 
class DeleteListboxSelection(AddListboxSelection)
    A class to delete the selection of a listbox preference.
 
  Methods defined here:
addToDialog(self, preferencesDialog)
Add this to the dialog.
deleteSelection(self)
Delete the selection of a listbox preference.

Methods inherited from AddListboxSelection:
addSelection(self)
Add the selection of a listbox preference.
addSelectionWithEvent(self, event)
Add the selection of a listbox preference, given an event.
addToPreferenceTable(self, preferenceTable)
Do nothing because the add listbox selection is not archivable.
getFromListboxPreference(self, listboxPreference)
Initialize.
setToDisplay(self)
Do nothing because the add listbox selection is not archivable.
writeToArchiveWriter(self, archiveWriter)
Do nothing because the add listbox selection is not archivable.

 
class DisplayToolButton
    A class to display the tool preferences dialog.
 
  Methods defined here:
addToDialog(self, preferencesDialog)
Add this to the dialog.
addToPreferenceTable(self, preferenceTable)
Do nothing because the add listbox selection is not archivable.
displayTool(self)
Display the tool preferences dialog.
getFromFolderName(self, folderName, moduleFilename, name)
Initialize.
getLowerName(self)
Get the lower case name.
setToDisplay(self)
Do nothing because the display tool button is not archivable.
writeToArchiveWriter(self, archiveWriter)
Do nothing because the display tool button is not archivable.

 
class DisplayToolButtonBesidePrevious(DisplayToolButton)
    A class to display the tool preferences dialog beside the previous preference dialog element.
 
  Methods defined here:
addToDialog(self, preferencesDialog)
Add this to the dialog.

Methods inherited from DisplayToolButton:
addToPreferenceTable(self, preferenceTable)
Do nothing because the add listbox selection is not archivable.
displayTool(self)
Display the tool preferences dialog.
getFromFolderName(self, folderName, moduleFilename, name)
Initialize.
getLowerName(self)
Get the lower case name.
setToDisplay(self)
Do nothing because the display tool button is not archivable.
writeToArchiveWriter(self, archiveWriter)
Do nothing because the display tool button is not archivable.

 
class Filename(BooleanPreference)
     Methods defined here:
addToDialog(self, preferencesDialog)
Add this to the dialog.
execute(self)
getFilenameFirstTypes(self)
Get the file types with the file type of the filename moved to the front of the list.
getFromFilename(self, fileTypes, name, value)
Initialize.
setToDisplay(self)
Pass.
setValueToString(self, valueString)
Set the filename to the string.

Methods inherited from BooleanPreference:
addToPreferenceTable(self, preferenceTable)
Add this to the preference table.
getFromValue(self, name, value)
Initialize.
setStateToValue(self)
Set the checkbox to the boolean.
setValueToSplitLine(self, lineIndex, lines, splitLine)
Set the value to the second word of a split line.
toggleCheckbox(self)
Workaround for Tkinter bug, toggle the value.
writeToArchiveWriter(self, archiveWriter)
Write tab separated name and value to the archive writer.

 
class FloatPreference(BooleanPreference)
    A class to display, read & write a float.
 
  Methods defined here:
addToDialog(self, preferencesDialog)
Add this to the dialog.
setToDisplay(self)
Set the float to the entry field.
setValueToString(self, valueString)
Set the float to the string.

Methods inherited from BooleanPreference:
addToPreferenceTable(self, preferenceTable)
Add this to the preference table.
getFromValue(self, name, value)
Initialize.
setStateToValue(self)
Set the checkbox to the boolean.
setValueToSplitLine(self, lineIndex, lines, splitLine)
Set the value to the second word of a split line.
toggleCheckbox(self)
Workaround for Tkinter bug, toggle the value.
writeToArchiveWriter(self, archiveWriter)
Write tab separated name and value to the archive writer.

 
class IntPreference(FloatPreference)
    A class to display, read & write an int.
 
 
Method resolution order:
IntPreference
FloatPreference
BooleanPreference

Methods defined here:
setValueToString(self, valueString)
Set the integer to the string.

Methods inherited from FloatPreference:
addToDialog(self, preferencesDialog)
Add this to the dialog.
setToDisplay(self)
Set the float to the entry field.

Methods inherited from BooleanPreference:
addToPreferenceTable(self, preferenceTable)
Add this to the preference table.
getFromValue(self, name, value)
Initialize.
setStateToValue(self)
Set the checkbox to the boolean.
setValueToSplitLine(self, lineIndex, lines, splitLine)
Set the value to the second word of a split line.
toggleCheckbox(self)
Workaround for Tkinter bug, toggle the value.
writeToArchiveWriter(self, archiveWriter)
Write tab separated name and value to the archive writer.

 
class LabelDisplay
    A class to add a label.
 
  Methods defined here:
addToDialog(self, preferencesDialog)
Add this to the dialog.
addToPreferenceTable(self, preferenceTable)
Do nothing because the label display is not archivable.
getFromName(self, name)
Initialize.
getName(self)
Get name for key sorting.
setToDisplay(self)
Do nothing because the label display is not archivable.
writeToArchiveWriter(self, archiveWriter)
Do nothing because the label display is not archivable.

 
class ListPreference(BooleanPreference)
     Methods defined here:
addToDialog(self, preferencesDialog)
Do nothing because the list preference does not have a graphical interface.
setToDisplay(self)
Do nothing because the list preference does not have a graphical interface.
setValueToSplitLine(self, lineIndex, lines, splitLine)
Set the value to the second and later words of a split line.
setValueToString(self, valueString)
Do nothing because the list preference does not have a graphical interface.
writeToArchiveWriter(self, archiveWriter)
Write tab separated name and list to the archive writer.

Methods inherited from BooleanPreference:
addToPreferenceTable(self, preferenceTable)
Add this to the preference table.
getFromValue(self, name, value)
Initialize.
setStateToValue(self)
Set the checkbox to the boolean.
toggleCheckbox(self)
Workaround for Tkinter bug, toggle the value.

 
class ListboxPreference(BooleanPreference)
     Methods defined here:
addToDialog(self, preferencesDialog)
Add this to the dialog.
getFromListPreference(self, listPreference, name, value)
Initialize.
setListboxItems(self)
Set the listbox items to the list preference.
setToDisplay(self)
Set the selection value to the listbox selection.
setValueToString(self, valueString)
Set the selection value to the string.

Methods inherited from BooleanPreference:
addToPreferenceTable(self, preferenceTable)
Add this to the preference table.
getFromValue(self, name, value)
Initialize.
setStateToValue(self)
Set the checkbox to the boolean.
setValueToSplitLine(self, lineIndex, lines, splitLine)
Set the value to the second word of a split line.
toggleCheckbox(self)
Workaround for Tkinter bug, toggle the value.
writeToArchiveWriter(self, archiveWriter)
Write tab separated name and value to the archive writer.

 
class PreferencesDialog
     Methods defined here:
__init__(self, displayPreferences, master)
execute(self)
openBrowser(self)
savePreferences(self)
savePreferencesDestroy(self)

 
class Radio(BooleanPreference)
    A class to display, read & write a boolean with associated radio button.
 
  Methods defined here:
addToDialog(self, preferencesDialog)
Add this to the dialog.
clickRadio(self)
Workaround for Tkinter bug, set the value.
getFromRadio(self, name, radio, value)
Initialize.
getIntVar(self)
Get the IntVar for this radio button group.
setDisplayState(self, row)
Set the boolean to the checkbox.
setToDisplay(self)
Set the boolean to the checkbox.

Methods inherited from BooleanPreference:
addToPreferenceTable(self, preferenceTable)
Add this to the preference table.
getFromValue(self, name, value)
Initialize.
setStateToValue(self)
Set the checkbox to the boolean.
setValueToSplitLine(self, lineIndex, lines, splitLine)
Set the value to the second word of a split line.
setValueToString(self, valueString)
Set the boolean to the string.
toggleCheckbox(self)
Workaround for Tkinter bug, toggle the value.
writeToArchiveWriter(self, archiveWriter)
Write tab separated name and value to the archive writer.

 
class RadioCapitalized(Radio)
    A class to display, read & write a boolean with associated radio button.
 
 
Method resolution order:
RadioCapitalized
Radio
BooleanPreference

Methods defined here:
addToDialog(self, preferencesDialog)
Add this to the dialog.
getLowerName(self)
Get the lower case name.

Methods inherited from Radio:
clickRadio(self)
Workaround for Tkinter bug, set the value.
getFromRadio(self, name, radio, value)
Initialize.
getIntVar(self)
Get the IntVar for this radio button group.
setDisplayState(self, row)
Set the boolean to the checkbox.
setToDisplay(self)
Set the boolean to the checkbox.

Methods inherited from BooleanPreference:
addToPreferenceTable(self, preferenceTable)
Add this to the preference table.
getFromValue(self, name, value)
Initialize.
setStateToValue(self)
Set the checkbox to the boolean.
setValueToSplitLine(self, lineIndex, lines, splitLine)
Set the value to the second word of a split line.
setValueToString(self, valueString)
Set the boolean to the string.
toggleCheckbox(self)
Workaround for Tkinter bug, toggle the value.
writeToArchiveWriter(self, archiveWriter)
Write tab separated name and value to the archive writer.

 
class StringPreference(BooleanPreference)
    A class to display, read & write a string.
 
  Methods defined here:
addToDialog(self, preferencesDialog)
Add this to the dialog.
setToDisplay(self)
Set the string to the entry field.
setValueToString(self, valueString)
Set the string to the value string.

Methods inherited from BooleanPreference:
addToPreferenceTable(self, preferenceTable)
Add this to the preference table.
getFromValue(self, name, value)
Initialize.
setStateToValue(self)
Set the checkbox to the boolean.
setValueToSplitLine(self, lineIndex, lines, splitLine)
Set the value to the second word of a split line.
toggleCheckbox(self)
Workaround for Tkinter bug, toggle the value.
writeToArchiveWriter(self, archiveWriter)
Write tab separated name and value to the archive writer.

 
Functions
       
displayDialog(displayPreferences)
Display the preferences dialog.
getArchiveText(preferences)
Get the text representation of the archive.
getPreferencesDirectoryPath()
Get the preferences directory path, which is the home directory joined with .skeinforge.
getPreferencesFilePath(filename)
Get the preferences file path, which is the home directory joined with .skeinforge and filename.
readPreferences(preferences)
Set an archive to the preferences read from a file.
readPreferencesFromText(preferences, text)
Set an archive to the preferences read from a text.
setArchiveToLine(lineIndex, lines, preferenceTable)
Set an archive to a preference line.
writePreferences(preferences)
Write the preferences to a file.

 
Data
        __author__ = 'Enrique Perez (perez_enrique@yahoo.com)'
__date__ = '$Date: 2008/23/04 $'
__license__ = 'GPL 3.0'
absolute_import = _Feature((2, 5, 0, 'alpha', 1), (2, 7, 0, 'alpha', 0), 16384)
globalIsMainLoopRunning = False
globalSpreadsheetSeparator = '\t'

 
Author
        Enrique Perez (perez_enrique@yahoo.com)