void KUrlNavigatorMenu::dropEvent(QDropEvent* event) { QAction* action = actionAt(event->pos()); if (action != 0) { emit urlsDropped(action, event); } }
void TilesetEditorWindow::dropEvent(QDropEvent *e) { const auto urls = e->mimeData()->urls(); if (!urls.isEmpty()) { emit urlsDropped(urls); e->acceptProposedAction(); } }
void Buffer::dropEvent(QDropEvent *event) { if (event->mimeData()->hasUrls()) { // If the user is dropping URLs, emit a signal QList<QUrl> urls = event->mimeData()->urls(); emit urlsDropped(urls); } else { // Do the default action ScintillaEditBase::dropEvent(event); } }
void pTabBar::dropEvent( QDropEvent* event ) { if ( !event->mimeData()->hasUrls() ) { // get drop tab int ni = tabAt( event->pos() ); // if get it if ( ni != -1 ) { // get original tab infos int oi = event->mimeData()->data( "x-tabindex" ).toInt(); QVariant otd = tabData( oi ); QIcon oti = tabIcon( oi ); QString ott = tabText( oi ); QColor ottc = tabTextColor( oi ); QString ottt = tabToolTip( oi ); QString otwt = tabWhatsThis( oi ); // remove original tab removeTab( oi ); // insert new one with correct infos int i = insertTab( ni, oti, ott ); setTabData( i, otd ); setTabTextColor( i, ottc ); setTabToolTip( i, ottt ); setTabWhatsThis( i, otwt ); //accept event->acceptProposedAction(); // emit signal emit tabDropped( oi, i ); // set new current index setCurrentIndex( i ); } } else emit urlsDropped( event->mimeData()->urls () ); // default event QTabBar::dropEvent( event ); }
void KonqMultiTabBar::dropEvent(QDropEvent* event) { const KUrl::List urls = KUrl::List::fromMimeData(event->mimeData()); emit urlsDropped(urls); }