| 1174 | } |
| 1175 | |
| 1176 | void Controller::registerDefaultActions() |
| 1177 | { |
| 1178 | auto mFile = ActionManager::instance()->actionContainer(M_FILE); |
| 1179 | auto mHelp = ActionManager::instance()->actionContainer(M_HELP); |
| 1180 | |
| 1181 | // file actions |
| 1182 | QAction *act = new QAction(tr("Open File"), mFile); |
| 1183 | auto cmd = ActionManager::instance()->registerAction(act, A_OPEN_FILE); |
| 1184 | cmd->setDefaultKeySequence(Qt::CTRL | Qt::Key_O); |
| 1185 | mFile->addAction(cmd, G_FILE_OPEN); |
| 1186 | connect(act, &QAction::triggered, this, &Controller::openFileDialog); |
| 1187 | |
| 1188 | act = new QAction(tr("Open Project"), mFile); |
| 1189 | cmd = ActionManager::instance()->registerAction(act, A_OPEN_PROJECT); |
| 1190 | mFile->addAction(cmd, G_FILE_OPEN); |
| 1191 | connect(act, &QAction::triggered, this, [=]() { |
| 1192 | auto prjService = dpfGetService(ProjectService); |
| 1193 | prjService->openProject(); |
| 1194 | }); |
| 1195 | |
| 1196 | // help actions |
| 1197 | act = new QAction(tr("Report Bug"), mHelp); |
| 1198 | cmd = ActionManager::instance()->registerAction(act, A_REPORTBUG); |
| 1199 | mHelp->addAction(cmd); |
| 1200 | connect(act, &QAction::triggered, this, [=]() { |
| 1201 | QDesktopServices::openUrl(QUrl("https://github.com/linuxdeepin/deepin-unioncode/issues")); |
| 1202 | }); |
| 1203 | |
| 1204 | act = new QAction(tr("Help Documents"), mHelp); |
| 1205 | cmd = ActionManager::instance()->registerAction(act, A_HELPDOC); |
| 1206 | mHelp->addAction(cmd); |
| 1207 | connect(act, &QAction::triggered, this, [=]() { |
| 1208 | QDesktopServices::openUrl(QUrl("https://uosdn.uniontech.com/#document2?dirid=656d40a9bd766615b0b02e5e")); |
| 1209 | }); |
| 1210 | } |
| 1211 | |
| 1212 | void Controller::showStatusBar() |
| 1213 | { |
nothing calls this directly
no test coverage detected