void QtDeleteAssetDialog::on_deletePushButton_clicked() { for(int row = 0; row < ui->assetsListWidget->count(); row++) { QListWidgetItem* item = ui->assetsListWidget->item(row); emit deleteAsset(item->text()); } close(); }
TileAssetView::TileAssetView( QWidget *parent ) : QListView( parent ) { iAddAsset = new QAction(tr("&Add asset"), this); connect( iAddAsset, SIGNAL(triggered()), this, SLOT(addAsset())); iDeleteAsset = new QAction(tr("&Delete asset"), this); connect( iDeleteAsset, SIGNAL(triggered()), this, SLOT(deleteAsset())); connect(this,SIGNAL(doubleClicked(const QModelIndex &)),this,SLOT(onDoubleClicked(const QModelIndex &))); this->setSelectionMode(QAbstractItemView::ExtendedSelection); }
PartList::PartList(QWidget *parent) : QWidget(parent), ui(new Ui::PartList) { ui->setupUi(this); // mAssetListWidget = findChild<AssetListWidget*>("assetList"); // connect(mAssetListWidget, SIGNAL(assetDoubleClicked(AssetRef)), this, SIGNAL(assetDoubleClicked(AssetRef))); mAssetTreeWidget = findChild<AssetTreeWidget*>("assetTree"); connect(mAssetTreeWidget, SIGNAL(assetDoubleClicked(AssetRef)), this, SIGNAL(assetDoubleClicked(AssetRef))); connect(findChild<QToolButton*>("toolButtonNewPart"), SIGNAL(clicked()), this, SLOT(newPart())); connect(findChild<QToolButton*>("toolButtonNewComp"), SIGNAL(clicked()), this, SLOT(newComp())); connect(findChild<QToolButton*>("toolButtonNewFolder"), SIGNAL(clicked()), this, SLOT(newFolder())); connect(findChild<QToolButton*>("toolButtonRenameAsset"), SIGNAL(clicked()), this, SLOT(renameAsset())); connect(findChild<QToolButton*>("toolButtonCopyAsset"), SIGNAL(clicked()), this, SLOT(copyAsset())); connect(findChild<QToolButton*>("toolButtonDeleteAsset"), SIGNAL(clicked()), this, SLOT(deleteAsset())); updateList(); }