commandSearch.ui.manager module¶
-
class
commandSearch.ui.manager.
ManagerMenu
(parent=None)¶ Bases:
PySide.QtGui.QMenu
Manager Menu
Used to create / edit and delete different pin sets and be able to switch between them, it also features the functionality to refresh the command list.
Parameters: parent (QWidget) – -
aboutToShow_
()¶ Before the menu is shown, the pin set are read, the menu is populated with the read pin set data and the menu is positioned.
-
add
(widget)¶ Add widget to a QWidgetAction and add it to the menu.
Parameters: widget (QWidget) – widget to be added to the menu
-
pinAdd
()¶ Add pin set, store all if the currently pinned commands and store then under the provided pin set name.
Raises: ValueError – if name is invalid or no pins are found
-
pinClear
()¶ Clear all pins and clear set selection.
-
pinDelete
()¶ Delete pin set, check if the provided name exists in the pin sets. If it does remove it from the data set and save.
Raises: ValueError – if name is invalid
-
pinName
¶ Get text from QLineEdit
-
populate
()¶ Populate the menu, clears the menu first, then adds the pins, set manager and finally the command refresh option.
-
populateCommands
()¶ Create command refresh button.
-
populatePins
()¶ Read pin set data and create radio buttons so the user can switch between the different sets available.
-
populateSets
()¶ Create set manager buttons.
-
position
()¶ Position the menu underneath its parent.
-
refresh
()¶ Refresh command list and clear the pin set selection.
-
setActive
()¶ Switch active pin set to checked radio button.
-
staticMetaObject
= <PySide.QtCore.QMetaObject object>¶
-