Pop up a list of fields from an object a user can change. When the user selects a field, an appropriate widget is shown to change the value of that field.
Parameters: |
|
---|
This action step returns a tuple with the name of the selected field, and its new value.
create the dialog. this method is used to unit test the action step.
Pop up a form for the user to change an object
Parameters: |
|
---|
Use this method to get access to the object to change in unit tests
Returns: | the object to change |
---|
create the dialog. this method is used to unit test the action step.
Pop up a list for the user to change objects
Parameters: |
|
---|
This action step can be customised using these attributes :
the window title of the dialog shown
the title of the dialog shown
the subtitle of the dialog shown
the camelot.view.art.Icon in the top right corner of the dialog
Use this method to get access to the objects to change in unit tests
Returns: | the object to change |
---|
create the dialog. this method is used to unit test the action step.
Close the view that triggered the action, if such a view is available.
Parameters: | accept – a boolean indicating if the view’s widget should accept the close event. This defaults to True, when this is set to False, the view will trigger it’s corresponding close action instead of accepting the close event. The close action might involve validating if the view can be closed, or requesting confirmation from the user. |
---|
Inform the GUI that obj was created.
Parameters: | obj – the object that was created |
---|
Inform the GUI that obj is going to be deleted.
Parameters: | obj – the object that is going to be deleted |
---|
Display a rich text editor to edit a text document.
Parameters: | document – a QtGui.QTextDocument object. |
---|
When this action step is constructed, the thread affinity of the document is changed to be the gui thread. when the editing of the document is finished, the affinity is returned to the current thread. There is no Cancel button on the dialog because the document is changed when the user is editing it, and this cannot be undone.
This action step can be customised using these attributes :
the window title of the dialog shown
the title of the dialog shown
the subtitle of the dialog shown
create the text edit dialog. this method is used to unit test the action step.
Flushes the session and informs the GUI about the changes.
Parameters: |
|
---|
Popup a QtGui.QMessageBox and send it result back. The arguments of this action are the same as those of the QtGui.QMessageBox constructor.
Parameters: |
|
---|
When the Cancel button is pressed, this action step will raise a CancelException
create the message box. this method is used to unit test the action step.
Open a file with the preferred application from the user. The absolute path is preferred, as this is most likely to work when running from an egg and in all kinds of setups.
Parameters: | file_name – the absolute path to the file to open |
---|
The yield statement will return True if the file was opend successfull.
Create a temporary filename that can be used to write to, and open later on.
Parameters: | suffix – the suffix of the file to create |
---|---|
Returns: | the filename of the temporary file |
Returns: | the path to the file that will be opened, use this method |
---|
to verify the content of the file in unit tests
Open the form view for a list of objects, in a non blocking way :param objects: the list of objects to display in the form view :param admin: the admin class to use to display the form
Render a jinja template into a temporary file and open that file with the prefered application of the user.
Parameters: |
|
---|
Write a stream to a temporary file and open that file with the preferred application of the user.
Parameters: |
|
---|
Write a string to a temporary file and open that file with the preferred application of the user.
Parameters: |
|
---|
Display a print preview dialog box for a matplotlib chart.
Parameters: | chart – a camelot.container.chartcontainer.FigureContainer object or a camelot.container.chartcontainer.AxesContainer subclass |
---|
Example use of this action step :
Display a print preview dialog box for an html string.
Parameters: | html – a string containing the html to render in the print preview. |
---|
the rendering of the html can be customised using the same attributes as those of the PrintPreview class.
Render a jinja template into a print preview dialog.
Parameters: |
|
---|
Display a print preview dialog box.
Parameters: | document – an instance of QtGui.QTextDocument or QtWebKit.QWebView that has a print_() method. The thread affinity of this object will be changed to be able to use it in the GUI. |
---|
the print preview can be customised using these attributes :
change the left margin of the content to the page border, unit is set by margin_unit
change the top margin of the content to the page border, unit is set by margin_unit
change the right margin of the content to the page border, unit is set by margin_unit
change the bottom margin of the content to the page border, unit is set by margin_unit
defin which unit is used for the defined margins (e.g. margin_left, margin_bottom)
the page size, by default QtGui.QPrinter.A4 is used
the page orientation, by default QtGui.QPrinter.Portrait is used.
the QtGui.QTextDocument holding the document that will be shown in the print preview
create the print preview widget. this method is used to unit test the action step.
Refresh all the open screens on the desktop, this will reload queries from the database
Select one or more files to open or to process.
Parameters: | file_name_filter – Filter on the names of the files that can be selected, such as ‘All files (*)’. See QtGui.QFileDialog for more documentation. |
---|
defaults to True, set to False if selection of multiple files is allowed
defaults to True, set to False if non existing files are allowed (to save something)
The yield statement of SelectFile returns a list of selected file names. This list has only one element when single is set to True. Raises a camelot.core.exception.CancelRequest when no file was selected.
This action step stores its last location into the QtCore.QSettings and uses it as the initial location the next time it is invoked.
create the file dialog widget. this method is used to unit test the action step.
Parameters: | directory – the directory in which to open the dialog, None to use the default |
---|
Select an object from a list
Parameters: | admin – a camelot.admin.object_admin.ObjectAdmin object |
---|
Show a full screen chart.
Parameters: | chart – a camelot.container.chartcontainer.FigureContainer or camelot.container.chartcontainer.AxesContainer |
---|
Show a full screen pixmap
Parameters: | pixmap – a camelot.view.art.Pixmap object |
---|
Inform the GUI that obj has changed.
Parameters: | obj – the object that has changed |
---|
Inform the user about the progress the application is making while executing an action. This ActionStep is not blocking. So it can be used inside transactions and will result in a minimum of delay when yielded. Each time an object is yielded, the progress dialog will be updated.
Parameters: |
|
---|
This method will update the progress dialog, if such dialog exists within the GuiContext
Parameters: | gui_context – a camelot.admin.action.GuiContext instance |
---|
Render a jinja template into a temporary file and open that file with microsoft word through the use of COM objects.
Parameters: |
|
---|