• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

Python main.Edis类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



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

示例1: __init__

    def __init__(self):
        QStatusBar.__init__(self)
        self.hide()
        Edis.load_component("status_bar", self)

        # Conexiones
        self.messageChanged.connect(self._clean_status)
开发者ID:Garjy,项目名称:edis,代码行数:7,代码来源:status_bar.py


示例2: __init__

    def __init__(self, edis=None):
        QWidget.__init__(self, edis)
        self.setAcceptDrops(True)
        self.box = QVBoxLayout(self)
        self.box.setContentsMargins(0, 0, 0, 0)
        self.box.setSpacing(0)

        # Stacked
        self.stack = QStackedWidget()
        self.box.addWidget(self.stack)

        # Replace widget
        #FIXME: mover esto
        self._replace_widget = replace_widget.ReplaceWidget()
        self._replace_widget.hide()
        self.box.addWidget(self._replace_widget)

        # Editor widget
        self.editor_widget = editor_widget.EditorWidget()

        # Conexiones
        self.connect(self.editor_widget, SIGNAL("saveCurrentFile()"),
                     self.save_file)
        self.connect(self.editor_widget, SIGNAL("fileClosed(int)"),
                     self._file_closed)
        self.connect(self.editor_widget, SIGNAL("recentFile(QStringList)"),
                     self.update_recents_files)
        self.connect(self.editor_widget, SIGNAL("allFilesClosed()"),
                     self.add_start_page)
        self.connect(self.editor_widget, SIGNAL("currentWidgetChanged(int)"),
                     self.change_widget)

        Edis.load_component("principal", self)
开发者ID:Garjy,项目名称:edis,代码行数:33,代码来源:editor_container.py


示例3: load_project_widget

    def load_project_widget(self, widget):
        self._tree_project = Edis.get_lateral("tree_projects")
        self.tabs.addTab(self._tree_project, self.tr("Proyectos"))

        editor_container = Edis.get_component("principal")
        self.connect(editor_container, SIGNAL("projectOpened(PyQt_PyObject)"),
                     self._open_project)
        self.connect(editor_container, SIGNAL("folderOpened(PyQt_PyObject)"),
                     self._open_directory)
开发者ID:Garjy,项目名称:edis,代码行数:9,代码来源:tab_container.py


示例4: build_source_code

 def build_source_code(self):
     output = Edis.get_component("output")
     project = Edis.get_lateral("tree_projects")
     weditor = self.get_active_editor()
     if weditor is not None:
         filename = self.save_file()
         if project.sources:
             output.build((filename, project.sources))
         else:
             if filename:
                 output.build((weditor.filename, []))
开发者ID:Garjy,项目名称:edis,代码行数:11,代码来源:editor_container.py


示例5: show_snake

 def show_snake(self):
     from src.ui.widgets.pyborita import pyborita_widget
     w = pyborita_widget.PyboritaWidget(self)
     toolbar = Edis.get_component("toolbar")
     lateral = Edis.get_component("tab_container")
     status = Edis.get_component("status_bar")
     output = Edis.get_component("output")
     widgets = [toolbar, status, lateral, output]
     for widget in widgets:
         widget.hide()
     self.stack.insertWidget(0, w)
     self.stack.setCurrentIndex(0)
开发者ID:Garjy,项目名称:edis,代码行数:12,代码来源:editor_container.py


示例6: load_symbols_widget

    def load_symbols_widget(self, widget):
        if self._symbols_widget is None:
            self._symbols_widget = Edis.get_lateral("symbols")
            self.tabs.addTab(self._symbols_widget, self.tr("Símbolos"))

            # Conexiones
            editor_container = Edis.get_component("principal")
            self.connect(self._symbols_widget, SIGNAL("goToLine(int)"),
                         editor_container.go_to_line)
            self.connect(editor_container, SIGNAL("updateSymbols(QString)"),
                         self._update_symbols_widget)
                         #lambda filename: self.thread.parse(filename))
            self.connect(editor_container.editor_widget,
                         SIGNAL("allFilesClosed()"),
                         self._symbols_widget.clear)
开发者ID:Garjy,项目名称:edis,代码行数:15,代码来源:tab_container.py


示例7: create_editor

    def create_editor(self, obj_file=None, filename=""):
        if obj_file is None:
            obj_file = object_file.EdisFile(filename)
        self.stack.addWidget(self.editor_widget)
        # Quito la página de inicio, si está
        _start_page = self.stack.widget(0)
        if isinstance(_start_page, start_page.StartPage):
            self.remove_widget(_start_page)
            # Detengo el tiimer
            _start_page.timer.stop()
        weditor = editor.Editor(obj_file)
        self.editor_widget.add_widget(weditor)
        self.editor_widget.add_item_combo(obj_file.filename)
        lateral = Edis.get_component("tab_container")
        if not lateral.isVisible():
            lateral.show()

        # Conexiones
        self.connect(obj_file, SIGNAL("fileChanged(PyQt_PyObject)"),
                     self._file_changed)
        self.connect(weditor, SIGNAL("cursorPositionChanged(int, int)"),
                     self.update_cursor)
        self.connect(weditor, SIGNAL("modificationChanged(bool)"),
                     self._file_modified)
        self.connect(weditor, SIGNAL("fileSaved(QString)"),
                     self._file_saved)
        self.connect(weditor, SIGNAL("linesChanged(int)"),
                     self.editor_widget.combo.move_to_symbol)
        self.connect(weditor, SIGNAL("dropEvent(PyQt_PyObject)"),
                     self._drop_editor)
        self.emit(SIGNAL("fileChanged(QString)"), obj_file.filename)

        weditor.setFocus()

        return weditor
