bool ProjectContentComponent::perform (const InvocationInfo& info) { switch (info.commandID) { case CommandIDs::saveProject: case CommandIDs::closeProject: case CommandIDs::saveDocument: case CommandIDs::saveDocumentAs: case CommandIDs::closeDocument: case CommandIDs::goToPreviousDoc: case CommandIDs::goToNextDoc: case CommandIDs::goToCounterpart: case CommandIDs::saveAndOpenInIDE: if (reinvokeCommandAfterCancellingModalComps (info)) { grabKeyboardFocus(); // to force any open labels to close their text editors return true; } break; default: break; } if (isCurrentlyBlockedByAnotherModalComponent()) return false; switch (info.commandID) { case CommandIDs::saveProject: saveProject(); break; case CommandIDs::closeProject: closeProject(); break; case CommandIDs::saveDocument: saveDocument(); break; case CommandIDs::saveDocumentAs: saveAs(); break; case CommandIDs::closeDocument: closeDocument(); break; case CommandIDs::goToPreviousDoc: goToPreviousFile(); break; case CommandIDs::goToNextDoc: goToNextFile(); break; case CommandIDs::goToCounterpart: goToCounterpart(); break; case CommandIDs::showFilePanel: showFilesTab(); break; case CommandIDs::showConfigPanel: showConfigTab(); break; case CommandIDs::showProjectSettings: showProjectSettings(); break; case CommandIDs::showProjectModules: showModules(); break; case CommandIDs::openInIDE: openInIDE (false); break; case CommandIDs::saveAndOpenInIDE: openInIDE (true); break; case CommandIDs::createNewExporter: showNewExporterMenu(); break; case CommandIDs::deleteSelectedItem: deleteSelectedTreeItems(); break; case CommandIDs::showTranslationTool: showTranslationTool(); break; default: return false; } return true; }
void MainWindow::ConnectProject(Project *newProject) { if (newProject) { connect(newProject, SIGNAL(newDomainSelected()), this, SLOT(updateVisibleDomain())); connect(newProject, SIGNAL(newDomainSelected()), ui->GLPanel, SLOT(updateGL())); connect(ui->createSubdomainButton, SIGNAL(clicked()), newProject, SLOT(createSubdomain())); connect(ui->saveProjectButton, SIGNAL(clicked()), newProject, SLOT(saveProject())); connect(ui->actionProjectSettings, SIGNAL(triggered()), newProject, SLOT(showProjectSettings())); connect(ui->runFullDomainButton, SIGNAL(clicked()), newProject, SLOT(runFullDomain())); connect(newProject, SIGNAL(showProjectExplorerPane()), this, SLOT(showProjectExplorerPane())); connect(newProject, SIGNAL(showCreateSubdomainPane()), this, SLOT(showCreateSubdomainPane())); connect(newProject, SIGNAL(showEditSubdomainPane()), this, SLOT(showEditSubdomainPane())); connect(newProject, SIGNAL(showAdcircPane()), this, SLOT(showAdcircPane())); connect(newProject, SIGNAL(showAnalyzeResultsPane()), this, SLOT(showAnalyzeResultsPane())); } }
bool ProjectContentComponent::perform (const InvocationInfo& info) { switch (info.commandID) { case CommandIDs::saveProject: case CommandIDs::closeProject: case CommandIDs::saveDocument: case CommandIDs::saveDocumentAs: case CommandIDs::closeDocument: case CommandIDs::goToPreviousDoc: case CommandIDs::goToNextDoc: case CommandIDs::goToCounterpart: case CommandIDs::saveAndOpenInIDE: if (reinvokeCommandAfterCancellingModalComps (info)) { grabKeyboardFocus(); // to force any open labels to close their text editors return true; } break; default: break; } if (isCurrentlyBlockedByAnotherModalComponent()) return false; switch (info.commandID) { case CommandIDs::saveProject: saveProject(); break; case CommandIDs::closeProject: closeProject(); break; case CommandIDs::saveDocument: saveDocument(); break; case CommandIDs::saveDocumentAs: saveAs(); break; case CommandIDs::closeDocument: closeDocument(); break; case CommandIDs::goToPreviousDoc: goToPreviousFile(); break; case CommandIDs::goToNextDoc: goToNextFile(); break; case CommandIDs::goToCounterpart: goToCounterpart(); break; case CommandIDs::showProjectSettings: showProjectSettings(); break; case CommandIDs::showProjectTab: showProjectTab(); break; case CommandIDs::showBuildTab: showBuildTab(); break; case CommandIDs::showFileExplorerPanel: showFilesPanel(); break; case CommandIDs::showModulesPanel: showModulesPanel(); break; case CommandIDs::showExportersPanel: showExportersPanel(); break; case CommandIDs::showExporterSettings: showCurrentExporterSettings(); break; case CommandIDs::openInIDE: openInSelectedIDE (false); break; case CommandIDs::saveAndOpenInIDE: openInSelectedIDE (true); break; case CommandIDs::createNewExporter: showNewExporterMenu(); break; case CommandIDs::deleteSelectedItem: deleteSelectedTreeItems(); break; case CommandIDs::showTranslationTool: showTranslationTool(); break; case CommandIDs::cleanAll: cleanAll(); break; case CommandIDs::toggleBuildEnabled: setBuildEnabled (! isBuildEnabled()); break; case CommandIDs::buildNow: rebuildNow(); break; case CommandIDs::toggleContinuousBuild: setContinuousRebuildEnabled (! isContinuousRebuildEnabled()); break; case CommandIDs::launchApp: launchApp(); break; case CommandIDs::killApp: killApp(); break; case CommandIDs::reinstantiateComp: reinstantiateLivePreviewWindows(); break; case CommandIDs::showWarnings: toggleWarnings(); break; case CommandIDs::nextError: showNextError(); break; case CommandIDs::prevError: showPreviousError(); break; default: return false; } return true; }