| 44 | } |
| 45 | |
| 46 | int COperatePlayer::InitialMenu() |
| 47 | { |
| 48 | bool check = false; |
| 49 | int nRet = 0; |
| 50 | |
| 51 | #if HAVE_QT6_RECORD |
| 52 | m_pRecord = new QAction( |
| 53 | QIcon::fromTheme("media-record"), tr("Record"), &m_Menu); |
| 54 | m_pRecord->setCheckable(true); |
| 55 | check = connect(m_pRecord, SIGNAL(toggled(bool)), |
| 56 | this, SLOT(slotRecord(bool))); |
| 57 | Q_ASSERT(check); |
| 58 | |
| 59 | m_pRecordPause = new QAction( |
| 60 | QIcon::fromTheme("media-playback-pause"), tr("Record pause"), &m_Menu); |
| 61 | m_pRecordPause->setCheckable(true); |
| 62 | m_pRecordPause->setEnabled(false); |
| 63 | check = connect(m_pRecordPause, SIGNAL(toggled(bool)), |
| 64 | this, SIGNAL(sigRecordPause(bool))); |
| 65 | Q_ASSERT(check); |
| 66 | #endif |
| 67 | |
| 68 | m_pScreenShot = new QAction(QIcon::fromTheme("camera-photo"), |
| 69 | tr("ScreenShot"), &m_Menu); |
| 70 | check = connect(m_pScreenShot, SIGNAL(triggered()), |
| 71 | this, SLOT(slotScreenShot())); |
| 72 | Q_ASSERT(check); |
| 73 | |
| 74 | #ifdef HAVE_QVideoWidget |
| 75 | m_Menu.addAction(m_Player.m_paStart); |
| 76 | check = connect(this, &COperatePlayer::sigRunning, |
| 77 | m_Player.m_paStart, &QAction::toggle); |
| 78 | Q_ASSERT(check); |
| 79 | check = connect(m_Player.m_paStart, SIGNAL(toggled(bool)), |
| 80 | this, SIGNAL(sigStart(bool))); |
| 81 | Q_ASSERT(check); |
| 82 | |
| 83 | m_Menu.addAction(m_Player.m_paPause); |
| 84 | check = connect(m_Player.m_paPause, SIGNAL(toggled(bool)), |
| 85 | this, SIGNAL(sigPause(bool))); |
| 86 | Q_ASSERT(check); |
| 87 | |
| 88 | #if HAVE_QT6_RECORD |
| 89 | m_Menu.addAction(m_Player.m_paRecord); |
| 90 | check = connect(m_Player.m_paRecord, SIGNAL(toggled(bool)), |
| 91 | m_pRecord ,SIGNAL(toggled(bool))); |
| 92 | Q_ASSERT(check); |
| 93 | |
| 94 | m_Menu.addAction(m_Player.m_paRecordPause); |
| 95 | check = connect(m_Player.m_paRecordPause, SIGNAL(toggled(bool)), |
| 96 | m_pRecordPause, SIGNAL(toggled(bool))); |
| 97 | Q_ASSERT(check); |
| 98 | #endif |
| 99 | |
| 100 | m_Menu.addAction(m_Player.m_paScreenShot); |
| 101 | check = connect(m_Player.m_paScreenShot, &QAction::triggered, |
| 102 | m_pScreenShot, &QAction::triggered); |
| 103 | Q_ASSERT(check); |
nothing calls this directly
no test coverage detected