1 /***************************************************************************
2 * Copyright (C) 2001-2005 Anne-Marie Mahfouf <annma@kde.org> *
3 * annemarie.mahfouf@free.fr *
5 * This program is free software; you can redistribute it and/or modify *
6 * it under the terms of the GNU General Public License as published by *
7 * the Free Software Foundation; either version 2 of the License, or *
8 * (at your option) any later version. *
10 * This program is distributed in the hope that it will be useful, *
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of *
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
13 * GNU General Public License for more details. *
15 * You should have received a copy of the GNU General Public License *
16 * along with this program; if not, write to the *
17 * Free Software Foundation, Inc., *
18 * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
19 ***************************************************************************/
29 #include <kmainwindow.h>
31 #include "khangmanview.h"
38 * @short Application Main Window
39 * @author Anne-Marie Mahfouf <annemarie.mahfouf@free.fr>
42 class KHangMan
: public KMainWindow
57 Update the text in the Statusbar
58 @param text the text that will be written in the statusbar
59 @param id the label in which the text will be written
61 void changeStatusbar(const QString
& text
, int id
);
62 ///Action that sets up the Language menu
63 KSelectAction
*m_languageAction
;
64 ///Method to set the current language into the Statusbar and to pass it to KHangManView
66 ///Translated names of languages
67 QStringList m_languageNames
;
68 ///Language codes of available languages
69 QStringList m_languages
;
74 ///Action in the Game menu to start a new word
76 ///Actions for the level combobox and the mode combobox
77 KSelectAction
*levelAct
, *modeAct
;
78 ///Populate the Languages menu
79 QPopupMenu
*langPopup
;
84 void setupStatusbar();
87 QString selectedLanguage
;
89 ///Translated and sorted names of languages
90 QStringList m_sortedNames
;
92 ///the different data files in each language dir
100 ///hold the current level
107 ///Create a KNewStuff instance
108 KHNewStuff
*mNewStuff
;
112 void slotChangeLanguage(int);
116 void slotChangeLevel();
119 void slotChangeMode();
120 ///In Settings menu, Configure KHangMan... menu item
121 void optionsPreferences();
122 ///access the KNewStuff class to install new data
123 void slotDownloadNewStuff();
124 ///update settings after Settings->Configure KHangMan dialog is closed
125 void updateSettings();
128 #endif // _KHANGMAN_H_