summaryrefslogtreecommitdiffstats
path: root/khangman
diff options
context:
space:
mode:
Diffstat (limited to 'khangman')
-rw-r--r--khangman/ChangeLog2
-rw-r--r--khangman/README.languages2
-rw-r--r--khangman/khangman/advanced.ui18
-rw-r--r--khangman/khangman/data/en/easy.kvtml4
-rw-r--r--khangman/khangman/khangman.cpp86
-rw-r--r--khangman/khangman/khangman.h1
-rw-r--r--khangman/khangman/khangmanview.cpp116
-rw-r--r--khangman/khangman/khangmanview.h7
-rw-r--r--khangman/khangman/khnewstuff.cpp8
-rw-r--r--khangman/khangman/khnewstuff.h4
-rw-r--r--khangman/khangman/normal.ui18
-rw-r--r--khangman/khangman/prefs.kcfgc2
-rw-r--r--khangman/khangman/timer.h1
-rw-r--r--khangman/khangman/timerdlg.ui36
14 files changed, 154 insertions, 151 deletions
diff --git a/khangman/ChangeLog b/khangman/ChangeLog
index 337a55d6..93419a47 100644
--- a/khangman/ChangeLog
+++ b/khangman/ChangeLog
@@ -1,5 +1,5 @@
June 23, 2005
-- add timers for KPassivePopup (Hint and Already Guessed) to allow young children to read (young children need more time)
+- add timers for KPassivePopup (Hint and Already Guessed) to allow young tqchildren to read (young tqchildren need more time)
- fixed hint position
- tooltip if no Win dialog to say the game is finished (is displayed for 4 seconds)
diff --git a/khangman/README.languages b/khangman/README.languages
index d72a7a72..b0d2bf07 100644
--- a/khangman/README.languages
+++ b/khangman/README.languages
@@ -25,7 +25,7 @@ cd kdeedu/khangman
./add_language <language_code>
- Here you must replace <language_code> with your language code.
+ Here you must tqreplace <language_code> with your language code.
The program will refuse a non-valid language code!
diff --git a/khangman/khangman/advanced.ui b/khangman/khangman/advanced.ui
index 02845c1a..20d03dac 100644
--- a/khangman/khangman/advanced.ui
+++ b/khangman/khangman/advanced.ui
@@ -1,10 +1,10 @@
<!DOCTYPE UI><UI version="3.3" stdsetdef="1">
<class>advanced</class>
-<widget class="QWidget">
+<widget class="TQWidget">
<property name="name">
<cstring>advanced</cstring>
</property>
- <property name="geometry">
+ <property name="tqgeometry">
<rect>
<x>0</x>
<y>0</y>
@@ -16,15 +16,15 @@
<property name="name">
<cstring>unnamed</cstring>
</property>
- <widget class="QLayoutWidget" row="0" column="0">
+ <widget class="TQLayoutWidget" row="0" column="0">
<property name="name">
- <cstring>layout2</cstring>
+ <cstring>tqlayout2</cstring>
</property>
<vbox>
<property name="name">
<cstring>unnamed</cstring>
</property>
- <widget class="QGroupBox">
+ <widget class="TQGroupBox">
<property name="name">
<cstring>groupBox5</cstring>
</property>
@@ -35,7 +35,7 @@
<property name="name">
<cstring>unnamed</cstring>
</property>
- <widget class="QCheckBox" row="0" column="0">
+ <widget class="TQCheckBox" row="0" column="0">
<property name="name">
<cstring>kcfg_Hint</cstring>
</property>
@@ -55,7 +55,7 @@ If this is &lt;b&gt;enabled&lt;/b&gt;, then hints are available and you can get
</widget>
</grid>
</widget>
- <widget class="QGroupBox">
+ <widget class="TQGroupBox">
<property name="name">
<cstring>groupBox6</cstring>
</property>
@@ -66,7 +66,7 @@ If this is &lt;b&gt;enabled&lt;/b&gt;, then hints are available and you can get
<property name="name">
<cstring>unnamed</cstring>
</property>
- <widget class="QCheckBox" row="0" column="0">
+ <widget class="TQCheckBox" row="0" column="0">
<property name="name">
<cstring>kcfg_AccentedLetters</cstring>
</property>
@@ -91,5 +91,5 @@ For example, in Catalan, if this is unchecked and you type "o", the o and ò wil
</widget>
</grid>
</widget>
-<layoutdefaults spacing="6" margin="11"/>
+<tqlayoutdefaults spacing="6" margin="11"/>
</UI>
diff --git a/khangman/khangman/data/en/easy.kvtml b/khangman/khangman/data/en/easy.kvtml
index 8e2521aa..58338d21 100644
--- a/khangman/khangman/data/en/easy.kvtml
+++ b/khangman/khangman/data/en/easy.kvtml
@@ -3,7 +3,7 @@
<kvtml encoding="UTF-8">
<e>
<o>playtime</o>
- <t>time assigned for children to play</t>
+ <t>time assigned for tqchildren to play</t>
</e>
<e>
<o>furniture</o>
@@ -134,7 +134,7 @@
<t>large group of persons</t>
</e>
<e>
- <o>children</o>
+ <o>tqchildren</o>
<t>young humans</t>
</e>
<e>
diff --git a/khangman/khangman/khangman.cpp b/khangman/khangman/khangman.cpp
index 0b14829e..e478d804 100644
--- a/khangman/khangman/khangman.cpp
+++ b/khangman/khangman/khangman.cpp
@@ -74,30 +74,30 @@ KHangMan::~KHangMan()
void KHangMan::setupActions()
{
// Game->New
- KAction *action = new KAction(i18n("&New"), "filenew", CTRL+Key_N , m_view, TQT_SLOT(slotNewGame()), actionCollection(), "file_new");
+ KAction *action = new KAction(i18n("&New"), "filenew", CTRL+Key_N , TQT_TQOBJECT(m_view), TQT_SLOT(slotNewGame()), actionCollection(), "file_new");
action->setToolTip(i18n( "Play with a new word" ));
// Game->Get Words in New Language
- new KAction( i18n("&Get Words in New Language..."), "knewstuff", CTRL+Key_G, this, TQT_SLOT( slotDownloadNewStuff() ), actionCollection(), "downloadnewstuff" );
+ new KAction( i18n("&Get Words in New Language..."), "knewstuff", CTRL+Key_G, TQT_TQOBJECT(this), TQT_SLOT( slotDownloadNewStuff() ), actionCollection(), "downloadnewstuff" );
- KStdAction::quit(this, TQT_SLOT(slotQuit()), actionCollection());
+ KStdAction::quit(TQT_TQOBJECT(this), TQT_SLOT(slotQuit()), actionCollection());
m_levelAction = new KSelectAction(i18n("Le&vel"), 0, actionCollection(), "combo_level");
m_levelAction->setToolTip(i18n( "Choose the level" ));
m_levelAction->setWhatsThis(i18n( "Choose the level of difficulty" ));
- connect(m_levelAction, TQT_SIGNAL(activated(int)), this, TQT_SLOT(slotChangeLevel(int)));
+ connect(m_levelAction, TQT_SIGNAL(activated(int)), TQT_TQOBJECT(this), TQT_SLOT(slotChangeLevel(int)));
// Action for selecting language.
m_languageAction = new KSelectAction(i18n("&Language"), 0, actionCollection(), "languages");
m_languageAction->setItems(m_languageNames);
- m_languageAction->setCurrentItem(m_languages.findIndex(Prefs::selectedLanguage()));
- connect(m_languageAction, TQT_SIGNAL(activated(int)), this, TQT_SLOT(slotChangeLanguage(int)));
+ m_languageAction->setCurrentItem(m_languages.tqfindIndex(Prefs::selectedLanguage()));
+ connect(m_languageAction, TQT_SIGNAL(activated(int)), TQT_TQOBJECT(this), TQT_SLOT(slotChangeLanguage(int)));
- KStdAction::preferences(this, TQT_SLOT(optionsPreferences()), actionCollection());
+ KStdAction::preferences(TQT_TQOBJECT(this), TQT_SLOT(optionsPreferences()), actionCollection());
// Mode. Currently hard coded into Sea and Desert themes.
TQStringList modes;
- m_modeAction = new KSelectAction(i18n("L&ook"), 0, this, TQT_SLOT(slotChangeMode()), actionCollection(), "combo_mode");
+ m_modeAction = new KSelectAction(i18n("L&ook"), 0, TQT_TQOBJECT(this), TQT_SLOT(slotChangeMode()), actionCollection(), "combo_mode");
modes += i18n("&Sea Theme");
modes += i18n("&Desert Theme");
m_modeAction->setItems(modes);
@@ -150,7 +150,7 @@ void KHangMan::slotChangeLevel(int index)
changeStatusbar("", IDS_ACCENTS);
#endif
Prefs::setCurrentLevel(index);
- levelString.replace(0, 1, levelString.left(1).lower());
+ levelString.tqreplace(0, 1, levelString.left(1).lower());
Prefs::setLevelFile(levelString +".kvtml");
Prefs::writeConfig();
m_view->slotNewGame();
@@ -159,12 +159,12 @@ void KHangMan::slotChangeLevel(int index)
void KHangMan::slotChangeLanguage(int index)
{
//good when no in English
- kdDebug() << "Change to " << m_languages[m_languageNames.findIndex(m_languageNames[index])] << endl;
- Prefs::setSelectedLanguage(m_languages[m_languageNames.findIndex(m_languageNames[index])]);
+ kdDebug() << "Change to " << m_languages[m_languageNames.tqfindIndex(m_languageNames[index])] << endl;
+ Prefs::setSelectedLanguage(m_languages[m_languageNames.tqfindIndex(m_languageNames[index])]);
Prefs::writeConfig();
loadLevels();
loadLangToolBar();
- changeStatusbar(m_languageNames[m_languages.findIndex(Prefs::selectedLanguage())], IDS_LANG);
+ changeStatusbar(m_languageNames[m_languages.tqfindIndex(Prefs::selectedLanguage())], IDS_LANG);
setAccent();
setMessages();
m_view->slotNewGame();
@@ -196,8 +196,8 @@ void KHangMan::setLanguages()
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(".."));
+ m_languages.remove(m_languages.tqfind("."));
+ m_languages.remove(m_languages.tqfind(".."));
}
m_languages.sort();
@@ -209,7 +209,7 @@ void KHangMan::setLanguages()
TQStringList temp_languages;
for (uint i=0; i<m_languages.count(); i++) {
- if (m_languages.contains(m_languages[i])>1) {
+ if (m_languages.tqcontains(m_languages[i])>1) {
temp_languages.append(m_languages[i]);
m_languages.remove(m_languages[i]);
}
@@ -224,11 +224,11 @@ void KHangMan::setLanguages()
// Write the present languages in config so they cannot be downloaded.
KConfig *config=kapp->config();
- config->setGroup("KNewStuffStatus");
+ config->setGroup("KNewStufftqStatus");
for (uint i=0; i<m_languages.count(); i++) {
TQString tmp = m_languages[i];
if (!config->readEntry(tmp))
- config->writeEntry(tmp, TQDate::currentDate().toString(Qt::ISODate));
+ config->writeEntry(tmp, TQString(TQDate::tqcurrentDate().toString(Qt::ISODate)));
}
// We look in $KDEDIR/share/locale/all_languages from
@@ -261,7 +261,7 @@ void KHangMan::loadSettings()
selectedLanguage = Prefs::selectedLanguage();
if (m_languages.grep(selectedLanguage).isEmpty())
selectedLanguage = "en";
- changeStatusbar(m_languageNames[m_languages.findIndex(Prefs::selectedLanguage())], IDS_LANG);
+ changeStatusbar(m_languageNames[m_languages.tqfindIndex(Prefs::selectedLanguage())], IDS_LANG);
// Show/hide characters toolbar
if (Prefs::showCharToolbar())
secondToolbar->show();
@@ -276,8 +276,8 @@ void KHangMan::setLevel()
if (currentLevel > (uint) levels.count())
currentLevel= 0;
levelString = levels[currentLevel];
- levelString.replace(0, 1, levelString.left(1).lower());
- levelString = levels[currentLevel].replace(0, 1, levels[currentLevel].left(1).lower()) ;
+ levelString.tqreplace(0, 1, levelString.left(1).lower());
+ levelString = levels[currentLevel].tqreplace(0, 1, levels[currentLevel].left(1).lower()) ;
}
void KHangMan::loadLevels()
@@ -292,14 +292,14 @@ void KHangMan::loadLevels()
for (TQStringList::Iterator it = mfiles.begin(); it != mfiles.end(); ++it ) {
TQFile f( *it);
//find the last / in the file name
- int location = f.name().findRev("/");
+ int location = f.name().tqfindRev("/");
//strip the string to keep only the filename and not the path
TQString mString = f.name().right(f.name().length()-location-1);
if (mString == Prefs::levelFile())
levelBool = true;
mString = mString.left(mString.length()-6);
//Put the first letter in Upper case
- mString = mString.replace(0, 1, mString.left(1).upper());
+ mString = mString.tqreplace(0, 1, mString.left(1).upper());
levels+=mString;
}
//TODO else tell no files had been found
@@ -307,13 +307,13 @@ void KHangMan::loadLevels()
// Sort easy, medium, hard at bottom, with the other categories at the top
levels.sort();
- TQString replace[3] = { "Easy", "Medium", "Hard" };
+ TQString tqreplace[3] = { "Easy", "Medium", "Hard" };
for ( int i = 0; i < 3; ++i )
{
- if ( levels.findIndex( replace[i] ) > -1 )
+ if ( levels.tqfindIndex( tqreplace[i] ) > -1 )
{
- levels.remove( replace[i] );
- levels.append( replace[i] );
+ levels.remove( tqreplace[i] );
+ levels.append( tqreplace[i] );
}
}
@@ -338,7 +338,7 @@ void KHangMan::loadLevels()
if (levelBool == false)
{
- Prefs::setLevelFile(levels[0].replace(0, 1, levels[0].left(1).lower())+".kvtml");
+ Prefs::setLevelFile(levels[0].tqreplace(0, 1, levels[0].left(1).lower())+".kvtml");
Prefs::setCurrentLevel(0);
currentLevel =0;
Prefs::writeConfig();
@@ -351,7 +351,7 @@ void KHangMan::loadLevels()
setLevel();
TQString m_lstring = translatedLevels[currentLevel].utf8();
- m_lstring.replace(0, 1, m_lstring.left(1).upper());
+ m_lstring.tqreplace(0, 1, m_lstring.left(1).upper());
changeStatusbar(m_lstring, IDS_LEVEL);
}
@@ -380,7 +380,7 @@ void KHangMan::optionsPreferences()
Timer *m_timer = new Timer();
dialog->addPage(m_timer, i18n("Timers"), "clock");
- connect(dialog, TQT_SIGNAL(settingsChanged()), this, TQT_SLOT(updateSettings()));
+ connect(dialog, TQT_SIGNAL(settingsChanged()), TQT_TQOBJECT(this), TQT_SLOT(updateSettings()));
dialog->show();
}
@@ -420,22 +420,22 @@ void KHangMan::loadLangToolBar()
m_allData.clear();
if (!m_noSpecialChars) {
- TQString myString=TQString("khangman/%1.txt").arg(Prefs::selectedLanguage());
+ TQString myString=TQString("khangman/%1.txt").tqarg(Prefs::selectedLanguage());
TQFile myFile;
myFile.setName(locate("data", myString));
// Let's look in local KDEHOME dir then
if (!myFile.exists()) {
TQString myString=TQString("khangman/data/%1/%1.txt")
- .arg(Prefs::selectedLanguage())
- .arg(Prefs::selectedLanguage());
+ .tqarg(Prefs::selectedLanguage())
+ .tqarg(Prefs::selectedLanguage());
myFile.setName(locate("data",myString));
kdDebug() << myString << endl;
}
if (!myFile.exists()) {
TQString mString=i18n("File $KDEDIR/share/apps/khangman/%1.txt not found;\n"
- "check your installation.").arg(Prefs::selectedLanguage());
+ "check your installation.").tqarg(Prefs::selectedLanguage());
KMessageBox::sorry( this, mString,
i18n("Error") );
kapp->quit();
@@ -455,9 +455,9 @@ void KHangMan::loadLangToolBar()
for (int i=0; i<(int) m_allData.count(); i++)
secondToolbar->insertButton (charIcon(m_allData[i].at(0)), i,
- TQT_SIGNAL( clicked() ), this,
+ TQT_SIGNAL( clicked() ), TQT_TQOBJECT(this),
TQT_SLOT( slotPasteChar()), true,
- i18n("Inserts the character %1").arg(m_allData[i]), i+1 );
+ i18n("Inserts the character %1").tqarg(m_allData[i]), i+1 );
}
if (Prefs::showCharToolbar())
@@ -480,7 +480,7 @@ void KHangMan::slotPasteChar()
TQString KHangMan::charIcon(const TQChar & c)
{
///Create a name and path for the icon
- TQString s = locateLocal("icon", "char" + TQString::number(c.unicode()) + ".png");
+ TQString s = locateLocal("icon", "char" + TQString::number(c.tqunicode()) + ".png");
TQRect r(4, 4, 120, 120);
@@ -492,19 +492,19 @@ TQString KHangMan::charIcon(const TQChar & c)
///Create the pixmap
TQPixmap pm(128, 128);
- pm.fill(Qt::white);
+ pm.fill(TQt::white);
TQPainter p(&pm);
p.setFont(font);
- p.setPen(Qt::black);
- p.drawText(r, Qt::AlignCenter, (TQString) c);
+ p.setPen(TQt::black);
+ p.drawText(r, TQt::AlignCenter, (TQString) c);
- ///Create transparency mask
+ ///Create transparency tqmask
TQBitmap bm(128, 128);
- bm.fill(Qt::color0);
+ bm.fill(TQt::color0);
TQPainter b(&bm);
b.setFont(font);
- b.setPen(Qt::color1);
- b.drawText(r, Qt::AlignCenter, (TQString) c);
+ b.setPen(TQt::color1);
+ b.drawText(r, TQt::AlignCenter, (TQString) c);
///Mask the pixmap
pm.setMask(bm);
diff --git a/khangman/khangman/khangman.h b/khangman/khangman/khangman.h
index 7c47711a..befebd3e 100644
--- a/khangman/khangman/khangman.h
+++ b/khangman/khangman/khangman.h
@@ -51,6 +51,7 @@ const int IDS_HINT = 103;
class KHangMan : public KMainWindow
{
Q_OBJECT
+ TQ_OBJECT
public:
/**
* Default Constructor
diff --git a/khangman/khangman/khangmanview.cpp b/khangman/khangman/khangmanview.cpp
index 8fc5bcc5..f4165258 100644
--- a/khangman/khangman/khangmanview.cpp
+++ b/khangman/khangman/khangmanview.cpp
@@ -41,23 +41,23 @@
#include "khangmanview.h"
-KHangManView::KHangManView(KHangMan*parent, const char *name)
- : TQWidget(parent, name, WStaticContents | WNoAutoErase)
+KHangManView::KHangManView(KHangMan*tqparent, const char *name)
+ : TQWidget(tqparent, name, WStaticContents | WNoAutoErase)
{
- khangman = parent;
+ khangman = tqparent;
// The widget for entering letters.
m_letterInput = new KLineEdit( this, "charWrite" );
- m_letterInput->setSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType) 1,
+ m_letterInput->tqsetSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType) 1,
(TQSizePolicy::SizeType) 0,
0, 0,
m_letterInput->sizePolicy().hasHeightForWidth() ) );
m_letterInput->setMaxLength( 1 );
- m_letterInput->setAlignment( int( TQLineEdit::AlignHCenter ) );
+ m_letterInput->tqsetAlignment( int( TQLineEdit::AlignHCenter ) );
// Press this button to enter a letter (or press enter)
m_guessButton = new KPushButton( this, "guessButton" );
- m_guessButton->setSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType) 1,
+ m_guessButton->tqsetSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType) 1,
(TQSizePolicy::SizeType) 0,
0, 0,
m_guessButton->sizePolicy().hasHeightForWidth() ) );
@@ -102,30 +102,30 @@ void KHangManView::replaceLetters(const TQString& sChar)
// Replace letter in the word
if (Prefs::oneLetter()) {
// We just replace the next instance.
- for (int count=0; count < m_word.contains(sChar, false); count++) {
+ for (int count=0; count < m_word.tqcontains(sChar, false); count++) {
- index = m_word.find(sChar, index, false);
+ index = m_word.tqfind(sChar, index, false);
if (m_goodWord.at(2*index)=='_') {
- m_goodWord.replace((2*index), 1, m_word.at(index));
+ m_goodWord.tqreplace((2*index), 1, m_word.at(index));
kdDebug() << "m_goodword " << m_goodWord << endl;
- if (count == m_word.contains(sChar, false)-1)
+ if (count == m_word.tqcontains(sChar, false)-1)
b_end = true;
break;
}
else
index++;
- if (count == m_word.contains(sChar, false)-1)
+ if (count == m_word.tqcontains(sChar, false)-1)
b_end = true;
}
}
else {
- for (int count=0; count < m_word.contains(sChar, false); count++) {
+ for (int count=0; count < m_word.tqcontains(sChar, false); count++) {
//searching for letter location
- index = m_word.find(sChar, index, false);
+ index = m_word.tqfind(sChar, index, false);
//we replace it...
- m_goodWord.replace((2*index), 1,m_word.at(index));
+ m_goodWord.tqreplace((2*index), 1,m_word.at(index));
index++;
}
}
@@ -146,7 +146,7 @@ void KHangManView::replaceLetters(const TQString& sChar)
if (!Prefs::oneLetter())
m_guessedLetters << sChar; //appends the list only if not in One Letter only mode...
- if (m_word.contains(sChar, false) == 1)
+ if (m_word.tqcontains(sChar, false) == 1)
m_guessedLetters << sChar; //append if only one instance
if (Prefs::oneLetter() && b_end)
@@ -159,28 +159,28 @@ bool KHangManView::containsChar(const TQString &sChar)
bool b = false;
if (m_accentedLetters && !Prefs::accentedLetters()) {
if (sChar=="i")
- b = m_word.contains(TQString::fromUtf8("í"), false);
+ b = m_word.tqcontains(TQString::fromUtf8("í"), false);
if (sChar=="a")
- b = m_word.contains(TQString::fromUtf8("à"), false)
- || m_word.contains(TQString::fromUtf8("á"), false)
- || m_word.contains(TQString::fromUtf8("ã"), false);
+ b = m_word.tqcontains(TQString::fromUtf8("à"), false)
+ || m_word.tqcontains(TQString::fromUtf8("á"), false)
+ || m_word.tqcontains(TQString::fromUtf8("ã"), false);
if (sChar=="u")
- b = m_word.contains(TQString::fromUtf8("ü"), false)
- || m_word.contains(TQString::fromUtf8("ù"), false);
+ b = m_word.tqcontains(TQString::fromUtf8("ü"), false)
+ || m_word.tqcontains(TQString::fromUtf8("ù"), false);
if (sChar=="o")
- b = m_word.contains(TQString::fromUtf8("ò"), false)
- || m_word.contains(TQString::fromUtf8("ó"), false)
- || m_word.contains(TQString::fromUtf8("õ"), false);
+ b = m_word.tqcontains(TQString::fromUtf8("ò"), false)
+ || m_word.tqcontains(TQString::fromUtf8("ó"), false)
+ || m_word.tqcontains(TQString::fromUtf8("õ"), false);
if (sChar=="e")
- b = m_word.contains(TQString::fromUtf8("è"), false)
- || m_word.contains(TQString::fromUtf8("é"), false);
+ b = m_word.tqcontains(TQString::fromUtf8("è"), false)
+ || m_word.tqcontains(TQString::fromUtf8("é"), false);
}
- return (b || m_word.contains(sChar, false));
+ return (b || m_word.tqcontains(sChar, false));
}
@@ -190,7 +190,7 @@ bool KHangManView::containsChar(const TQString &sChar)
void KHangManView::mousePressEvent(TQMouseEvent *mouse)
{
- if (mouse->button() == RightButton && m_hintExists && Prefs::hint()) {
+ if (mouse->button() == Qt::RightButton && m_hintExists && Prefs::hint()) {
KPassivePopup *myPopup = new KPassivePopup( m_letterInput);
myPopup->setView(i18n("Hint"), m_hint );
@@ -234,7 +234,7 @@ void KHangManView::setTheme()
void KHangManView::paintEvent( TQPaintEvent * )
{
// This pixmap implements double buffering to remove all forms of
- // flicker in the repainting.
+ // flicker in the tqrepainting.
TQPixmap buf(width(), height());
// Repaint the contents of the khangman view into the pixmap.
@@ -379,7 +379,7 @@ void KHangManView::slotTry()
}
// Handle the guess.
- if (!m_guessedLetters.contains(guess.lower())) {
+ if (!m_guessedLetters.tqcontains(guess.lower())) {
// The letter is not already guessed.
if (containsChar(guess)) {
@@ -389,11 +389,11 @@ void KHangManView::slotTry()
TQString stripWord = m_goodWord;
TQString sword = m_word;
if (dd > 0) {
- stripWord.replace(2*c, 1, "");
- stripWord.replace(2*c-1, 1, "");
+ stripWord.tqreplace(2*c, 1, "");
+ stripWord.tqreplace(2*c-1, 1, "");
- stripWord.replace(2*(dd-1), 1, "");
- stripWord.replace(2*(dd-1)-1, 1, "");
+ stripWord.tqreplace(2*(dd-1), 1, "");
+ stripWord.tqreplace(2*(dd-1)-1, 1, "");
}
TQStringList rightChars = TQStringList::split(" ", stripWord, true);
@@ -431,7 +431,7 @@ void KHangManView::slotTry()
popup->show(mapToGlobal(point));
TQTimer::singleShot( 4*1000, this, TQT_SLOT(slotNewGame()) );
}
- else if (KMessageBox::questionYesNo(this, i18n("Congratulations! You won! Do you want to play again?"),TQString::null,i18n("Play Again"), i18n("Do Not Play")) == 3)
+ else if (KMessageBox::questionYesNo(this, i18n("Congratulations! You won! Do you want to play again?"),TQString(),i18n("Play Again"), i18n("Do Not Play")) == 3)
slotNewGame();
else
kapp->quit();
@@ -442,7 +442,7 @@ void KHangManView::slotTry()
m_guessedLetters << guess.lower();
m_guessedLetters << guess.upper();
- m_missedLetters = m_missedLetters.replace((2 * m_numMissedLetters),
+ m_missedLetters = m_missedLetters.tqreplace((2 * m_numMissedLetters),
1, guess.lower());
m_numMissedLetters++;
update();
@@ -467,7 +467,7 @@ void KHangManView::slotTry()
TQLabel *popLabel = new TQLabel( vb);
popLabel->setFont(TQFont("Sans Serif", 14, TQFont::Normal));
- popLabel->setText(i18n("<qt>You lost!\nThe word was\n<b>%1</b></qt>").arg(m_word));
+ popLabel->setText(i18n("<qt>You lost!\nThe word was\n<b>%1</b></qt>").tqarg(m_word));
popup->setView( vb );
TQPoint abspos = popup->pos();
@@ -477,7 +477,7 @@ void KHangManView::slotTry()
TQTimer::singleShot( 4 * 1000, this, TQT_SLOT(slotNewGame()) );
}
- else if (KMessageBox::questionYesNo(this, newGameString, TQString::null, i18n("Play Again"), i18n("Do Not Play")) == 3)
+ else if (KMessageBox::questionYesNo(this, newGameString, TQString(), i18n("Play Again"), i18n("Do Not Play")) == 3)
slotNewGame();
else
kapp->quit();
@@ -496,7 +496,7 @@ void KHangManView::slotTry()
int x = 0;
int y = 0;
- if (m_missedLetters.contains(guess, false) > 0) {
+ if (m_missedLetters.tqcontains(guess, false) > 0) {
// FIXME: popup should be better placed.
TQPoint abspos = popup->pos();
@@ -513,7 +513,7 @@ void KHangManView::slotTry()
m_letterInput->setEnabled(false);
}
- if (m_goodWord.contains(guess, false) > 0) {
+ if (m_goodWord.tqcontains(guess, false) > 0) {
TQPoint abspos = popup->pos();
if (Prefs::mode() == 0) {
@@ -586,15 +586,15 @@ void KHangManView::game()
// Check if the data files are installed in the correct dir.
TQString myString = TQString("khangman/data/%1/%2")
- .arg(Prefs::selectedLanguage())
- .arg(Prefs::levelFile());
+ .tqarg(Prefs::selectedLanguage())
+ .tqarg(Prefs::levelFile());
TQFile myFile;
myFile.setName(locate("data", myString));
if (!myFile.exists()) {
TQString mString = i18n("File $KDEDIR/share/apps/khangman/data/%1/%2 not found!\n"
"Check your installation, please!")
- .arg(Prefs::selectedLanguage())
- .arg(Prefs::levelFile());
+ .tqarg(Prefs::selectedLanguage())
+ .tqarg(Prefs::levelFile());
KMessageBox::sorry( this, mString, i18n("Error") );
kapp->quit();
}
@@ -631,42 +631,42 @@ void KHangManView::game()
// If needed, display white space or - if in word or semi dot.
// 1. Find dashes.
- int f = m_word.find( "-" );
+ int f = m_word.tqfind( "-" );
if (f>0) {
- m_goodWord.replace(2*f, 1, "-");
+ m_goodWord.tqreplace(2*f, 1, "-");
- int g = m_word.find( "-", f+1);
+ int g = m_word.tqfind( "-", f+1);
if (g>0)
- m_goodWord.replace(2*g, 3, "-");
+ m_goodWord.tqreplace(2*g, 3, "-");
if (g>1)
m_goodWord.append("_");
}
// 2. Find white space.
- c = m_word.find( " " );
+ c = m_word.tqfind( " " );
if (c > 0) {
- m_goodWord.replace(2*c, 1, " ");
- dd = m_word.find( " ", c+1);
+ m_goodWord.tqreplace(2*c, 1, " ");
+ dd = m_word.tqfind( " ", c+1);
if (dd > 0)
- m_goodWord.replace(2*dd, c+1, " ");
+ m_goodWord.tqreplace(2*dd, c+1, " ");
}
// 3. Find ·
- int e = m_word.find( TQString::fromUtf8("·") );
+ int e = m_word.tqfind( TQString::fromUtf8("·") );
if (e>0)
- m_goodWord.replace(2*e, 1, TQString::fromUtf8("·") );
+ m_goodWord.tqreplace(2*e, 1, TQString::fromUtf8("·") );
// 4. Find '
- int h = m_word.find( "'" );
+ int h = m_word.tqfind( "'" );
if (h>0)
- m_goodWord.replace(2*h, 1, "'");
+ m_goodWord.tqreplace(2*h, 1, "'");
}
void KHangManView::readFile()
{
kdDebug() << "in read kvtml file " << endl;
- TQString myString=TQString("khangman/data/%1/%2").arg(Prefs::selectedLanguage()).arg(Prefs::levelFile());
+ TQString myString=TQString("khangman/data/%1/%2").tqarg(Prefs::selectedLanguage()).tqarg(Prefs::levelFile());
myString= locate("data", myString);
KEduVocDataItemList verbs = KEduVocData::parse(myString);
@@ -728,7 +728,7 @@ void KHangManView::loadAnimation()
for (uint i = 0; i < 11; i++) {
m_animationPics[i].load(locate( "data",
TQString("khangman/pics/%1/animation%2.png")
- .arg(m_themeName).arg(i) ));
+ .tqarg(m_themeName).tqarg(i) ));
}
}
diff --git a/khangman/khangman/khangmanview.h b/khangman/khangman/khangmanview.h
index 7ffffcf2..8f03f7c9 100644
--- a/khangman/khangman/khangmanview.h
+++ b/khangman/khangman/khangmanview.h
@@ -38,16 +38,17 @@ class KHangMan;
* here.
*/
-class KHangManView : public QWidget
+class KHangManView : public TQWidget
{
Q_OBJECT
+ TQ_OBJECT
public:
- KHangManView(KHangMan *parent=0, const char *name=0);
+ KHangManView(KHangMan *tqparent=0, const char *name=0);
virtual ~KHangManView();
- ///parent instance
+ ///tqparent instance
KHangMan *khangman;
void setTheme();
diff --git a/khangman/khangman/khnewstuff.cpp b/khangman/khangman/khnewstuff.cpp
index f15fca87..efc816e5 100644
--- a/khangman/khangman/khnewstuff.cpp
+++ b/khangman/khangman/khnewstuff.cpp
@@ -18,8 +18,8 @@
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
As a special exception, permission is given to link this program
- with any edition of Qt, and distribute the resulting executable,
- without including the source code for Qt in the source distribution.
+ with any edition of TQt, and distribute the resulting executable,
+ without including the source code for TQt in the source distribution.
*/
#include <kapplication.h>
@@ -55,8 +55,8 @@ bool KHNewStuff::install( const TQString &fileName )
m_view->khangman->setLanguages();
//refresh Languages menu
m_view->khangman->m_languageAction->setItems(m_view->khangman->m_languageNames);
- m_view->khangman->slotChangeLanguage(m_view->khangman->m_languages.findIndex(Prefs::selectedLanguage()));
- m_view->khangman->m_languageAction->setCurrentItem(m_view->khangman->m_languages.findIndex(Prefs::selectedLanguage()));
+ m_view->khangman->slotChangeLanguage(m_view->khangman->m_languages.tqfindIndex(Prefs::selectedLanguage()));
+ m_view->khangman->m_languageAction->setCurrentItem(m_view->khangman->m_languages.tqfindIndex(Prefs::selectedLanguage()));
return true;
}
diff --git a/khangman/khangman/khnewstuff.h b/khangman/khangman/khnewstuff.h
index 826300f2..a80652ed 100644
--- a/khangman/khangman/khnewstuff.h
+++ b/khangman/khangman/khnewstuff.h
@@ -18,8 +18,8 @@
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
As a special exception, permission is given to link this program
- with any edition of Qt, and distribute the resulting executable,
- without including the source code for Qt in the source distribution.
+ with any edition of TQt, and distribute the resulting executable,
+ without including the source code for TQt in the source distribution.
*/
#ifndef KHNEWSTUFF_H
#define KHNEWSTUFF_H
diff --git a/khangman/khangman/normal.ui b/khangman/khangman/normal.ui
index f9673223..ad8dc9e9 100644
--- a/khangman/khangman/normal.ui
+++ b/khangman/khangman/normal.ui
@@ -1,10 +1,10 @@
<!DOCTYPE UI><UI version="3.3" stdsetdef="1">
<class>normal</class>
-<widget class="QWidget">
+<widget class="TQWidget">
<property name="name">
<cstring>normal</cstring>
</property>
- <property name="geometry">
+ <property name="tqgeometry">
<rect>
<x>0</x>
<y>0</y>
@@ -16,15 +16,15 @@
<property name="name">
<cstring>unnamed</cstring>
</property>
- <widget class="QLayoutWidget" row="0" column="0">
+ <widget class="TQLayoutWidget" row="0" column="0">
<property name="name">
- <cstring>layout4</cstring>
+ <cstring>tqlayout4</cstring>
</property>
<vbox>
<property name="name">
<cstring>unnamed</cstring>
</property>
- <widget class="QCheckBox">
+ <widget class="TQCheckBox">
<property name="name">
<cstring>kcfg_OneLetter</cstring>
</property>
@@ -41,7 +41,7 @@ For example, the word to guess is "potato". If this option is unchecked, when yo
Default is that for one letter typed, all instances of that letter in the word are displayed.</string>
</property>
</widget>
- <widget class="QCheckBox">
+ <widget class="TQCheckBox">
<property name="name">
<cstring>kcfg_WonDialog</cstring>
</property>
@@ -58,7 +58,7 @@ This is the default state.
If this option is checked, this dialog will not appear and a new game will automatically start after four seconds. A passive popup tells you you have won the game. When this opton is checked you don't have an intrusive dialog each time you won a game.</string>
</property>
</widget>
- <widget class="QGroupBox">
+ <widget class="TQGroupBox">
<property name="name">
<cstring>groupBox3_2</cstring>
</property>
@@ -69,7 +69,7 @@ If this option is checked, this dialog will not appear and a new game will autom
<property name="name">
<cstring>unnamed</cstring>
</property>
- <widget class="QCheckBox">
+ <widget class="TQCheckBox">
<property name="name">
<cstring>kcfg_Sound</cstring>
</property>
@@ -90,5 +90,5 @@ Default is no sound.</string>
</widget>
</grid>
</widget>
-<layoutdefaults spacing="6" margin="11"/>
+<tqlayoutdefaults spacing="6" margin="11"/>
</UI>
diff --git a/khangman/khangman/prefs.kcfgc b/khangman/khangman/prefs.kcfgc
index b7e804e6..8d9311bc 100644
--- a/khangman/khangman/prefs.kcfgc
+++ b/khangman/khangman/prefs.kcfgc
@@ -1,6 +1,6 @@
# Code generation options for kconfig_compiler
File=khangman.kcfg
-IncludeFiles=kstandarddirs.h,qdir.h
+IncludeFiles=kstandarddirs.h,tqdir.h
ClassName=Prefs
Singleton=true
Mutators=true
diff --git a/khangman/khangman/timer.h b/khangman/khangman/timer.h
index ad6b50bb..1d2d1738 100644
--- a/khangman/khangman/timer.h
+++ b/khangman/khangman/timer.h
@@ -33,6 +33,7 @@
class Timer : public timerdlg
{
Q_OBJECT
+ TQ_OBJECT
public:
///Constructor
diff --git a/khangman/khangman/timerdlg.ui b/khangman/khangman/timerdlg.ui
index facfaaa1..2e803f1d 100644
--- a/khangman/khangman/timerdlg.ui
+++ b/khangman/khangman/timerdlg.ui
@@ -1,10 +1,10 @@
<!DOCTYPE UI><UI version="3.3" stdsetdef="1">
<class>timerdlg</class>
-<widget class="QWidget">
+<widget class="TQWidget">
<property name="name">
<cstring>timerdlg</cstring>
</property>
- <property name="geometry">
+ <property name="tqgeometry">
<rect>
<x>0</x>
<y>0</y>
@@ -16,7 +16,7 @@
<property name="name">
<cstring>unnamed</cstring>
</property>
- <widget class="QGroupBox" row="0" column="0">
+ <widget class="TQGroupBox" row="0" column="0">
<property name="name">
<cstring>groupBox5</cstring>
</property>
@@ -27,15 +27,15 @@
<property name="name">
<cstring>unnamed</cstring>
</property>
- <widget class="QLayoutWidget">
+ <widget class="TQLayoutWidget">
<property name="name">
- <cstring>layout5</cstring>
+ <cstring>tqlayout5</cstring>
</property>
<grid>
<property name="name">
<cstring>unnamed</cstring>
</property>
- <widget class="QSlider" row="1" column="0">
+ <widget class="TQSlider" row="1" column="0">
<property name="name">
<cstring>kcfg_HintTimer</cstring>
</property>
@@ -64,7 +64,7 @@
<string>Time during which the Hint is displayed</string>
</property>
<property name="whatsThis" stdset="0">
- <string>You can set the time for displaying the Hint tooltip. Default is 3 seconds but younger children might need longer time to be able to read the Hint.</string>
+ <string>You can set the time for displaying the Hint tooltip. Default is 3 seconds but younger tqchildren might need longer time to be able to read the Hint.</string>
</property>
</widget>
<spacer row="2" column="0">
@@ -77,7 +77,7 @@
<property name="sizeType">
<enum>Expanding</enum>
</property>
- <property name="sizeHint">
+ <property name="tqsizeHint">
<size>
<width>295</width>
<height>20</height>
@@ -94,14 +94,14 @@
<property name="sizeType">
<enum>Expanding</enum>
</property>
- <property name="sizeHint">
+ <property name="tqsizeHint">
<size>
<width>25</width>
<height>16</height>
</size>
</property>
</spacer>
- <widget class="QLabel" row="2" column="1">
+ <widget class="TQLabel" row="2" column="1">
<property name="name">
<cstring>timeHintLabel</cstring>
</property>
@@ -122,9 +122,9 @@
</widget>
</grid>
</widget>
- <widget class="QLayoutWidget">
+ <widget class="TQLayoutWidget">
<property name="name">
- <cstring>layout6</cstring>
+ <cstring>tqlayout6</cstring>
</property>
<grid>
<property name="name">
@@ -138,7 +138,7 @@
<string>Set the time for displaying the Already Guessed Letter:</string>
</property>
</widget>
- <widget class="QLabel" row="2" column="1">
+ <widget class="TQLabel" row="2" column="1">
<property name="name">
<cstring>timeMissedLabel</cstring>
</property>
@@ -149,7 +149,7 @@
<cstring>kcfg_MissedTimer</cstring>
</property>
</widget>
- <widget class="QSlider" row="1" column="0">
+ <widget class="TQSlider" row="1" column="0">
<property name="name">
<cstring>kcfg_MissedTimer</cstring>
</property>
@@ -178,7 +178,7 @@
<string>Time during which the Already Guessed tooltip is displayed</string>
</property>
<property name="whatsThis" stdset="0">
- <string>You can set the time for displaying the Already Guessed tooltip after you try a letter that was already guessed. Default is 3 seconds but younger children might need longer time to be able to understand they are trying a letter that was already guessed.</string>
+ <string>You can set the time for displaying the Already Guessed tooltip after you try a letter that was already guessed. Default is 3 seconds but younger tqchildren might need longer time to be able to understand they are trying a letter that was already guessed.</string>
</property>
</widget>
<spacer row="3" column="1">
@@ -191,7 +191,7 @@
<property name="sizeType">
<enum>Expanding</enum>
</property>
- <property name="sizeHint">
+ <property name="tqsizeHint">
<size>
<width>25</width>
<height>16</height>
@@ -208,7 +208,7 @@
<property name="sizeType">
<enum>Expanding</enum>
</property>
- <property name="sizeHint">
+ <property name="tqsizeHint">
<size>
<width>295</width>
<height>20</height>
@@ -221,7 +221,7 @@
</widget>
</grid>
</widget>
-<layoutdefaults spacing="6" margin="11"/>
+<tqlayoutdefaults spacing="6" margin="11"/>
<includehints>
<includehint>kactivelabel.h</includehint>
<includehint>kactivelabel.h</includehint>