wizard Package
wizard Package
The wizard module contains generic wizards and wizard pages
backup Module
-
class camelot.view.wizard.backup.BackupPage(backup_mechanism, parent=None)[source]
Bases: camelot.view.wizard.pages.progress_page.ProgressPage
-
run()[source]
-
title = _('Backup in progress')
-
class camelot.view.wizard.backup.BackupWizard(backup_mechanism, parent=None)[source]
Bases: PyQt4.QtGui.QWizard
Wizard to perform a backup using a BackupMechanism
-
backup_page
alias of BackupPage
-
select_backup_file_page
alias of SelectBackupFilePage
-
window_title = _('Backup')
-
class camelot.view.wizard.backup.RestorePage(backup_mechanism, parent=None)[source]
Bases: camelot.view.wizard.pages.progress_page.ProgressPage
-
run()[source]
-
title = _('Restore in progress')
-
class camelot.view.wizard.backup.RestoreWizard(backup_mechanism, parent=None)[source]
Bases: PyQt4.QtGui.QWizard
Wizard to perform a restore using a BackupMechanism
-
restore_page
alias of RestorePage
-
select_restore_file_page
alias of SelectRestoreFilePage
-
window_title = _('Restore')
importwizard Module
Module for managing imports
-
class camelot.view.wizard.importwizard.CsvCollectionGetter(filename)[source]
Bases: object
Returns data from csv file as a list of RowData objects
-
class camelot.view.wizard.importwizard.DataPreviewCollectionProxy(*args, **kwargs)[source]
Bases: camelot.view.proxy.collection_proxy.CollectionProxy
-
class camelot.view.wizard.importwizard.DataPreviewPage(parent=None, model=None, collection_getter=None)[source]
Bases: PyQt4.QtGui.QWizardPage
DataPreviewPage is the previewing page for the import wizard
-
initializePage()[source]
Gets all info needed from SelectFilePage and feeds table
-
isComplete()[source]
-
update_complete(row=0)[source]
-
validatePage()[source]
-
validate_all_rows()[source]
-
class camelot.view.wizard.importwizard.FinalPage(parent=None, model=None, admin=None)[source]
Bases: camelot.view.wizard.pages.progress_page.ProgressPage
FinalPage is the final page in the import process
-
run()[source]
-
sub_title = _('Please wait while data is being imported.')
-
title = _('Import Progress')
-
class camelot.view.wizard.importwizard.ImportWizard(parent=None, admin=None)[source]
Bases: PyQt4.QtGui.QWizard
ImportWizard provides a two-step wizard for importing data as objects
into Camelot. To create a custom wizard, subclass this ImportWizard and
overwrite its class attributes.
To import a different file format, you probably need a custom
collection_getter for this file type.
-
add_pages(model, admin)[source]
Add all pages to the import wizard, reimplement this method to add
custom pages to the wizard. This method is called in the __init__
method, to add all pages to the wizard.
Parameters: | model – the CollectionProxy that will be used to display the to |
be imported data
:param admin: the admin of the destination data
-
collection_getter
alias of CsvCollectionGetter
-
data_preview_page
alias of DataPreviewPage
-
final_page
alias of FinalPage
-
rowdata_admin_decorator
alias of RowDataAdminDecorator
-
select_file_page
alias of SelectFilePage
-
window_title = u'Import CSV data'
-
class camelot.view.wizard.importwizard.RowData(row_number, row_data)[source]
Bases: object
Class representing the data in a single row of the imported file as an
object with attributes column_1, column_2, ..., each representing the data
in a single column of that row.
since the imported file might contain less columns than expected, the
RowData object returns None for not existing attributes
-
class camelot.view.wizard.importwizard.RowDataAdminDecorator(object_admin)[source]
Bases: object
Decorator that transforms the Admin of the class to be imported to an
Admin of the RowData objects to be used when previewing and validating the
data to be imported.
based on the field attributes of the original mode, it will turn the
background color pink if the data is invalid for being imported.
-
create_validator(model)[source]
Creates a validator that validates the data to be imported, the
validator will check if the background of the cell is pink, and if it
is it will mark that object as invalid.
-
delete(obj)[source]
-
flush(obj)[source]
When flush is called, don’t do anything, since we’ll only save the
object when importing them for real
-
get_columns()[source]
-
get_dynamic_field_attributes(obj, field_names)[source]
-
get_field_attributes(field_name)[source]
-
get_fields()[source]
-
get_static_field_attributes(field_names)[source]
-
new_field_attributes(i, original_field_attributes, original_field)[source]
-
class camelot.view.wizard.importwizard.UTF8Recoder(f, encoding)[source]
Iterator that reads an encoded stream and reencodes the input to
UTF-8.
-
next()[source]
-
class camelot.view.wizard.importwizard.UnicodeReader(f, dialect=<class csv.excel at 0xd0731ac>, encoding='utf-8', **kwds)[source]
A CSV reader which will iterate over lines in the CSV file “f”, which is
encoded in the given encoding.
-
next()[source]
-
class camelot.view.wizard.importwizard.XlsCollectionGetter(filename, encoding='utf-8')[source]
Bases: object
Returns the data from excel file as a list of RowData objects
merge_document Module
Wizard to merge documents with a list of objects.
This wizard is triggered thru an entry in the main menu.
-
class camelot.view.wizard.merge_document.MergeDocumentWizard(parent=None, selection_getter=None)[source]
Bases: PyQt4.QtGui.QWizard
This wizard lets the user select a template file, it then
merges that template will all the selected rows in a table
-
window_title = _('Merge Document')
-
class camelot.view.wizard.merge_document.MergePage(parent, selection_getter)[source]
Bases: camelot.view.wizard.pages.progress_page.ProgressPage
Wait until merge is complete
-
run()[source]
-
title = _('Merge in progress')
-
class camelot.view.wizard.merge_document.SelectTemplatePage(parent=None)[source]
Bases: camelot.view.wizard.pages.select.SelectFilePage
Page to select the template to merge
-
icon = Icon('tango/32x32/mimetypes/x-office-document-template.png')
-
sub_title = _('Click 'Browse' to select a template file, then click 'Next'.')
-
title = _('Merge a template document')
new Module
Wizard and wizard pages to assist in the creation of new objects
-
class camelot.view.wizard.new.NewObjectWizard(parent, admin)[source]
Bases: PyQt4.QtGui.QWizard
-
class camelot.view.wizard.new.SelectSubclassPage(parent, admin)[source]
Bases: PyQt4.QtGui.QWizardPage
Page for a wizard that allows the selection of a subclass
new_company Module
update_value Module
A wizard to update a field on a collection of objects
-
class camelot.view.wizard.update_value.ReplaceContentsData[source]
Bases: object
-
class camelot.view.wizard.update_value.ReplaceContentsPage(parent, collection_getter, data)[source]
Bases: camelot.view.wizard.pages.update_entities_page.UpdateEntitiesPage
-
title = _('Replace field contents')
-
update_entity(obj)[source]
-
class camelot.view.wizard.update_value.SelectValuePage(parent, admin, data)[source]
Bases: PyQt4.QtGui.QWizardPage
Page to select a value to update
-
field_changed(index)[source]
-
set_fields(fields)[source]
-
sub_title = _('Select the field to update and enter its new value')
-
title = _('Replace field contents')
-
value_changed(value_editor=None)[source]
-
class camelot.view.wizard.update_value.UpdateValueWizard(parent=None, selection_getter=None, admin=None)[source]
Bases: PyQt4.QtGui.QWizard
This wizard presents the user with a selection of the possible fields to
update and a new value. Then this field is changed for all objects in a given
collection
-
select_value_page
alias of SelectValuePage
-
window_title = _('Replace')