launcher.main#
Application launcher editor.
Classes:
|
Widget used to edit launcher items associated with the current bookmark. |
|
Context menu associated with the ThumbnailEditorWidget. |
|
Widget used to edit launcher items associated with the current bookmark. |
Data:
Default launcher item definition |
|
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.
Button click action.
sizeHint
()Returns a size hint.
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
- 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.
- 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 action.
contextMenuEvent
(event)Event handler.
data
()Returns launcher item data.
edit_item
(item)Slot used top edit a widget item.
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.
- 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