当前位置: 首页>>代码示例>>Python>>正文


Python ui_tools.install_shortcuts函数代码示例

本文整理汇总了Python中ninja_ide.tools.ui_tools.install_shortcuts函数的典型用法代码示例。如果您正苦于以下问题:Python install_shortcuts函数的具体用法?Python install_shortcuts怎么用?Python install_shortcuts使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


在下文中一共展示了install_shortcuts函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: install

    def install(self):
        ide = IDE.get_service('ide')
        ide.place_me_on("explorer_container", self, "lateral")
        #Searching the Preferences
        self.tree_projects = None
        self._treeSymbols = None
        if settings.SHOW_SYMBOLS_LIST:
            self.add_tab_symbols()
        self._inspector = None
        if settings.SHOW_WEB_INSPECTOR and settings.WEBINSPECTOR_SUPPORTED:
            self.add_tab_inspector()
        self._listErrors = None
        if settings.SHOW_ERRORS_LIST:
            self.add_tab_errors()
        self._listMigration = None
        if settings.SHOW_MIGRATION_LIST:
            self.add_tab_migration()

        if self.count() == 0:
            central_container = IDE.get_service("central_container")
            central_container.change_explorer_visibility(force_hide=True)
        ui_tools.install_shortcuts(self, actions.ACTIONS, ide)
        for each_tab in self.__tabs:
            if hasattr(each_tab, "install"):
                each_tab.install()
开发者ID:Zekom,项目名称:ninja-ide,代码行数:25,代码来源:explorer_container.py

示例2: install

    def install(self):
        """Install StatusBar as a service."""
        self.hide()
        ide = IDE.get_service('ide')
        ide.setStatusBar(self)

        ui_tools.install_shortcuts(self, actions.ACTIONS_STATUS, ide)
开发者ID:JuloWaks,项目名称:ninja-ide,代码行数:7,代码来源:status_bar.py

示例3: install

    def install(self):
        """Install StatusBar as a service."""
        self.hide()
        ide = IDE.get_service('ide')
        self._codeLocator = locator_widget.LocatorWidget(ide)

        ui_tools.install_shortcuts(self, actions.ACTIONS_STATUS, ide)
开发者ID:CleiverC,项目名称:ninja-ide,代码行数:7,代码来源:status_bar.py

示例4: install

    def install(self):
        ide = IDE.get_service('ide')
        ide.place_me_on("explorer_container", self, "lateral")

        for tabname, obj, icon in self.__TABS:
            self.add_tab(tabname, obj, icon)

        if self.count() == 0:
            self.hide()
        ui_tools.install_shortcuts(self, actions.ACTIONS, ide)
开发者ID:WeAreLaVelle,项目名称:ninja-ide,代码行数:10,代码来源:explorer_container.py

示例5: install

    def install(self):
        ide = IDE.get_service('ide')
        ide.place_me_on("main_container", self, "central", top=True)

        self.combo_area = combo_editor.ComboEditor(original=True)
        self.splitter.addWidget(self.combo_area)
        self.stack.addWidget(self.splitter)

        self.current_widget = self.combo_area

        ui_tools.install_shortcuts(self, actions.ACTIONS, ide)
开发者ID:cags84,项目名称:ninja-ide,代码行数:11,代码来源:main_container.py

示例6: install

    def install(self):
        ide = IDE.getInstance()
        ide.place_me_on("main_container", self, "central", top=True)

        self.combo_area = combo_editor.ComboEditor(original=True)
        self.combo_area.allFilesClosed.connect(self._files_closed)
        self.splitter.add_widget(self.combo_area)
        self.add_widget(self.splitter)

        self.current_widget = self.combo_area

        ui_tools.install_shortcuts(self, actions.ACTIONS, ide)
开发者ID:Salmista-94,项目名称:Ninja_3.0_PyQt5,代码行数:12,代码来源:main_container.py

示例7: install

    def install(self):
        """Install triggered by the ide."""
        self.setup_ui()
        ninjaide = IDE.get_service('ide')
        ninjaide.place_me_on("tools_dock", self, "central")
        ui_tools.install_shortcuts(self, actions.ACTIONS, ninjaide)

        self.connect(ninjaide, SIGNAL("goingDown()"), self.save_configuration)

        qsettings = IDE.ninja_settings()
        value = qsettings.value("tools_dock/visible", True, type=bool)
        self.setVisible(value)
