parameters: (self, parent)
docstring: Setup the actions for the Options menu. The actions are handled by the parent widget
docstring_summary: Setup the actions for the Options menu. The actions are handled by the parent widget
docstring_tokens: Setup the actions for the Options menu . The actions are handled by the parent widget
function: def setup_options_actions(self, parent):
          """
          Setup the actions for the Options menu. The actions are handled by the parent widget
          """
          container_widget = QWidget(self)
          layout = QHBoxLayout(container_widget)
          layout.setContentsMargins(0, 0, 0, 0)
          layout.setSpacing(0)
          container_widget.setLayout(layout)
          self.setCornerWidget(container_widget, Qt.TopRightCorner)
  
          run_button = QPushButton(container_widget)
          run_button.setObjectName(self.RUN_BUTTON_OBJECT_NAME)
          run_button.setIcon(get_icon("mdi.play", PLAY_BUTTON_GREEN_COLOR, 1.6))
          run_button.clicked.connect(parent.execute_current_async)
          layout.addWidget(run_button)
  
          abort_button = QPushButton(container_widget)
          abort_button.setObjectName(self.ABORT_BUTTON_OBJECT_NAME)
          abort_button.setIcon(get_icon("mdi.square", ABORT_BUTTON_RED_COLOR, 1.1))
          abort_button.clicked.connect(parent.abort_current)
          layout.addWidget(abort_button)
  
          options_button = QPushButton(container_widget)
          options_button.setObjectName(self.OPTIONS_BUTTON_OBJECT_NAME)
          options_button.setSizePolicy(QSizePolicy.Maximum, QSizePolicy.Maximum)
          options_button.setText("Options")
  
          options_menu = QMenu("", self)
          options_button.setMenu(options_menu)
          layout.addWidget(options_button)
  
          self.tabCloseRequested.connect(parent.close_tab)
  
          run_action = create_action(self, "Run", on_triggered=parent.execute_current_async,
                                     shortcut=("Ctrl+Enter", "Ctrl+Return"),
                                     shortcut_context=Qt.ApplicationShortcut,
                                     shortcut_visible_in_context_menu=True)
  
          run_all_action = create_action(self, "Run All", on_triggered=parent.execute_async,
                                         shortcut=("Ctrl+Shift+Enter", "Ctrl+Shift+Return"),
                                         shortcut_context=Qt.ApplicationShortcut,
                                         shortcut_visible_in_context_menu=True)
  
          abort_action = create_action(self, "Abort", on_triggered=parent.abort_current, shortcut="Ctrl+D",
                                       shortcut_context=Qt.ApplicationShortcut, shortcut_visible_in_context_menu=True)
  
          # menu action to toggle the find/replace dialog
          toggle_find_replace = create_action(self, 'Find/Replace...', on_triggered=parent.toggle_find_replace_dialog,
                                              shortcut='Ctrl+F', shortcut_visible_in_context_menu=True)
  
          toggle_comment_action = create_action(self, "Comment/Uncomment", on_triggered=parent.toggle_comment_current,
                                                shortcut="Ctrl+/", shortcut_context=Qt.ApplicationShortcut,
                                                shortcut_visible_in_context_menu=True)
  
          tabs_to_spaces_action = create_action(self, 'Tabs to Spaces', on_triggered=parent.tabs_to_spaces_current,
                                                shortcut_visible_in_context_menu=True)
  
          spaces_to_tabs_action = create_action(self, 'Spaces to Tabs', on_triggered=parent.spaces_to_tabs_current,
                                                shortcut_visible_in_context_menu=True)
  
          toggle_whitespace_action = create_action(self, 'Toggle Whitespace Visible',
                                                   on_triggered=parent.toggle_whitespace_visible_all,
                                                   shortcut_visible_in_context_menu=True)
  
          # Store actions for adding to menu bar; None will add a separator
          editor_actions = [run_action,
                            run_all_action,
                            abort_action,
                            None,
                            toggle_find_replace,
                            None,
                            toggle_comment_action,
                            toggle_whitespace_action,
                            None,
                            tabs_to_spaces_action,
                            spaces_to_tabs_action]
  
          add_actions(options_menu, editor_actions)
