1/*
2 Copyright (C) 2006 Mauricio Piacentini <mauricio@tabuleiro.com>
3
4 Libkmahjongg is free software; you can redistribute it and/or modify
5 it under the terms of the GNU General Public License as published by
6 the Free Software Foundation; either version 2 of the License, or
7 (at your option) any later version.
8
9 This program is distributed in the hope that it will be useful,
10 but WITHOUT ANY WARRANTY; without even the implied warranty of
11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 GNU General Public License for more details.
13
14 You should have received a copy of the GNU General Public License
15 along with this program; if not, write to the Free Software
16 Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
17*/
18
19#include "kmahjonggconfigdialog.h"
20
21#include <klocale.h>
22#include <kstandarddirs.h>
23#include <krandom.h>
24#include <kconfig.h>
25#include <kdebug.h>
26
27#include "kmahjonggtilesetselector.h"
28#include "kmahjonggbackgroundselector.h"
29
30class KMahjonggConfigDialogPrivate
31{
32public:
33 KConfigSkeleton * m_config;
34};
35
36KMahjonggConfigDialog::KMahjonggConfigDialog( QWidget *parent, const QString& name,
37 KConfigSkeleton *config)
38 : KConfigDialog(parent, name, config),
39 d(new KMahjonggConfigDialogPrivate)
40{
41 setFaceType(List);
42 setButtons(Ok | Apply | Cancel | Help);
43 setDefaultButton(Ok);
44 setModal(true);
45 d->m_config = config;
46}
47
48KMahjonggConfigDialog::~KMahjonggConfigDialog()
49{
50 delete d;
51}
52
53void KMahjonggConfigDialog::addTilesetPage()
54{
55 KMahjonggTilesetSelector * ts = new KMahjonggTilesetSelector(this, d->m_config);
56 //TODO: Use the cards icon for our page for now, need to get one for tilesets made
57 addPage(ts, i18n("Tiles"), QLatin1String( "games-config-tiles" ));
58}
59
60void KMahjonggConfigDialog::addBackgroundPage()
61{
62 KMahjonggBackgroundSelector * ts = new KMahjonggBackgroundSelector(this, d->m_config);
63 //TODO: need icon
64 addPage(ts, i18n("Background"), QLatin1String( "games-config-background" ));
65}
66
67void KMahjonggConfigDialog::updateWidgetsDefault()
68{
69 kDebug() << "updateWidgetsDefault";
70}
71/*void KMahjonggConfigDialog::updateWidgets()
72{
73 kDebug() << "updateWidgets";
74}
75void KMahjonggConfigDialog::updateSettings()
76{
77 kDebug() << "updateSettings";
78}*/
79
80#include "kmahjonggconfigdialog.moc"
81