void QryPlnrDsnDsn1NDomaingd::handleRequest( DbsPlnr* dbsplnr , ReqPlnr* req ) { if (req->ixVBasetype == ReqPlnr::VecVBasetype::CMD) { reqCmd = req; if (req->cmd.compare("cmdset") == 0) { cout << "\trefresh" << endl; cout << "\tshow" << endl; } else if (req->cmd.compare("refresh") == 0) { req->retain = handleRefresh(dbsplnr); } else if (req->cmd.compare("show") == 0) { req->retain = handleShow(dbsplnr); } else { cout << "\tinvalid command!" << endl; }; if (!req->retain) reqCmd = NULL; } else if (req->ixVBasetype == ReqPlnr::VecVBasetype::REGULAR) { }; };
void QryFmncFab1NFabuser::handleRequest( DbsFmnc* dbsfmnc , ReqFmnc* req ) { if (req->ixVBasetype == ReqFmnc::VecVBasetype::CMD) { reqCmd = req; if (req->cmd.compare("cmdset") == 0) { cout << "\trefresh" << endl; cout << "\tshow" << endl; } else if (req->cmd == "refresh") { req->retain = handleRefresh(dbsfmnc); } else if (req->cmd == "show") { req->retain = handleShow(dbsfmnc); } else { cout << "\tinvalid command!" << endl; }; if (!req->retain) reqCmd = NULL; } else if (req->ixVBasetype == ReqFmnc::VecVBasetype::REGULAR) { }; };
void RadioWidget::on_StationsView__customContextMenuRequested (const QPoint& point) { const auto& idx = Ui_.StationsView_->indexAt (point); if (!idx.isValid ()) return; const auto type = idx.data (Media::RadioItemRole::ItemType).toInt (); const auto parentType = idx.parent ().data (Media::RadioItemRole::ItemType).toInt (); QMenu menu; menu.addAction (tr ("Refresh"), this, SLOT (handleRefresh ())); if (type == Media::RadioType::CustomAddableStreams) { menu.addAction (tr ("Add an URL..."), this, SLOT (handleAddUrl ())); const auto& url = Player_->GetSourceObject ()->GetCurrentSource ().ToUrl (); if (url.isValid () && !url.isLocalFile ()) menu.addAction (tr ("Add current stream..."), this, SLOT (handleAddCurrentUrl ())); } else if (parentType == Media::RadioType::CustomAddableStreams) { menu.addAction (tr ("Remove this URL"), this, SLOT (handleRemoveUrl ())); } menu.exec (Ui_.StationsView_->viewport ()->mapToGlobal (point)); }
void RadioWidget::on_StationsView__customContextMenuRequested (const QPoint& point) { const auto& idx = Ui_.StationsView_->indexAt (point); if (!idx.isValid ()) return; const auto type = idx.data (Media::RadioItemRole::ItemType).toInt (); const auto parentType = idx.parent ().data (Media::RadioItemRole::ItemType).toInt (); const auto iconsMgr = Core::Instance ().GetProxy ()->GetIconThemeManager (); QMenu menu; menu.addAction (iconsMgr->GetIcon ("view-refresh"), tr ("Refresh"), this, SLOT (handleRefresh ())); switch (type) { case Media::RadioType::CustomAddableStreams: { menu.addAction (iconsMgr->GetIcon ("list-add"), tr ("Add an URL..."), this, SLOT (handleAddUrl ())); const auto& url = Player_->GetSourceObject ()->GetCurrentSource ().ToUrl (); if (url.isValid () && !url.isLocalFile ()) menu.addAction (tr ("Add current stream..."), this, SLOT (handleAddCurrentUrl ())); break; } case Media::RadioType::TracksList: case Media::RadioType::TracksRoot: case Media::RadioType::SingleTrack: { menu.addAction (iconsMgr->GetIcon ("download"), tr ("Download tracks..."), this, SLOT (handleDownloadTracks ())); break; } default: break; } if (parentType == Media::RadioType::CustomAddableStreams) { menu.addAction (iconsMgr->GetIcon ("list-remove"), tr ("Remove this URL"), this, SLOT (handleRemoveUrl ())); } menu.exec (Ui_.StationsView_->viewport ()->mapToGlobal (point)); }
SLOT (handleGotFileUrl (QUrl, QByteArray))); connect (acc->GetQObject (), SIGNAL (gotChanges (QList<Change>)), this, SLOT (handleGotChanges (QList<Change>))); } } ToolBar_->addWidget (AccountsBox_); Refresh_ = new QAction (Proxy_->GetIconThemeManager ()->GetIcon ("view-refresh"), tr ("Refresh"), this); connect (Refresh_, SIGNAL (triggered ()), this, SLOT (handleRefresh ())); Upload_ = new QAction (Proxy_->GetIconThemeManager ()->GetIcon ("svn-commit"), tr ("Upload"), this); connect (Upload_, SIGNAL (triggered ()), this, SLOT (handleUpload ())); ToolBar_->addActions ({ Refresh_, Util::CreateSeparator (ToolBar_), CreateDir_, Upload_ }); ToolBar_->addSeparator (); OpenTrash_ = new QAction (Proxy_->GetIconThemeManager ()->GetIcon ("user-trash"), tr ("Open trash"), this); OpenTrash_->setCheckable (true); connect (OpenTrash_, SIGNAL (triggered (bool)),