summaryrefslogtreecommitdiffstats
path: root/klettres/klettres/klettresview.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'klettres/klettres/klettresview.cpp')
-rw-r--r--klettres/klettres/klettresview.cpp58
1 files changed, 29 insertions, 29 deletions
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&)) );
}
}