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. |
Base class: Interface
The IToolkit interface defines the API to be implemented by a toolkit.
Create an action, i.e. an object that implements the IAction interface.
Parameter: | parent – is the optional parent view. |
---|---|
Returns: | the action. |
Create a singleton application, i.e. an object that implements the IApplication interface.
Parameters: |
|
---|---|
Returns: | the application. Repeated calls must return the same application. |
Create an editor that implements the ICheckBox interface.
Parameter: | parent – is the optional parent view. |
---|---|
Returns: | the editor. |
Create an action, i.e. an object that implements the IAction interface, to handle closing an object.
Returns: | the action. |
---|
Create an editor that implements the IComboBox interface.
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. |
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 view that implements the IDialog interface.
Parameter: | parent – is the optional parent view. |
---|---|
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 view that implements the IDock interface..
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 the IFilesystemLocationEditor interface.
Parameter: | parent – is the optional parent view. |
---|---|
Returns: | the editor. |
Find the toolkit view with a particular identifier.
Parameters: |
|
---|---|
Returns: | the toolkit view. An exception will be raised if the view could not be found. |
Create an editor that implements the IFloatSpinBox interface.
Parameter: | parent – is the optional parent view. |
---|---|
Returns: | the editor. |
Create a view that implements the IForm interface.
Parameter: | parent – is the optional parent view. |
---|---|
Returns: | the view. |
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 view that implements the IGrid interface.
Parameter: | parent – is the optional parent view. |
---|---|
Returns: | the view. |
Create a view that implements the IGroupBox interface.
Parameter: | parent – is the optional parent view. |
---|---|
Returns: | the view. |
Create a view that implements the IHBox interface.
Parameter: | parent – is the optional parent view. |
---|---|
Returns: | the view. |
Display a informational message to the user.
Parameters: |
|
---|
Create an editor that implements the ILabel interface.
Parameter: | parent – is the optional parent view. |
---|---|
Returns: | the editor. |
Create an editor that implements the ILineEditor interface.
Parameter: | parent – is the optional parent view. |
---|---|
Returns: | the editor. |
Create an editor that implements the IListEditor interface.
Parameter: | parent – is the optional parent view. |
---|---|
Returns: | the editor. |
Create a view that implements the IMainWindow interface.
Parameter: | parent – is the optional parent view. |
---|---|
Returns: | the view. |
Create a view that implements the IMenu interface.
Parameter: | parent – is the optional parent view. |
---|---|
Returns: | the view. |
Create a view that implements the IMenuBar interface.
Parameter: | parent – is the optional parent view. |
---|---|
Returns: | the view. |
Create a view that implements the IMessageArea interface.
Parameter: | parent – is the optional parent view. |
---|---|
Returns: | the view. |
Create an action, i.e. an object that implements the IAction interface, to handle creating a new object.
Returns: | the action. |
---|
Create an action, i.e. an object that implements the IAction interface, to handle opening an object.
Returns: | the action. |
---|
Create an editor that implements the IOptionList interface.
Parameter: | parent – is the optional parent view. |
---|---|
Returns: | the editor. |
Create an editor that implements the IPushButton interface.
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, i.e. an object that implements the IAction interface, to handle quitting the application.
Returns: | the action. |
---|
Create an editor that implements the IRadioButtons interface.
Parameter: | parent – is the optional parent view. |
---|---|
Returns: | the editor. |
Create an action, i.e. an object that implements the IAction interface, to handle saving an object.
Returns: | the action. |
---|
Create an action, i.e. an object that implements the IAction interface, to handle saving an object under a new name.
Returns: | the action. |
---|
Create an editor that implements the ISpinBox interface.
Parameter: | parent – is the optional parent view. |
---|---|
Returns: | the editor. |
Create a view that implements the ISplitter interface.
Parameter: | parent – is the optional parent view. |
---|---|
Returns: | the view. |
Create an editor that implements the IStorageLocationEditor interface.
Parameter: | parent – is the optional parent view. |
---|---|
Returns: | the editor. |
Create a view that implements the ITabBar interface.
Parameter: | parent – is the optional parent view. |
---|---|
Returns: | the view. |
Create a view that implements the ITabPage interface.
Parameter: | parent – is the optional parent view. |
---|---|
Returns: | the view. |
Create an editor that implements the ITableEditor interface.
Parameter: | parent – is the optional parent view. |
---|---|
Returns: | the editor. |
Create an editor that implements the ITextEditor interface.
Parameter: | parent – is the optional parent view. |
---|---|
Returns: | the editor. |
Create an editor that implements the IToolButton interface.
Parameter: | parent – is the optional parent view. |
---|---|
Returns: | the editor. |
Create a view that implements the IVBox interface.
Parameter: | parent – is the optional parent view. |
---|---|
Returns: | the layout. |
Create a view that implements the IViewStack interface.
Parameter: | parent – is the optional parent view. |
---|---|
Returns: | the layout. |
Display a warning message to the user.
Parameters: |
|
---|
Create an action, i.e. an object that implements the IAction interface, to handle “What’s This?”.
Returns: | the action. |
---|
Create a view that implements the IWizard interface.
Parameter: | parent – is the optional parent view. |
---|---|
Returns: | the view. |
Create a view that implements the IWizardPage interface.
Parameter: | parent – is the optional parent view. |
---|---|
Returns: | the view. |