FileTransferWindow::FileTransferWindow(FileTransferManager *manager, QWidget *parent) : QFrame{parent}, DesktopAwareObject{this}, m_manager{manager} { new TaskbarProgress{manager, this}; setWindowRole("kadu-file-transfer"); createGui(); new WindowGeometryManager{new ConfigFileVariantWrapper{"General", "TransferWindowGeometry"}, QRect(200, 200, 500, 300), this}; for (auto &&fileTransfer : m_manager->items()) fileTransferAdded(fileTransfer); connect(m_manager, SIGNAL(fileTransferAdded(FileTransfer)), this, SLOT(fileTransferAdded(FileTransfer))); connect(m_manager, SIGNAL(fileTransferRemoved(FileTransfer)), this, SLOT(fileTransferRemoved(FileTransfer))); contentsChanged(); }
void FileTransferHandlerManager::setFileTransferManager(FileTransferManager *fileTransferManager) { m_fileTransferManager = fileTransferManager; connect(m_fileTransferManager.data(), SIGNAL(fileTransferAboutToBeAdded(FileTransfer)), this, SLOT(fileTransferAboutToBeAdded(FileTransfer))); connect(m_fileTransferManager.data(), SIGNAL(fileTransferAboutToBeRemoved(FileTransfer)), this, SLOT(fileTransferRemoved(FileTransfer))); triggerAllAccountsRegistered(); }
void FileTransferManager::itemRemoved(FileTransfer fileTransfer) { emit fileTransferRemoved(fileTransfer); disconnect(fileTransfer, SIGNAL(updated()), this, SLOT(updateProgress())); updateProgress(); }