| 234 | } |
| 235 | |
| 236 | void MainWindow::createActions() |
| 237 | { |
| 238 | openAct = new QAction(QIcon(":/images/open.png"), tr("&Open..."), this); |
| 239 | openAct->setShortcuts(QKeySequence::Open); |
| 240 | openAct->setStatusTip(tr("Open an existing file")); |
| 241 | connect(openAct, SIGNAL(triggered()), this, SLOT(open())); |
| 242 | |
| 243 | saveAct = new QAction(QIcon(":/images/save.png"), tr("&Save"), this); |
| 244 | saveAct->setShortcuts(QKeySequence::Save); |
| 245 | saveAct->setStatusTip(tr("Save the document to disk")); |
| 246 | connect(saveAct, SIGNAL(triggered()), this, SLOT(save())); |
| 247 | |
| 248 | saveAsAct = new QAction(tr("Save &As..."), this); |
| 249 | saveAsAct->setShortcuts(QKeySequence::SaveAs); |
| 250 | saveAsAct->setStatusTip(tr("Save the document under a new name")); |
| 251 | connect(saveAsAct, SIGNAL(triggered()), this, SLOT(saveAs())); |
| 252 | |
| 253 | saveReadable = new QAction(tr("Save &Readable..."), this); |
| 254 | saveReadable->setStatusTip(tr("Save document in readable form")); |
| 255 | connect(saveReadable, SIGNAL(triggered()), this, SLOT(saveToReadableFile())); |
| 256 | |
| 257 | exitAct = new QAction(tr("E&xit"), this); |
| 258 | exitAct->setShortcuts(QKeySequence::Quit); |
| 259 | exitAct->setStatusTip(tr("Exit the application")); |
| 260 | connect(exitAct, SIGNAL(triggered()), qApp, SLOT(closeAllWindows())); |
| 261 | |
| 262 | undoAct = new QAction(QIcon(":/images/undo.png"), tr("&Undo"), this); |
| 263 | undoAct->setShortcuts(QKeySequence::Undo); |
| 264 | connect(undoAct, SIGNAL(triggered()), hexEdit, SLOT(undo())); |
| 265 | |
| 266 | redoAct = new QAction(QIcon(":/images/redo.png"), tr("&Redo"), this); |
| 267 | redoAct->setShortcuts(QKeySequence::Redo); |
| 268 | connect(redoAct, SIGNAL(triggered()), hexEdit, SLOT(redo())); |
| 269 | |
| 270 | saveSelectionReadable = new QAction(tr("&Save Selection Readable..."), this); |
| 271 | saveSelectionReadable->setStatusTip(tr("Save selection in readable form")); |
| 272 | connect(saveSelectionReadable, SIGNAL(triggered()), this, SLOT(saveSelectionToReadableFile())); |
| 273 | |
| 274 | aboutAct = new QAction(tr("&About"), this); |
| 275 | aboutAct->setStatusTip(tr("Show the application's About box")); |
| 276 | connect(aboutAct, SIGNAL(triggered()), this, SLOT(about())); |
| 277 | |
| 278 | aboutQtAct = new QAction(tr("About &Qt"), this); |
| 279 | aboutQtAct->setStatusTip(tr("Show the Qt library's About box")); |
| 280 | connect(aboutQtAct, SIGNAL(triggered()), qApp, SLOT(aboutQt())); |
| 281 | |
| 282 | findAct = new QAction(QIcon(":/images/find.png"), tr("&Find/Replace"), this); |
| 283 | findAct->setShortcuts(QKeySequence::Find); |
| 284 | findAct->setStatusTip(tr("Show the Dialog for finding and replacing")); |
| 285 | connect(findAct, SIGNAL(triggered()), this, SLOT(showSearchDialog())); |
| 286 | |
| 287 | findNextAct = new QAction(tr("Find &next"), this); |
| 288 | findNextAct->setShortcuts(QKeySequence::FindNext); |
| 289 | findNextAct->setStatusTip(tr("Find next occurrence of the searched pattern")); |
| 290 | connect(findNextAct, SIGNAL(triggered()), this, SLOT(findNext())); |
| 291 | |
| 292 | optionsAct = new QAction(tr("&Options"), this); |
| 293 | optionsAct->setStatusTip(tr("Show the Dialog to select applications options")); |
nothing calls this directly
no outgoing calls
no test coverage detected