AppearanceSetManager::AppearanceSetManager() : SetMapManager() { //ctor getSetList()[0] = *createDefaultSet(); //create a default appearance set and add it to the set list. setAsDefault(getSetList()[0].getSetName()); setAsCurrent(getSetList()[0].getSetName()); cout << "Appearance Set Manager Created" << endl; cout << "______________________________" << endl; }
void CardDatabase::checkUnknownSets() { SetList sets = getSetList(); // no set is enabled. Probably this is the first time running trice if(!sets.getEnabledSetsNum()) { sets.guessSortKeys(); sets.sortByKey(); sets.enableAll(); detectedFirstRun = true; return; } int numUnknownSets = sets.getUnknownSetsNum(); // no unkown sets. if(!numUnknownSets) return; QMessageBox msgbox(QMessageBox::Question, tr("New sets found"), tr("%1 new set(s) have been found in the card database. Do you want to enable them?").arg(numUnknownSets), QMessageBox::Yes | QMessageBox::No | QMessageBox::Cancel); switch(msgbox.exec()) { case QMessageBox::No: sets.markAllAsKnown(); break; case QMessageBox::Yes: sets.enableAllUnknown(); break; default: break; } return; }