//----------------------------------------------------------------------------- void UndoRedoGuiCommand::init () { setShortcut (UNDO_, QKeySequence::Undo); setShortcut (REDO_, QKeySequence::Redo); setIcon (UNDO_, QIcon (":/images/ic_undo_black_24dp.png")); setIcon (REDO_, QIcon (":/images/ic_redo_black_24dp.png")); resetActionTriggerSlot (UNDO_, SLOT(undo())); resetActionTriggerSlot (REDO_, SLOT(redo())); }
//----------------------------------------------------------------------------- void CloseFileGuiCommand::init () { getQAction(CLOSE_FILE_)->setShortcut (QKeySequence::Close); getQAction(CLOSE_FILE_)->setIcon (QIcon(":/images/icons/fileclose.png")); getQAction(EXIT_APPLICATION_)->setShortcut (QKeySequence::Quit); getQAction(EXIT_APPLICATION_)->setIcon (QIcon(":/images/icons/exit.png")); resetActionTriggerSlot(CLOSE_FILE_, SLOT(closeFile())); resetActionTriggerSlot(EXIT_APPLICATION_, SLOT(exitApplication())); }