Exemplo n.º 1
0
    def create_versions_widget(self):

        self.collapse_wdg_vers = ui_misc_classes.Ui_collapsableWidget(state=True)
        layout_files = QtGui.QVBoxLayout()
        self.collapse_wdg_vers.setLayout(layout_files)
        self.collapse_wdg_vers.setText('Hide Versions Files')
        self.collapse_wdg_vers.setCollapsedText('Show Versions Files')

        # self.files_tree_widget = QtGui.QTreeWidget()
        self.treeWidget_vers = QtGui.QTreeWidget()
        self.treeWidget_vers.setAlternatingRowColors(True)
        self.treeWidget_vers.setSelectionMode(QtGui.QAbstractItemView.NoSelection)
        self.treeWidget_vers.setVerticalScrollMode(QtGui.QAbstractItemView.ScrollPerPixel)
        self.treeWidget_vers.setRootIsDecorated(False)
        self.treeWidget_vers.headerItem().setText(0, "File")
        self.treeWidget_vers.headerItem().setText(1, "Path")
        self.treeWidget_vers.setStyleSheet('QTreeView::item {padding: 2px;}')
        for keys, values in self.paths:
            for i, fl in enumerate(values['versioned']['names']):
                full_path = gf.form_path(self.repo['value'][0] + '/' + values['versioned']['paths'][i])
                item = QtGui.QTreeWidgetItem()
                item.setText(0, ''.join(fl))
                item.setText(1, full_path)
                self.treeWidget_vers.addTopLevelItem(item)
            self.treeWidget_vers.setMinimumWidth(self.treeWidget_vers.columnWidth(0) + self.treeWidget_vers.columnWidth(1) + 150)
        self.treeWidget_vers.setMinimumHeight(250)
        self.treeWidget_vers.resizeColumnToContents(0)
        self.treeWidget_vers.resizeColumnToContents(1)

        layout_files.addWidget(self.treeWidget_vers)

        self.main_layout.addWidget(self.collapse_wdg_vers)
Exemplo n.º 2
0
    def create_tasks_dependencies_widget(self):

        collapse_wdg_tasks = ui_misc_classes.Ui_collapsableWidget(state=True)
        layout_files = QtGui.QVBoxLayout()
        collapse_wdg_tasks.setLayout(layout_files)
        collapse_wdg_tasks.setText('Hide Tasks Dependencies')
        collapse_wdg_tasks.setCollapsedText('Show Tasks Dependencies')

        self.files_tree_widget = QtGui.QTreeWidget()

        layout_files.addWidget(self.files_tree_widget)

        self.main_layout.addWidget(collapse_wdg_tasks)
Exemplo n.º 3
0
    def create_snapshots_dependencies_widget(self):

        collapse_wdg_snapshots = ui_misc_classes.Ui_collapsableWidget()
        layout_files = QtGui.QVBoxLayout()
        collapse_wdg_snapshots.setLayout(layout_files)
        collapse_wdg_snapshots.setText('Hide Snapshots Dependencies')
        collapse_wdg_snapshots.setCollapsedText('Show Snapshots Dependencies')
        collapse_wdg_snapshots.setCollapsed(True)

        self.files_tree_widget = QtGui.QTreeWidget()

        layout_files.addWidget(self.files_tree_widget)

        self.main_layout.addWidget(collapse_wdg_snapshots)
Exemplo n.º 4
0
    def create_description_widget(self):

        self.collapse_wdg_descr = ui_misc_classes.Ui_collapsableWidget()
        layout_files = QtGui.QVBoxLayout()
        self.collapse_wdg_descr.setLayout(layout_files)
        self.collapse_wdg_descr.setText('Hide Description')
        self.collapse_wdg_descr.setCollapsedText('Show Description')
        self.collapse_wdg_descr.setCollapsed(False)

        from lib.ui_classes.ui_checkin_out_classes import Ui_descriptionWidget

        self.description_widget = Ui_descriptionWidget(None, None, parent=self)
        self.description_widget.descriptionTextEdit.setViewportMargins(
            0, 20, 0, 0)

        self.description_widget.setMinimumHeight(200)
        self.description_widget.setMinimumWidth(400)

        self.description_widget.set_description(self.description)

        layout_files.addWidget(self.description_widget)

        self.main_layout.addWidget(self.collapse_wdg_descr)