LibKmahjongg

kmahjonggconfigdialog.cpp
1 /*
2  SPDX-FileCopyrightText: 2006 Mauricio Piacentini <[email protected]>
3 
4  SPDX-License-Identifier: GPL-2.0-or-later
5 */
6 
7 // own
8 #include "kmahjonggconfigdialog.h"
9 
10 // KF
11 #include <KConfig>
12 #include <KLocalizedString>
13 
14 // LibKMahjongg
15 #include "kmahjonggbackgroundselector.h"
16 #include "kmahjonggtilesetselector.h"
17 #include "libkmahjongg_debug.h"
18 
19 class KMahjonggConfigDialogPrivate
20 {
21 public:
22  KConfigSkeleton * m_config;
23 };
24 
25 KMahjonggConfigDialog::KMahjonggConfigDialog(QWidget * parent, const QString & name,
26  KConfigSkeleton * config)
27  : KConfigDialog(parent, name, config)
28  , d(new KMahjonggConfigDialogPrivate)
29 {
30  setFaceType(List);
31  setModal(true);
32  d->m_config = config;
33 }
34 
35 KMahjonggConfigDialog::~KMahjonggConfigDialog() = default;
36 
37 void KMahjonggConfigDialog::addTilesetPage()
38 {
39  KMahjonggTilesetSelector * ts = new KMahjonggTilesetSelector(this, d->m_config);
40  //TODO: Use the cards icon for our page for now, need to get one for tilesets made
41  addPage(ts, i18n("Tiles"), QStringLiteral("games-config-tiles"));
42 }
43 
44 void KMahjonggConfigDialog::addBackgroundPage()
45 {
46  KMahjonggBackgroundSelector * ts = new KMahjonggBackgroundSelector(this, d->m_config);
47  //TODO: need icon
48  addPage(ts, i18n("Background"), QStringLiteral("games-config-background"));
49 }
50 
51 void KMahjonggConfigDialog::updateWidgetsDefault()
52 {
53  //qCDebug(LIBKMAHJONGG_LOG) << "updateWidgetsDefault";
54 }
QString i18n(const char *text, const TYPE &arg...)
KPageWidgetItem * addPage(QWidget *page, const QString &itemName, const QString &pixmapName=QString(), const QString &header=QString(), bool manage=true)
KSharedConfigPtr config()
QString name(StandardShortcut id)
This file is part of the KDE documentation.
Documentation copyright © 1996-2023 The KDE developers.
Generated on Mon May 8 2023 04:09:42 by doxygen 1.8.17 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.