File indexing completed on 2024-04-14 03:40:24

0001 /***************************************************************************
0002  *   This file is part of the Kanagram project                             *
0003  *   Copyright 2011 Sebastian Kügler <sebas@kde.org>                       *
0004  *   Copyright 2011 Marco Martin <mart@kde.org>                            *
0005  *   Copyright 2012 Laszlo Papp <lpapp@kde.org>                            *
0006  *   Copyright 2014 Jeremy Whiting <jpwhiting@kde.org>                     *
0007  *                                                                         *
0008  *   This program is free software; you can redistribute it and/or modify  *
0009  *   it under the terms of the GNU General Public License as published by  *
0010  *   the Free Software Foundation; either version 2 of the License, or     *
0011  *   (at your option) any later version.                                   *
0012  *                                                                         *
0013  *   This program is distributed in the hope that it will be useful,       *
0014  *   but WITHOUT ANY WARRANTY; without even the implied warranty of        *
0015  *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the         *
0016  *   GNU General Public License for more details.                          *
0017  *                                                                         *
0018  *   You should have received a copy of the GNU General Public License     *
0019  *   along with this program; if not, write to the                         *
0020  *   Free Software Foundation, Inc.,                                       *
0021  *   51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.          *
0022  ***************************************************************************/
0023 
0024 #ifndef MAINWINDOW_H
0025 #define MAINWINDOW_H
0026 
0027 #include <QQuickView>
0028 #include <KConfigGroup>
0029 
0030 class KanagramGame;
0031 class KConfigDialog;
0032 class KHelpMenu;
0033 class VocabSettings;
0034 
0035 class MainWindow : public QQuickView
0036 {
0037     Q_OBJECT
0038 public:
0039     MainWindow();
0040     ~MainWindow();
0041 
0042 public Q_SLOTS:
0043     void showAboutKanagram();
0044     void showAboutKDE();
0045     void showHandbook();
0046 
0047     /** invoke the settings dialog */
0048     void showSettings();
0049 
0050 private Q_SLOTS:
0051     void categoryChanged();
0052 
0053 private:
0054     KConfigGroup config(const QString &group);
0055 
0056     KanagramGame *m_game;
0057 
0058     /** settings dialog */
0059     KConfigDialog *m_configDialog;
0060 
0061     /** settings page pointers */
0062     VocabSettings *m_vocabSettings;
0063 
0064     /** help menu for displaying about box */
0065     KHelpMenu *m_helpMenu;
0066 };
0067 
0068 #endif // MAINWINDOW_H