def __init_menu_help(self): """ Initialize the 'Help' menu. """ #### ABOUT SUBMENU ENTRY about = QAction('About', self.parent()) about.setStatusTip('Display information about B3') about.triggered.connect(self.parent().show_about) #### B3 DONATION SUBMENU ENTRY donate = QAction('Donate to B3', self.parent()) donate.setStatusTip('Donate to the BigBrotherBot project') donate.setIcon(QIcon(ICON_PAYPAL)) donate.triggered.connect(lambda: webbrowser.open(B3_DONATE)) #### XLRSTATS WEBTOOL xlrstats = QAction('XLRstats webtool', self.parent()) xlrstats.setStatusTip('Visit the XLRstats webtool homepage') xlrstats.setIcon(QIcon(ICON_XLRSTATS)) xlrstats.triggered.connect(lambda: webbrowser.open(B3_XLRSTATS)) #### B3 WIKI SUBMENU ENTRY wiki = QAction('B3 Wiki', self.parent()) wiki.setStatusTip('Visit the B3 documentation wiki') wiki.triggered.connect(lambda: webbrowser.open(B3_WIKI)) #### B3 CONFIG GENERATOR SUBMENU ENTRY code = QAction('B3 Code Reference', self.parent()) code.setStatusTip('Open the B3 code reference') code.triggered.connect(lambda: webbrowser.open(B3_DOCUMENTATION)) #### B3 CONFIG GENERATOR SUBMENU ENTRY config = QAction('B3 Configuration File Generator', self.parent()) config.setStatusTip( 'Open the B3 configuration file generator web tool') config.triggered.connect(lambda: webbrowser.open(B3_CONFIG_GENERATOR)) #### B3 FORUM LINK SUBMENU ENTRY forum = QAction('B3 Forum', self.parent()) forum.setStatusTip('Visit the B3 forums to request support') forum.triggered.connect(lambda: webbrowser.open(B3_FORUM)) #### B3 HOMEPAGE LINK SUBMENU ENTRY website = QAction('B3 Website', self.parent()) website.setStatusTip('Visit the B3 website') website.triggered.connect(lambda: webbrowser.open(B3_WEBSITE)) ## HELP MENU ENTRY help_menu = self.addMenu('&Help') help_menu.addAction(about) if b3.getPlatform() != 'darwin': help_menu.addSeparator() help_menu.addAction(donate) help_menu.addAction(xlrstats) help_menu.addSeparator() help_menu.addAction(code) help_menu.addAction(config) help_menu.addAction(forum) help_menu.addAction(website) help_menu.addAction(wiki)
def __init_menu_help(self): """ Initialize the 'Help' menu. """ #### ABOUT SUBMENU ENTRY about = QAction('About', self.parent()) about.setStatusTip('Display information about B3') about.triggered.connect(self.parent().show_about) #### B3 DONATION SUBMENU ENTRY donate = QAction('Donate to B3', self.parent()) donate.setStatusTip('Donate to the BigBrotherBot project') donate.setIcon(QIcon(ICON_PAYPAL)) donate.triggered.connect(lambda: webbrowser.open(B3_DONATE)) #### XLRSTATS WEBTOOL xlrstats = QAction('XLRstats webtool', self.parent()) xlrstats.setStatusTip('Visit the XLRstats webtool homepage') xlrstats.setIcon(QIcon(ICON_XLRSTATS)) xlrstats.triggered.connect(lambda: webbrowser.open(B3_XLRSTATS)) #### B3 WIKI SUBMENU ENTRY wiki = QAction('B3 Wiki', self.parent()) wiki.setStatusTip('Visit the B3 documentation wiki') wiki.triggered.connect(lambda: webbrowser.open(B3_WIKI)) #### B3 CONFIG GENERATOR SUBMENU ENTRY code = QAction('B3 Code Reference', self.parent()) code.setStatusTip('Open the B3 code reference') code.triggered.connect(lambda: webbrowser.open(B3_DOCUMENTATION)) #### B3 CONFIG GENERATOR SUBMENU ENTRY config = QAction('B3 Configuration File Generator', self.parent()) config.setStatusTip('Open the B3 configuration file generator web tool') config.triggered.connect(lambda: webbrowser.open(B3_CONFIG_GENERATOR)) #### B3 FORUM LINK SUBMENU ENTRY forum = QAction('B3 Forum', self.parent()) forum.setStatusTip('Visit the B3 forums to request support') forum.triggered.connect(lambda: webbrowser.open(B3_FORUM)) #### B3 HOMEPAGE LINK SUBMENU ENTRY website = QAction('B3 Website', self.parent()) website.setStatusTip('Visit the B3 website') website.triggered.connect(lambda: webbrowser.open(B3_WEBSITE)) ## HELP MENU ENTRY help_menu = self.addMenu('&Help') help_menu.addAction(about) if b3.getPlatform() != 'darwin': help_menu.addSeparator() help_menu.addAction(donate) help_menu.addAction(xlrstats) help_menu.addSeparator() help_menu.addAction(code) help_menu.addAction(config) help_menu.addAction(forum) help_menu.addAction(website) help_menu.addAction(wiki)
def __init_menu_tools(self): """ Initialize the 'Tools' menu. """ #### UPDATE CHECK SUBMENU ENTRY update_check = QAction('Check Update', self.parent()) update_check.setStatusTip( 'Check if a newer version of B3 is available') update_check.setIcon(QIcon(ICON_UPDATE)) update_check.triggered.connect(self.parent().check_update) #### B3 PLUGIN DIRECTORY SUBMENU ENTRY plugin_directory = QAction('Plugins Directory', self.parent()) plugin_directory.setStatusTip('Open the 3rd party plugins directory') plugin_directory.setIcon(QIcon(ICON_PLUGINS)) plugin_directory.triggered.connect( self.parent().open_extplugins_directory) #### B3 PLUGIN ARCHIVE SUBMENU ENTRY plugin_repository = QAction('Plugins Repository', self.parent()) plugin_repository.setStatusTip('Browse all the available B3 plugins') plugin_repository.setIcon(QIcon(ICON_PLUGINS)) plugin_repository.triggered.connect( lambda: webbrowser.open(B3_PLUGIN_REPOSITORY)) #### UPDATE B3 DATABASE ENTRY update_database = QAction('Update B3 Database', self.parent()) update_database.setStatusTip( 'Update all your B3 databases to the latest version') update_database.setIcon(QIcon(ICON_DATABASE)) update_database.triggered.connect(self.parent().update_database) #### PREFERENCES preferences = QAction('Preferences...', self.parent()) preferences.setStatusTip('Open the B3 preferences panel') preferences.setIcon(QIcon(ICON_SETTINGS)) preferences.triggered.connect(self.parent().open_preferences) ## TOOLS MENU ENTRY tools_menu = self.addMenu('&Tools') tools_menu.addAction(preferences) if b3.getPlatform() != 'darwin': tools_menu.addSeparator() tools_menu.addAction(update_check) tools_menu.addAction(update_database) tools_menu.addSeparator() tools_menu.addAction(plugin_directory) tools_menu.addAction(plugin_repository)
def __init_menu_tools(self): """ Initialize the 'Tools' menu. """ #### UPDATE CHECK SUBMENU ENTRY update_check = QAction('Check Update', self.parent()) update_check.setStatusTip('Check if a newer version of B3 is available') update_check.setIcon(QIcon(ICON_UPDATE)) update_check.triggered.connect(self.parent().check_update) #### B3 PLUGIN DIRECTORY SUBMENU ENTRY plugin_directory = QAction('Plugins Directory', self.parent()) plugin_directory.setStatusTip('Open the 3rd party plugins directory') plugin_directory.setIcon(QIcon(ICON_PLUGINS)) plugin_directory.triggered.connect(self.parent().open_extplugins_directory) #### B3 PLUGIN ARCHIVE SUBMENU ENTRY plugin_repository = QAction('Plugins Repository', self.parent()) plugin_repository.setStatusTip('Browse all the available B3 plugins') plugin_repository.setIcon(QIcon(ICON_PLUGINS)) plugin_repository.triggered.connect(lambda: webbrowser.open(B3_PLUGIN_REPOSITORY)) #### UPDATE B3 DATABASE ENTRY update_database = QAction('Update B3 Database', self.parent()) update_database.setStatusTip('Update all your B3 databases to the latest version') update_database.setIcon(QIcon(ICON_DATABASE)) update_database.triggered.connect(self.parent().update_database) #### PREFERENCES preferences = QAction('Preferences...', self.parent()) preferences.setStatusTip('Open the B3 preferences panel') preferences.setIcon(QIcon(ICON_SETTINGS)) preferences.triggered.connect(self.parent().open_preferences) ## TOOLS MENU ENTRY tools_menu = self.addMenu('&Tools') tools_menu.addAction(preferences) if b3.getPlatform() != 'darwin': tools_menu.addSeparator() tools_menu.addAction(update_check) tools_menu.addAction(update_database) tools_menu.addSeparator() tools_menu.addAction(plugin_directory) tools_menu.addAction(plugin_repository)