Example #1
0
    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)
Example #2
0
    def __init__(self):
        QTreeWidget.__init__(self)
        # Configuración QTreeWidget
        self.setAnimated(True)
        self.header().setStretchLastSection(False)
        self.header().setHidden(True)
        self.header().setResizeMode(0, QHeaderView.ResizeToContents)
        # Lista de fuentes, para la compilación
        self._sources = []
        # Proyectos abiertos
        self._projects = []

        self.setContextMenuPolicy(Qt.CustomContextMenu)

        # Conexiones
        self.connect(self, SIGNAL("customContextMenuRequested(const QPoint &)"), self._menu_tree_project)
        self.connect(self, SIGNAL("itemDoubleClicked(QTreeWidgetItem*, int)"), self._open_file)

        Edis.load_lateral("tree_projects", self)
Example #3
0
    def __init__(self):
        QTreeWidget.__init__(self)
        # Configuración QTreeWidget
        self.setAnimated(True)
        self.header().setStretchLastSection(False)
        self.header().setHidden(True)
        self.header().setResizeMode(0, QHeaderView.ResizeToContents)
        # Lista de fuentes, para la compilación
        self._sources = []
        # Proyectos abiertos
        self._projects = []

        self.setContextMenuPolicy(Qt.CustomContextMenu)

        # Conexiones
        self.connect(self, SIGNAL("customContextMenuRequested(const QPoint &)"),
                     self._menu_tree_project)
        self.connect(self, SIGNAL("itemDoubleClicked(QTreeWidgetItem*, int)"),
                     self._open_file)

        Edis.load_lateral("tree_projects", self)
Example #4
0
    def __init__(self, parent=None):
        QTreeView.__init__(self)
        self.header().setHidden(True)
        self.setAnimated(True)

        # Modelo
        self.model = QFileSystemModel(self)
        path = QDir.toNativeSeparators(QDir.homePath())
        self.model.setRootPath(path)
        self.setModel(self.model)
        self.model.setNameFilters(["*.c", "*.h", "*.s"])
        self.setRootIndex(QModelIndex(self.model.index(path)))
        self.model.setNameFilterDisables(False)

        # Se ocultan algunas columnas
        self.hideColumn(1)
        self.hideColumn(2)
        self.hideColumn(3)

        # Conexion
        self.doubleClicked.connect(self._open_file)

        Edis.load_lateral("explorer", self)