void QBtWorkspace::drop_files(const QMap<QString, QVariant> &userInfo) { QStringList files = userInfo["files"].toStringList(); QString dropPath = userInfo["drop_target"].toString(); SelectionsSet dropedFiles; foreach (QString file, files) { dropedFiles.insert(file); }
//******************************************************************* // access_permissions PRIVATE //******************************************************************* void QBtView::access_permissions() { SelectionsSet data = get_selected_items(); if( data.empty() ) { if( QBtShared::is_regular_file( selected_file_full_name() ) ) { const QFileInfo fi( selected_file_path() ); data.insert( fi.absoluteFilePath() ); } } if( data.empty() ) return; QBtAttrDialog dialog( this, data ); if( QDialog::Accepted == dialog.exec() ) refresh(); }
//******************************************************************* // remove_selected PRIVATE //------------------------------------------------------------------- // Funkcja wywolywana po nacisnieciu klawiszy Delete lub F8. // Usuwa z dysku zaznaczone /lub aktualny plik. //******************************************************************* void QBtView::remove_selected() { SelectionsSet data = get_selected_items(); if( data.empty() ) { if( QBtShared::is_regular_file( selected_file_full_name() ) ) { const QFileInfo fi( selected_file_path() ); data.insert( fi.absoluteFilePath() ); } } if( data.empty() ) return; QBtDeleteQuest quest( this ); quest.set_files( data ); if( quest.exec() != QDialog::Accepted ) return; const bool wipe = quest.to_wipe(); QBtDeleter deleter( this ); deleter.set_data( data, wipe ); if( QDialog::Accepted == deleter.exec() ) refresh(); }