eric7.TrayStarter.TrayStarterTypes

Module implementing data classes for the various tray starter menu items.

Global Attributes

None

Classes

TrayStarterAction Class defining a tray starter action.
TrayStarterMenu Class defining a tray starter menu.
TrayStarterSeparator Class defining a tray starter menu separator.

Functions

None


TrayStarterAction

Class defining a tray starter action.

Derived from

None

Class Attributes

add_it
command
icon
name
text
typ

Class Methods

fromDict Class method to create an action instance from a given action dictionary.
fromJSON Class method to create an action instance given a JSON string.

Methods

toDict Public method to convert the action to a dictionary.
toJSON Public method to convert the action to a JSON string.

Static Methods

None

TrayStarterAction.fromDict (class method)

fromDict(data)

Class method to create an action instance from a given action dictionary.

data (dict)
dictionary containing the action data
Return:
instantiated action object
Return Type:
TrayStarterAction

TrayStarterAction.fromJSON (class method)

fromJSON(jsonStr)

Class method to create an action instance given a JSON string.

jsonStr (str)
JSON string containing the encoded action data
Return:
action instance
Return Type:
TrayStarterAction

TrayStarterAction.toDict

toDict()

Public method to convert the action to a dictionary.

Return:
dictionary with key "typ" containing the action data
Return Type:
dict[str, Any]

TrayStarterAction.toJSON

toJSON()

Public method to convert the action to a JSON string.

Return:
string containing the JSON encoded action data
Return Type:
str
Up


TrayStarterMenu

Class defining a tray starter menu.

Derived from

None

Class Attributes

add_it
icon
items
name
title
typ

Class Methods

fromDict Class method to create a menu instance from a given menu dictionary.
fromJSON Class method to create a menu instance given a JSON string.

Methods

toDict Public method to convert the menu to a dictionary.
toJSON Public method to convert the menu to a JSON string.

Static Methods

None

TrayStarterMenu.fromDict (class method)

fromDict(data)

Class method to create a menu instance from a given menu dictionary.

data (dict)
dictionary containing the menu data
Return:
instantiated menu object
Return Type:
TrayStarterMenu

TrayStarterMenu.fromJSON (class method)

fromJSON(jsonStr)

Class method to create a menu instance given a JSON string.

jsonStr (str)
JSON string containing the encoded menu data
Return:
menu instance
Return Type:
TrayStarterMenu

TrayStarterMenu.toDict

toDict()

Public method to convert the menu to a dictionary.

Return:
dictionary with key "typ" containing the menu data
Return Type:
dict[str, Any]

TrayStarterMenu.toJSON

toJSON()

Public method to convert the menu to a JSON string.

Return:
string containing the JSON encoded menu data
Return Type:
str
Up


TrayStarterSeparator

Class defining a tray starter menu separator.

Derived from

None

Class Attributes

typ

Class Methods

fromDict Class method to create a separator instance from a given separator dictionary.
fromJSON Class method to create a separator instance given a JSON string.

Methods

toDict Public method to convert the separator to a dictionary.
toJSON Public method to convert the separator to a JSON string.

Static Methods

None

TrayStarterSeparator.fromDict (class method)

fromDict(_data)

Class method to create a separator instance from a given separator dictionary.

_data (dict)
dictionary containing the separator data
Return:
instantiated separator object
Return Type:
TrayStarterSeparator

TrayStarterSeparator.fromJSON (class method)

fromJSON(jsonStr)

Class method to create a separator instance given a JSON string.

jsonStr (str)
JSON string containing the encoded separator data
Return:
separator instance
Return Type:
TrayStarterSeparator

TrayStarterSeparator.toDict

toDict()

Public method to convert the separator to a dictionary.

Return:
dictionary with key "typ" containing the separator data
Return Type:
dict[str, Any]

TrayStarterSeparator.toJSON

toJSON()

Public method to convert the separator to a JSON string.

Return:
string containing the JSON encoded separator data
Return Type:
str
Up