|
|
|
@ -54,43 +54,43 @@ void CSVDoc::View::setupFileMenu()
|
|
|
|
|
QMenu *file = menuBar()->addMenu (tr ("File"));
|
|
|
|
|
|
|
|
|
|
QAction* newGame = createMenuEntry("New Game", ":./menu-new-game.png", file, "document-file-newgame");
|
|
|
|
|
connect (newGame, SIGNAL (triggered()), this, SIGNAL (newGameRequest()));
|
|
|
|
|
connect (newGame, &QAction::triggered, this, &View::newGameRequest);
|
|
|
|
|
|
|
|
|
|
QAction* newAddon = createMenuEntry("New Addon", ":./menu-new-addon.png", file, "document-file-newaddon");
|
|
|
|
|
connect (newAddon, SIGNAL (triggered()), this, SIGNAL (newAddonRequest()));
|
|
|
|
|
connect (newAddon, &QAction::triggered, this, &View::newAddonRequest);
|
|
|
|
|
|
|
|
|
|
QAction* open = createMenuEntry("Open", ":./menu-open.png", file, "document-file-open");
|
|
|
|
|
connect (open, SIGNAL (triggered()), this, SIGNAL (loadDocumentRequest()));
|
|
|
|
|
connect (open, &QAction::triggered, this, &View::loadDocumentRequest);
|
|
|
|
|
|
|
|
|
|
QAction* save = createMenuEntry("Save", ":./menu-save.png", file, "document-file-save");
|
|
|
|
|
connect (save, SIGNAL (triggered()), this, SLOT (save()));
|
|
|
|
|
connect (save, &QAction::triggered, this, &View::save);
|
|
|
|
|
mSave = save;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
file->addSeparator();
|
|
|
|
|
|
|
|
|
|
QAction* verify = createMenuEntry("Verify", ":./menu-verify.png", file, "document-file-verify");
|
|
|
|
|
connect (verify, SIGNAL (triggered()), this, SLOT (verify()));
|
|
|
|
|
connect (verify, &QAction::triggered, this, &View::verify);
|
|
|
|
|
mVerify = verify;
|
|
|
|
|
|
|
|
|
|
QAction* merge = createMenuEntry("Merge", ":./menu-merge.png", file, "document-file-merge");
|
|
|
|
|
connect (merge, SIGNAL (triggered()), this, SLOT (merge()));
|
|
|
|
|
connect (merge, &QAction::triggered, this, &View::merge);
|
|
|
|
|
mMerge = merge;
|
|
|
|
|
|
|
|
|
|
QAction* loadErrors = createMenuEntry("Error Log", ":./error-log.png", file, "document-file-errorlog");
|
|
|
|
|
connect (loadErrors, SIGNAL (triggered()), this, SLOT (loadErrorLog()));
|
|
|
|
|
connect (loadErrors, &QAction::triggered, this, &View::loadErrorLog);
|
|
|
|
|
|
|
|
|
|
QAction* meta = createMenuEntry(CSMWorld::UniversalId::Type_MetaDatas, file, "document-file-metadata");
|
|
|
|
|
connect (meta, SIGNAL (triggered()), this, SLOT (addMetaDataSubView()));
|
|
|
|
|
connect (meta, &QAction::triggered, this, &View::addMetaDataSubView);
|
|
|
|
|
|
|
|
|
|
file->addSeparator();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
QAction* close = createMenuEntry("Close", ":./menu-close.png", file, "document-file-close");
|
|
|
|
|
connect (close, SIGNAL (triggered()), this, SLOT (close()));
|
|
|
|
|
connect (close, &QAction::triggered, this, &View::close);
|
|
|
|
|
|
|
|
|
|
QAction* exit = createMenuEntry("Exit", ":./menu-exit.png", file, "document-file-exit");
|
|
|
|
|
connect (exit, SIGNAL (triggered()), this, SLOT (exit()));
|
|
|
|
|
connect (exit, &QAction::triggered, this, &View::exit);
|
|
|
|
|
|
|
|
|
|
connect (this, SIGNAL(exitApplicationRequest(CSVDoc::View *)), &mViewManager, SLOT(exitApplication(CSVDoc::View *)));
|
|
|
|
|
connect (this, &View::exitApplicationRequest, &mViewManager, &ViewManager::exitApplication);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
namespace
|
|
|
|
@ -121,21 +121,21 @@ void CSVDoc::View::setupEditMenu()
|
|
|
|
|
|
|
|
|
|
mUndo = mDocument->getUndoStack().createUndoAction (this, tr("Undo"));
|
|
|
|
|
setupShortcut("document-edit-undo", mUndo);
|
|
|
|
|
connect(mUndo, SIGNAL (changed ()), this, SLOT (undoActionChanged ()));
|
|
|
|
|
connect(mUndo, &QAction::changed, this, &View::undoActionChanged);
|
|
|
|
|
mUndo->setIcon(QIcon(QString::fromStdString(":./menu-undo.png")));
|
|
|
|
|
edit->addAction (mUndo);
|
|
|
|
|
|
|
|
|
|
mRedo = mDocument->getUndoStack().createRedoAction (this, tr("Redo"));
|
|
|
|
|
connect(mRedo, SIGNAL (changed ()), this, SLOT (redoActionChanged ()));
|
|
|
|
|
connect(mRedo, &QAction::changed, this, &View::redoActionChanged);
|
|
|
|
|
setupShortcut("document-edit-redo", mRedo);
|
|
|
|
|
mRedo->setIcon(QIcon(QString::fromStdString(":./menu-redo.png")));
|
|
|
|
|
edit->addAction (mRedo);
|
|
|
|
|
|
|
|
|
|
QAction* userSettings = createMenuEntry("Preferences", ":./menu-preferences.png", edit, "document-edit-preferences");
|
|
|
|
|
connect (userSettings, SIGNAL (triggered()), this, SIGNAL (editSettingsRequest()));
|
|
|
|
|
connect (userSettings, &QAction::triggered, this, &View::editSettingsRequest);
|
|
|
|
|
|
|
|
|
|
QAction* search = createMenuEntry(CSMWorld::UniversalId::Type_Search, edit, "document-edit-search");
|
|
|
|
|
connect (search, SIGNAL (triggered()), this, SLOT (addSearchSubView()));
|
|
|
|
|
connect (search, &QAction::triggered, this, &View::addSearchSubView);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void CSVDoc::View::setupViewMenu()
|
|
|
|
@ -143,17 +143,17 @@ void CSVDoc::View::setupViewMenu()
|
|
|
|
|
QMenu *view = menuBar()->addMenu (tr ("View"));
|
|
|
|
|
|
|
|
|
|
QAction *newWindow = createMenuEntry("New View", ":./menu-new-window.png", view, "document-view-newview");
|
|
|
|
|
connect (newWindow, SIGNAL (triggered()), this, SLOT (newView()));
|
|
|
|
|
connect (newWindow, &QAction::triggered, this, &View::newView);
|
|
|
|
|
|
|
|
|
|
mShowStatusBar = createMenuEntry("Toggle Status Bar", ":./menu-status-bar.png", view, "document-view-statusbar");
|
|
|
|
|
connect (mShowStatusBar, SIGNAL (toggled (bool)), this, SLOT (toggleShowStatusBar (bool)));
|
|
|
|
|
connect (mShowStatusBar, &QAction::toggled, this, &View::toggleShowStatusBar);
|
|
|
|
|
mShowStatusBar->setCheckable (true);
|
|
|
|
|
mShowStatusBar->setChecked (CSMPrefs::get()["Windows"]["show-statusbar"].isTrue());
|
|
|
|
|
|
|
|
|
|
view->addAction (mShowStatusBar);
|
|
|
|
|
|
|
|
|
|
QAction *filters = createMenuEntry(CSMWorld::UniversalId::Type_Filters, view, "document-mechanics-filters");
|
|
|
|
|
connect (filters, SIGNAL (triggered()), this, SLOT (addFiltersSubView()));
|
|
|
|
|
connect (filters, &QAction::triggered, this, &View::addFiltersSubView);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void CSVDoc::View::setupWorldMenu()
|
|
|
|
@ -161,32 +161,32 @@ void CSVDoc::View::setupWorldMenu()
|
|
|
|
|
QMenu *world = menuBar()->addMenu (tr ("World"));
|
|
|
|
|
|
|
|
|
|
QAction* referenceables = createMenuEntry(CSMWorld::UniversalId::Type_Referenceables, world, "document-world-referencables");
|
|
|
|
|
connect (referenceables, SIGNAL (triggered()), this, SLOT (addReferenceablesSubView()));
|
|
|
|
|
connect (referenceables, &QAction::triggered, this, &View::addReferenceablesSubView);
|
|
|
|
|
|
|
|
|
|
QAction* references = createMenuEntry(CSMWorld::UniversalId::Type_References, world, "document-world-references");
|
|
|
|
|
connect (references, SIGNAL (triggered()), this, SLOT (addReferencesSubView()));
|
|
|
|
|
|
|
|
|
|
connect (references, &QAction::triggered, this, &View::addReferencesSubView);
|
|
|
|
|
|
|
|
|
|
world->addSeparator();
|
|
|
|
|
|
|
|
|
|
QAction* cells = createMenuEntry(CSMWorld::UniversalId::Type_Cells, world, "document-world-cells");
|
|
|
|
|
connect (cells, SIGNAL (triggered()), this, SLOT (addCellsSubView()));
|
|
|
|
|
connect (cells, &QAction::triggered, this, &View::addCellsSubView);
|
|
|
|
|
|
|
|
|
|
QAction *lands = createMenuEntry(CSMWorld::UniversalId::Type_Lands, world, "document-world-lands");
|
|
|
|
|
connect (lands, SIGNAL (triggered()), this, SLOT (addLandsSubView()));
|
|
|
|
|
connect (lands, &QAction::triggered, this, &View::addLandsSubView);
|
|
|
|
|
|
|
|
|
|
QAction *landTextures = createMenuEntry(CSMWorld::UniversalId::Type_LandTextures, world, "document-world-landtextures");
|
|
|
|
|
connect (landTextures, SIGNAL (triggered()), this, SLOT (addLandTexturesSubView()));
|
|
|
|
|
connect (landTextures, &QAction::triggered, this, &View::addLandTexturesSubView);
|
|
|
|
|
|
|
|
|
|
QAction *grid = createMenuEntry(CSMWorld::UniversalId::Type_Pathgrids, world, "document-world-pathgrid");
|
|
|
|
|
connect (grid, SIGNAL (triggered()), this, SLOT (addPathgridSubView()));
|
|
|
|
|
connect (grid, &QAction::triggered, this, &View::addPathgridSubView);
|
|
|
|
|
|
|
|
|
|
world->addSeparator();
|
|
|
|
|
|
|
|
|
|
QAction* regions = createMenuEntry(CSMWorld::UniversalId::Type_Regions, world, "document-world-regions");
|
|
|
|
|
connect (regions, SIGNAL (triggered()), this, SLOT (addRegionsSubView()));
|
|
|
|
|
connect (regions, &QAction::triggered, this, &View::addRegionsSubView);
|
|
|
|
|
|
|
|
|
|
QAction *regionMap = createMenuEntry(CSMWorld::UniversalId::Type_RegionMap, world, "document-world-regionmap");
|
|
|
|
|
connect (regionMap, SIGNAL (triggered()), this, SLOT (addRegionMapSubView()));
|
|
|
|
|
connect (regionMap, &QAction::triggered, this, &View::addRegionMapSubView);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void CSVDoc::View::setupMechanicsMenu()
|
|
|
|
@ -194,27 +194,27 @@ void CSVDoc::View::setupMechanicsMenu()
|
|
|
|
|
QMenu *mechanics = menuBar()->addMenu (tr ("Mechanics"));
|
|
|
|
|
|
|
|
|
|
QAction* scripts = createMenuEntry(CSMWorld::UniversalId::Type_Scripts, mechanics, "document-mechanics-scripts");
|
|
|
|
|
connect (scripts, SIGNAL (triggered()), this, SLOT (addScriptsSubView()));
|
|
|
|
|
connect (scripts, &QAction::triggered, this, &View::addScriptsSubView);
|
|
|
|
|
|
|
|
|
|
QAction* startScripts = createMenuEntry(CSMWorld::UniversalId::Type_StartScripts, mechanics, "document-mechanics-startscripts");
|
|
|
|
|
connect (startScripts, SIGNAL (triggered()), this, SLOT (addStartScriptsSubView()));
|
|
|
|
|
connect (startScripts, &QAction::triggered, this, &View::addStartScriptsSubView);
|
|
|
|
|
|
|
|
|
|
QAction* globals = createMenuEntry(CSMWorld::UniversalId::Type_Globals, mechanics, "document-mechanics-globals");
|
|
|
|
|
connect (globals, SIGNAL (triggered()), this, SLOT (addGlobalsSubView()));
|
|
|
|
|
connect (globals, &QAction::triggered, this, &View::addGlobalsSubView);
|
|
|
|
|
|
|
|
|
|
QAction* gmsts = createMenuEntry(CSMWorld::UniversalId::Type_Gmsts, mechanics, "document-mechanics-gamesettings");
|
|
|
|
|
connect (gmsts, SIGNAL (triggered()), this, SLOT (addGmstsSubView()));
|
|
|
|
|
|
|
|
|
|
connect (gmsts, &QAction::triggered, this, &View::addGmstsSubView);
|
|
|
|
|
|
|
|
|
|
mechanics->addSeparator();
|
|
|
|
|
|
|
|
|
|
QAction* spells = createMenuEntry(CSMWorld::UniversalId::Type_Spells, mechanics, "document-mechanics-spells");
|
|
|
|
|
connect (spells, SIGNAL (triggered()), this, SLOT (addSpellsSubView()));
|
|
|
|
|
connect (spells, &QAction::triggered, this, &View::addSpellsSubView);
|
|
|
|
|
|
|
|
|
|
QAction* enchantments = createMenuEntry(CSMWorld::UniversalId::Type_Enchantments, mechanics, "document-mechanics-enchantments");
|
|
|
|
|
connect (enchantments, SIGNAL (triggered()), this, SLOT (addEnchantmentsSubView()));
|
|
|
|
|
connect (enchantments, &QAction::triggered, this, &View::addEnchantmentsSubView);
|
|
|
|
|
|
|
|
|
|
QAction* magicEffects = createMenuEntry(CSMWorld::UniversalId::Type_MagicEffects, mechanics, "document-mechanics-magiceffects");
|
|
|
|
|
connect (magicEffects, SIGNAL (triggered()), this, SLOT (addMagicEffectsSubView()));
|
|
|
|
|
connect (magicEffects, &QAction::triggered, this, &View::addMagicEffectsSubView);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void CSVDoc::View::setupCharacterMenu()
|
|
|
|
@ -222,38 +222,38 @@ void CSVDoc::View::setupCharacterMenu()
|
|
|
|
|
QMenu *characters = menuBar()->addMenu (tr ("Characters"));
|
|
|
|
|
|
|
|
|
|
QAction* skills = createMenuEntry(CSMWorld::UniversalId::Type_Skills, characters, "document-character-skills");
|
|
|
|
|
connect (skills, SIGNAL (triggered()), this, SLOT (addSkillsSubView()));
|
|
|
|
|
connect (skills, &QAction::triggered, this, &View::addSkillsSubView);
|
|
|
|
|
|
|
|
|
|
QAction* classes = createMenuEntry(CSMWorld::UniversalId::Type_Classes, characters, "document-character-classes");
|
|
|
|
|
connect (classes, SIGNAL (triggered()), this, SLOT (addClassesSubView()));
|
|
|
|
|
connect (classes, &QAction::triggered, this, &View::addClassesSubView);
|
|
|
|
|
|
|
|
|
|
QAction* factions = createMenuEntry(CSMWorld::UniversalId::Type_Faction, characters, "document-character-factions");
|
|
|
|
|
connect (factions, SIGNAL (triggered()), this, SLOT (addFactionsSubView()));
|
|
|
|
|
connect (factions, &QAction::triggered, this, &View::addFactionsSubView);
|
|
|
|
|
|
|
|
|
|
QAction* races = createMenuEntry(CSMWorld::UniversalId::Type_Races, characters, "document-character-races");
|
|
|
|
|
connect (races, SIGNAL (triggered()), this, SLOT (addRacesSubView()));
|
|
|
|
|
connect (races, &QAction::triggered, this, &View::addRacesSubView);
|
|
|
|
|
|
|
|
|
|
QAction* birthsigns = createMenuEntry(CSMWorld::UniversalId::Type_Birthsigns, characters, "document-character-birthsigns");
|
|
|
|
|
connect (birthsigns, SIGNAL (triggered()), this, SLOT (addBirthsignsSubView()));
|
|
|
|
|
|
|
|
|
|
connect (birthsigns, &QAction::triggered, this, &View::addBirthsignsSubView);
|
|
|
|
|
|
|
|
|
|
QAction* bodyParts = createMenuEntry(CSMWorld::UniversalId::Type_BodyParts, characters, "document-character-bodyparts");
|
|
|
|
|
connect (bodyParts, SIGNAL (triggered()), this, SLOT (addBodyPartsSubView()));
|
|
|
|
|
connect (bodyParts, &QAction::triggered, this, &View::addBodyPartsSubView);
|
|
|
|
|
|
|
|
|
|
characters->addSeparator();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
QAction* topics = createMenuEntry(CSMWorld::UniversalId::Type_Topics, characters, "document-character-topics");
|
|
|
|
|
connect (topics, SIGNAL (triggered()), this, SLOT (addTopicsSubView()));
|
|
|
|
|
connect (topics, &QAction::triggered, this, &View::addTopicsSubView);
|
|
|
|
|
|
|
|
|
|
QAction* topicInfos = createMenuEntry(CSMWorld::UniversalId::Type_TopicInfos, characters, "document-character-topicinfos");
|
|
|
|
|
connect (topicInfos, SIGNAL (triggered()), this, SLOT (addTopicInfosSubView()));
|
|
|
|
|
|
|
|
|
|
connect (topicInfos, &QAction::triggered, this, &View::addTopicInfosSubView);
|
|
|
|
|
|
|
|
|
|
characters->addSeparator();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
QAction* journals = createMenuEntry(CSMWorld::UniversalId::Type_Journals, characters, "document-character-journals");
|
|
|
|
|
connect (journals, SIGNAL (triggered()), this, SLOT (addJournalsSubView()));
|
|
|
|
|
connect (journals, &QAction::triggered, this, &View::addJournalsSubView);
|
|
|
|
|
|
|
|
|
|
QAction* journalInfos = createMenuEntry(CSMWorld::UniversalId::Type_JournalInfos, characters, "document-character-journalinfos");
|
|
|
|
|
connect (journalInfos, SIGNAL (triggered()), this, SLOT (addJournalInfosSubView()));
|
|
|
|
|
connect (journalInfos, &QAction::triggered, this, &View::addJournalInfosSubView);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void CSVDoc::View::setupAssetsMenu()
|
|
|
|
@ -266,30 +266,30 @@ void CSVDoc::View::setupAssetsMenu()
|
|
|
|
|
assets->addSeparator();
|
|
|
|
|
|
|
|
|
|
QAction* sounds = createMenuEntry(CSMWorld::UniversalId::Type_Sounds, assets, "document-assets-sounds");
|
|
|
|
|
connect (sounds, SIGNAL (triggered()), this, SLOT (addSoundsSubView()));
|
|
|
|
|
connect (sounds, &QAction::triggered, this, &View::addSoundsSubView);
|
|
|
|
|
|
|
|
|
|
QAction* soundGens = createMenuEntry(CSMWorld::UniversalId::Type_SoundGens, assets, "document-assets-soundgens");
|
|
|
|
|
connect (soundGens, SIGNAL (triggered()), this, SLOT (addSoundGensSubView()));
|
|
|
|
|
connect (soundGens, &QAction::triggered, this, &View::addSoundGensSubView);
|
|
|
|
|
|
|
|
|
|
assets->addSeparator(); // resources follow here
|
|
|
|
|
|
|
|
|
|
QAction* meshes = createMenuEntry(CSMWorld::UniversalId::Type_Meshes, assets, "document-assets-meshes");
|
|
|
|
|
connect (meshes, SIGNAL (triggered()), this, SLOT (addMeshesSubView()));
|
|
|
|
|
connect (meshes, &QAction::triggered, this, &View::addMeshesSubView);
|
|
|
|
|
|
|
|
|
|
QAction* icons = createMenuEntry(CSMWorld::UniversalId::Type_Icons, assets, "document-assets-icons");
|
|
|
|
|
connect (icons, SIGNAL (triggered()), this, SLOT (addIconsSubView()));
|
|
|
|
|
connect (icons, &QAction::triggered, this, &View::addIconsSubView);
|
|
|
|
|
|
|
|
|
|
QAction* musics = createMenuEntry(CSMWorld::UniversalId::Type_Musics, assets, "document-assets-musics");
|
|
|
|
|
connect (musics, SIGNAL (triggered()), this, SLOT (addMusicsSubView()));
|
|
|
|
|
connect (musics, &QAction::triggered, this, &View::addMusicsSubView);
|
|
|
|
|
|
|
|
|
|
QAction* soundFiles = createMenuEntry(CSMWorld::UniversalId::Type_SoundsRes, assets, "document-assets-soundres");
|
|
|
|
|
connect (soundFiles, SIGNAL (triggered()), this, SLOT (addSoundsResSubView()));
|
|
|
|
|
connect (soundFiles, &QAction::triggered, this, &View::addSoundsResSubView);
|
|
|
|
|
|
|
|
|
|
QAction* textures = createMenuEntry(CSMWorld::UniversalId::Type_Textures, assets, "document-assets-textures");
|
|
|
|
|
connect (textures, SIGNAL (triggered()), this, SLOT (addTexturesSubView()));
|
|
|
|
|
connect (textures, &QAction::triggered, this, &View::addTexturesSubView);
|
|
|
|
|
|
|
|
|
|
QAction* videos = createMenuEntry(CSMWorld::UniversalId::Type_Videos, assets, "document-assets-videos");
|
|
|
|
|
connect (videos, SIGNAL (triggered()), this, SLOT (addVideosSubView()));
|
|
|
|
|
connect (videos, &QAction::triggered, this, &View::addVideosSubView);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void CSVDoc::View::setupDebugMenu()
|
|
|
|
@ -297,7 +297,7 @@ void CSVDoc::View::setupDebugMenu()
|
|
|
|
|
QMenu *debug = menuBar()->addMenu (tr ("Debug"));
|
|
|
|
|
|
|
|
|
|
QAction* profiles = createMenuEntry(CSMWorld::UniversalId::Type_DebugProfiles, debug, "document-debug-profiles");
|
|
|
|
|
connect (profiles, SIGNAL (triggered()), this, SLOT (addDebugProfilesSubView()));
|
|
|
|
|
connect (profiles, &QAction::triggered, this, &View::addDebugProfilesSubView);
|
|
|
|
|
|
|
|
|
|
debug->addSeparator();
|
|
|
|
|
|
|
|
|
@ -305,8 +305,8 @@ void CSVDoc::View::setupDebugMenu()
|
|
|
|
|
&dynamic_cast<CSMWorld::IdTable&> (*mDocument->getData().getTableModel (
|
|
|
|
|
CSMWorld::UniversalId::Type_DebugProfiles)), this);
|
|
|
|
|
|
|
|
|
|
connect (mGlobalDebugProfileMenu, SIGNAL (triggered (const std::string&)),
|
|
|
|
|
this, SLOT (run (const std::string&)));
|
|
|
|
|
connect (mGlobalDebugProfileMenu, &GlobalDebugProfileMenu::triggered,
|
|
|
|
|
this, [this](const std::string &profile){ this->run(profile, ""); });
|
|
|
|
|
|
|
|
|
|
QAction *runDebug = debug->addMenu (mGlobalDebugProfileMenu);
|
|
|
|
|
runDebug->setText (tr ("Run OpenMW"));
|
|
|
|
@ -314,11 +314,11 @@ void CSVDoc::View::setupDebugMenu()
|
|
|
|
|
runDebug->setIcon(QIcon(QString::fromStdString(":./run-openmw.png")));
|
|
|
|
|
|
|
|
|
|
QAction* stopDebug = createMenuEntry("Stop OpenMW", ":./stop-openmw.png", debug, "document-debug-shutdown");
|
|
|
|
|
connect (stopDebug, SIGNAL (triggered()), this, SLOT (stop()));
|
|
|
|
|
connect (stopDebug, &QAction::triggered, this, &View::stop);
|
|
|
|
|
mStopDebug = stopDebug;
|
|
|
|
|
|
|
|
|
|
QAction* runLog = createMenuEntry(CSMWorld::UniversalId::Type_RunLog, debug, "document-debug-runlog");
|
|
|
|
|
connect (runLog, SIGNAL (triggered()), this, SLOT (addRunLogSubView()));
|
|
|
|
|
connect (runLog, &QAction::triggered, this, &View::addRunLogSubView);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void CSVDoc::View::setupHelpMenu()
|
|
|
|
@ -326,16 +326,16 @@ void CSVDoc::View::setupHelpMenu()
|
|
|
|
|
QMenu *help = menuBar()->addMenu (tr ("Help"));
|
|
|
|
|
|
|
|
|
|
QAction* helpInfo = createMenuEntry("Help", ":/info.png", help, "document-help-help");
|
|
|
|
|
connect (helpInfo, SIGNAL (triggered()), this, SLOT (openHelp()));
|
|
|
|
|
connect (helpInfo, &QAction::triggered, this, &View::openHelp);
|
|
|
|
|
|
|
|
|
|
QAction* tutorial = createMenuEntry("Tutorial", ":/info.png", help, "document-help-tutorial");
|
|
|
|
|
connect (tutorial, SIGNAL (triggered()), this, SLOT (tutorial()));
|
|
|
|
|
connect (tutorial, &QAction::triggered, this, &View::tutorial);
|
|
|
|
|
|
|
|
|
|
QAction* about = createMenuEntry("About OpenMW-CS", ":./info.png", help, "document-help-about");
|
|
|
|
|
connect (about, SIGNAL (triggered()), this, SLOT (infoAbout()));
|
|
|
|
|
connect (about, &QAction::triggered, this, &View::infoAbout);
|
|
|
|
|
|
|
|
|
|
QAction* aboutQt = createMenuEntry("About Qt", ":./qt.png", help, "document-help-qt");
|
|
|
|
|
connect (aboutQt, SIGNAL (triggered()), this, SLOT (infoAboutQt()));
|
|
|
|
|
connect (aboutQt, &QAction::triggered, this, &View::infoAboutQt);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
QAction* CSVDoc::View::createMenuEntry(CSMWorld::UniversalId::Type type, QMenu* menu, const char* shortcutName)
|
|
|
|
@ -501,10 +501,10 @@ CSVDoc::View::View (ViewManager& viewManager, CSMDoc::Document *document, int to
|
|
|
|
|
|
|
|
|
|
mSubViewFactory.add (CSMWorld::UniversalId::Type_RunLog, new SubViewFactory<RunLogSubView>);
|
|
|
|
|
|
|
|
|
|
connect (mOperations, SIGNAL (abortOperation (int)), this, SLOT (abortOperation (int)));
|
|
|
|
|
connect (mOperations, &Operations::abortOperation, this, &View::abortOperation);
|
|
|
|
|
|
|
|
|
|
connect (&CSMPrefs::State::get(), SIGNAL (settingChanged (const CSMPrefs::Setting *)),
|
|
|
|
|
this, SLOT (settingChanged (const CSMPrefs::Setting *)));
|
|
|
|
|
connect (&CSMPrefs::State::get(), &CSMPrefs::State::settingChanged,
|
|
|
|
|
this, &View::settingChanged);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
CSVDoc::View::~View()
|
|
|
|
@ -584,8 +584,8 @@ void CSVDoc::View::addSubView (const CSMWorld::UniversalId& id, const std::strin
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (mScroll)
|
|
|
|
|
QObject::connect(mScroll->horizontalScrollBar(),
|
|
|
|
|
SIGNAL(rangeChanged(int,int)), this, SLOT(moveScrollBarToEnd(int,int)));
|
|
|
|
|
QObject::connect(mScroll->horizontalScrollBar(), &QScrollBar::rangeChanged,
|
|
|
|
|
this, &View::moveScrollBarToEnd);
|
|
|
|
|
|
|
|
|
|
// User setting for limiting the number of sub views per top level view.
|
|
|
|
|
// Automatically open a new top level view if this number is exceeded
|
|
|
|
@ -637,28 +637,27 @@ void CSVDoc::View::addSubView (const CSMWorld::UniversalId& id, const std::strin
|
|
|
|
|
|
|
|
|
|
updateSubViewIndices();
|
|
|
|
|
|
|
|
|
|
connect (view, SIGNAL (focusId (const CSMWorld::UniversalId&, const std::string&)), this,
|
|
|
|
|
SLOT (addSubView (const CSMWorld::UniversalId&, const std::string&)));
|
|
|
|
|
connect (view, &SubView::focusId, this, &View::addSubView);
|
|
|
|
|
|
|
|
|
|
connect (view, SIGNAL (closeRequest (SubView *)), this, SLOT (closeRequest (SubView *)));
|
|
|
|
|
connect (view, qOverload<SubView *>(&SubView::closeRequest),
|
|
|
|
|
this, &View::closeRequest);
|
|
|
|
|
|
|
|
|
|
connect (view, SIGNAL (updateTitle()), this, SLOT (updateTitle()));
|
|
|
|
|
connect (view, &SubView::updateTitle, this, &View::updateTitle);
|
|
|
|
|
|
|
|
|
|
connect (view, SIGNAL (updateSubViewIndices (SubView *)),
|
|
|
|
|
this, SLOT (updateSubViewIndices (SubView *)));
|
|
|
|
|
connect (view, &SubView::updateSubViewIndices, this, &View::updateSubViewIndices);
|
|
|
|
|
|
|
|
|
|
CSVWorld::TableSubView* tableView = dynamic_cast<CSVWorld::TableSubView*>(view);
|
|
|
|
|
if (tableView)
|
|
|
|
|
{
|
|
|
|
|
connect (this, SIGNAL (requestFocus (const std::string&)),
|
|
|
|
|
tableView, SLOT (requestFocus (const std::string&)));
|
|
|
|
|
connect (this, &View::requestFocus,
|
|
|
|
|
tableView, &CSVWorld::TableSubView::requestFocus);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
CSVWorld::SceneSubView* sceneView = dynamic_cast<CSVWorld::SceneSubView*>(view);
|
|
|
|
|
if (sceneView)
|
|
|
|
|
{
|
|
|
|
|
connect(sceneView, SIGNAL(requestFocus(const std::string&)),
|
|
|
|
|
this, SLOT(onRequestFocus(const std::string&)));
|
|
|
|
|
connect(sceneView, &CSVWorld::SceneSubView::requestFocus,
|
|
|
|
|
this, &View::onRequestFocus);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (CSMPrefs::State::get()["ID Tables"]["subview-new-window"].isTrue())
|
|
|
|
@ -684,8 +683,8 @@ void CSVDoc::View::moveScrollBarToEnd(int min, int max)
|
|
|
|
|
{
|
|
|
|
|
mScroll->horizontalScrollBar()->setValue(max);
|
|
|
|
|
|
|
|
|
|
QObject::disconnect(mScroll->horizontalScrollBar(),
|
|
|
|
|
SIGNAL(rangeChanged(int,int)), this, SLOT(moveScrollBarToEnd(int,int)));
|
|
|
|
|
QObject::disconnect(mScroll->horizontalScrollBar(), &QScrollBar::rangeChanged,
|
|
|
|
|
this, &View::moveScrollBarToEnd);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|