Main Page   Compound List   File List   Compound Members   File Members  

klettres.h

Go to the documentation of this file.
00001 /*
00002  * Copyright (C) 2001-2003 Anne-Marie Mahfouf <annma@kde.org>
00003 
00004     This program is free software; you can redistribute it and/or
00005     modify it under the terms of version 2 of the GNU General Public
00006     License as published by the Free Software Foundation.
00007 
00008     This program is distributed in the hope that it will be useful,
00009     but WITHOUT ANY WARRANTY; without even the implied warranty of
00010     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00011     GNU General Public License for more details.
00012 
00013     You should have received a copy of the GNU General Public License
00014     along with this program; if not, write to the Free Software
00015     Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
00016  */
00017 
00018 #ifndef _KLETTRES_H_
00019 #define _KLETTRES_H_
00020 
00021 #ifdef HAVE_CONFIG_H
00022 #include <config.h>
00023 #endif
00024 
00025 //KDE headers
00026 #include <kmainwindow.h>
00027 #include "klettresview.h"
00028 #include "soundfactory.h"
00029 
00030 class KToggleAction;
00031 class KSelectAction;
00032 class KToolBar;
00033 class KComboBox;
00034 class QDomDocument;
00035 
00036 
00045 class KLettres : public KMainWindow
00046 {
00047     Q_OBJECT
00048 public:
00049 
00051     KLettres();
00053     virtual ~KLettres();
00055     QLabel *langLabel;
00057     QLabel *levLabel;
00059     QFont newFont;
00061     KToolBar *tb;
00063     KComboBox *lev_comb;
00065    QString language;
00067    QString langString, style;
00068    //Holds the file from which the letters or syllables are read
00069    int length, input, num, numRead;
00071    bool menuBool;
00073    bool kidBool;
00075    bool grownBool;
00076 
00077    void registerLanguage(const QString &menuItem, const char *actionId, bool enabled);
00082    void changeLanguage(uint newLanguage);
00088    bool loadLayout(QDomDocument &layoutDocument);
00090    KLettresView *m_view;
00092    SoundFactory *soundFactory;
00093 
00094 protected:
00099     void saveProperties(KConfig *);
00100 
00106     void readProperties(KConfig *);
00107 
00108 
00109 private slots:
00110 
00112     void optionsConfigureKeys();
00114     void optionsConfigureToolbars();
00116     void optionsPreferences();
00120     void newToolbarConfig();
00122     void slotMenubar();
00124     void slotShowM();
00126     void slotGrownup();
00128     void slotKid();
00133     void slotChangeLevel(int );
00138     void updateLevMenu(int );
00142     void loadSettings();
00144     void language0();
00146     void language1();
00148     void language2();
00150     void language3();
00152     void language4();
00153 
00154     void slotPasteCcaron();
00155     void slotPasteDcaron();
00156     void slotPasteRcaron();
00157     void slotPasteScaron();
00158     void slotPasteTcaron();
00159     void slotPasteZcaron();
00160     void slotPasteAcircle();
00161     void slotPasteAwithE();
00162     void slotPasteObarre();
00163     void slotPasteAacute();
00164     void slotPasteAumlaut();
00165     void slotPasteEacute();
00166     void slotPasteIacute();
00167     void slotPasteLacute();
00168     void slotPasteLapos();
00169     void slotPasteOacute();
00170     void slotPasteOchap();
00171     void slotPasteRacute();
00172     void slotPasteUacute();
00173     void slotPasteNcaron();
00174 
00175 private:
00177     void setupAccel();
00179     void setupActions();
00184     void updateLanguage(int );
00190     void loadLanguages();
00192     void loadLangToolBar();
00193 
00194 private:
00195 
00197     KToggleAction *m_action;
00199     KSelectAction *language_menu;
00201     KAction *fontAct;
00203     uint selectedLanguage;
00205     uint languages;
00207     QString languageActions[16];
00209     QStringList m_languages;
00211     QString userLanguage;
00213     int defaultLang;
00215     KToolBar *secondToolbar;
00216 };
00217 
00218 #endif // _KLETTRES_H_

Generated on Sat Oct 18 21:37:50 2003 by doxygen1.2.18