summaryrefslogtreecommitdiffstats
path: root/klettres
diff options
context:
space:
mode:
Diffstat (limited to 'klettres')
-rw-r--r--klettres/klettres/klettres.cpp148
-rw-r--r--klettres/klettres/klettres.h18
-rw-r--r--klettres/klettres/klettresview.cpp58
-rw-r--r--klettres/klettres/klettresview.h20
-rw-r--r--klettres/klettres/klnewstuff.cpp8
-rw-r--r--klettres/klettres/klnewstuff.h4
-rw-r--r--klettres/klettres/prefs_addons.h6
-rw-r--r--klettres/klettres/soundfactory.cpp24
-rw-r--r--klettres/klettres/soundfactory.h12
-rw-r--r--klettres/klettres/timer.cpp16
-rw-r--r--klettres/klettres/timer.h2
11 files changed, 158 insertions, 158 deletions
diff --git a/klettres/klettres/klettres.cpp b/klettres/klettres/klettres.cpp
index 031f2f3c..4d378ee6 100644
--- a/klettres/klettres/klettres.cpp
+++ b/klettres/klettres/klettres.cpp
@@ -19,14 +19,14 @@
***************************************************************************/
//Qt includes
-#include <qbitmap.h>
-#include <qdir.h>
-#include <qfile.h>
-#include <qlabel.h>
-#include <qpainter.h>
-#include <qstring.h>
-#include <qtooltip.h>
-#include <qwhatsthis.h>
+#include <tqbitmap.h>
+#include <tqdir.h>
+#include <tqfile.h>
+#include <tqlabel.h>
+#include <tqpainter.h>
+#include <tqstring.h>
+#include <tqtooltip.h>
+#include <tqwhatsthis.h>
//KDE includes
#include <kaction.h>
@@ -72,8 +72,8 @@ KLettres::KLettres()
loadSettings();
//Setup current language sounds
soundFactory = new SoundFactory(this, "sounds");
- setMinimumSize( QSize( 640, 550 ) );
- setMaximumSize( QSize( 640, 550 ) );
+ setMinimumSize( TQSize( 640, 550 ) );
+ setMaximumSize( TQSize( 640, 550 ) );
//Start game
m_view->game();
}
@@ -88,11 +88,11 @@ void KLettres::findLanguages()
m_languageNames.clear();
//m_sortedNames.clear();
//the program scans in khangman/data/ to see what languages data is found
- QStringList mdirs = KGlobal::dirs()->findDirs("data", "klettres/");
+ TQStringList mdirs = KGlobal::dirs()->findDirs("data", "klettres/");
if (mdirs.isEmpty()) return;
- for (QStringList::Iterator it =mdirs.begin(); it !=mdirs.end(); ++it ) {
- QDir dir(*it);
- m_languages += dir.entryList(QDir::Dirs, QDir::Name);
+ for (TQStringList::Iterator it =mdirs.begin(); it !=mdirs.end(); ++it ) {
+ TQDir dir(*it);
+ m_languages += dir.entryList(TQDir::Dirs, TQDir::Name);
m_languages.remove(m_languages.find("."));
m_languages.remove(m_languages.find(".."));
}
@@ -104,7 +104,7 @@ void KLettres::findLanguages()
Prefs::setLanguages(m_languages);
Prefs::writeConfig();
//find duplicated entries in KDEDIR and KDEHOME
- QStringList temp_languages;
+ TQStringList temp_languages;
for (uint i=0; i<m_languages.count(); i++)
{
if (m_languages.contains(m_languages[i])>1) {
@@ -125,16 +125,16 @@ void KLettres::findLanguages()
config->setGroup("KNewStuffStatus");
for (uint i=0; i<m_languages.count(); i++)
{
- QString tmp = m_languages[i];
+ TQString tmp = m_languages[i];
if (!config->readEntry(tmp))
- config->writeEntry(tmp, QDate::currentDate().toString());
+ config->writeEntry(tmp, TQDate::currentDate().toString());
}
//we look in $KDEDIR/share/locale/all_languages from /kdelibs/kdecore/all_languages
//to find the name of the country
//corresponding to the code and the language the user set
KConfig entry(locate("locale", "all_languages"));
- const QStringList::ConstIterator itEnd = m_languages.end();
- for (QStringList::Iterator it = m_languages.begin(); it != m_languages.end(); ++it) {
+ const TQStringList::ConstIterator itEnd = m_languages.end();
+ for (TQStringList::Iterator it = m_languages.begin(); it != m_languages.end(); ++it) {
if (*it == "hi-ro")
m_languageNames.append(i18n("Romanized Hindi"));
else if (*it =="lug_UG")
@@ -149,10 +149,10 @@ void KLettres::findLanguages()
//m_sortedNames = m_languageNames;
}
-QString Prefs::defaultLanguage()
+TQString Prefs::defaultLanguage()
{
//see what is the user language for KDE
- QStringList defaultLanguages = KGlobal::locale()->languagesTwoAlpha();
+ TQStringList defaultLanguages = KGlobal::locale()->languagesTwoAlpha();
if (!defaultLanguages.isEmpty()) {
//scan to see if defaultLanguages[0] belongs to m_languages. If not, en is default.
int i = Prefs::self()->m_languages.findIndex(defaultLanguages[0]);
@@ -163,18 +163,18 @@ QString Prefs::defaultLanguage()
else
return Prefs::self()->m_languages[i]; //KDE default if exists
}
- return QString::null;
+ return TQString::null;
}
-bool KLettres::loadLayout(QDomDocument &layoutDocument)
+bool KLettres::loadLayout(TQDomDocument &layoutDocument)
{
- QFile layoutFile(locate("data", "klettres/"+Prefs::language()+"/sounds.xml"));
+ TQFile layoutFile(locate("data", "klettres/"+Prefs::language()+"/sounds.xml"));
//if xml file is not found, program exits
if (!layoutFile.exists())
{
kdWarning() << "sounds.xml file not found in $KDEDIR/share/apps/klettres/"+Prefs::language() << endl;
- QString mString=i18n("The file sounds.xml was not found in\n"
+ TQString mString=i18n("The file sounds.xml was not found in\n"
"$KDEDIR/share/apps/klettres/\n\n"
"Please install this file and start KLettres again.\n\n");
KMessageBox::information( this, mString,"KLettres - Error" );
@@ -195,16 +195,16 @@ bool KLettres::loadLayout(QDomDocument &layoutDocument)
void KLettres::setupActions()
{
- KAction *m_newAction = new KAction(i18n("New Sound"), "file_new", CTRL+Key_N, m_view, SLOT(game()), actionCollection(), "play_new");
+ KAction *m_newAction = new KAction(i18n("New Sound"), "file_new", CTRL+Key_N, m_view, TQT_SLOT(game()), actionCollection(), "play_new");
m_newAction->setToolTip(i18n("Play a new sound"));
m_newAction->setWhatsThis(i18n("You can play a new sound by clicking this button or using the File menu, New Sound."));
- new KAction( i18n("Get Alphabet in New Language..."), "knewstuff", 0, this, SLOT( slotDownloadNewStuff() ), actionCollection(), "downloadnewstuff" );
- KAction *m_playAgainAction = new KAction(i18n("Replay Sound"),"player_play", CTRL+Key_P, m_view, SLOT(slotPlayAgain()), actionCollection(), "play_again");
+ new KAction( i18n("Get Alphabet in New Language..."), "knewstuff", 0, this, TQT_SLOT( slotDownloadNewStuff() ), actionCollection(), "downloadnewstuff" );
+ KAction *m_playAgainAction = new KAction(i18n("Replay Sound"),"player_play", CTRL+Key_P, m_view, TQT_SLOT(slotPlayAgain()), actionCollection(), "play_again");
m_playAgainAction->setToolTip(i18n("Play the same sound again"));
m_playAgainAction->setWhatsThis(i18n("You can replay the same sound again by clicking this button or using the File menu, Replay Sound."));
- KStdAction::quit(kapp, SLOT(quit()), actionCollection());
+ KStdAction::quit(kapp, TQT_SLOT(quit()), actionCollection());
- m_menubarAction = new KToggleAction(i18n("Show &Menubar"),"editclear", CTRL+Key_M, this, SLOT(slotMenubar()), actionCollection(), "menubar");
+ m_menubarAction = new KToggleAction(i18n("Show &Menubar"),"editclear", CTRL+Key_M, this, TQT_SLOT(slotMenubar()), actionCollection(), "menubar");
m_menubarAction->setCheckedState(i18n("Hide &Menubar"));
m_menubarAction->setChecked(true);
m_menubarAction->setWhatsThis(i18n("You can show or hide the menubar as you wish by clicking this button."));
@@ -230,16 +230,16 @@ void KLettres::setupActions()
m_themeAction->setToolTip(i18n("Select the theme"));
m_themeAction->setWhatsThis(i18n("Here you can change the theme for KLettres. A theme consists in the background picture and the font color for the letter displayed."));
- m_kidAction = new KToggleAction(i18n("Mode Kid"), "klettres_kids", CTRL+Key_K, this, SLOT(slotModeKid()), actionCollection(), "mode_kid");
+ m_kidAction = new KToggleAction(i18n("Mode Kid"), "klettres_kids", CTRL+Key_K, this, TQT_SLOT(slotModeKid()), actionCollection(), "mode_kid");
m_kidAction->setWhatsThis(i18n("If you are in the Grown-up mode, clicking on this button will set up the Kid mode. The Kid mode has no menubar and the font is bigger in the statusbar."));
- m_grownupAction = new KToggleAction(i18n("Mode Grown-up"), "klettres_grownup", CTRL+Key_G, this, SLOT(slotModeGrownup()), actionCollection(), "mode_grownup");
+ m_grownupAction = new KToggleAction(i18n("Mode Grown-up"), "klettres_grownup", CTRL+Key_G, this, TQT_SLOT(slotModeGrownup()), actionCollection(), "mode_grownup");
m_grownupAction->setWhatsThis(i18n("The Grown-up mode is the normal mode where you can see the menubar."));
- connect(m_levelAction, SIGNAL(activated(int)), this, SLOT(slotChangeLevel(int)));
- connect(m_languageAction, SIGNAL(activated(int)), this, SLOT(slotChangeLanguage(int)));
- connect(m_themeAction, SIGNAL(activated(int)), this, SLOT(slotChangeTheme(int)));
+ connect(m_levelAction, TQT_SIGNAL(activated(int)), this, TQT_SLOT(slotChangeLevel(int)));
+ connect(m_languageAction, TQT_SIGNAL(activated(int)), this, TQT_SLOT(slotChangeLanguage(int)));
+ connect(m_themeAction, TQT_SIGNAL(activated(int)), this, TQT_SLOT(slotChangeTheme(int)));
- KStdAction::preferences(this, SLOT(optionsPreferences()), actionCollection());
+ KStdAction::preferences(this, TQT_SLOT(optionsPreferences()), actionCollection());
setupGUI();
}
@@ -247,8 +247,8 @@ void KLettres::setupActions()
void KLettres::setupStatusbar()
{
KStatusBar *st=statusBar();
- m_langLabel = new QLabel(st);
- m_levLabel = new QLabel(st);
+ m_langLabel = new TQLabel(st);
+ m_levLabel = new TQLabel(st);
st->addWidget(m_levLabel);
st->insertFixedItem("", 1);//add a space
st->addWidget(m_langLabel);
@@ -273,7 +273,7 @@ void KLettres::optionsPreferences()
//fonts is the icon
Timer *m_timer = new Timer();
dialog->addPage(m_timer, i18n("Timer"), "clock");
- connect(dialog, SIGNAL(settingsChanged()), this, SLOT(slotUpdateSettings()));
+ connect(dialog, TQT_SIGNAL(settingsChanged()), this, TQT_SLOT(slotUpdateSettings()));
dialog->show();
}
@@ -283,8 +283,8 @@ void KLettres::loadSettings()
//selectedLanguage = Prefs::languageNumber();
//m_view->selectedLanguage = selectedLanguage;
m_languageAction->setCurrentItem(Prefs::languageNumber());
- QString langString = m_languageNames[Prefs::languageNumber()];
- langString.replace("&", QString::null);
+ TQString langString = m_languageNames[Prefs::languageNumber()];
+ langString.replace("&", TQString::null);
m_langLabel->setText(i18n("Current language is %1").arg(langString));
loadLangToolBar();
// load default level
@@ -367,8 +367,8 @@ void KLettres::slotChangeLanguage(int newLanguage)
Prefs::setLanguage(m_languages[newLanguage]);
Prefs::writeConfig();
// Update the StatusBar
- QString langString = m_languageNames[newLanguage];
- langString.replace("&", QString::null);
+ TQString langString = m_languageNames[newLanguage];
+ langString.replace("&", TQString::null);
m_langLabel->setText(i18n("Current language is %1").arg(langString));
loadLangToolBar();
// Change language effectively
@@ -397,12 +397,12 @@ void KLettres::slotChangeTheme(int index)
void KLettres::slotModeGrownup()
{
- QPalette pal;
- QColorGroup cg;
- cg.setColor( QColorGroup::Background, white);
+ TQPalette pal;
+ TQColorGroup cg;
+ cg.setColor( TQColorGroup::Background, white);
pal.setActive( cg );
statusBar()->setPalette( pal );
- QFont f_lab( "Serif" , 10); //font for statusBar
+ TQFont f_lab( "Serif" , 10); //font for statusBar
m_levLabel->setFont(f_lab);
m_langLabel->setFont(f_lab);
m_menubarAction->setChecked(true);
@@ -413,8 +413,8 @@ void KLettres::slotModeGrownup()
m_menubarAction->setToolTip(i18n("Hide Menubar"));
slotMenubar();
//m_secondToolbar->setIconSize(22); //causes a crash when adding/removing actions in toolbar
- setMinimumSize( QSize( 640, 538 ) );
- setMaximumSize( QSize( 640, 538 ) );
+ setMinimumSize( TQSize( 640, 538 ) );
+ setMaximumSize( TQSize( 640, 538 ) );
m_view->m_timer = Prefs::grownTimer();
Prefs::setMode(Prefs::EnumMode::grownup);
Prefs::writeConfig();
@@ -422,12 +422,12 @@ void KLettres::slotModeGrownup()
void KLettres::slotModeKid()
{
- QPalette pal;
- QColorGroup cg;
- cg.setColor( QColorGroup::Background, white);
+ TQPalette pal;
+ TQColorGroup cg;
+ cg.setColor( TQColorGroup::Background, white);
pal.setActive( cg );
statusBar()->setPalette( pal );
- QFont f_lab( "Serif" , 12); //font for statusBar
+ TQFont f_lab( "Serif" , 12); //font for statusBar
f_lab.setBold(true);
m_levLabel->setFont(f_lab);
m_langLabel->setFont(f_lab);
@@ -439,8 +439,8 @@ void KLettres::slotModeKid()
m_menubarAction->setToolTip(i18n("Show Menubar"));
m_grownupAction->setChecked(false);
//m_secondToolbar->setIconSize(32);
- setMinimumSize( QSize( 640, 480 ) );
- setMaximumSize( QSize( 640, 480 ) );
+ setMinimumSize( TQSize( 640, 480 ) );
+ setMaximumSize( TQSize( 640, 480 ) );
m_view->m_timer = Prefs::kidTimer();
Prefs::setMode(Prefs::EnumMode::kid);
Prefs::writeConfig();
@@ -452,13 +452,13 @@ void KLettres::loadLangToolBar()
if (m_languages[Prefs::languageNumber()]== "cs" || m_languages[Prefs::languageNumber()]== "da" || m_languages[Prefs::languageNumber()]== "sk" || m_languages[Prefs::languageNumber()]== "es" || m_languages[Prefs::languageNumber()]== "de" || m_languages[Prefs::languageNumber()]== "nds")//Dutch, English, French and Italian have no special characters
{
allData.clear();
- QString myString=QString("klettres/%1.txt").arg(m_languages[Prefs::languageNumber()]);
- QFile myFile;
+ TQString myString=TQString("klettres/%1.txt").arg(m_languages[Prefs::languageNumber()]);
+ TQFile myFile;
myFile.setName(locate("data",myString));
if (!myFile.exists())
{
- QString mString=i18n("File $KDEDIR/share/apps/klettres/%1.txt not found;\n"
+ TQString mString=i18n("File $KDEDIR/share/apps/klettres/%1.txt not found;\n"
"please check your installation.").arg(m_languages[Prefs::languageNumber()]);
KMessageBox::sorry( this, mString,
i18n("Error") );
@@ -466,16 +466,16 @@ void KLettres::loadLangToolBar()
}
update();
//we open the file and store info into the stream...
- QFile openFileStream(myFile.name());
+ TQFile openFileStream(myFile.name());
openFileStream.open(IO_ReadOnly);
- QTextStream readFileStr(&openFileStream);
- readFileStr.setEncoding(QTextStream::UnicodeUTF8);
+ TQTextStream readFileStr(&openFileStream);
+ readFileStr.setEncoding(TQTextStream::UnicodeUTF8);
//allData contains all the words from the file
- allData = QStringList::split("\n", readFileStr.read(), true);
+ allData = TQStringList::split("\n", readFileStr.read(), true);
openFileStream.close();
for (int i=0; i<(int) allData.count(); i++) {
if (!allData[i].isEmpty())
- m_secondToolbar->insertButton (charIcon(allData[i].at(0)), i, SIGNAL( clicked() ), this, SLOT( slotPasteChar()), true, i18n("Inserts the character %1").arg(allData[i]), i+1 );
+ m_secondToolbar->insertButton (charIcon(allData[i].at(0)), i, TQT_SIGNAL( clicked() ), this, TQT_SLOT( slotPasteChar()), true, i18n("Inserts the character %1").arg(allData[i]), i+1 );
}
}
}
@@ -486,34 +486,34 @@ void KLettres::slotPasteChar()
m_view->m_letterEdit->insert(allData[charBut->id()]);
}
-QString KLettres::charIcon(const QChar & c)
+TQString KLettres::charIcon(const TQChar & c)
{
///Create a name and path for the icon
- QString s = locateLocal("icon", "char" + QString::number(c.unicode()) + ".png");
+ TQString s = locateLocal("icon", "char" + TQString::number(c.unicode()) + ".png");
- QRect r(4, 4, 120, 120);
+ TQRect r(4, 4, 120, 120);
///A font to draw the character with
- QFont font;
+ TQFont font;
font.setFamily( "Arial" );
font.setPixelSize(120);
- font.setWeight(QFont::Normal);
+ font.setWeight(TQFont::Normal);
///Create the pixmap
- QPixmap pm(128, 128);
+ TQPixmap pm(128, 128);
pm.fill(Qt::white);
- QPainter p(&pm);
+ TQPainter p(&pm);
p.setFont(font);
p.setPen(Qt::black);
- p.drawText(r, Qt::AlignCenter, (QString) c);
+ p.drawText(r, Qt::AlignCenter, (TQString) c);
///Create transparency mask
- QBitmap bm(128, 128);
+ TQBitmap bm(128, 128);
bm.fill(Qt::color0);
- QPainter b(&bm);
+ TQPainter b(&bm);
b.setFont(font);
b.setPen(Qt::color1);
- b.drawText(r, Qt::AlignCenter, (QString) c);
+ b.drawText(r, Qt::AlignCenter, (TQString) c);
///Mask the pixmap
pm.setMask(bm);
diff --git a/klettres/klettres/klettres.h b/klettres/klettres/klettres.h
index 82ce62ed..574b583a 100644
--- a/klettres/klettres/klettres.h
+++ b/klettres/klettres/klettres.h
@@ -56,15 +56,15 @@ public:
///Sound class
SoundFactory *soundFactory;
///All available language codes
- QStringList m_languages;
+ TQStringList m_languages;
///All available language names
- QStringList m_languageNames;
+ TQStringList m_languageNames;
/**
*Load the xml file
*@param layoutDocument the xml file
*@return bool true if the xml document is found and well formed, false otherwise
*/
- bool loadLayout(QDomDocument &layoutDocument);
+ bool loadLayout(TQDomDocument &layoutDocument);
///Number corresponding to the selected language: 0 is Czech, 1 is Danish, 2 is English (default), 3 is French, 4 is Dutch, 5 is Slovak
//uint selectedLanguage;
///Action that sets up the Language menu
@@ -90,13 +90,13 @@ protected:
///Action allow the Grownup mode
KToggleAction *m_grownupAction;
///Label stating the language in the statusbar
- QLabel *m_langLabel;
+ TQLabel *m_langLabel;
///Label stating the level in the statusbar
- QLabel *m_levLabel;
+ TQLabel *m_levLabel;
///Holds the levels
- QStringList m_levelsNames;
+ TQStringList m_levelsNames;
///Holds the looks
- QStringList m_themesNames;
+ TQStringList m_themesNames;
///Create an instance of a KToolBar
KToolBar *m_mainToolbar;
///Second toolbar with buttons of special characters per language
@@ -112,7 +112,7 @@ protected:
/**generates icons for the special characters toolbar
* @param c the character that will be painted on the icon
*/
- QString charIcon(const QChar &c);
+ TQString charIcon(const TQChar &c);
/**
*Update the level menu and level combobox
* @param id The id of the new level
@@ -123,7 +123,7 @@ protected:
///Set the correct buttons on the second toolbar according to the language
void loadLangToolBar();
///All the special characters from a language file, these characters will be as buttons on the Special Characters Toolbar
- QStringList allData;
+ TQStringList allData;
protected slots:
///Call the Get New Stuff dialog
diff --git a/klettres/klettres/klettresview.cpp b/klettres/klettres/klettresview.cpp
index f015c18d..c9891bf1 100644
--- a/klettres/klettres/klettresview.cpp
+++ b/klettres/klettres/klettresview.cpp
@@ -18,11 +18,11 @@
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. *
***************************************************************************/
-#include <qlabel.h>
-#include <qtimer.h>
-#include <qtooltip.h>
-#include <qwhatsthis.h>
-#include <qpainter.h>
+#include <tqlabel.h>
+#include <tqtimer.h>
+#include <tqtooltip.h>
+#include <tqwhatsthis.h>
+#include <tqpainter.h>
#include <kapplication.h>
#include <klocale.h>
@@ -34,17 +34,17 @@
#include "prefs.h"
KLettresView::KLettresView(KLettres *parent)
- : QWidget(parent)
+ : TQWidget(parent)
{
m_klettres = parent;
- setMinimumSize( QSize( 640, 480 ) );
- setMaximumSize( QSize( 640, 480 ) );
+ setMinimumSize( TQSize( 640, 480 ) );
+ setMaximumSize( TQSize( 640, 480 ) );
//lineEdit for user input
m_letterEdit = new KLineEdit( this, "line1" );
- m_letterEdit->setGeometry( QRect( 40, 310, 161, 160 ) );
- QToolTip::add( m_letterEdit, i18n( "Type the letter or syllable that you just heard" ) );
+ m_letterEdit->setGeometry( TQRect( 40, 310, 161, 160 ) );
+ TQToolTip::add( m_letterEdit, i18n( "Type the letter or syllable that you just heard" ) );
setFont(Prefs::font());
//load background pics
@@ -90,25 +90,25 @@ void KLettresView::chooseSound()
else
width = 200+(20*(m_length-2));
update();
- m_letterEdit->setMinimumSize( QSize( width, 160 ) );
- m_letterEdit->setMaximumSize( QSize( width, 160 ) );
+ m_letterEdit->setMinimumSize( TQSize( width, 160 ) );
+ m_letterEdit->setMaximumSize( TQSize( width, 160 ) );
}
-void KLettresView::paintEvent( QPaintEvent * )
+void KLettresView::paintEvent( TQPaintEvent * )
{
if (Prefs::level()%2==1) {
- QPainter paint(this);
+ TQPainter paint(this);
paint.setFont(Prefs::font());
- QString start = i18n("Start");
+ TQString start = i18n("Start");
paint.setFont(Prefs::font());
if (Prefs::theme() == Prefs::EnumTheme::desert) {
- paint.setPen( QColor(115, 50, 95)); //brown
- //m_letterEdit->setPaletteForegroundColor(QColor(115, 50, 95));
+ paint.setPen( TQColor(115, 50, 95)); //brown
+ //m_letterEdit->setPaletteForegroundColor(TQColor(115, 50, 95));
}
else if (Prefs::theme() == Prefs::EnumTheme::arctic) {
paint.setPen( Qt::white );
- //m_letterEdit->setPaletteForegroundColor(QColor(48, 75, 137));
+ //m_letterEdit->setPaletteForegroundColor(TQColor(48, 75, 137));
}
else {
paint.setPen( Qt::white );
@@ -124,28 +124,28 @@ void KLettresView::game()
m_cursorPos = 1;
//reset everything so when you change language or levels
//it all restarts nicely
- QObject::disconnect(m_letterEdit, SIGNAL(textChanged(const QString&)),this,SLOT(slotProcess(const QString&)) );
+ TQObject::disconnect(m_letterEdit, TQT_SIGNAL(textChanged(const TQString&)),this,TQT_SLOT(slotProcess(const TQString&)) );
m_letterEdit->clear();
m_letterEdit->setCursorPosition(0);
m_letterEdit->setMaxLength(1); //fix that's in trunk
m_letterEdit->setFocus();
chooseSound();
- QObject::connect(m_letterEdit, SIGNAL(textChanged(const QString&)), this, SLOT(slotProcess(const QString&)) );
+ TQObject::connect(m_letterEdit, TQT_SIGNAL(textChanged(const TQString&)), this, TQT_SLOT(slotProcess(const TQString&)) );
}
-void KLettresView::slotProcess(const QString &inputLetter)
+void KLettresView::slotProcess(const TQString &inputLetter)
{
- QObject::disconnect(m_letterEdit, SIGNAL(textChanged(const QString&)), this, SLOT(slotProcess(const QString&)) );
+ TQObject::disconnect(m_letterEdit, TQT_SIGNAL(textChanged(const TQString&)), this, TQT_SLOT(slotProcess(const TQString&)) );
//check if backspace
if(inputLetter.length() != m_cursorPos)
{
m_cursorPos--;
m_letterEdit->setMaxLength( m_cursorPos );
- QObject::connect(m_letterEdit, SIGNAL(textChanged(const QString&)),this,SLOT(slotProcess(const QString&)) );
+ TQObject::connect(m_letterEdit, TQT_SIGNAL(textChanged(const TQString&)),this,TQT_SLOT(slotProcess(const TQString&)) );
return;
}
- QChar input_character = inputLetter.at(inputLetter.length()-1);
+ TQChar input_character = inputLetter.at(inputLetter.length()-1);
if (input_character.isLetter()) //(a1.at(inputLetter.length()).lower().isLetter())
{
@@ -153,21 +153,21 @@ void KLettresView::slotProcess(const QString &inputLetter)
m_letterEdit->selectAll();
m_letterEdit->cut();
m_letterEdit->setText(m_upperLetter);
- QTimer::singleShot(m_timer*100, this, SLOT(slotTimerDone()));
+ TQTimer::singleShot(m_timer*100, this, TQT_SLOT(slotTimerDone()));
}
else
{
kdDebug() << "in no char loop" << endl;
kdDebug() << "cursor " << m_cursorPos << endl;
m_letterEdit->backspace();
- QObject::connect(m_letterEdit, SIGNAL(textChanged(const QString&)),this,SLOT(slotProcess(const QString&)) );
+ TQObject::connect(m_letterEdit, TQT_SIGNAL(textChanged(const TQString&)),this,TQT_SLOT(slotProcess(const TQString&)) );
}
}
void KLettresView::slotTimerDone()
{
kdDebug() << "in timer done" << endl;
- QString match = m_currentLetter.left(m_cursorPos );
+ TQString match = m_currentLetter.left(m_cursorPos );
if (match == m_upperLetter)
{
@@ -177,7 +177,7 @@ void KLettresView::slotTimerDone()
m_letterEdit->setCursorPosition( m_cursorPos );
m_letterEdit->setFocus();
m_cursorPos ++;
- QObject::connect(m_letterEdit, SIGNAL(textChanged(const QString&)), this, SLOT(slotProcess(const QString&)) );
+ TQObject::connect(m_letterEdit, TQT_SIGNAL(textChanged(const TQString&)), this, TQT_SLOT(slotProcess(const TQString&)) );
}
else
{
@@ -191,7 +191,7 @@ void KLettresView::slotTimerDone()
//play sound again
m_klettres->soundFactory->playSound(m_random);
- QObject::connect(m_letterEdit, SIGNAL(textChanged(const QString&)), this, SLOT(slotProcess(const QString&)) );
+ TQObject::connect(m_letterEdit, TQT_SIGNAL(textChanged(const TQString&)), this, TQT_SLOT(slotProcess(const TQString&)) );
}
}
diff --git a/klettres/klettres/klettresview.h b/klettres/klettres/klettresview.h
index 80c8a95b..63e274f1 100644
--- a/klettres/klettres/klettresview.h
+++ b/klettres/klettres/klettresview.h
@@ -21,8 +21,8 @@
#ifndef KLETTRESVIEW_H
#define KLETTRESVIEW_H
-#include <qwidget.h>
-#include <qpalette.h>
+#include <tqwidget.h>
+#include <tqpalette.h>
#include <klineedit.h>
class QLabel;
@@ -68,12 +68,12 @@ public:
protected:
///The pixmaps for the themes backgrounds
- QPixmap m_grownupPicture,
+ TQPixmap m_grownupPicture,
m_kidPicture,
m_desertPicture;
///Palette changes wether it's kid or grown-up
- QPalette pal;
- QColorGroup cg;
+ TQPalette pal;
+ TQColorGroup cg;
///cursor position in the line edit
int m_cursorPos;
///Random number that decides on the letter/syllable and sound
@@ -83,13 +83,13 @@ protected:
///Choose a sound in random and ensure that it's not the same than the previous one
void chooseSound();
///Current letter or syllable stored
- QString m_currentLetter;
+ TQString m_currentLetter;
///Current letter entered uppercase i.e. m_inputLetter.upper()
- QString m_upperLetter;
+ TQString m_upperLetter;
///Current letter entered
- //QString m_inputLetter; NOTE: not used
+ //TQString m_inputLetter; NOTE: not used
///Paint the letter/syllable in levels 1 and 3
- void paintEvent( QPaintEvent * );
+ void paintEvent( TQPaintEvent * );
public slots:
///Start playing displaying a new letter/syllable, playing the associated sound
@@ -99,7 +99,7 @@ protected:
///Play the same sound again
void slotPlayAgain();
- void slotProcess(const QString &inputLetter);
+ void slotProcess(const TQString &inputLetter);
void slotTimerDone();
};
diff --git a/klettres/klettres/klnewstuff.cpp b/klettres/klettres/klnewstuff.cpp
index c6d601ba..ed6061ba 100644
--- a/klettres/klettres/klnewstuff.cpp
+++ b/klettres/klettres/klnewstuff.cpp
@@ -18,7 +18,7 @@
#include <kdebug.h>
#include <ktar.h>
-#include <qdir.h>
+#include <tqdir.h>
#include <kaction.h>
#include <kapplication.h>
#include <kstandarddirs.h>
@@ -31,7 +31,7 @@ KLNewStuff::KLNewStuff( KLettresView *view ) :
{
}
-bool KLNewStuff::install( const QString &fileName )
+bool KLNewStuff::install( const TQString &fileName )
{
kdDebug(5850) << "KLNewStuff::install(): " << fileName << endl;
@@ -40,7 +40,7 @@ bool KLNewStuff::install( const QString &fileName )
return false;
const KArchiveDirectory *archiveDir = archive.directory();
KStandardDirs myStdDir;
- const QString destDir =myStdDir.saveLocation("data", kapp->instanceName() + "/", true);
+ const TQString destDir =myStdDir.saveLocation("data", kapp->instanceName() + "/", true);
KStandardDirs::makeDir( destDir );
archiveDir->copyTo(destDir);
archive.close();
@@ -54,7 +54,7 @@ bool KLNewStuff::install( const QString &fileName )
return true;
}
-bool KLNewStuff::createUploadFile( const QString &fileName )
+bool KLNewStuff::createUploadFile( const TQString &fileName )
{
//return mView->saveCalendar( fileName );
return true;
diff --git a/klettres/klettres/klnewstuff.h b/klettres/klettres/klnewstuff.h
index f7cd9803..e3c6acbe 100644
--- a/klettres/klettres/klnewstuff.h
+++ b/klettres/klettres/klnewstuff.h
@@ -29,8 +29,8 @@ class KLNewStuff : public KNewStuff
public:
KLNewStuff( KLettresView * );
- bool install( const QString &fileName );
- bool createUploadFile( const QString &fileName );
+ bool install( const TQString &fileName );
+ bool createUploadFile( const TQString &fileName );
//private:
KLettresView *m_view;
diff --git a/klettres/klettres/prefs_addons.h b/klettres/klettres/prefs_addons.h
index 42744ffa..ec28026a 100644
--- a/klettres/klettres/prefs_addons.h
+++ b/klettres/klettres/prefs_addons.h
@@ -20,8 +20,8 @@
***************************************************************************/
public:
-static QString defaultLanguage();
-static void setLanguages(const QStringList &languages)
+static TQString defaultLanguage();
+static void setLanguages(const TQStringList &languages)
{
Prefs::self()->m_languages = languages;
}
@@ -45,4 +45,4 @@ static int languageNumber()
return 0;
}
-QStringList m_languages;
+TQStringList m_languages;
diff --git a/klettres/klettres/soundfactory.cpp b/klettres/klettres/soundfactory.cpp
index 31f243fa..e23bc501 100644
--- a/klettres/klettres/soundfactory.cpp
+++ b/klettres/klettres/soundfactory.cpp
@@ -34,7 +34,7 @@
SoundFactory::SoundFactory(KLettres *parent, const char *name)
- : QObject(parent, name)
+ : TQObject(parent, name)
{
klettres = parent;
@@ -50,7 +50,7 @@ SoundFactory::~SoundFactory()
{
}
-void SoundFactory::change(QString currentLanguage)
+void SoundFactory::change(TQString currentLanguage)
{
//go load the sounds for the current language
bool ok = loadLanguage(m_layoutsDocument, currentLanguage);
@@ -61,7 +61,7 @@ void SoundFactory::change(QString currentLanguage)
void SoundFactory::playSound(int mySound)
{
- QString soundFile;
+ TQString soundFile;
if ((uint) mySound >= sounds) return;
@@ -78,22 +78,22 @@ void SoundFactory::loadFailure()
KMessageBox::error(klettres, i18n("Error while loading the sound names."));
}
-bool SoundFactory::loadLanguage(QDomDocument &layoutDocument, QString currentLanguage)
+bool SoundFactory::loadLanguage(TQDomDocument &layoutDocument, TQString currentLanguage)
{
- QDomNodeList languagesList,
+ TQDomNodeList languagesList,
alphabetList,
syllablesList,
soundNamesList;
- QDomElement languageElement,
+ TQDomElement languageElement,
alphabetElement,
syllableElement,
soundNameElement;
- QDomAttr nameAttribute, fileAttribute;
+ TQDomAttr nameAttribute, fileAttribute;
languagesList = layoutDocument.elementsByTagName("language");
- QDomAttr codeAttribute;
+ TQDomAttr codeAttribute;
//check if the sound files match current language
- languageElement = (const QDomElement &) languagesList.item(0).toElement();
+ languageElement = (const TQDomElement &) languagesList.item(0).toElement();
codeAttribute = languageElement.attributeNode("code");
if (currentLanguage != codeAttribute.value()) {
kdDebug() << "Fail reading language !!! " << endl;
@@ -107,7 +107,7 @@ bool SoundFactory::loadLanguage(QDomDocument &layoutDocument, QString currentLan
if (alphabetList.count() != 1)
return false;
- alphabetElement = (const QDomElement &) alphabetList.item(0).toElement();
+ alphabetElement = (const TQDomElement &) alphabetList.item(0).toElement();
soundNamesList = alphabetElement.elementsByTagName("sound");
}
@@ -119,7 +119,7 @@ bool SoundFactory::loadLanguage(QDomDocument &layoutDocument, QString currentLan
if (syllablesList.count() != 1)
return false;
- syllableElement = (const QDomElement &) syllablesList.item(0).toElement();
+ syllableElement = (const TQDomElement &) syllablesList.item(0).toElement();
soundNamesList = syllableElement.elementsByTagName("sound");
}
@@ -133,7 +133,7 @@ bool SoundFactory::loadLanguage(QDomDocument &layoutDocument, QString currentLan
for (uint sound = 0; sound < sounds; sound++)
{
- soundNameElement = (const QDomElement &) soundNamesList.item(sound).toElement();
+ soundNameElement = (const TQDomElement &) soundNamesList.item(sound).toElement();
nameAttribute = soundNameElement.attributeNode("name");
//namesList helds the names of the letter or syllable to display
namesList.append(nameAttribute.value());
diff --git a/klettres/klettres/soundfactory.h b/klettres/klettres/soundfactory.h
index c02b26c4..2cc8a5de 100644
--- a/klettres/klettres/soundfactory.h
+++ b/klettres/klettres/soundfactory.h
@@ -25,7 +25,7 @@
#ifndef _SOUNDFACTORY_H_
#define _SOUNDFACTORY_H_
-#include <qdom.h>
+#include <tqdom.h>
class KLettres;
@@ -50,23 +50,23 @@ public:
///Call the main instance of the program
KLettres *klettres;
///Change the language when the user changes the language in the Languages menu
- void change(QString currentLanguage);
+ void change(TQString currentLanguage);
///Play the sound associated to int soundRef
void playSound(int ) ;
///Number of sounds corresponding to the current language and level (alphabet or syllables)
uint sounds;
///List of sound names
- QStringList namesList;
+ TQStringList namesList;
///List of sound files associated with each sound name
- QStringList filesList;
+ TQStringList filesList;
/**
* Load the sounds of one given language
* Call that when you read the language from Config and when the language changes
* or when the level changes
*/
- bool loadLanguage(QDomDocument &layoutDocument, QString currentLanguage);
+ bool loadLanguage(TQDomDocument &layoutDocument, TQString currentLanguage);
///The language document
- QDomDocument m_layoutsDocument;
+ TQDomDocument m_layoutsDocument;
private:
///Report a load failure
diff --git a/klettres/klettres/timer.cpp b/klettres/klettres/timer.cpp
index 7ddcc20c..f102d82e 100644
--- a/klettres/klettres/timer.cpp
+++ b/klettres/klettres/timer.cpp
@@ -22,8 +22,8 @@
#include <klocale.h>
-#include <qlabel.h>
-#include <qslider.h>
+#include <tqlabel.h>
+#include <tqslider.h>
#include "timer.h"
#include "prefs.h"
@@ -32,17 +32,17 @@
Timer::Timer()
:timerdlg()
{
- timeGrownLabel->setText(QString::number(Prefs::grownTimer()) + " " + i18n("tenths of second"));
- timeKidLabel->setText(QString::number(Prefs::kidTimer()) + " " + i18n("tenths of second"));
- connect(kcfg_GrownTimer, SIGNAL(valueChanged(int)), this, SLOT(sliderValueChanged()));
- connect(kcfg_KidTimer, SIGNAL(valueChanged(int)), this, SLOT(sliderValueChanged()));
+ timeGrownLabel->setText(TQString::number(Prefs::grownTimer()) + " " + i18n("tenths of second"));
+ timeKidLabel->setText(TQString::number(Prefs::kidTimer()) + " " + i18n("tenths of second"));
+ connect(kcfg_GrownTimer, TQT_SIGNAL(valueChanged(int)), this, TQT_SLOT(sliderValueChanged()));
+ connect(kcfg_KidTimer, TQT_SIGNAL(valueChanged(int)), this, TQT_SLOT(sliderValueChanged()));
}
void Timer::sliderValueChanged()
{
- timeKidLabel->setText(QString::number(kcfg_KidTimer->value()) + " " + i18n("tenths of second"));
- timeGrownLabel->setText(QString::number(kcfg_GrownTimer->value()) + " " + i18n("tenths of second"));
+ timeKidLabel->setText(TQString::number(kcfg_KidTimer->value()) + " " + i18n("tenths of second"));
+ timeGrownLabel->setText(TQString::number(kcfg_GrownTimer->value()) + " " + i18n("tenths of second"));
}
diff --git a/klettres/klettres/timer.h b/klettres/klettres/timer.h
index 91785a32..28634cf3 100644
--- a/klettres/klettres/timer.h
+++ b/klettres/klettres/timer.h
@@ -41,7 +41,7 @@ public:
Timer();
protected slots:
- ///When the QSlider value changes
+ ///When the TQSlider value changes
void sliderValueChanged();
};