void RSS::on_actionBrowse_triggered() { const auto& folder = g_win->selectDownloadFolder(); if (folder.isEmpty()) return; downloadSelected(folder); }
void RSS::downloadToPrevious() { const auto* action = qobject_cast<const QAction*>(sender()); // use the directory from the action title const auto folder = action->text(); downloadSelected(folder); }
/** * \brief Slot to handle toolbar actions * * This is just a dispatcher method that calls the appropriate acction * handler slot. */ void TaskMainWindow::handleToolbarAction(QAction *action) { debug(LOG_DEBUG, DEBUG_LOG, 0, "toolbar action called"); if (action == ui->actionStartQueue) { startQueue(); return; } if (action == ui->actionStopQueue) { stopQueue(); return; } if (action == ui->actionDelete) { deleteSelected(); return; } if (action == ui->actionDownload) { downloadSelected(); return; } }
void LinksDialog::linkTreeWidgetCostumPopupMenu( QPoint point ) { QMenu contextMnu( this ); QAction *voteupAct = new QAction(QIcon(IMAGE_EXPORTFRIEND), tr( "Share Link Anonymously" ), &contextMnu ); connect( voteupAct , SIGNAL( triggered() ), this, SLOT( voteup_anon() ) ); QMenu *voteMenu = new QMenu( tr("Vote on Link"), &contextMnu ); voteMenu->setIcon(QIcon(IMAGE_EXPORTFRIEND)); QAction *vote_p2 = new QAction( QIcon(IMAGE_GREAT), tr("+2 Great!"), &contextMnu ); connect( vote_p2 , SIGNAL( triggered() ), this, SLOT( voteup_p2() ) ); voteMenu->addAction(vote_p2); QAction *vote_p1 = new QAction( QIcon(IMAGE_GOOD), tr("+1 Good"), &contextMnu ); connect( vote_p1 , SIGNAL( triggered() ), this, SLOT( voteup_p1() ) ); voteMenu->addAction(vote_p1); QAction *vote_p0 = new QAction( QIcon(IMAGE_OK), tr("0 Okay"), &contextMnu ); connect( vote_p0 , SIGNAL( triggered() ), this, SLOT( voteup_p0() ) ); voteMenu->addAction(vote_p0); QAction *vote_m1 = new QAction( QIcon(IMAGE_SUX), tr("-1 Sux"), &contextMnu ); connect( vote_m1 , SIGNAL( triggered() ), this, SLOT( voteup_m1() ) ); voteMenu->addAction(vote_m1); QAction *vote_m2 = new QAction( QIcon(IMAGE_BADLINK), tr("-2 Bad Link"), &contextMnu ); connect( vote_m2 , SIGNAL( triggered() ), this, SLOT( voteup_m2() ) ); voteMenu->addAction(vote_m2); QAction *downloadAct = new QAction(QIcon(IMAGE_DOWNLOAD), tr("Download"), &contextMnu); connect(downloadAct, SIGNAL(triggered()), this, SLOT(downloadSelected())); contextMnu.addAction(voteupAct); contextMnu.addSeparator(); contextMnu.addMenu(voteMenu); contextMnu.addSeparator(); contextMnu.addAction(downloadAct); contextMnu.exec(ui.linkTreeWidget->viewport()->mapToGlobal(point)); }
void RSS::on_actionDownload_triggered() { downloadSelected(""); }