开发者ID:Garjy,项目名称:edis,代码行数:35,代码来源:editor_container.py


示例8: __init__

    def __init__(self):
        QTreeWidget.__init__(self)
        self.setObjectName("simbolos")
        self.header().setHidden(True)
        self.setSelectionMode(self.SingleSelection)
        self.setAnimated(True)
        self.header().setStretchLastSection(False)
        self.header().setHorizontalScrollMode(
            QAbstractItemView.ScrollPerPixel)
        self.header().setResizeMode(0, QHeaderView.ResizeToContents)

        # Conexión
        self.itemClicked[QTreeWidgetItem, int].connect(self.go_to_line)
        self.itemActivated[QTreeWidgetItem, int].connect(self.go_to_line)

        Edis.load_lateral("symbols", self)
开发者ID:Garjy,项目名称:edis,代码行数:16,代码来源:tree_symbols.py


示例9: __init__

    def __init__(self, parent=None):
        super(EnvironmentConfiguration, self).__init__()
        self.general_section = GeneralSection()
        #self.shortcut_section = ShortcutSection()

        preferences = Edis.get_component("preferences")
        preferences.install_section(self)
开发者ID:Garjy,项目名称:edis,代码行数:7,代码来源:environment_configuration.py


示例10: _create_file

 def _create_file(self):
     DEBUG("Creating a file...")
     dialog = NewFileDialog(self)
     data = dialog.data
     if data:
         current_item = self.currentItem()
         filename, ftype = data["filename"], data["type"]
         filename = os.path.join(current_item.path, filename)
         if os.path.exists(filename):
             # El archivo ya existe
             QMessageBox.information(
                 self, self.tr("Información"), self.tr("Ya existe un archivo con ese" " nombre"), QMessageBox.Ok
             )
             DEBUG("A file already exists...")
             return
         if ftype == 1:
             # Header file
             preprocessor = os.path.splitext(os.path.basename(filename))[0]
             content = "#ifndef %s_H_\n#define %s_H\n\n#endif" % (preprocessor.upper(), preprocessor.upper())
         else:
             content = ""
             # Agrego a la lista de archivos fuente
             self._sources.append(filename)
         # Creo el archivo
         file_manager.write_file(filename, content)
         if isinstance(current_item, EdisItem):
             parent = current_item.child(ftype)
         else:
             parent = current_item
         # Agrego el ítem al árbol
         new_item = TreeItem(parent, [data["filename"]])
         new_item.path = filename
         editor_container = Edis.get_component("principal")
         editor_container.open_file(filename)
开发者ID:Garjy,项目名称:edis,代码行数:34,代码来源:tree_projects.py


示例11: _open_file

    def _open_file(self, item):
        """ Cambia de archivo en el stacked """

        editor_container = Edis.get_component("principal")
        index = self.list_of_files.row(item)
        editor_container.editor_widget.change_item(index)
        self.close()
开发者ID:Garjy,项目名称:edis,代码行数:7,代码来源:file_selector.py


示例12: _change_scheme

 def _change_scheme(self, theme):
     theme = theme.split()[0].lower()
     editor_container = Edis.get_component("principal")
     editor = editor_container.get_active_editor()
     if editor is not None:
         # Restyle
         pass
开发者ID:Garjy,项目名称:edis,代码行数:7,代码来源:editor_configuration.py


示例13: _load_menu_combo_file

    def _load_menu_combo_file(self, point):
        """ Muestra el menú """

        menu = QMenu()
        editor_container = Edis.get_component("principal")
        save_as_action = menu.addAction(QIcon(":image/save-as"),
                                        self.tr("Guardar como..."))
        reload_action = menu.addAction(QIcon(":image/reload"),
                                       self.tr("Recargar"))
        menu.addSeparator()
        compile_action = menu.addAction(QIcon(":image/build"),
                                        self.tr("Compilar"))
        execute_action = menu.addAction(QIcon(":image/run"),
                                        self.tr("Ejecutar"))
        menu.addSeparator()
        close_action = menu.addAction(QIcon(":image/close"),
                                      self.tr("Cerrar archivo"))

        # Conexiones
        self.connect(save_as_action, SIGNAL("triggered()"),
                     editor_container.save_file_as)
        self.connect(reload_action, SIGNAL("triggered()"),
                     editor_container.reload_file)
        self.connect(compile_action, SIGNAL("triggered()"),
                     editor_container.build_source_code)
        self.connect(execute_action, SIGNAL("triggered()"),
                     editor_container.run_binary)
        self.connect(close_action, SIGNAL("triggered()"),
                     editor_container.close_file)

        menu.exec_(self.mapToGlobal(point))
