From 999f961ff5278b84c8ffd8a91addb9343e589cf0 Mon Sep 17 00:00:00 2001 From: Timothy Pearson Date: Sun, 18 Dec 2011 18:30:46 -0600 Subject: Rename old tq methods that no longer need a unique name --- ktouch/src/ktouch.cpp | 8 +++---- ktouch/src/ktouch.h | 4 ++-- ktouch/src/ktouchcoloreditor_dlg.ui | 18 ++++++++-------- ktouch/src/ktouchkeyboardeditor_dlg.ui | 6 +++--- ktouch/src/ktouchlectureeditor_dlg.ui | 26 +++++++++++------------ ktouch/src/ktouchopenrequest_dlg.ui | 12 +++++------ ktouch/src/ktouchprefcolorslayout.ui | 30 +++++++++++++-------------- ktouch/src/ktouchprefgenerallayout.ui | 14 ++++++------- ktouch/src/ktouchprefkeyboardlayout.ui | 4 ++-- ktouch/src/ktouchpreftraininglayout.ui | 14 ++++++------- ktouch/src/ktouchstatistics.cpp | 8 +++---- ktouch/src/ktouchstatistics_dlg.ui | 38 +++++++++++++++++----------------- ktouch/src/ktouchstatus.cpp | 8 +++---- ktouch/src/ktouchstatus.h | 8 +++---- ktouch/src/ktouchstatuslayout.ui | 20 +++++++++--------- ktouch/src/ktouchtrainer.cpp | 18 ++++++++-------- ktouch/src/ktouchtrainer.h | 6 +++--- 17 files changed, 121 insertions(+), 121 deletions(-) (limited to 'ktouch/src') diff --git a/ktouch/src/ktouch.cpp b/ktouch/src/ktouch.cpp index cf6bd2e3..432fa386 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 @@ -659,11 +659,11 @@ void KTouch::initTrainingSession() { // 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(); diff --git a/ktouch/src/ktouch.h b/ktouch/src/ktouch.h index 4703fd92..620dfb49 100644 --- a/ktouch/src/ktouch.h +++ b/ktouch/src/ktouch.h @@ -30,7 +30,7 @@ class KToggleAction; class KActionMenu; class KSelectAction; -class KTouchtqStatus; +class KTouchStatus; class KTouchSlideLine; class KTouchKeyboardWidget; class KTouchTrainer; @@ -154,7 +154,7 @@ class KTouch : public KMainWindow { KSelectAction *m_keyboardColorAction; KSelectAction *m_defaultLectureAction; - KTouchtqStatus *m_statusWidget; ///< Pointer to the status widget on top of the main widget. + KTouchStatus *m_statusWidget; ///< Pointer to the status widget on top of the main widget. KTouchSlideLine *m_slideLineWidget; ///< Pointer to the sliding line widget. KTouchKeyboardWidget *m_keyboardWidget; ///< Pointer to the keyboard widget. KTouchTrainer *m_trainer; ///< The training 'master' (runs the training). diff --git a/ktouch/src/ktouchcoloreditor_dlg.ui b/ktouch/src/ktouchcoloreditor_dlg.ui index 0be9d5f2..2e13f7d0 100644 --- a/ktouch/src/ktouchcoloreditor_dlg.ui +++ b/ktouch/src/ktouchcoloreditor_dlg.ui @@ -31,7 +31,7 @@ 0 - + 0 0 @@ -99,7 +99,7 @@ Expanding - + 20 16 @@ -211,7 +211,7 @@ Expanding - + 20 40 @@ -246,7 +246,7 @@ Fixed - + 16 20 @@ -337,7 +337,7 @@ Expanding - + 30 20 @@ -383,7 +383,7 @@ Fixed - + 16 20 @@ -400,7 +400,7 @@ Expanding - + 20 20 @@ -417,7 +417,7 @@ Expanding - + 20 16 @@ -514,7 +514,7 @@ Expanding - + 20 16 diff --git a/ktouch/src/ktouchkeyboardeditor_dlg.ui b/ktouch/src/ktouchkeyboardeditor_dlg.ui index 14c1c6bb..23c88168 100644 --- a/ktouch/src/ktouchkeyboardeditor_dlg.ui +++ b/ktouch/src/ktouchkeyboardeditor_dlg.ui @@ -45,7 +45,7 @@ Expanding - + 40 20 @@ -128,7 +128,7 @@ 0 - + 0 100 @@ -290,7 +290,7 @@ 0 - + 32767 70 diff --git a/ktouch/src/ktouchlectureeditor_dlg.ui b/ktouch/src/ktouchlectureeditor_dlg.ui index a4e8f989..bbe6cc8d 100644 --- a/ktouch/src/ktouchlectureeditor_dlg.ui +++ b/ktouch/src/ktouchlectureeditor_dlg.ui @@ -87,7 +87,7 @@ 0 - + 32767 70 @@ -165,13 +165,13 @@ upBtn - + 35 28 - + 30 32767 @@ -188,13 +188,13 @@ downBtn - + 35 28 - + 30 32767 @@ -211,13 +211,13 @@ newBtn - + 35 28 - + 30 32767 @@ -242,13 +242,13 @@ 0 - + 35 28 - + 30 32767 @@ -273,7 +273,7 @@ Fixed - + 40 20 @@ -358,7 +358,7 @@ Expanding - + 16 20 @@ -383,7 +383,7 @@ Expanding - + 20 20 @@ -510,7 +510,7 @@ Expanding - + 248 20 diff --git a/ktouch/src/ktouchopenrequest_dlg.ui b/ktouch/src/ktouchopenrequest_dlg.ui index f878335f..d224bce3 100644 --- a/ktouch/src/ktouchopenrequest_dlg.ui +++ b/ktouch/src/ktouchopenrequest_dlg.ui @@ -42,7 +42,7 @@ currentRadioBtn - + 0 28 @@ -56,7 +56,7 @@ presetRadioBtn - + 0 28 @@ -89,7 +89,7 @@ Fixed - + 20 16 @@ -106,7 +106,7 @@ Expanding - + 20 16 @@ -151,7 +151,7 @@ openFileRadioBtn - + 0 28 @@ -181,7 +181,7 @@ Expanding - + 40 20 diff --git a/ktouch/src/ktouchprefcolorslayout.ui b/ktouch/src/ktouchprefcolorslayout.ui index 53c87079..2d519808 100644 --- a/ktouch/src/ktouchprefcolorslayout.ui +++ b/ktouch/src/ktouchprefcolorslayout.ui @@ -59,7 +59,7 @@ Expanding - + 40 20 @@ -130,7 +130,7 @@ kcfg_TeacherBackgroundColor - + 40 0 @@ -166,7 +166,7 @@ 0 - + 40 0 @@ -189,7 +189,7 @@ Expanding - + 20 20 @@ -206,7 +206,7 @@ Fixed - + 20 20 @@ -217,7 +217,7 @@ kcfg_StudentTextColor - + 40 0 @@ -245,7 +245,7 @@ kcfg_StudentBackgroundColor - + 40 0 @@ -273,7 +273,7 @@ Fixed - + 20 20 @@ -306,7 +306,7 @@ Expanding - + 34 20 @@ -333,7 +333,7 @@ Fixed - + 20 16 @@ -369,7 +369,7 @@ Expanding - + 140 20 @@ -391,7 +391,7 @@ true - + 40 0 @@ -424,7 +424,7 @@ Fixed - + 20 20 @@ -446,7 +446,7 @@ true - + 40 0 @@ -485,7 +485,7 @@ Expanding - + 20 40 diff --git a/ktouch/src/ktouchprefgenerallayout.ui b/ktouch/src/ktouchprefgenerallayout.ui index 95c44ed6..ff4959f6 100644 --- a/ktouch/src/ktouchprefgenerallayout.ui +++ b/ktouch/src/ktouchprefgenerallayout.ui @@ -106,7 +106,7 @@ Expanding - + 227 20 @@ -117,7 +117,7 @@ kcfg_SlidingSpeed - + 32767 20 @@ -149,7 +149,7 @@ Fixed - + 20 20 @@ -184,7 +184,7 @@ Fixed - + 20 16 @@ -238,7 +238,7 @@ Fixed - + 20 16 @@ -271,7 +271,7 @@ Expanding - + 114 20 @@ -323,7 +323,7 @@ Expanding - + 31 30 diff --git a/ktouch/src/ktouchprefkeyboardlayout.ui b/ktouch/src/ktouchprefkeyboardlayout.ui index 1c25d804..c9a2d75b 100644 --- a/ktouch/src/ktouchprefkeyboardlayout.ui +++ b/ktouch/src/ktouchprefkeyboardlayout.ui @@ -65,7 +65,7 @@ Fixed - + 20 16 @@ -121,7 +121,7 @@ Expanding - + 20 30 diff --git a/ktouch/src/ktouchpreftraininglayout.ui b/ktouch/src/ktouchpreftraininglayout.ui index c2928dc0..7f68f36a 100644 --- a/ktouch/src/ktouchpreftraininglayout.ui +++ b/ktouch/src/ktouchpreftraininglayout.ui @@ -51,7 +51,7 @@ Fixed - + 20 16 @@ -121,7 +121,7 @@ Fixed - + 16 20 @@ -146,7 +146,7 @@ Fixed - + 16 20 @@ -165,7 +165,7 @@ Fixed - + 20 16 @@ -235,7 +235,7 @@ Fixed - + 16 20 @@ -252,7 +252,7 @@ Fixed - + 16 20 @@ -310,7 +310,7 @@ Expanding - + 20 20 diff --git a/ktouch/src/ktouchstatistics.cpp b/ktouch/src/ktouchstatistics.cpp index c8483096..8ae335d0 100644 --- a/ktouch/src/ktouchstatistics.cpp +++ b/ktouch/src/ktouchstatistics.cpp @@ -328,7 +328,7 @@ void KTouchStatistics::updateChartTab() { { double t = m_currSessionStats.m_elapsedTime; double wpm = m_currSessionStats.m_words/t*60.0; - double tp = TQDateTime::tqcurrentDateTime().toTime_t()/(3600.0*24); + double tp = TQDateTime::currentDateTime().toTime_t()/(3600.0*24); data.push_back(std::make_pair(tp, wpm) ); } chartWidget->LeftAxis.setLabel( i18n("Words per minute") ); @@ -352,7 +352,7 @@ void KTouchStatistics::updateChartTab() { { double t = m_currSessionStats.m_elapsedTime; double cpm = m_currSessionStats.m_correctChars/t*60.0; - double tp = TQDateTime::tqcurrentDateTime().toTime_t()/(3600.0*24); + double tp = TQDateTime::currentDateTime().toTime_t()/(3600.0*24); data.push_back(std::make_pair(tp, cpm) ); } chartWidget->LeftAxis.setLabel( i18n("Characters per minute") ); @@ -376,7 +376,7 @@ void KTouchStatistics::updateChartTab() { { double tc = m_currSessionStats.m_totalChars; double corr = m_currSessionStats.m_correctChars/tc; - double tp = TQDateTime::tqcurrentDateTime().toTime_t()/(3600.0*24); + double tp = TQDateTime::currentDateTime().toTime_t()/(3600.0*24); data.push_back(std::make_pair(tp, corr) ); } chartWidget->LeftAxis.setLabel( i18n("Correctness") ); @@ -407,7 +407,7 @@ void KTouchStatistics::updateChartTab() { double t = m_currSessionStats.m_elapsedTime; double cpm = m_currSessionStats.m_correctChars/t*60.0; double skill = corr*cpm; - double tp = TQDateTime::tqcurrentDateTime().toTime_t()/(3600.0*24); + double tp = TQDateTime::currentDateTime().toTime_t()/(3600.0*24); data.push_back(std::make_pair(tp, skill) ); } chartWidget->LeftAxis.setLabel( i18n("Skill") ); diff --git a/ktouch/src/ktouchstatistics_dlg.ui b/ktouch/src/ktouchstatistics_dlg.ui index 568ed7ef..d54fd2b1 100644 --- a/ktouch/src/ktouchstatistics_dlg.ui +++ b/ktouch/src/ktouchstatistics_dlg.ui @@ -172,7 +172,7 @@ elapsedTimeLCD - + 50 32767 @@ -189,7 +189,7 @@ totalCharsLCD - + 50 32767 @@ -206,7 +206,7 @@ wrongCharsLCD - + 50 32767 @@ -223,7 +223,7 @@ wordsLCD - + 50 32767 @@ -264,7 +264,7 @@ frame4 - + 20 0 @@ -414,7 +414,7 @@ charSpeedLCD - + 50 32767 @@ -431,7 +431,7 @@ wordSpeedLCD - + 50 32767 @@ -479,7 +479,7 @@ Expanding - + 20 40 @@ -618,7 +618,7 @@ elapsedTimeLCDLevel - + 50 32767 @@ -632,7 +632,7 @@ totalCharsLCDLevel - + 50 32767 @@ -646,7 +646,7 @@ wrongCharsLCDLevel - + 50 32767 @@ -660,7 +660,7 @@ wordsLCDLevel - + 50 32767 @@ -698,7 +698,7 @@ frame4_2 - + 20 0 @@ -848,7 +848,7 @@ charSpeedLCDLevel - + 50 32767 @@ -862,7 +862,7 @@ wordSpeedLCDLevel - + 50 32767 @@ -904,7 +904,7 @@ Expanding - + 20 89 @@ -1060,7 +1060,7 @@ Expanding - + 20 16 @@ -1189,7 +1189,7 @@ Expanding - + 20 20 @@ -1232,7 +1232,7 @@ Expanding - + 40 20 diff --git a/ktouch/src/ktouchstatus.cpp b/ktouch/src/ktouchstatus.cpp index bfbac46c..94d11894 100644 --- a/ktouch/src/ktouchstatus.cpp +++ b/ktouch/src/ktouchstatus.cpp @@ -20,13 +20,13 @@ #include #include "prefs.h" -KTouchtqStatus::KTouchtqStatus(TQWidget *parent) +KTouchStatus::KTouchStatus(TQWidget *parent) : KTouchStatusLayout(parent) { applyPreferences(); } -void KTouchtqStatus::applyPreferences() { +void KTouchStatus::applyPreferences() { if (Prefs::autoLevelChange()) { levelUpBtn->setEnabled( !Prefs::disableManualLevelChange() ); levelDownBtn->setEnabled( !Prefs::disableManualLevelChange() ); @@ -37,11 +37,11 @@ void KTouchtqStatus::applyPreferences() { } } -void KTouchtqStatus::setNewChars(const TQString& newChars) { +void KTouchStatus::setNewChars(const TQString& newChars) { newCharsLabel->setText(newChars); } -void KTouchtqStatus::updatetqStatus(unsigned int level, double correctness) { +void KTouchStatus::updateStatus(unsigned int level, double correctness) { levelLCD->display(static_cast(level)+1); // +1 because our level variable ranges from 0...n-1 correctnessBar->setProgress(static_cast(correctness*100) ); } diff --git a/ktouch/src/ktouchstatus.h b/ktouch/src/ktouchstatus.h index 229ed903..f4be66f4 100644 --- a/ktouch/src/ktouchstatus.h +++ b/ktouch/src/ktouchstatus.h @@ -22,21 +22,21 @@ /** This is the implementation of the status widget (at the top of the main view). * It simply displays the status but does not have a functionality of its own. * Everythings is calculated in the trainer (see KTouchTrainer)and then displayed - * using the updatetqStatus() member function. + * using the updateStatus() member function. * The "new characters" string is set using the member function setNewChars(). */ -class KTouchtqStatus : public KTouchStatusLayout { +class KTouchStatus : public KTouchStatusLayout { Q_OBJECT TQ_OBJECT public: /// Constructor - KTouchtqStatus(TQWidget *parent); + KTouchStatus(TQWidget *parent); /// Called when the preferences have changed in the configuration dialog. void applyPreferences(); /// Sets the new characters text. void setNewChars(const TQString& newChars); /// Updates the level LCD and the correctness progress bar - void updatetqStatus(unsigned int level, double correctness); + void updateStatus(unsigned int level, double correctness); }; #endif // KTOUCHSTATUS_H diff --git a/ktouch/src/ktouchstatuslayout.ui b/ktouch/src/ktouchstatuslayout.ui index 3721f578..29fda5be 100644 --- a/ktouch/src/ktouchstatuslayout.ui +++ b/ktouch/src/ktouchstatuslayout.ui @@ -58,7 +58,7 @@ 0 - + 0 30 @@ -95,7 +95,7 @@ levelUpBtn - + 20 20 @@ -112,7 +112,7 @@ levelDownBtn - + 20 20 @@ -160,7 +160,7 @@ Expanding - + 20 2 @@ -171,7 +171,7 @@ speedLCD - + 0 30 @@ -203,7 +203,7 @@ Expanding - + 20 2 @@ -233,7 +233,7 @@ Expanding - + 20 2 @@ -261,7 +261,7 @@ Expanding - + 20 2 @@ -291,7 +291,7 @@ Expanding - + 20 2 @@ -337,7 +337,7 @@ Expanding - + 20 2 diff --git a/ktouch/src/ktouchtrainer.cpp b/ktouch/src/ktouchtrainer.cpp index b2e48277..7ed140ca 100644 --- a/ktouch/src/ktouchtrainer.cpp +++ b/ktouch/src/ktouchtrainer.cpp @@ -31,7 +31,7 @@ #include "ktouchdefaults.h" #include "prefs.h" -KTouchTrainer::KTouchTrainer(KTouchtqStatus *status, KTouchSlideLine *slideLine, KTouchKeyboardWidget *keyboard, KTouchLecture *lecture) +KTouchTrainer::KTouchTrainer(KTouchStatus *status, KTouchSlideLine *slideLine, KTouchKeyboardWidget *keyboard, KTouchLecture *lecture) : TQObject(), m_trainingTimer(new TQTimer), m_statusWidget(status), @@ -233,7 +233,7 @@ void KTouchTrainer::enterPressed() { void KTouchTrainer::updateWidgets() { // update status widget - m_statusWidget->updatetqStatus(m_level, m_levelStats.correctness()); + m_statusWidget->updateStatus(m_level, m_levelStats.correctness()); // update slide line widget m_slideLineWidget->setStudentText(m_studentText); // update keyboard widget -> show next to be pressed char. @@ -270,7 +270,7 @@ void KTouchTrainer::startTraining(bool keepLevel) { gotoFirstLine(); updateStatusBarMessage(i18n("Starting training session: Waiting for first keypress...") ); updateStatusBar(); - m_statusWidget->updatetqStatus(m_level, 1); + m_statusWidget->updateStatus(m_level, 1); m_statusWidget->speedLCD->display( 0 ); m_trainingPaused=true; // Go into "Pause" mode m_trainingTimer->stop(); // Training timer will be started on first keypress. @@ -285,7 +285,7 @@ void KTouchTrainer::pauseTraining() { m_trainingPaused=true; m_trainingTimer->stop(); m_slideLineWidget->setCursorTimerEnabled(false); - m_statusWidget->updatetqStatus(m_level, m_levelStats.correctness()); + m_statusWidget->updateStatus(m_level, m_levelStats.correctness()); m_statusWidget->speedLCD->display( m_levelStats.charSpeed() ); updateStatusBarMessage(i18n("Training session paused. Training continues on next keypress...") ); updateStatusBar(); @@ -298,7 +298,7 @@ void KTouchTrainer::pauseTraining() { void KTouchTrainer::continueTraining() { m_trainingPaused=false; m_slideLineWidget->setCursorTimerEnabled(true); - m_statusWidget->updatetqStatus(m_level, m_levelStats.correctness() ); + m_statusWidget->updateStatus(m_level, m_levelStats.correctness() ); m_statusWidget->speedLCD->display( m_levelStats.charSpeed() ); updateStatusBarMessage(i18n("Training session! The time is running...") ); updateStatusBar(); @@ -317,12 +317,12 @@ void KTouchTrainer::storeTrainingStatistics() { // are there level stats to be stored? if (m_levelStats.m_elapsedTime != 0) { //kdDebug() << "[KTouchTrainer::storeTrainingStatistics] Storing level statistics!" << endl; - m_levelStats.m_timeRecorded = TQDateTime::tqcurrentDateTime(); + m_levelStats.m_timeRecorded = TQDateTime::currentDateTime(); data.m_levelStats.push_back( m_levelStats ); } if (m_sessionStats.m_elapsedTime != 0) { //kdDebug() << "[KTouchTrainer::storeTrainingStatistics] Storing session statistics!" << endl; - m_sessionStats.m_timeRecorded = TQDateTime::tqcurrentDateTime(); + m_sessionStats.m_timeRecorded = TQDateTime::currentDateTime(); data.m_sessionStats.push_back( m_sessionStats ); } } @@ -487,7 +487,7 @@ void KTouchTrainer::statsChangeLevel() { // are there level stats to be stored? if (m_levelStats.m_elapsedTime != 0) { //kdDebug() << "[KTouchTrainer::storeTrainingStatistics] Storing level statistics!" << endl; - m_levelStats.m_timeRecorded = TQDateTime::tqcurrentDateTime(); + m_levelStats.m_timeRecorded = TQDateTime::currentDateTime(); data.m_levelStats.push_back( m_levelStats ); } // clear level stats @@ -497,6 +497,6 @@ void KTouchTrainer::statsChangeLevel() { // remember level in session stats m_sessionStats.m_levelNums.insert(m_level); // show new level (in status widet) and 100% correctness - m_statusWidget->updatetqStatus(m_level, 1); + m_statusWidget->updateStatus(m_level, 1); } // ---------------------------------------------------------------------------- diff --git a/ktouch/src/ktouchtrainer.h b/ktouch/src/ktouchtrainer.h index 4dba8ebc..2a766a64 100644 --- a/ktouch/src/ktouchtrainer.h +++ b/ktouch/src/ktouchtrainer.h @@ -23,7 +23,7 @@ class TQTimer; -class KTouchtqStatus; +class KTouchStatus; class KTouchSlideLine; class KTouchKeyboardWidget; class KTouchLecture; @@ -62,7 +62,7 @@ class KTouchTrainer : public TQObject { TQ_OBJECT public: /// Constructor. - KTouchTrainer(KTouchtqStatus *status, KTouchSlideLine *slideLine, KTouchKeyboardWidget *keyboard, KTouchLecture *lecture); + KTouchTrainer(KTouchStatus *status, KTouchSlideLine *slideLine, KTouchKeyboardWidget *keyboard, KTouchLecture *lecture); /// Destructor virtual ~KTouchTrainer(); /// Jumps to the first line in the current level (m_level) (Note: has no effect on the training statistics). @@ -149,7 +149,7 @@ class KTouchTrainer : public TQObject { /// right before a new level and new line is started). void statsChangeLevel(); - KTouchtqStatus *m_statusWidget; ///< Pointer to the status widget on top of the main window. + KTouchStatus *m_statusWidget; ///< Pointer to the status widget on top of the main window. KTouchSlideLine *m_slideLineWidget; ///< Pointer to the sliding line widget. KTouchKeyboardWidget *m_keyboardWidget; ///< Pointer to the keyboard widget. KTouchLecture *m_lecture; ///< Pointer to the lecture data. -- cgit v1.2.3