Ejemplo n.º 1
0
 def openSelectedDirectory(self):
     get_selected = self.treeWidget.selectedItems()
     if get_selected:
         base_node = get_selected[0]
         get_child_node = base_node.text(0)
         client_operation.open_directory(get_child_node)
         self.treeWidget.clear()
         self.updateClientInterface(client_operation.get_current_directory())
Ejemplo n.º 2
0
def openParentDirectory():
    client_operation.open_parent_directory()
    Ui_MainWindow.treeWidget.clear()
    Ui_MainWindow.updateClientInterface(
        client_operation.get_current_directory())
Ejemplo n.º 3
0
        tree_list.append(QtWidgets.QTreeWidgetItem(item))
    Ui_MainWindow.treeWidget.addTopLevelItems(tree_list)


def openParentDirectory():
    client_operation.open_parent_directory()
    Ui_MainWindow.treeWidget.clear()
    Ui_MainWindow.updateClientInterface(
        client_operation.get_current_directory())


def openSelectedDirectory():
    get_selected = Ui_MainWindow.treeWidget.selectedItems()
    if get_selected:
        base_node = get_selected[0]
        get_child_node = base_node.text(0)
        client_operation.open_directory(get_child_node)
        Ui_MainWindow.treeWidget.clear()
        Ui_MainWindow.updateClientInterface(
            client_operation.get_current_directory())


client_operation.set_home_directory()
updateClientInterface(client_operation.get_current_directory())
Ui_MainWindow.actionJoin.triggered.connect(Ui_MainWindow.openJoinDialog)
Ui_MainWindow.actionHost.triggered.connect(Ui_MainWindow.openCreateDialog)
Ui_MainWindow.client_parent_button.clicked.connect(
    Ui_MainWindow.openParentDirectory)
Ui_MainWindow.treeWidget.itemSelectionChanged.connect(
    Ui_MainWindow.openSelectedDirectory)
Ejemplo n.º 4
0
 def openParentDirectory(self):
     client_operation.open_parent_directory()
     self.treeWidget.clear()
     self.updateClientInterface(client_operation.get_current_directory())