Ejemplo n.º 1
0
void QtFileTransferWidget::addReceiveItem(ReceiveFileSession * fileSession) {

	QtFileTransferDownloadItem * fileTransferItem = new QtFileTransferDownloadItem(this, fileSession, _downloadFolder);
	SAFE_CONNECT(fileTransferItem, SIGNAL(removeClicked()), SLOT(itemRemoveClicked()));
	QListWidgetItem * item = new QListWidgetItem(/*_ui->downloadTransferListWidget*/);
	item->setSizeHint(fileTransferItem->minimumSizeHint());
	_ui->downloadTransferListWidget->insertItem(0, item);
	_ui->downloadTransferListWidget->setItemWidget(item, fileTransferItem);
	showDownloadTab();
	showAndRaise();
}
Ejemplo n.º 2
0
void QtFileTransferWidget::addSendItem(SendFileSession * fileSession,
	const std::string & filename, const std::string & contact) {

	QtFileTransferUploadItem * fileTransferItem = new QtFileTransferUploadItem(this, fileSession,
		QString::fromStdString(filename), contact);
	SAFE_CONNECT(fileTransferItem, SIGNAL(removeClicked()), SLOT(itemRemoveClicked()));
	QListWidgetItem * item = new QListWidgetItem(/*_ui->uploadTransferListWidget*/);
	item->setSizeHint(fileTransferItem->minimumSizeHint());
	_ui->uploadTransferListWidget->insertItem(0, item);
	_ui->uploadTransferListWidget->setItemWidget(item, fileTransferItem);
	showUploadTab();
	showAndRaise();
}
Ejemplo n.º 3
0
void OSItem::onRemoveClicked()
{
  // Note: an OSDropZone2 owns this OSItem;
  // there should be a parent...
  //OS_ASSERT(this->parent());

  // ... and it should be a OSDropZone2...
  //auto dropZone = qobject_cast<OSDropZone2 *>(this->parent());
  //OS_ASSERT(dropZone);

  // ... and it needs to listen to, and act on,
  // this signal to cause a model object reset
  emit itemRemoveClicked(this);
}
Ejemplo n.º 4
0
void OSItem::onRemoveClicked()
{
  emit itemRemoveClicked(this);
}