开发者ID:JuloWaks,项目名称:ninja-ide,代码行数:12,代码来源:tools_dock.py

示例8: install

 def install(self):
     self._load_ui()
     ninjaide = IDE.get_service("ide")
     ninjaide.place_me_on("tools_dock", self, "central")
     ui_tools.install_shortcuts(self, actions.ACTIONS, ninjaide)
     ninjaide.goingDown.connect(self._save_settings)
     ninja_settings = IDE.ninja_settings()
     index = int(ninja_settings.value("tools_dock/widgetVisible", -1))
     if index == -1:
         self.hide()
     else:
         self._show(index)
开发者ID:ninja-ide,项目名称:ninja-ide,代码行数:12,代码来源:tools_dock.py

示例9: install

    def install(self):
        ide = IDE.get_service("ide")
        ide.place_me_on("main_container", self, "central", top=True)

        self.combo_area = combo_editor.ComboEditor(original=True)
        self.connect(self.combo_area, SIGNAL("allFilesClosed()"), self._files_closed)
        self.connect(self.combo_area, SIGNAL("showComboSelector()"), self.change_tab)
        self.splitter.add_widget(self.combo_area)
        self.add_widget(self.splitter)

        self.current_widget = self.combo_area

        ui_tools.install_shortcuts(self, actions.ACTIONS, ide)
开发者ID:namhai,项目名称:ninja-ide,代码行数:13,代码来源:main_container.py

示例10: install

    def install(self):
        ide = IDE.get_service('ide')
        ide.place_me_on("main_container", self, "central", top=True)

        self.combo_area = combo_editor.ComboEditor(original=True)
        self.combo_area.allFilesClosed.connect(self._files_closed)
        # self.combo_area.allFilesClosed.connect(self._files_closed)
        self.splitter.add_widget(self.combo_area)
        self.add_widget(self.splitter)

        self.current_widget = self.combo_area
        # Code Locator
        self._code_locator = locator_widget.LocatorWidget(ide)

        ui_tools.install_shortcuts(self, actions.ACTIONS, ide)
开发者ID:ninja-ide,项目名称:ninja-ide,代码行数:15,代码来源:__main_container.py

示例11: install

    def install(self):
        ninjaide = IDE.get_service("ide")
        ninjaide.place_me_on("main_container", self, "central", top=True)

        self.combo_area = combo_editor.ComboEditor(original=True)
        self.combo_area.allFilesClosed.connect(self._files_closed)
        self.combo_area.allFilesClosed.connect(
            lambda: self.allFilesClosed.emit())
        self.combo_area.fileClosed.connect(self._add_to_last_opened)
        self.splitter.add_widget(self.combo_area)
        self.add_widget(self.splitter)
        # self.current_widget = self.combo_area
        # Code Locator
        self._code_locator = locator_widget.LocatorWidget(ninjaide)

        data_settings = IDE.data_settings()
        recent_files = data_settings.value("lastSession/recentFiles")
        if recent_files is not None:
            self.__last_opened_files = recent_files
        ui_tools.install_shortcuts(self, actions.ACTIONS, ninjaide)
开发者ID:ninja-ide,项目名称:ninja-ide,代码行数:20,代码来源:main_container.py

