summaryrefslogtreecommitdiffstats
path: root/klettres
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-01-04 02:22:38 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-01-04 02:22:38 +0000
commit98a12d05a48814bec3870b9a6d5865475cfa1c95 (patch)
treea711801e47696fb0cf162abd7330e0b5b480ba39 /klettres
parent421a1845137c7c396b5d03bce53237fcb149d602 (diff)
downloadtdeedu-98a12d05a48814bec3870b9a6d5865475cfa1c95.tar.gz
tdeedu-98a12d05a48814bec3870b9a6d5865475cfa1c95.zip
Automated conversion for enhanced compatibility with TQt for Qt4 3.4.0 TP1
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdeedu@1211429 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'klettres')
-rw-r--r--klettres/klettres/fontsdlg.ui4
-rw-r--r--klettres/klettres/klettres.cpp38
-rw-r--r--klettres/klettres/klettres.h6
-rw-r--r--klettres/klettres/soundfactory.cpp8
-rw-r--r--klettres/klettres/soundfactory.h4
-rw-r--r--klettres/klettres/timerdlg.ui18
6 files changed, 39 insertions, 39 deletions
diff --git a/klettres/klettres/fontsdlg.ui b/klettres/klettres/fontsdlg.ui
index 34c72ad5..8659fe93 100644
--- a/klettres/klettres/fontsdlg.ui
+++ b/klettres/klettres/fontsdlg.ui
@@ -4,7 +4,7 @@
<property name="name">
<cstring>fontsdlg</cstring>
</property>
- <property name="geometry">
+ <property name="tqgeometry">
<rect>
<x>0</x>
<y>0</y>
@@ -31,7 +31,7 @@
</widget>
<customwidgets>
</customwidgets>
-<layoutdefaults spacing="6" margin="11"/>
+<tqlayoutdefaults spacing="6" margin="11"/>
<includehints>
<includehint>kfontdialog.h</includehint>
</includehints>
diff --git a/klettres/klettres/klettres.cpp b/klettres/klettres/klettres.cpp
index 4d378ee6..39394d4b 100644
--- a/klettres/klettres/klettres.cpp
+++ b/klettres/klettres/klettres.cpp
@@ -66,7 +66,7 @@ KLettres::KLettres()
Prefs::writeConfig();
//MainWindow GUI: menus, tolbars and statusbar
setupActions();
- setupStatusbar();
+ setuptqStatusbar();
setupToolbars();
//Load Settings
loadSettings();
@@ -107,7 +107,7 @@ void KLettres::findLanguages()
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]);
}
@@ -122,12 +122,12 @@ void KLettres::findLanguages()
m_languages.sort();
//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());
+ config->writeEntry(tmp, TQDate::tqcurrentDate().toString());
}
//we look in $KDEDIR/share/locale/all_languages from /kdelibs/kdecore/all_languages
//to find the name of the country
@@ -156,7 +156,7 @@ TQString Prefs::defaultLanguage()
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]);
- if (Prefs::self()->m_languages.contains(Prefs::language()))
+ if (Prefs::self()->m_languages.tqcontains(Prefs::language()))
return Prefs::language(); //the last language played
else if (i<1)
return "en"; //if no other
@@ -167,11 +167,11 @@ TQString Prefs::defaultLanguage()
}
-bool KLettres::loadLayout(TQDomDocument &layoutDocument)
+bool KLettres::loadLayout(TQDomDocument &tqlayoutDocument)
{
- TQFile layoutFile(locate("data", "klettres/"+Prefs::language()+"/sounds.xml"));
+ TQFile tqlayoutFile(locate("data", "klettres/"+Prefs::language()+"/sounds.xml"));
//if xml file is not found, program exits
- if (!layoutFile.exists())
+ if (!tqlayoutFile.exists())
{
kdWarning() << "sounds.xml file not found in $KDEDIR/share/apps/klettres/"+Prefs::language() << endl;
TQString mString=i18n("The file sounds.xml was not found in\n"
@@ -180,15 +180,15 @@ bool KLettres::loadLayout(TQDomDocument &layoutDocument)
KMessageBox::information( this, mString,"KLettres - Error" );
kapp->quit();//exit(1);
}
- if (!layoutFile.open(IO_ReadOnly))
+ if (!tqlayoutFile.open(IO_ReadOnly))
return false;
//Check if document is well-formed
- if (!layoutDocument.setContent(&layoutFile))
+ if (!tqlayoutDocument.setContent(&tqlayoutFile))
{
- layoutFile.close();
+ tqlayoutFile.close();
return false;
}
- layoutFile.close();
+ tqlayoutFile.close();
return true;
}
@@ -244,7 +244,7 @@ void KLettres::setupActions()
setupGUI();
}
-void KLettres::setupStatusbar()
+void KLettres::setuptqStatusbar()
{
KStatusBar *st=statusBar();
m_langLabel = new TQLabel(st);
@@ -284,7 +284,7 @@ void KLettres::loadSettings()
//m_view->selectedLanguage = selectedLanguage;
m_languageAction->setCurrentItem(Prefs::languageNumber());
TQString langString = m_languageNames[Prefs::languageNumber()];
- langString.replace("&", TQString::null);
+ langString.tqreplace("&", TQString::null);
m_langLabel->setText(i18n("Current language is %1").arg(langString));
loadLangToolBar();
// load default level
@@ -368,11 +368,11 @@ void KLettres::slotChangeLanguage(int newLanguage)
Prefs::writeConfig();
// Update the StatusBar
TQString langString = m_languageNames[newLanguage];
- langString.replace("&", TQString::null);
+ langString.tqreplace("&", TQString::null);
m_langLabel->setText(i18n("Current language is %1").arg(langString));
loadLangToolBar();
// Change language effectively
- bool ok = loadLayout(soundFactory->m_layoutsDocument);
+ bool ok = loadLayout(soundFactory->m_tqlayoutsDocument);
if (ok)
soundFactory->change(Prefs::language());
m_view->game();
@@ -470,7 +470,7 @@ void KLettres::loadLangToolBar()
openFileStream.open(IO_ReadOnly);
TQTextStream readFileStr(&openFileStream);
readFileStr.setEncoding(TQTextStream::UnicodeUTF8);
- //allData contains all the words from the file
+ //allData tqcontains all the words from the file
allData = TQStringList::split("\n", readFileStr.read(), true);
openFileStream.close();
for (int i=0; i<(int) allData.count(); i++) {
@@ -489,7 +489,7 @@ void KLettres::slotPasteChar()
TQString KLettres::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);
@@ -507,7 +507,7 @@ TQString KLettres::charIcon(const TQChar & c)
p.setPen(Qt::black);
p.drawText(r, Qt::AlignCenter, (TQString) c);
- ///Create transparency mask
+ ///Create transparency tqmask
TQBitmap bm(128, 128);
bm.fill(Qt::color0);
TQPainter b(&bm);
diff --git a/klettres/klettres/klettres.h b/klettres/klettres/klettres.h
index afed715c..d767e3e5 100644
--- a/klettres/klettres/klettres.h
+++ b/klettres/klettres/klettres.h
@@ -61,10 +61,10 @@ public:
TQStringList m_languageNames;
/**
*Load the xml file
- *@param layoutDocument the xml file
+ *@param tqlayoutDocument the xml file
*@return bool true if the xml document is found and well formed, false otherwise
*/
- bool loadLayout(TQDomDocument &layoutDocument);
+ bool loadLayout(TQDomDocument &tqlayoutDocument);
///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
@@ -106,7 +106,7 @@ protected:
///Build the main window menus
void setupActions();
///Create and setup statusbar
- void setupStatusbar();
+ void setuptqStatusbar();
///Create main and second toolbars
void setupToolbars();
/**generates icons for the special characters toolbar
diff --git a/klettres/klettres/soundfactory.cpp b/klettres/klettres/soundfactory.cpp
index e23bc501..d210e4d7 100644
--- a/klettres/klettres/soundfactory.cpp
+++ b/klettres/klettres/soundfactory.cpp
@@ -41,7 +41,7 @@ SoundFactory::SoundFactory(KLettres *parent, const char *name)
namesList = filesList = 0;
sounds = 0;
- bool ok = klettres->loadLayout(m_layoutsDocument);
+ bool ok = klettres->loadLayout(m_tqlayoutsDocument);
if (ok) change(Prefs::language());
if (!ok) loadFailure();
}
@@ -53,7 +53,7 @@ SoundFactory::~SoundFactory()
void SoundFactory::change(TQString currentLanguage)
{
//go load the sounds for the current language
- bool ok = loadLanguage(m_layoutsDocument, currentLanguage);
+ bool ok = loadLanguage(m_tqlayoutsDocument, currentLanguage);
kdDebug() << "ok " << ok << endl;
//tell the user if there are no sounds
if (!ok) loadFailure();
@@ -78,7 +78,7 @@ void SoundFactory::loadFailure()
KMessageBox::error(klettres, i18n("Error while loading the sound names."));
}
-bool SoundFactory::loadLanguage(TQDomDocument &layoutDocument, TQString currentLanguage)
+bool SoundFactory::loadLanguage(TQDomDocument &tqlayoutDocument, TQString currentLanguage)
{
TQDomNodeList languagesList,
alphabetList,
@@ -90,7 +90,7 @@ bool SoundFactory::loadLanguage(TQDomDocument &layoutDocument, TQString currentL
soundNameElement;
TQDomAttr nameAttribute, fileAttribute;
- languagesList = layoutDocument.elementsByTagName("language");
+ languagesList = tqlayoutDocument.elementsByTagName("language");
TQDomAttr codeAttribute;
//check if the sound files match current language
languageElement = (const TQDomElement &) languagesList.item(0).toElement();
diff --git a/klettres/klettres/soundfactory.h b/klettres/klettres/soundfactory.h
index 2cc8a5de..ace9e36d 100644
--- a/klettres/klettres/soundfactory.h
+++ b/klettres/klettres/soundfactory.h
@@ -64,9 +64,9 @@ public:
* Call that when you read the language from Config and when the language changes
* or when the level changes
*/
- bool loadLanguage(TQDomDocument &layoutDocument, TQString currentLanguage);
+ bool loadLanguage(TQDomDocument &tqlayoutDocument, TQString currentLanguage);
///The language document
- TQDomDocument m_layoutsDocument;
+ TQDomDocument m_tqlayoutsDocument;
private:
///Report a load failure
diff --git a/klettres/klettres/timerdlg.ui b/klettres/klettres/timerdlg.ui
index 91ab486f..f9ed6798 100644
--- a/klettres/klettres/timerdlg.ui
+++ b/klettres/klettres/timerdlg.ui
@@ -4,7 +4,7 @@
<property name="name">
<cstring>timerdlg</cstring>
</property>
- <property name="geometry">
+ <property name="tqgeometry">
<rect>
<x>0</x>
<y>0</y>
@@ -12,7 +12,7 @@
<height>260</height>
</rect>
</property>
- <property name="minimumSize">
+ <property name="tqminimumSize">
<size>
<width>350</width>
<height>0</height>
@@ -80,7 +80,7 @@
<property name="sizeType">
<enum>Expanding</enum>
</property>
- <property name="sizeHint">
+ <property name="tqsizeHint">
<size>
<width>264</width>
<height>20</height>
@@ -97,7 +97,7 @@
<property name="sizeType">
<enum>Expanding</enum>
</property>
- <property name="sizeHint">
+ <property name="tqsizeHint">
<size>
<width>25</width>
<height>16</height>
@@ -114,7 +114,7 @@
<property name="sizeType">
<enum>Expanding</enum>
</property>
- <property name="sizeHint">
+ <property name="tqsizeHint">
<size>
<width>270</width>
<height>20</height>
@@ -163,7 +163,7 @@
<property name="sizeType">
<enum>Expanding</enum>
</property>
- <property name="sizeHint">
+ <property name="tqsizeHint">
<size>
<width>228</width>
<height>20</height>
@@ -199,7 +199,7 @@
<property name="sizeType">
<enum>Expanding</enum>
</property>
- <property name="sizeHint">
+ <property name="tqsizeHint">
<size>
<width>226</width>
<height>20</height>
@@ -216,7 +216,7 @@
<property name="sizeType">
<enum>Expanding</enum>
</property>
- <property name="sizeHint">
+ <property name="tqsizeHint">
<size>
<width>25</width>
<height>16</height>
@@ -238,7 +238,7 @@
</widget>
<customwidgets>
</customwidgets>
-<layoutdefaults spacing="6" margin="11"/>
+<tqlayoutdefaults spacing="6" margin="11"/>
<includehints>
<includehint>kactivelabel.h</includehint>
</includehints>