summaryrefslogtreecommitdiffstats
path: root/ktouch/src/ktouch.cpp
diff options
context:
space:
mode:
authorTimothy Pearson <kb9vqf@pearsoncomputing.net>2011-12-15 15:47:17 -0600
committerTimothy Pearson <kb9vqf@pearsoncomputing.net>2011-12-15 15:47:17 -0600
commit6c3f7a55fb7888efc80a7350ef0c2f46ee02baa3 (patch)
treecc90a09df2d1fd6d956cc084529a62d354316ad3 /ktouch/src/ktouch.cpp
parent174fd5e23c68598774706ea9b571d3d178e36b81 (diff)
downloadtdeedu-6c3f7a55fb7888efc80a7350ef0c2f46ee02baa3.tar.gz
tdeedu-6c3f7a55fb7888efc80a7350ef0c2f46ee02baa3.zip
Rename a number of old tq methods that are no longer tq specific
Diffstat (limited to 'ktouch/src/ktouch.cpp')
-rw-r--r--ktouch/src/ktouch.cpp30
1 files changed, 15 insertions, 15 deletions
diff --git a/ktouch/src/ktouch.cpp b/ktouch/src/ktouch.cpp
index cf6bd2e3..6c9a78c8 100644
--- a/ktouch/src/ktouch.cpp
+++ b/ktouch/src/ktouch.cpp
@@ -75,7 +75,7 @@ KTouch::KTouch()
setupActions();
// create the GUI reading the ui.rc file
if (!initialGeometrySet())
- resize( TQSize(700, 510).expandedTo(tqminimumSizeHint()));
+ resize( TQSize(700, 510).expandedTo(minimumSizeHint()));
setupGUI(ToolBar | Keys | StatusBar | Create);
setAutoSaveSettings();
// Read user statistics
@@ -179,10 +179,10 @@ void KTouch::keyPressEvent(TQKeyEvent *keyEvent) {
if (keyEvent->text().length() > 1) {
kdDebug() << "[KTouch::keyPressEvent] text = '" << TQString(keyEvent->text()).ascii() << "'" << endl;
}
- TQChar key = keyEvent->text().at(0); // get first tqunicode character
+ TQChar key = keyEvent->text().at(0); // get first unicode character
// HACK : manually filter out known dead keys
// bool has_dead_key = true;
- switch (key.tqunicode()) {
+ switch (key.unicode()) {
case 94 : m_lastDeadKey = TQChar(uint(94)); break;
case 176 : m_lastDeadKey = TQChar(uint(176)); break;
case 180 : m_lastDeadKey = TQChar(uint(180)); break;
@@ -459,18 +459,18 @@ void KTouch::changeStatusbarStats(unsigned int level_correct, unsigned int level
unsigned int session_correct, unsigned int session_total, unsigned int session_words)
{
statusBar()->changeItem(i18n( "Level: Correct/Total chars: %1/%2 Words: %3")
- .tqarg(level_correct).tqarg(level_total).tqarg(level_words), 1);
+ .arg(level_correct).arg(level_total).arg(level_words), 1);
statusBar()->changeItem(i18n( "Session: Correct/Total chars: %1/%2 Words: %3")
- .tqarg(session_correct).tqarg(session_total).tqarg(session_words), 2);
+ .arg(session_correct).arg(session_total).arg(session_words), 2);
}
// ----------------------------------------------------------------------------
void KTouch::changeKeyboard(int num) {
if (static_cast<unsigned int>(num)>=m_keyboardFiles.count()) return;
Prefs::setCurrentKeyboardFile( m_keyboardFiles[num] );
-// kdDebug() << "[KTouch::changeKeyboard] new keyboard tqlayout = " << Prefs::currentKeyboardFile() << endl;
+// kdDebug() << "[KTouch::changeKeyboard] new keyboard layout = " << Prefs::currentKeyboardFile() << endl;
m_keyboardLayoutAction->setCurrentItem(num);
- // call Apply-Preferenzes in "noisy"-mode, pop up an error if the chosen tqlayout file is corrupt
+ // call Apply-Preferenzes in "noisy"-mode, pop up an error if the chosen layout file is corrupt
m_keyboardWidget->applyPreferences(this, false);
}
// ----------------------------------------------------------------------------
@@ -489,7 +489,7 @@ void KTouch::changeLecture(int num) {
KTouchLecture l;
TQString fileName = m_lectureFiles[num];
if (!l.loadXML(this, KURL::fromPathOrURL(fileName))) {
- KMessageBox::sorry(0, i18n("Could not find/open the lecture file '%1'.").tqarg(fileName) );
+ KMessageBox::sorry(0, i18n("Could not find/open the lecture file '%1'.").arg(fileName) );
m_defaultLectureAction->setCurrentItem(-1);
}
else {
@@ -620,8 +620,8 @@ void KTouch::init() {
*/
}
- // if keyboard tqlayout (loaded by Prefs is not available (e.g. the
- // tqlayout file has been deleted) switch to default keyboard
+ // if keyboard layout (loaded by Prefs is not available (e.g. the
+ // layout file has been deleted) switch to default keyboard
if (m_keyboardFiles.contains(Prefs::currentKeyboardFile() )==0) {
TQString default_keyboard;
// determine locale
@@ -652,18 +652,18 @@ void KTouch::init() {
}
// ----------------------------------------------------------------------------
-// Creates the tqlayout and GUI setup for a practice session
+// Creates the layout and GUI setup for a practice session
void KTouch::initTrainingSession() {
//kdDebug() << "[KTouch::initTrainingSession] setting up layouts and widgets for new training session..." << endl;
// Build the training area. The status widget has a fixed vertical size, the slide line and the
// keyboard grow according to their vertical stretch factors (see last argument in the constructors
// of TQSizePolicy)
TQVBox * mainLayout = new TQVBox( this );
- m_statusWidget = new KTouchtqStatus( mainLayout );
+ m_statusWidget = new KTouchStatus( mainLayout );
m_slideLineWidget = new KTouchSlideLine( mainLayout );
- m_slideLineWidget->tqsetSizePolicy( TQSizePolicy(TQSizePolicy::Preferred, TQSizePolicy::Expanding, 0, 1) );
+ m_slideLineWidget->setSizePolicy( TQSizePolicy(TQSizePolicy::Preferred, TQSizePolicy::Expanding, 0, 1) );
m_keyboardWidget = new KTouchKeyboardWidget( mainLayout );
- m_keyboardWidget->tqsetSizePolicy(TQSizePolicy(TQSizePolicy::Preferred, TQSizePolicy::Expanding, 0, 3) );
+ m_keyboardWidget->setSizePolicy(TQSizePolicy(TQSizePolicy::Preferred, TQSizePolicy::Expanding, 0, 3) );
setCentralWidget(mainLayout);
// apply the settings to the widgets
m_slideLineWidget->applyPreferences();
@@ -753,7 +753,7 @@ void KTouch::updateFileLists() {
// TODO : search in i18n() directories
m_keyboardFiles = dirs->findAllResources("data","ktouch/*.keyboard");
- // remove the number tqlayout, since this is the necessary default tqlayout and will be
+ // remove the number layout, since this is the necessary default layout and will be
// added anyway
TQStringList::iterator it = m_keyboardFiles.find("number.keyboard");
if (it!=m_keyboardFiles.end()) m_keyboardFiles.remove(it);