示例12: __init__

    def __init__(self, start_server=False):
        QMainWindow.__init__(self)
        self.setWindowTitle('NINJA-IDE {Ninja-IDE Is Not Just Another IDE}')
        self.setMinimumSize(750, 500)
        QToolTip.setFont(QFont(settings.FONT.family(), 10))
        #Load the size and the position of the main window
        self.load_window_geometry()
        self.__project_to_open = 0

        #Editables
        self.__neditables = {}
        #Filesystem
        self.filesystem = nfilesystem.NVirtualFileSystem()

        #Start server if needed
        self.s_listener = None
        if start_server:
            self.s_listener = QLocalServer()
            self.s_listener.listen("ninja_ide")
            self.connect(self.s_listener, SIGNAL("newConnection()"),
                         self._process_connection)

        #Sessions handler
        self._session = None
        #Opacity
        self.opacity = settings.MAX_OPACITY

        #ToolBar
        self.toolbar = QToolBar(self)
        if settings.IS_MAC_OS:
            self.toolbar.setIconSize(QSize(36, 36))
        else:
            self.toolbar.setIconSize(QSize(24, 24))
        self.toolbar.setToolTip(translations.TR_IDE_TOOLBAR_TOOLTIP)
        self.toolbar.setToolButtonStyle(Qt.ToolButtonIconOnly)
        # Set toggleViewAction text and tooltip
        self.toggleView = self.toolbar.toggleViewAction()
        self.toggleView.setText(translations.TR_TOOLBAR_VISIBILITY)
        self.toggleView.setToolTip(translations.TR_TOOLBAR_VISIBILITY)
        self.addToolBar(settings.TOOLBAR_AREA, self.toolbar)
        if settings.HIDE_TOOLBAR:
            self.toolbar.hide()
        #Notificator
        self.notification = notification.Notification(self)

        #Plugin Manager
        # CHECK ACTIVATE PLUGINS SETTING
        #services = {
            #'editor': plugin_services.MainService(),
            #'toolbar': plugin_services.ToolbarService(self.toolbar),
            ##'menuApp': plugin_services.MenuAppService(self.pluginsMenu),
            #'menuApp': plugin_services.MenuAppService(None),
            #'explorer': plugin_services.ExplorerService(),
            #'misc': plugin_services.MiscContainerService(self.misc)}
        #serviceLocator = plugin_manager.ServiceLocator(services)
        serviceLocator = plugin_manager.ServiceLocator(None)
        self.plugin_manager = plugin_manager.PluginManager(resources.PLUGINS,
                                                           serviceLocator)
        self.plugin_manager.discover()
        #load all plugins!
        self.plugin_manager.load_all()

        #Tray Icon
        self.trayIcon = updates.TrayIconUpdates(self)
        self.connect(self.trayIcon, SIGNAL("closeTrayIcon()"),
                     self._close_tray_icon)
        self.trayIcon.show()

        key = Qt.Key_1
        for i in range(10):
            if settings.IS_MAC_OS:
                short = ui_tools.TabShortcuts(
                    QKeySequence(Qt.CTRL + Qt.ALT + key), self, i)
            else:
                short = ui_tools.TabShortcuts(
                    QKeySequence(Qt.ALT + key), self, i)
            key += 1
            self.connect(short, SIGNAL("activated()"), self._change_tab_index)
        short = ui_tools.TabShortcuts(QKeySequence(Qt.ALT + Qt.Key_0), self, 10)
        self.connect(short, SIGNAL("activated()"), self._change_tab_index)

        # Register menu categories
        IDE.register_bar_category(translations.TR_MENU_FILE, 100)
        IDE.register_bar_category(translations.TR_MENU_EDIT, 110)
        IDE.register_bar_category(translations.TR_MENU_VIEW, 120)
        IDE.register_bar_category(translations.TR_MENU_SOURCE, 130)
        IDE.register_bar_category(translations.TR_MENU_PROJECT, 140)
        IDE.register_bar_category(translations.TR_MENU_EXTENSIONS, 150)
        IDE.register_bar_category(translations.TR_MENU_ABOUT, 160)
        # Register General Menu Items
        ui_tools.install_shortcuts(self, actions.ACTIONS_GENERAL, self)

        self.register_service('ide', self)
        self.register_service('toolbar', self.toolbar)
        #Register signals connections
        connections = (
            {'target': 'main_container',
             'signal_name': 'fileSaved(QString)',
             'slot': self.show_message},
            {'target': 'main_container',
#.........这里部分代码省略.........
开发者ID:LeoYao,项目名称:ninja-ide,代码行数:101,代码来源:ide.py

示例13: install_tab

 def install_tab(self):
     ide = IDE.get_service('ide')
     ui_tools.install_shortcuts(self, actions.PROJECTS_TREE_ACTIONS, ide)
     ide.goingDown.connect(self._on_ide_going_down)
开发者ID:ninja-ide,项目名称:ninja-ide,代码行数:4,代码来源:tree_projects_widget.py

示例14: install_tab

 def install_tab(self):
     ide = IDE.get_service('ide')
     ui_tools.install_shortcuts(self, actions.PROJECTS_TREE_ACTIONS, ide)
开发者ID:WeAreLaVelle,项目名称:ninja-ide,代码行数:3,代码来源:tree_projects_widget.py

示例15: install

 def install(self):
     ide = IDE.get_service('ide')
     ide.place_me_on("main_container", self, "central", top=True)
     ui_tools.install_shortcuts(self, actions.ACTIONS, ide)
开发者ID:pdorrell,项目名称:ninja-ide,代码行数:4,代码来源:main_container.py


注:本文中的ninja_ide.tools.ui_tools.install_shortcuts函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。