moved kdeaccessibility kdeaddons kdeadmin kdeartwork kdebindings kdeedu kdegames...
[kdeedu.git] / kmessedwords / kmessedwords / mainwindow.h
blobc8d127eb6d5bda9757f6e2c8a5b92d28c07b9636
1 /***************************************************************************
2 mainwindow.h - description
3 -------------------
4 begin : Sun Oct 21 2001
5 copyright : (C) 2001 by Primoz Anzur
6 (C) 2004 by Reuben Sutton
7 email : reubens@gmail.com
8 ***************************************************************************/
10 /***************************************************************************
11 * *
12 * This program is free software; you can redistribute it and/or modify *
13 * it under the terms of the GNU General Public License as published by *
14 * the Free Software Foundation; either version 2 of the License, or *
15 * (at your option) any later version. *
16 * *
17 ***************************************************************************/
19 #ifndef MAINWINDOW_H
20 #define MAINWINDOW_H
22 #define LOCAL_VERSION "2.3.1"
23 //CVS version changes ONLY with major overhaul OR submission of new features...
25 #include <kmessagebox.h>
26 #include <kpopupmenu.h>
27 #include <khelpmenu.h>
28 #include <kmainwindow.h>
30 #include <qpushbutton.h>
32 #include "kwritewords.h"
33 #include "kmwview.h"
34 #include "minparser.h"
36 class KSelectAction;
38 /** MainWindow is the base class of the project */
39 class MainWindow : public KMainWindow
41 Q_OBJECT
42 public:
43 /** construtor */
44 MainWindow();
45 /** destructor */
46 ~MainWindow();
48 protected:
49 ///Call an instance of the dictionary dialog
50 KWriteWords showConfig;
51 ///Instance of the config class
52 KConfig *config;
53 ///An instance of the GUI inherited from FrontEnd
54 KmwView *m_view;
56 KSelectAction *levelAct;
57 ///Helds the current theme name (default or bubbly)
58 QString m_themeName;
59 ///The path to the local data words (local dictionary)
60 QString m_setLocalDictionary;
61 ///All the themes found
62 QStringList m_themeString;
63 ///Set up the actions for the menus
64 void setupActions();
65 ///Set up the settings at start
66 void loadSettings();
67 ///Set the background picture
68 void setBackgroundPic();
69 ///necessary to have the background pic resize correctly
70 void resizeEvent(QResizeEvent *);
72 protected slots:
73 ///Opens the dictionary dialog
74 void slot_openBook();
75 ///Opens the Configure MessedWords dialog
76 void optionsPreferences();
77 ///Apply new settings from Configure KMessedWords dialog to the view
78 void updateSettings();
79 /**
80 Write the new level in the statusbar
81 @param text the text hat will be written in the statusbar
83 void updateStatusBar(const QString &text);
84 ///When the user changes the level with the Menu
85 void slotChangeLevel();
86 void updateButtons();
87 void updateButtonText();
90 #endif