File indexing completed on 2022-11-29 18:42:19

0001 /*
0002     SPDX-FileCopyrightText: 2006 Mauricio Piacentini <mauricio@tabuleiro.com>
0003 
0004     SPDX-License-Identifier: GPL-2.0-or-later
0005 */
0006 
0007 // own
0008 #include "kmahjonggconfigdialog.h"
0009 
0010 // KF
0011 #include <KConfig>
0012 #include <KLocalizedString>
0013 
0014 // LibKMahjongg
0015 #include "kmahjonggbackgroundselector.h"
0016 #include "kmahjonggtilesetselector.h"
0017 #include "libkmahjongg_debug.h"
0018 
0019 class KMahjonggConfigDialogPrivate
0020 {
0021 public:
0022     KConfigSkeleton * m_config;
0023 };
0024 
0025 KMahjonggConfigDialog::KMahjonggConfigDialog(QWidget * parent, const QString & name,
0026                                              KConfigSkeleton * config)
0027     : KConfigDialog(parent, name, config)
0028     , d(new KMahjonggConfigDialogPrivate)
0029 {
0030     setFaceType(List);
0031     setModal(true);
0032     d->m_config = config;
0033 }
0034 
0035 KMahjonggConfigDialog::~KMahjonggConfigDialog() = default;
0036 
0037 void KMahjonggConfigDialog::addTilesetPage()
0038 {
0039     KMahjonggTilesetSelector * ts = new KMahjonggTilesetSelector(this, d->m_config);
0040     //TODO: Use the cards icon for our page for now, need to get one for tilesets made
0041     addPage(ts, i18n("Tiles"), QStringLiteral("games-config-tiles"));
0042 }
0043 
0044 void KMahjonggConfigDialog::addBackgroundPage()
0045 {
0046     KMahjonggBackgroundSelector * ts = new KMahjonggBackgroundSelector(this, d->m_config);
0047     //TODO: need icon
0048     addPage(ts, i18n("Background"), QStringLiteral("games-config-background"));
0049 }
0050 
0051 void KMahjonggConfigDialog::updateWidgetsDefault()
0052 {
0053     //qCDebug(LIBKMAHJONGG_LOG) << "updateWidgetsDefault";
0054 }