launcher.main#

Application launcher editor.

Classes:

LauncherItemEditor([data, parent])

Widget used to edit launcher items associated with the current bookmark.

LauncherListContextMenu(index[, parent])

Context menu associated with the ThumbnailEditorWidget.

LauncherListWidget([parent])

Widget used to edit launcher items associated with the current bookmark.

Data:

DEFAULT_ITEM

Default launcher item definition

THUMBNAIL_EDITOR_SIZE

Default launcher item size

class bookmarks.launcher.main.LauncherItemEditor(data=None, parent=None)[source]#

Bases: QDialog

Widget used to edit launcher items associated with the current bookmark.

Methods:

action()

Add item action.

init_data(item)

Initializes the editor.

path_button_clicked()

Button click action.

sizeHint()

Returns a size hint.

thumbnail_button_clicked()

Button click action.

update_thumbnail_image(path)

Updates the item's thumbnail image.

Attributes:

itemAdded(*args, **kwargs)

Signal emitted when a launcher item was added

itemChanged(*args, **kwargs)

Signal emitted when a launcher item changes

action()[source]#

Add item action.

init_data(item)[source]#

Initializes the editor.

path_button_clicked()[source]#

Button click action.

sizeHint()[source]#

Returns a size hint.

thumbnail_button_clicked()[source]#

Button click action.

update_thumbnail_image(path)[source]#

Updates the item’s thumbnail image.

Parameters

path (str) – Path to an image file.

itemAdded(*args, **kwargs)#

Signal emitted when a launcher item was added

itemChanged(*args, **kwargs)#

Signal emitted when a launcher item changes

class bookmarks.launcher.main.LauncherListContextMenu(index, parent=None)[source]#

Bases: BaseContextMenu

Context menu associated with the ThumbnailEditorWidget.

Methods:

setup()

Creates the context menu.

setup()[source]#

Creates the context menu.

class bookmarks.launcher.main.LauncherListWidget(parent=None)[source]#

Bases: ListWidget

Widget used to edit launcher items associated with the current bookmark.

Methods:

add_item(data)

Adds a new launcher item to the editor.

add_new_item()

Add new item action.

contextMenuEvent(event)

Event handler.

data()

Returns launcher item data.

edit_item(item)

Slot used top edit a widget item.

emit_data_change()

Slot connected to the itemAdded signal.

init_data(data)

Initialises the editor.

remove_item(item)

Remove launcher item action.

setValue(v)

Sets the launcher item data.

update_item(item, data)

Update item action.

value()

Returns the launcher item data.

add_item(data)[source]#

Adds a new launcher item to the editor.

add_new_item()[source]#

Add new item action.

contextMenuEvent(event)[source]#

Event handler.

data()[source]#

Returns launcher item data.

edit_item(item)[source]#

Slot used top edit a widget item.

emit_data_change()[source]#

Slot connected to the itemAdded signal.

init_data(data)[source]#

Initialises the editor.

remove_item(item)[source]#

Remove launcher item action.

setValue(v)[source]#

Sets the launcher item data.

update_item(item, data)[source]#

Update item action.

value()[source]#

Returns the launcher item data.

bookmarks.launcher.main.DEFAULT_ITEM = {0: {'button': None, 'description': "Enter the item's name, e.g. Maya", 'key': 'name', 'placeholder': 'Name, e.g. "Maya"', 'widget': <class 'bookmarks.ui.LineEdit'>}, 1: {'button': 'Pick', 'description': 'Path to the executable.', 'key': 'path', 'placeholder': 'Path, e.g. "C:/maya/maya.exe"', 'widget': <class 'bookmarks.ui.LineEdit'>}, 2: {'button': 'Pick', 'description': 'Path to an image file used to represent this item', 'key': 'thumbnail', 'placeholder': 'Path to an image, e.g. "C:/images/maya.png"', 'widget': <class 'bookmarks.ui.LineEdit'>}}#

Default launcher item definition

bookmarks.launcher.main.THUMBNAIL_EDITOR_SIZE = 90#

Default launcher item size