开发者ID:Garjy,项目名称:edis,代码行数:31,代码来源:editor_widget.py


示例14: _delete_file

    def _delete_file(self):
        """ Borra fisicamente el archivo y lo quita del árbol """

        DEBUG("Deleting file...")
        current_item = self.currentItem()
        # Flags
        yes = QMessageBox.Yes
        no = QMessageBox.No
        result = QMessageBox.warning(
            self,
            self.tr("Advertencia"),
            self.tr("Está seguro que quiere borrar " "el archivo?<br><br><b>{0}</b>").format(current_item.path),
            no | yes,
        )
        if result == no:
            return
        # Elimino el item de la lista de fuentes
        self._sources.remove(current_item.path)
        # Cierro el archivo del editor
        editor_container = Edis.get_component("principal")
        editor_container.close_file_from_project(current_item.path)
        # Elimino el item del árbol
        index = current_item.parent().indexOfChild(current_item)
        current_item.parent().takeChild(index)
        # Borro el archivo fisicamente
        os.remove(current_item.path)
开发者ID:Garjy,项目名称:edis,代码行数:26,代码来源:tree_projects.py


示例15: _change_dock_position

 def _change_dock_position(self):
     edis = Edis.get_component("edis")
     current_area = edis.dockWidgetArea(self)
     if current_area == Qt.LeftDockWidgetArea:
         edis.addDockWidget(Qt.RightDockWidgetArea, self)
     else:
         edis.addDockWidget(Qt.LeftDockWidgetArea, self)
开发者ID:Garjy,项目名称:edis,代码行数:7,代码来源:tab_container.py


示例16: save

    def save(self):
        """ Guarda las configuraciones del Editor. """

        use_tabs = bool(self.combo_tabs.currentIndex())
        settings.set_setting('editor/usetabs', use_tabs)
        auto_indent = self.check_autoindent.isChecked()
        settings.set_setting('editor/indent', auto_indent)
        settings.set_setting('editor/minimap', self.check_minimap.isChecked())
        #settings.set_setting('editor/minimap-animation',
                             #self.check_minimap_animation.isChecked())
        font = self.combo_font.currentFont().family()
        settings.set_setting('editor/font', font)
        font_size = self.spin_size_font.value()
        settings.set_setting('editor/size-font', font_size)
        scheme = self.combo_scheme.currentText().split()[0].lower()
        settings.set_setting('editor/scheme', scheme)
        settings.set_setting('editor/cursor',
                             self.combo_caret.currentIndex())
        settings.set_setting('editor/caret-width',
                             self.spin_caret_width.value())
        settings.set_setting('editor/cursor-period',
                             self.slider_caret_period.value())
        editor_container = Edis.get_component("principal")
        editor = editor_container.get_active_editor()
        if editor is not None:
            editor.setIndentationsUseTabs(use_tabs)
            editor.load_font(font, font_size)
开发者ID:Garjy,项目名称:edis,代码行数:27,代码来源:editor_configuration.py


示例17: _replace

 def _replace(self):
     if not self.word_replace:
         return
     editor_container = Edis.get_component("principal")
     weditor = editor_container.get_active_editor()
     if weditor.hasSelectedText():
         weditor.replace(self.word_replace)
         self._find_next()
开发者ID:Garjy,项目名称:edis,代码行数:8,代码来源:replace_widget.py


示例18: _replace_all

 def _replace_all(self):
     editor_container = Edis.get_component("principal")
     weditor = editor_container.get_active_editor()
     found = weditor.findFirst(self.word, False, False, False, False,
                               True, 0, 0, True)
     while found:
         weditor.replace(self.word_replace)
         found = weditor.findNext()
开发者ID:Garjy,项目名称:edis,代码行数:8,代码来源:replace_widget.py


示例19: __init__

    def __init__(self):
        QDockWidget.__init__(self)
        self.setFeatures(QDockWidget.NoDockWidgetFeatures)
        title_bar = self.titleBarWidget()
        self._remove_titlebar(title_bar)

        #self._filename = None
        self._sources = None

        self.salida_ = process.EjecutarWidget()
        self.setWidget(self.salida_)

        # Conexiones
        key_escape = QShortcut(QKeySequence(Qt.Key_Escape), self)
        key_escape.activated.connect(self.hide)

        Edis.load_component("output", self)
开发者ID:Garjy,项目名称:edis,代码行数:17,代码来源:output_container.py


示例20: eventFilter

 def eventFilter(self, obj, event):
     if obj == self.label_logo and event.type() == QEvent.MouseButtonPress:
         self.clicks += 1
         if self.clicks == 6:
             self.close()
             editor_container = Edis.get_component("principal")
             editor_container.show_snake()
     return False
开发者ID:Garjy,项目名称:edis,代码行数:8,代码来源:about.py



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
Python underscore._函数代码示例发布时间:2022-05-27
下一篇:
Python transaction.Transaction类代码示例发布时间:2022-05-27
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap