summaryrefslogtreecommitdiffstats
path: root/kbruch/src/statisticsview.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 /kbruch/src/statisticsview.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 'kbruch/src/statisticsview.cpp')
-rw-r--r--kbruch/src/statisticsview.cpp28
1 files changed, 14 insertions, 14 deletions
diff --git a/kbruch/src/statisticsview.cpp b/kbruch/src/statisticsview.cpp
index 6c73b2b8..8e6db5d6 100644
--- a/kbruch/src/statisticsview.cpp
+++ b/kbruch/src/statisticsview.cpp
@@ -20,7 +20,7 @@
/* the includes are needed for TQt support */
#include <tqlabel.h>
-#include <tqlayout.h>
+#include <layout.h>
#include <tqpushbutton.h>
#include <tqtooltip.h>
#include <tqwhatsthis.h>
@@ -48,17 +48,17 @@ StatisticsView::StatisticsView(TQWidget * parent, const char * name):
/* set the caption of the window */
// setCaption(i18n("Statistics"));
- /* add a tqlayout as a base */
- tqlayout1 = new TQVBoxLayout(this);
- tqlayout1->setSpacing(6);
- tqlayout1->setMargin(6);
+ /* add a layout as a base */
+ layout1 = new TQVBoxLayout(this);
+ layout1->setSpacing(6);
+ layout1->setMargin(6);
/* now add a v-spacer */
TQSpacerItem * v_spacer = new TQSpacerItem(1, 1);
- tqlayout1->addItem(v_spacer);
+ layout1->addItem(v_spacer);
/* create a grid to show the labels */
- labelGrid = new TQGridLayout(tqlayout1, 3, 2);
+ labelGrid = new TQGridLayout(layout1, 3, 2);
/* add 6 labels to the grid */
info1Label = new TQLabel(this);
@@ -112,10 +112,10 @@ StatisticsView::StatisticsView(TQWidget * parent, const char * name):
/* now add a v-spacer */
v_spacer = new TQSpacerItem(1, 1);
- tqlayout1->addItem(v_spacer);
+ layout1->addItem(v_spacer);
/* the Reset button */
- buttonLayout = new TQHBoxLayout(tqlayout1);
+ buttonLayout = new TQHBoxLayout(layout1);
resetBtn = new TQPushButton(i18n("&Reset"), this);
TQObject::connect(resetBtn, TQT_SIGNAL(clicked()), this, TQT_SLOT(resetStatistics()));
buttonLayout->addWidget(resetBtn);
@@ -150,14 +150,14 @@ void StatisticsView::addCorrect()
{
++m_count;
++m_correct;
- (void) calc(); /* tqrepaint the statistics */
+ (void) calc(); /* repaint the statistics */
}
/* called, if a task was solved wrong */
void StatisticsView::addWrong()
{
++m_count;
- (void) calc(); /* tqrepaint the statistics */
+ (void) calc(); /* repaint the statistics */
}
@@ -169,7 +169,7 @@ void StatisticsView::calc()
TQString new_text;
TQString number;
- new_text = TQString("<b>%1</b>").tqarg(m_count);
+ new_text = TQString("<b>%1</b>").arg(m_count);
result1Label->setText(new_text);
/* we have to be careful with division by 0 */
@@ -179,11 +179,11 @@ void StatisticsView::calc()
result3Label->setText("- (- %)");
} else {
/* set the correct label */
- new_text = TQString("%1 (%2 %)").tqarg(m_correct).tqarg(int(double(m_correct) / m_count * 100));
+ new_text = TQString("%1 (%2 %)").arg(m_correct).arg(int(double(m_correct) / m_count * 100));
result2Label->setText(new_text);
/* set the incorrect label */
- new_text = TQString("%1 (%2 %)").tqarg(m_count - m_correct).tqarg(int(double(m_count - m_correct) / m_count * 100));
+ new_text = TQString("%1 (%2 %)").arg(m_count - m_correct).arg(int(double(m_count - m_correct) / m_count * 100));
result3Label->setText(new_text);
}
}