MCPcopy Create free account
hub / github.com/KangLin/RabbitRemoteControl / slotCustomContextMenuRequested

Method slotCustomContextMenuRequested

App/Client/mainwindow.cpp:918–938  ·  view source on GitHub ↗

! * \brief MainWindow::slotCustomContextMenuRequested * \param pos: The view is converted to global coordinates * \see CViewSplitterContainer::slotCustomContextMenuRequested * CViewTable::CViewTable */

Source from the content-addressed store, hash-verified

916 * CViewTable::CViewTable
917 */
918void MainWindow::slotCustomContextMenuRequested(const QPoint &pos)
919{
920 if(!m_pView)
921 return;
922 auto pWin = m_pView->GetCurrentView();
923 if(!pWin) {
924 qDebug(log) << "The current view is empty";
925 return;
926 }
927 foreach(auto p, m_Operates)
928 {
929 if(p->GetViewer() == pWin)
930 {
931 qDebug(log) << "Load plugin menu";
932 auto m = p->GetMenu(ui->menuTools);
933 if(!m) return;
934 // Note: The view is converted to global coordinates
935 m->exec(pos);
936 }
937 }
938}
939
940void MainWindow::on_actionExit_E_triggered()
941{

Callers

nothing calls this directly

Calls 1

GetCurrentViewMethod · 0.45

Tested by

no test coverage detected