summaryrefslogtreecommitdiffstats
path: root/kbruch/src/statisticsview.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'kbruch/src/statisticsview.cpp')
-rw-r--r--kbruch/src/statisticsview.cpp34
1 files changed, 17 insertions, 17 deletions
diff --git a/kbruch/src/statisticsview.cpp b/kbruch/src/statisticsview.cpp
index d6b8ff37..b3fee887 100644
--- a/kbruch/src/statisticsview.cpp
+++ b/kbruch/src/statisticsview.cpp
@@ -18,7 +18,7 @@
#include "statisticsview.h"
#include "statisticsview.moc"
-/* the includes are needed for Qt support */
+/* the includes are needed for TQt support */
#include <tqlabel.h>
#include <tqlayout.h>
#include <tqpushbutton.h>
@@ -31,8 +31,8 @@
#include "settingsclass.h"
/* constructor */
-StatisticsView::StatisticsView(TQWidget * parent, const char * name):
- TQWidget(parent, name), m_count(0), m_correct(0)
+StatisticsView::StatisticsView(TQWidget * tqparent, const char * name):
+ TQWidget(tqparent, name), m_count(0), m_correct(0)
{
#ifdef DEBUG
kdDebug() << "constructor StatisticsView()" << endl;
@@ -48,17 +48,17 @@ StatisticsView::StatisticsView(TQWidget * parent, const char * name):
/* set the caption of the window */
// setCaption(i18n("Statistics"));
- /* add a layout as a base */
- layout1 = new TQVBoxLayout(this);
- layout1->setSpacing(6);
- layout1->setMargin(6);
+ /* add a tqlayout as a base */
+ tqlayout1 = new TQVBoxLayout(this);
+ tqlayout1->setSpacing(6);
+ tqlayout1->setMargin(6);
/* now add a v-spacer */
TQSpacerItem * v_spacer = new TQSpacerItem(1, 1);
- layout1->addItem(v_spacer);
+ tqlayout1->addItem(v_spacer);
/* create a grid to show the labels */
- labelGrid = new TQGridLayout(layout1, 3, 2);
+ labelGrid = new TQGridLayout(tqlayout1, 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);
- layout1->addItem(v_spacer);
+ tqlayout1->addItem(v_spacer);
/* the Reset button */
- buttonLayout = new TQHBoxLayout(layout1);
+ buttonLayout = new TQHBoxLayout(tqlayout1);
resetBtn = new TQPushButton(i18n("&Reset"), this);
TQObject::connect(resetBtn, TQT_SIGNAL(clicked()), this, TQT_SLOT(resetStatistics()));
buttonLayout->addWidget(resetBtn);
@@ -142,7 +142,7 @@ StatisticsView::~StatisticsView()
SettingsClass::setCorrect(m_correct);
SettingsClass::writeConfig();
- /* no need to delete any child widgets, Qt does it by itself */
+ /* no need to delete any child widgets, TQt does it by itself */
}
/* called, if a task solved correctly */
@@ -150,14 +150,14 @@ void StatisticsView::addCorrect()
{
++m_count;
++m_correct;
- (void) calc(); /* repaint the statistics */
+ (void) calc(); /* tqrepaint the statistics */
}
/* called, if a task was solved wrong */
void StatisticsView::addWrong()
{
++m_count;
- (void) calc(); /* repaint the statistics */
+ (void) calc(); /* tqrepaint the statistics */
}
@@ -169,7 +169,7 @@ void StatisticsView::calc()
TQString new_text;
TQString number;
- new_text = TQString("<b>%1</b>").arg(m_count);
+ new_text = TQString("<b>%1</b>").tqarg(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 %)").arg(m_correct).arg(int(double(m_correct) / m_count * 100));
+ new_text = TQString("%1 (%2 %)").tqarg(m_correct).tqarg(int(double(m_correct) / m_count * 100));
result2Label->setText(new_text);
/* set the incorrect label */
- new_text = TQString("%1 (%2 %)").arg(m_count - m_correct).arg(int(double(m_count - m_correct) / m_count * 100));
+ new_text = TQString("%1 (%2 %)").tqarg(m_count - m_correct).tqarg(int(double(m_count - m_correct) / m_count * 100));
result3Label->setText(new_text);
}
}