The dip.toolkits module contains the toolkits included with dip. The default toolkit uses PyQt4.
Base class: Model
The BaseToolkit class is a base class for toolkits that implements the default mapping of dip.model types to the editors used to handle them.
Get an EditorFactory sub-class that will create a factory that will create an editor to handle attributes of a particular type.
Parameter: | attribute_type – is the type of the attribute. |
---|---|
Returns: | the EditorFactory sub-class. |
Get a callable that will create a editor to handle attributes of a particular type.
Parameter: | attribute_type – is the type of the attribute. |
---|---|
Returns: | the callable. |
Get the factory that will create an object that is adapted to a particular interface.
Parameter: | interface – is the interface. |
---|---|
Returns: | a callable that will accept a single argument that is an optional parent view and will return an object that is adapted to a sub-class of the IObject interface. |
Base class: Interface
The IToolkit interface defines the API to be implemented by a toolkit.
Create an action.
Parameter: | parent – is the optional parent view. |
---|---|
Returns: | the action. |
Create a singleton application.
Parameters: |
|
---|---|
Returns: | the application. Repeated calls must return the same application. |
Call a callable after a delay.
Parameters: |
|
---|
Create an editor based on a check box.
Parameter: | parent – is the optional parent view. |
---|---|
Returns: | the editor. |
Create an action to handle closing an object.
Returns: | the action. |
---|
Create an editor based on a combo box.
Parameter: | parent – is the optional parent view. |
---|---|
Returns: | the editor. |
Get an EditorFactory sub-class that will create a factory that will create an editor to handle attributes of a particular type.
Parameter: | attribute_type – is the type of the attribute. |
---|---|
Returns: | the EditorFactory sub-class. |
Get an EditorFactory sub-class that will create a factory that creates views of a particular type.
Parameter: | view – is the view. |
---|---|
Returns: | the EditorFactory sub-class. |
Load a file containing a user interface design.
Parameter: | ui_file_name – is the name of the file. |
---|---|
Returns: | an opaque object that will be passed to designer_view(). |
Create a view from a previously loaded user interface design.
Parameters: |
|
---|---|
Returns: | the view. |
Create a dialog view.
Parameters: |
|
---|---|
Returns: | the view. |
Return a view that can be displayed as a top-level window.
Parameter: | view – is the view to be displayed. |
---|---|
Returns: | the view, possibly wrapped so that it can be displayed. |
Create a dock view.
Parameter: | parent – is the optional parent view. |
---|---|
Returns: | the view. |
Get a callable that will create a editor to handle attributes of a particular type.
Parameter: | attribute_type – is the type of the attribute. |
---|---|
Returns: | the callable. |
Create an editor that implements a filesystem file/directory location editor.
Parameter: | parent – is the optional parent view. |
---|---|
Returns: | the editor. |
Find the view with a particular identifier.
Parameters: |
|
---|---|
Returns: | the view. An exception will be raised if the view could not be found. |
Create an editor for floats based on a spin box.
Parameter: | parent – is the optional parent view. |
---|---|
Returns: | the editor. |
Create a layout to contain a number of items arranged as a form.
Parameter: | parent – is the optional parent view. |
---|---|
Returns: | the layout. |
Get the name of a file to open from the user.
Parameters: |
|
---|---|
Returns: | the name of the file to open or an empty string if there was none. |
Get the name of a file to save from the user.
Parameters: |
|
---|---|
Returns: | the name of the file to save or an empty string if there was none. |
Create a group box view.
Parameter: | parent – is the optional parent view. |
---|---|
Returns: | the view. |
Create a layout to contain a number of items arranged horizontally.
Parameter: | parent – is the optional parent view. |
---|---|
Returns: | the layout. |
Display a informational message to the user.
Parameters: |
|
---|
Create an editor for displaying a string.
Parameter: | parent – is the optional parent view. |
---|---|
Returns: | the editor. |
Create an editor based on a line editor.
Parameter: | parent – is the optional parent view. |
---|---|
Returns: | the editor. |
Create an editor for a list.
Parameter: | parent – is the optional parent view. |
---|---|
Returns: | the editor. |
Create a main window view.
Parameter: | parent – is the optional parent view. |
---|---|
Returns: | the view. |
Create a menu.
Parameter: | parent – is the optional parent view. |
---|---|
Returns: | the menu. |
Create a menu bar.
Parameter: | parent – is the optional parent view. |
---|---|
Returns: | the menu bar. |
Create a message area.
Parameter: | parent – is the optional parent view. |
---|---|
Returns: | the message area. |
Create an action to handle creating a new object.
Returns: | the action. |
---|
Get the factory that will create an object that is adapted to a particular interface.
Parameter: | interface – is the interface. |
---|---|
Returns: | a callable that will accept a single argument that is an optional parent view and will return an object that is adapted to a sub-class of the IObject interface. |
Create an action to handle opening an object.
Returns: | the action. |
---|
Create an editor used to select from a sequence of options.
Parameter: | parent – is the optional parent view. |
---|---|
Returns: | the editor. |
Create an editor based on a push button.
Parameter: | parent – is the optional parent view. |
---|---|
Returns: | the editor. |
Ask the user a question.
Parameters: |
|
---|---|
Returns: | The button that was pressed. |
Create an action to handle quitting the application.
Returns: | the action. |
---|
Create an editor that implements a set of radio buttons.
Parameter: | parent – is the optional parent view. |
---|---|
Returns: | the editor. |
Create an action to handle saving an object.
Returns: | the action. |
---|
Create an action to handle saving an object under a new name.
Returns: | the action. |
---|
Create an editor based on a spin box.
Parameter: | parent – is the optional parent view. |
---|---|
Returns: | the editor. |
Create a splitter view to contain a number of items.
Parameter: | parent – is the optional parent view. |
---|---|
Returns: | the view. |
Create an editor that implements a storage location editor.
Parameter: | parent – is the optional parent view. |
---|---|
Returns: | the editor. |
Create a tab bar view.
Parameter: | parent – is the optional parent view. |
---|---|
Returns: | the view. |
Create an editor for a table.
Parameter: | parent – is the optional parent view. |
---|---|
Returns: | the editor. |
Create an editor based on a text editor.
Parameter: | parent – is the optional parent view. |
---|---|
Returns: | the editor. |
Create an editor based on a tool button.
Parameter: | parent – is the optional parent view. |
---|---|
Returns: | the editor. |
Create a layout to contain a number of items arranged vertically.
Parameter: | parent – is the optional parent view. |
---|---|
Returns: | the layout. |
Create a layout to contain a stack of items such that only one is visible at a time.
Parameter: | parent – is the optional parent view. |
---|---|
Returns: | the layout. |
Display a warning message to the user.
Parameters: |
|
---|
Create an action to handle “What’s This?”.
Returns: | the action. |
---|
Create a wizard view.
Parameter: | parent – is the optional parent view. |
---|---|
Returns: | the view. |
Create a wizard page view.
Parameter: | parent – is the optional parent view. |
---|---|
Returns: | the view. |