void TutorialSelector::openCategory( const Category &C) { emit openTutorial(""); loadTutorials(C.xmlFilename); emit openCategory(C.name); emit openHTML(C.htmlFilename); currentCategory=C; }
void TutorialSelector::changeRequested( QTreeWidgetItem *item ) { if (itemToTutorial.find(item) != itemToTutorial.end()) { const Tutorial &T=itemToTutorial[item]; openTutorial(T); } else if (itemToCategory.find(item) != itemToCategory.end()) { const Category &C=itemToCategory[item]; openCategory(C); } }
HelpAppliance::HelpAppliance(QObject *parent) : QObject(parent) , m_helpScene(new HelpScene) , m_dummyWidget(new QWidget) { // create the gui components over a dummy widget ui.setupUi(m_dummyWidget); ui.tutorialButton->setVisible(App::onlineServices->checkForTutorial()); connect(App::onlineServices, SIGNAL(tutorialFound(bool)), ui.tutorialButton, SLOT(setVisible(bool))); connect(ui.webButton, SIGNAL(clicked()), App::onlineServices, SLOT(openWebpage())); connect(ui.blogButton, SIGNAL(clicked()), App::onlineServices, SLOT(openBlog())); connect(ui.tutorialButton, SIGNAL(clicked()), App::onlineServices, SLOT(openTutorial())); connect(ui.updateButton, SIGNAL(clicked()), App::onlineServices, SLOT(checkForUpdates())); // listen to scene events connect(m_helpScene->helpItem, SIGNAL(closeMe()), this, SLOT(slotClose())); // customize appliance sceneSet(m_helpScene); topbarAddWidget(ui.helpBox); setFocusToScene(); }
void TutorialSelector::openTutorial( const Tutorial &T) { emit openTutorial(T.sceneFilename); emit openHTML(T.htmlFilename); }
void MainWindow::createShortcuts() { m_LoadShortcut = new QShortcut(QKeySequence(ShortcutKeys::loadShortcutKey), this); connect(m_LoadShortcut, SIGNAL(activated()), this, SLOT(loadCrossword())); m_SaveShortcut = new QShortcut(QKeySequence(ShortcutKeys::saveShortcutKey), this); connect(m_SaveShortcut, SIGNAL(activated()), this, SLOT(saveCrossword())); m_HelpShortcut = new QShortcut(QKeySequence(ShortcutKeys::helpShortcutKey), this); connect(m_HelpShortcut, SIGNAL(activated()), this, SLOT(openHelp())); m_ExitShortcut = new QShortcut(QKeySequence(ShortcutKeys::exitShortcutKey), this); connect(m_ExitShortcut, SIGNAL(activated()), this, SLOT(exitConfirmation())); m_TutorialShortcut = new QShortcut(QKeySequence(ShortcutKeys::tutorialShortcutKey), this); connect(m_TutorialShortcut, SIGNAL(activated()), this, SLOT(openTutorial())); m_EmailAnswersShortcut = new QShortcut(QKeySequence(ShortcutKeys::emailAnswersKey), this); connect(m_EmailAnswersShortcut, SIGNAL(activated()), this, SLOT(emailAnswers())); m_EmailFeedbackShortcut = new QShortcut(QKeySequence(ShortcutKeys::emailFeedbackKey), this); connect(m_EmailFeedbackShortcut, SIGNAL(activated()), this, SLOT(emailFeedback())); m_PrintAnswersShortcut = new QShortcut(QKeySequence(ShortcutKeys::printAnswersKey), this); connect(m_PrintAnswersShortcut, SIGNAL(activated()), this, SLOT(printAnswers())); m_ScoreShortcut = new QShortcut(QKeySequence(ShortcutKeys::markShortcutKey), this); connect(m_ScoreShortcut, SIGNAL(activated()), this, SLOT(scoreCrossword())); m_FilePropertiesShortcut = new QShortcut(QKeySequence(ShortcutKeys::filePropertiesShortcutKey), this); connect(m_FilePropertiesShortcut, SIGNAL(activated()), this, SLOT(showFileProperties())); m_FilterTableViewShortcut = new QShortcut(QKeySequence(ShortcutKeys::filterTableViewShortcutKey), this); connect(m_FilterTableViewShortcut, SIGNAL(activated()), this, SLOT(cycleTableViewFilter())); m_CycleSpeechModeShortcut = new QShortcut(QKeySequence(ShortcutKeys::cycleSpeechModeShortcutKey), this); connect(m_CycleSpeechModeShortcut, SIGNAL(activated()), this, SLOT(cycleSpeechMode())); m_StopSpeechShortcut = new QShortcut(QKeySequence(ShortcutKeys::stopSpeechKey), this); connect(m_StopSpeechShortcut, SIGNAL(activated()), this, SLOT(stopSpeech())); m_ApplicationOpenReminderShortcut = new QShortcut(QKeySequence(ShortcutKeys::toggleApplicationOpenReminderKey), this); connect(m_ApplicationOpenReminderShortcut, SIGNAL(activated()), this, SLOT(toggleApplicationOpenReminder())); m_ReadCurrentClueWordShortcut = new QShortcut(QKeySequence(ShortcutKeys::readCurrentClueWordKey), this); connect(m_ReadCurrentClueWordShortcut, SIGNAL(activated()), this, SLOT(readCurrentWordInClue())); m_AdvanceCurrentClueWordShortcut = new QShortcut(QKeySequence(ShortcutKeys::advanceClueWordKey), this); connect(m_AdvanceCurrentClueWordShortcut, SIGNAL(activated()), this, SLOT(advanceToNextWordInClue())); m_IncreaseSpeechRateShortcut = new QShortcut(QKeySequence(ShortcutKeys::increaseSpeechRateKey), this); connect(m_IncreaseSpeechRateShortcut, SIGNAL(activated()), this, SLOT(increaseSpeechRate())); m_DecreaseSpeechRateShortcut = new QShortcut(QKeySequence(ShortcutKeys::decreaseSpeechRateKey), this); connect(m_DecreaseSpeechRateShortcut, SIGNAL(activated()), this, SLOT(decreaseSpeechRate())); m_ReadLastSpokenPhraseShortcut = new QShortcut(QKeySequence(ShortcutKeys::readLastSpokenPhraseKey), this); connect(m_ReadLastSpokenPhraseShortcut, SIGNAL(activated()), this, SLOT(readLastSpokenPhrase())); m_CycleViewVisibilityShortcut = new QShortcut(QKeySequence(ShortcutKeys::cycleViewVisibilityKey), this); connect(m_CycleViewVisibilityShortcut, SIGNAL(activated()), this, SLOT(cycleViewVisibility())); }