Exemple #1
0
    def __init__(self):
        super(FileGui, self).__init__()
        self.cl = QVBoxLayout()
        self.loggin = Logger('FileGui', self.logginn)

        tt = QHBoxLayout()
        self.local = QLabel('Local: ', self)
        self.pathbar = QLineEdit(self)
        folder = qta.icon('fa5s.folder-open',
                          color='orange',
                          color_active='red')
        self.pathbtn = QPushButton(folder, "", self)
        tt.addWidget(self.local)
        tt.addWidget(self.pathbar)
        tt.addWidget(self.pathbtn)
        self.cl.addLayout(tt)

        tt = QHBoxLayout()
        self.other = QLabel('Otro: ', self)
        self.pathbar2 = QLineEdit(self)
        folder = qta.icon('fa5s.folder-open',
                          color='orange',
                          color_active='red')
        self.pathbtn2 = QPushButton(folder, "", self)
        tt.addWidget(self.other)
        tt.addWidget(self.pathbar2)
        tt.addWidget(self.pathbtn2)
        self.cl.addLayout(tt)

        tt = QHBoxLayout()
        self.local = QLabel('Folders: ')
        self.pathbarftp = QLineEdit(self)
        self.pathbarftp.setReadOnly(True)
        tt.addWidget(self.local)
        tt.addWidget(self.pathbarftp)
        self.cl.addLayout(tt)

        self.li = QListWidget(self)
        self.cl.addWidget(self.li)
        self.li.itemDoubleClicked.connect(self.ftp_move_to)

        tt = QHBoxLayout()
        find = qta.icon('fa5s.search', color='orange', color_active='red')
        self.proc = QPushButton(find, "", self)
        tt.addWidget(self.proc)
        tt.addStretch()
        self.move = QButtonGroup()
        tt1 = QRadioButton("Todos")
        tt2 = QRadioButton("Último")
        tt2.setChecked(True)
        self.move.addButton(tt1, 2)
        self.move.addButton(tt2, 1)
        self.move.setExclusive(True)
        tt.addWidget(tt1)
        tt.addWidget(tt2)
        self.cl.addLayout(tt)

        tt = QVBoxLayout()
        tt3 = QHBoxLayout()
        self.namelabel = QLabel(self)
        tt3.addWidget(self.namelabel)
        tt2 = QHBoxLayout()
        self.progresslabel = QLabel(self)
        self.speedlabel = QLabel(self)
        tt2.addWidget(self.progresslabel)
        tt2.addWidget(self.speedlabel)
        self.progress = QProgressBar(self)
        self.progress.setMinimum(0)
        self.progress.setMaximum(100)
        tt.addLayout(tt3)
        tt.addLayout(tt2)
        tt.addWidget(self.progress)
        self.cl.addLayout(tt)

        self.setLayout(self.cl)
        self.pathbtn.clicked.connect(self.set_path)
        self.proc.clicked.connect(self.procces)
        self.pathbtn2.clicked.connect(self.set_path2)
        self.ftpm = None
        self.in_progress = False