| 110 | } |
| 111 | |
| 112 | MainWindow::MainWindow(ICaptureContext &ctx) : QMainWindow(NULL), ui(new Ui::MainWindow), m_Ctx(ctx) |
| 113 | { |
| 114 | ui->setupUi(this); |
| 115 | |
| 116 | setProperty("ICaptureContext", QVariant::fromValue((void *)&ctx)); |
| 117 | |
| 118 | #if defined(Q_OS_WIN32) |
| 119 | // remove inject menu item when it's not enabled in the settings |
| 120 | if(!ctx.Config().AllowProcessInject) |
| 121 | ui->menu_File->removeAction(ui->action_Inject_into_Process); |
| 122 | #else |
| 123 | // process injection is not supported on non-Windows, so remove the menu item rather than disable |
| 124 | // it without a clear way to communicate that it is never supported |
| 125 | ui->menu_File->removeAction(ui->action_Inject_into_Process); |
| 126 | #endif |
| 127 | |
| 128 | QToolTip::setPalette(palette()); |
| 129 | |
| 130 | qApp->installEventFilter(this); |
| 131 | |
| 132 | setAcceptDrops(true); |
| 133 | |
| 134 | QObject::connect(ui->menu_Tools, &QMenu::aboutToShow, this, &MainWindow::updateToolsMenuOptions); |
| 135 | |
| 136 | QObject::connect(ui->action_Load_Default_Layout, &QAction::triggered, this, |
| 137 | &MainWindow::loadLayout_triggered); |
| 138 | QObject::connect(ui->action_Load_Layout_1, &QAction::triggered, this, |
| 139 | &MainWindow::loadLayout_triggered); |
| 140 | QObject::connect(ui->action_Load_Layout_2, &QAction::triggered, this, |
| 141 | &MainWindow::loadLayout_triggered); |
| 142 | QObject::connect(ui->action_Load_Layout_3, &QAction::triggered, this, |
| 143 | &MainWindow::loadLayout_triggered); |
| 144 | QObject::connect(ui->action_Load_Layout_4, &QAction::triggered, this, |
| 145 | &MainWindow::loadLayout_triggered); |
| 146 | QObject::connect(ui->action_Load_Layout_5, &QAction::triggered, this, |
| 147 | &MainWindow::loadLayout_triggered); |
| 148 | QObject::connect(ui->action_Load_Layout_6, &QAction::triggered, this, |
| 149 | &MainWindow::loadLayout_triggered); |
| 150 | |
| 151 | QObject::connect(ui->action_Save_Default_Layout, &QAction::triggered, this, |
| 152 | &MainWindow::saveLayout_triggered); |
| 153 | QObject::connect(ui->action_Save_Layout_1, &QAction::triggered, this, |
| 154 | &MainWindow::saveLayout_triggered); |
| 155 | QObject::connect(ui->action_Save_Layout_2, &QAction::triggered, this, |
| 156 | &MainWindow::saveLayout_triggered); |
| 157 | QObject::connect(ui->action_Save_Layout_3, &QAction::triggered, this, |
| 158 | &MainWindow::saveLayout_triggered); |
| 159 | QObject::connect(ui->action_Save_Layout_4, &QAction::triggered, this, |
| 160 | &MainWindow::saveLayout_triggered); |
| 161 | QObject::connect(ui->action_Save_Layout_5, &QAction::triggered, this, |
| 162 | &MainWindow::saveLayout_triggered); |
| 163 | QObject::connect(ui->action_Save_Layout_6, &QAction::triggered, this, |
| 164 | &MainWindow::saveLayout_triggered); |
| 165 | |
| 166 | QObject::connect(ui->action_Launch_Application_Window, &QAction::triggered, this, |
| 167 | &MainWindow::on_action_Launch_Application_triggered); |
| 168 | |
| 169 | QObject::connect(ui->action_Clear_Capture_Files_History, &QAction::triggered, this, |
nothing calls this directly
no test coverage detected