function_tokens: def setup_options_actions ( self , parent ) : container_widget = QWidget ( self ) layout = QHBoxLayout ( container_widget ) layout . setContentsMargins ( 0 , 0 , 0 , 0 ) layout . setSpacing ( 0 ) container_widget . setLayout ( layout ) self . setCornerWidget ( container_widget , Qt . TopRightCorner ) run_button = QPushButton ( container_widget ) run_button . setObjectName ( self . RUN_BUTTON_OBJECT_NAME ) run_button . setIcon ( get_icon ( "mdi.play" , PLAY_BUTTON_GREEN_COLOR , 1.6 ) ) run_button . clicked . connect ( parent . execute_current_async ) layout . addWidget ( run_button ) abort_button = QPushButton ( container_widget ) abort_button . setObjectName ( self . ABORT_BUTTON_OBJECT_NAME ) abort_button . setIcon ( get_icon ( "mdi.square" , ABORT_BUTTON_RED_COLOR , 1.1 ) ) abort_button . clicked . connect ( parent . abort_current ) layout . addWidget ( abort_button ) options_button = QPushButton ( container_widget ) options_button . setObjectName ( self . OPTIONS_BUTTON_OBJECT_NAME ) options_button . setSizePolicy ( QSizePolicy . Maximum , QSizePolicy . Maximum ) options_button . setText ( "Options" ) options_menu = QMenu ( "" , self ) options_button . setMenu ( options_menu ) layout . addWidget ( options_button ) self . tabCloseRequested . connect ( parent . close_tab ) run_action = create_action ( self , "Run" , on_triggered = parent . execute_current_async , shortcut = ( "Ctrl+Enter" , "Ctrl+Return" ) , shortcut_context = Qt . ApplicationShortcut , shortcut_visible_in_context_menu = True ) run_all_action = create_action ( self , "Run All" , on_triggered = parent . execute_async , shortcut = ( "Ctrl+Shift+Enter" , "Ctrl+Shift+Return" ) , shortcut_context = Qt . ApplicationShortcut , shortcut_visible_in_context_menu = True ) abort_action = create_action ( self , "Abort" , on_triggered = parent . abort_current , shortcut = "Ctrl+D" , shortcut_context = Qt . ApplicationShortcut , shortcut_visible_in_context_menu = True ) # menu action to toggle the find/replace dialog toggle_find_replace = create_action ( self , 'Find/Replace...' , on_triggered = parent . toggle_find_replace_dialog , shortcut = 'Ctrl+F' , shortcut_visible_in_context_menu = True ) toggle_comment_action = create_action ( self , "Comment/Uncomment" , on_triggered = parent . toggle_comment_current , shortcut = "Ctrl+/" , shortcut_context = Qt . ApplicationShortcut , shortcut_visible_in_context_menu = True ) tabs_to_spaces_action = create_action ( self , 'Tabs to Spaces' , on_triggered = parent . tabs_to_spaces_current , shortcut_visible_in_context_menu = True ) spaces_to_tabs_action = create_action ( self , 'Spaces to Tabs' , on_triggered = parent . spaces_to_tabs_current , shortcut_visible_in_context_menu = True ) toggle_whitespace_action = create_action ( self , 'Toggle Whitespace Visible' , on_triggered = parent . toggle_whitespace_visible_all , shortcut_visible_in_context_menu = True ) # Store actions for adding to menu bar; None will add a separator editor_actions = [ run_action , run_all_action , abort_action , None , toggle_find_replace , None , toggle_comment_action , toggle_whitespace_action , None , tabs_to_spaces_action , spaces_to_tabs_action ] add_actions ( options_menu , editor_actions )