Changeset View
Changeset View
Standalone View
Standalone View
mainwindow.cpp
Show First 20 Lines • Show All 422 Lines • ▼ Show 20 Line(s) | 421 | { | |||
---|---|---|---|---|---|
423 | KCardTheme theme = themes.at( KRandom::random() % themes.size() ); | 423 | KCardTheme theme = themes.at( KRandom::random() % themes.size() ); | ||
424 | Settings::setCardTheme( theme.dirName() ); | 424 | Settings::setCardTheme( theme.dirName() ); | ||
425 | 425 | | |||
426 | appearanceChanged(); | 426 | appearanceChanged(); | ||
427 | } | 427 | } | ||
428 | 428 | | |||
429 | void MainWindow::configureAppearance() | 429 | void MainWindow::configureAppearance() | ||
430 | { | 430 | { | ||
431 | const QString previewFormat = QStringLiteral("back;10_spade,jack_diamond,queen_club,king_heart;1_spade"); | | |||
432 | const QSet<QString> features = QSet<QString>() << QStringLiteral("AngloAmerican") << QStringLiteral("Backs1"); | | |||
433 | | ||||
434 | if ( !KConfigDialog::showDialog(QStringLiteral("KPatAppearanceDialog")) ) | 431 | if ( !KConfigDialog::showDialog(QStringLiteral("KPatAppearanceDialog")) ) | ||
435 | { | 432 | { | ||
436 | KConfigDialog * dialog = new KConfigDialog( this, QStringLiteral("KPatAppearanceDialog"), Settings::self() ); | 433 | KConfigDialog * dialog = new KConfigDialog( this, QStringLiteral("KPatAppearanceDialog"), Settings::self() ); | ||
437 | 434 | | |||
438 | dialog->addPage( new KCardThemeWidget( features, previewFormat ), | 435 | const QSet<QString> features = QSet<QString>() << QStringLiteral("AngloAmerican") << QStringLiteral("Backs1"); | ||
tcanabrava: const auto features = QSet<QString> { items here }; | |||||
436 | | ||||
437 | dialog->addPage( new KCardThemeWidget( features, | ||||
438 | QStringLiteral("back;10_spade,jack_diamond,queen_club,king_heart;1_spade") ), | ||||
439 | i18n("Card Deck"), | 439 | i18n("Card Deck"), | ||
440 | QStringLiteral("games-config-theme"), | 440 | QStringLiteral("games-config-theme"), | ||
441 | i18n("Select a card deck") | 441 | i18n("Select a card deck") | ||
442 | ); | 442 | ); | ||
443 | 443 | | |||
444 | KgThemeProvider* provider = Renderer::self()->themeProvider(); | 444 | KgThemeProvider* provider = Renderer::self()->themeProvider(); | ||
445 | dialog->addPage( new KgThemeSelector(provider), | 445 | dialog->addPage( new KgThemeSelector(provider), | ||
446 | i18n("Game Theme"), | 446 | i18n("Game Theme"), | ||
▲ Show 20 Lines • Show All 634 Lines • Show Last 20 Lines |
const auto features = QSet<QString> { items here };