MCPcopy Create free account
hub / github.com/ModOrganizer2/modorganizer / showEvent

Method showEvent

src/mainwindow.cpp:1217–1363  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1215}
1216
1217void MainWindow::showEvent(QShowEvent* event)
1218{
1219 QMainWindow::showEvent(event);
1220
1221 if (!m_WasVisible) {
1222 ui->modList->refreshFilters();
1223 readSettings();
1224
1225 // this needs to be connected here instead of in the constructor because the
1226 // actual changing of the stylesheet is done by MOApplication, which
1227 // connects its signal in runApplication() (in main.cpp), and that happens
1228 // _after_ the MainWindow is constructed, but _before_ it is shown
1229 //
1230 // by connecting the event here, changing the style setting will first be
1231 // handled by MOApplication, and then in updateStyle(), at which point the
1232 // stylesheet has already been set correctly
1233 connect(this, SIGNAL(styleChanged(QString)), this, SLOT(updateStyle(QString)));
1234
1235 // only the first time the window becomes visible
1236 m_Tutorial.registerControl();
1237
1238 hookUpWindowTutorials();
1239
1240 if (m_OrganizerCore.settings().firstStart()) {
1241 QString firstStepsTutorial = ToQString(AppConfig::firstStepsTutorial());
1242 if (TutorialManager::instance().hasTutorial(firstStepsTutorial)) {
1243 if (shouldStartTutorial()) {
1244 TutorialManager::instance().activateTutorial("MainWindow",
1245 firstStepsTutorial);
1246 }
1247 } else {
1248 log::error("{} missing", firstStepsTutorial);
1249 QPoint pos = ui->toolBar->mapToGlobal(QPoint());
1250 pos.rx() += ui->toolBar->width() / 2;
1251 pos.ry() += ui->toolBar->height();
1252 QWhatsThis::showText(pos,
1253 QObject::tr("Please use \"Help\" from the toolbar to get "
1254 "usage instructions to all elements"));
1255 }
1256
1257 if (!m_OrganizerCore.managedGame()->getSupportURL().isEmpty()) {
1258 QMessageBox::information(this, tr("Game Support Wiki"),
1259 tr("Do you know how to mod this game? Do you need to "
1260 "learn? There's a game support wiki available! "
1261 "Click OK to open the wiki. In the future, you can "
1262 "access this link from the \"Help\" menu."),
1263 QMessageBox::Ok);
1264 gameSupportTriggered();
1265 }
1266
1267 QMessageBox newCatDialog;
1268 newCatDialog.setWindowTitle(tr("Category Setup"));
1269 newCatDialog.setText(
1270 tr("Please choose how to handle the default category setup.\n\n"
1271 "If you've already connected to Nexus, you can automatically import Nexus "
1272 "categories for this game (if applicable). Otherwise, use the old Mod "
1273 "Organizer default category structure, or leave the categories blank (for "
1274 "manual setup)."));

Callers

nothing calls this directly

Calls 15

QPointClass · 0.85
refreshFiltersMethod · 0.80
firstStartMethod · 0.80
getAccessManagerMethod · 0.80
addButtonMethod · 0.80
loadCategoriesMethod · 0.80
saveCategoriesMethod · 0.80
setFirstStartMethod · 0.80
setCategoryMappingsMethod · 0.80
restoreIndexMethod · 0.80
registerAsNXMHandlerMethod · 0.80
startPluginsMethod · 0.80

Tested by

no test coverage detected