summaryrefslogtreecommitdiffstats
path: root/kbruch
diff options
context:
space:
mode:
Diffstat (limited to 'kbruch')
-rw-r--r--kbruch/src/Makefile.am2
-rw-r--r--kbruch/src/exercisebase.h2
-rw-r--r--kbruch/src/exercisecompare.cpp4
-rw-r--r--kbruch/src/exercisecompare.h2
-rw-r--r--kbruch/src/exerciseconvert.cpp2
-rw-r--r--kbruch/src/exerciseconvert.h2
-rw-r--r--kbruch/src/exercisefactorize.cpp20
-rw-r--r--kbruch/src/exercisefactorize.h2
-rw-r--r--kbruch/src/factorizedwidget.h2
-rw-r--r--kbruch/src/fractionbasewidget.h2
-rw-r--r--kbruch/src/kbruch.kcfg6
-rw-r--r--kbruch/src/mainqtwidget.cpp50
-rw-r--r--kbruch/src/mainqtwidget.h2
-rw-r--r--kbruch/src/ratio.cpp2
-rw-r--r--kbruch/src/rationalwidget.h2
-rw-r--r--kbruch/src/ratiowidget.h2
-rw-r--r--kbruch/src/resultwidget.h2
-rw-r--r--kbruch/src/statisticsview.cpp2
-rw-r--r--kbruch/src/statisticsview.h2
-rw-r--r--kbruch/src/task.cpp26
-rw-r--r--kbruch/src/task.h6
-rw-r--r--kbruch/src/taskview.cpp2
-rw-r--r--kbruch/src/taskview.h2
-rw-r--r--kbruch/src/taskwidget.h6
-rw-r--r--kbruch/testcases/Makefile.am2
25 files changed, 73 insertions, 81 deletions
diff --git a/kbruch/src/Makefile.am b/kbruch/src/Makefile.am
index 6459bbf1..b088487e 100644
--- a/kbruch/src/Makefile.am
+++ b/kbruch/src/Makefile.am
@@ -4,7 +4,7 @@ kbruch_COMPILE_FIRST = version.h
kbruch_SOURCES = exercisebase.cpp taskvieweroptionsbase.ui task.cpp ratio.cpp taskview.cpp statisticsview.cpp primenumber.cpp kbruch.cpp mainqtwidget.cpp taskwidget.cpp fractionbasewidget.cpp resultwidget.cpp exercisecompare.cpp ratiowidget.cpp rationalwidget.cpp exerciseconvert.cpp exercisefactorize.cpp factorizedwidget.cpp settingsclass.kcfgc
kbruch_LDADD = $(LIB_TDEUI)
# the library search path.
-kbruch_LDFLAGS = $(all_libraries) $(KDE_RPATH) $(LIB_QT) -lDCOP $(LIB_TDECORE) $(LIB_TDEUI) -ltdefx $(LIB_TDEIO) -ltdetexteditor
+kbruch_LDFLAGS = $(all_libraries) $(KDE_RPATH) $(LIB_TQT) -lDCOP $(LIB_TDECORE) $(LIB_TDEUI) -ltdefx $(LIB_TDEIO) -ltdetexteditor
EXTRA_DIST = kbruch.cpp kbruch.h kbruch.desktop hi32-app-kbruch.png hi16-app-kbruch.png lo32-app-kbruch.png lo16-app-kbruch.png mainqtwidget.cpp mainqtwidget.h primenumber.cpp primenumber.h statisticsview.cpp statisticsview.h exercisebase.cpp exercisebase.h taskview.cpp taskview.h ratio.cpp ratio.h task.cpp task.h taskwidget.cpp taskwidget.h fractionbasewidget.cpp fractionbasewidget.h resultwidget.cpp resultwidget.h exercisecompare.cpp exercisecompare.h ratiowidget.cpp ratiowidget.h rationalwidget.cpp rationalwidget.h exerciseconvert.cpp exerciseconvert.h exercisefactorize.cpp exercisefactorize.h factorizedwidget.cpp factorizedwidget.h kbruch.rc taskvieweroptionsbase.ui
diff --git a/kbruch/src/exercisebase.h b/kbruch/src/exercisebase.h
index 459f0d7d..224622a5 100644
--- a/kbruch/src/exercisebase.h
+++ b/kbruch/src/exercisebase.h
@@ -35,7 +35,7 @@
* */
class ExerciseBase : public TQWidget
{
- Q_OBJECT
+ TQ_OBJECT
public:
diff --git a/kbruch/src/exercisecompare.cpp b/kbruch/src/exercisecompare.cpp
index b98d5c78..b5a94b84 100644
--- a/kbruch/src/exercisecompare.cpp
+++ b/kbruch/src/exercisecompare.cpp
@@ -86,7 +86,7 @@ ExerciseCompare::ExerciseCompare(TQWidget * parent, const char * name):
m_signButtonState = lessThen;
taskLineHBoxLayout->addWidget(m_signButton);
- TQObject::connect(m_signButton, TQT_SIGNAL(clicked()), this, TQT_SLOT(slotSignButtonClicked()));
+ TQObject::connect(m_signButton, TQ_SIGNAL(clicked()), this, TQ_SLOT(slotSignButtonClicked()));
TQToolTip::add(m_signButton, i18n("Click on this button to change the comparison sign."));
// spacer
@@ -124,7 +124,7 @@ ExerciseCompare::ExerciseCompare(TQWidget * parent, const char * name):
m_checkButton->setDefault(true); // is the default button of the dialog
TQToolTip::add(m_checkButton, i18n("Click on this button to check your result."));
lowerHBox->addWidget(m_checkButton, 1, TQt::AlignRight);
- TQObject::connect(m_checkButton, TQT_SIGNAL(clicked()), this, TQT_SLOT(slotCheckButtonClicked()));
+ TQObject::connect(m_checkButton, TQ_SIGNAL(clicked()), this, TQ_SLOT(slotCheckButtonClicked()));
// that the user can start typing without moving the focus
m_signButton->setFocus();
diff --git a/kbruch/src/exercisecompare.h b/kbruch/src/exercisecompare.h
index 54e81138..a282721d 100644
--- a/kbruch/src/exercisecompare.h
+++ b/kbruch/src/exercisecompare.h
@@ -44,7 +44,7 @@ class TQVBoxLayout;
* */
class ExerciseCompare : public ExerciseBase
{
- Q_OBJECT
+ TQ_OBJECT
public:
diff --git a/kbruch/src/exerciseconvert.cpp b/kbruch/src/exerciseconvert.cpp
index ec7db1e7..2e3fb808 100644
--- a/kbruch/src/exerciseconvert.cpp
+++ b/kbruch/src/exerciseconvert.cpp
@@ -158,7 +158,7 @@ ExerciseConvert::ExerciseConvert(TQWidget * parent, const char * name):
m_checkButton->setDefault(true); // is the default button of the dialog
TQToolTip::add(m_checkButton, i18n("Click on this button to check your result. The button will not work if you have not entered a result yet."));
lowerHBox->addWidget(m_checkButton, 1, TQt::AlignRight);
- TQObject::connect(m_checkButton, TQT_SIGNAL(clicked()), this, TQT_SLOT(slotCheckButtonClicked()));
+ TQObject::connect(m_checkButton, TQ_SIGNAL(clicked()), this, TQ_SLOT(slotCheckButtonClicked()));
// that the user can start typing without moving the focus
numer_edit->setFocus();
diff --git a/kbruch/src/exerciseconvert.h b/kbruch/src/exerciseconvert.h
index 777eff76..7bca7962 100644
--- a/kbruch/src/exerciseconvert.h
+++ b/kbruch/src/exerciseconvert.h
@@ -42,7 +42,7 @@ class TQVBoxLayout;
* */
class ExerciseConvert : public ExerciseBase
{
- Q_OBJECT
+ TQ_OBJECT
public:
diff --git a/kbruch/src/exercisefactorize.cpp b/kbruch/src/exercisefactorize.cpp
index e971e12f..8eb43a9a 100644
--- a/kbruch/src/exercisefactorize.cpp
+++ b/kbruch/src/exercisefactorize.cpp
@@ -126,14 +126,14 @@ ExerciseFactorize::ExerciseFactorize(TQWidget * parent, const char * name):
m_factor13Button->setText( i18n( "13" ) );
m_factor17Button->setText( i18n( "17" ) );
m_factor19Button->setText( i18n( "19" ) );
- TQObject::connect(m_factor2Button, TQT_SIGNAL(clicked()), this, TQT_SLOT(slotFactor2ButtonClicked()));
- TQObject::connect(m_factor3Button, TQT_SIGNAL(clicked()), this, TQT_SLOT(slotFactor3ButtonClicked()));
- TQObject::connect(m_factor5Button, TQT_SIGNAL(clicked()), this, TQT_SLOT(slotFactor5ButtonClicked()));
- TQObject::connect(m_factor7Button, TQT_SIGNAL(clicked()), this, TQT_SLOT(slotFactor7ButtonClicked()));
- TQObject::connect(m_factor11Button, TQT_SIGNAL(clicked()), this, TQT_SLOT(slotFactor11ButtonClicked()));
- TQObject::connect(m_factor13Button, TQT_SIGNAL(clicked()), this, TQT_SLOT(slotFactor13ButtonClicked()));
- TQObject::connect(m_factor17Button, TQT_SIGNAL(clicked()), this, TQT_SLOT(slotFactor17ButtonClicked()));
- TQObject::connect(m_factor19Button, TQT_SIGNAL(clicked()), this, TQT_SLOT(slotFactor19ButtonClicked()));
+ TQObject::connect(m_factor2Button, TQ_SIGNAL(clicked()), this, TQ_SLOT(slotFactor2ButtonClicked()));
+ TQObject::connect(m_factor3Button, TQ_SIGNAL(clicked()), this, TQ_SLOT(slotFactor3ButtonClicked()));
+ TQObject::connect(m_factor5Button, TQ_SIGNAL(clicked()), this, TQ_SLOT(slotFactor5ButtonClicked()));
+ TQObject::connect(m_factor7Button, TQ_SIGNAL(clicked()), this, TQ_SLOT(slotFactor7ButtonClicked()));
+ TQObject::connect(m_factor11Button, TQ_SIGNAL(clicked()), this, TQ_SLOT(slotFactor11ButtonClicked()));
+ TQObject::connect(m_factor13Button, TQ_SIGNAL(clicked()), this, TQ_SLOT(slotFactor13ButtonClicked()));
+ TQObject::connect(m_factor17Button, TQ_SIGNAL(clicked()), this, TQ_SLOT(slotFactor17ButtonClicked()));
+ TQObject::connect(m_factor19Button, TQ_SIGNAL(clicked()), this, TQ_SLOT(slotFactor19ButtonClicked()));
// add tooltips to the factor buttons
TQToolTip::add(m_factor2Button, i18n("Add prime factor 2."));
@@ -148,13 +148,13 @@ ExerciseFactorize::ExerciseFactorize(TQWidget * parent, const char * name):
// the remove last factor button
m_removeLastFactorButton->setText( i18n( "&Remove Last Factor" ) );
m_removeLastFactorButton->setEnabled(false);
- TQObject::connect(m_removeLastFactorButton, TQT_SIGNAL(clicked()), this, TQT_SLOT(slotRemoveLastFactorButtonClicked()));
+ TQObject::connect(m_removeLastFactorButton, TQ_SIGNAL(clicked()), this, TQ_SLOT(slotRemoveLastFactorButtonClicked()));
TQToolTip::add(m_removeLastFactorButton, i18n("Removes the last entered prime factor."));
// the check task button
m_checkButton->setText( i18n( "&Check Task" ) );
TQToolTip::add(m_checkButton, i18n("Click on this button to check your result. The button will not work if you have not entered a result yet."));
- TQObject::connect(m_checkButton, TQT_SIGNAL(clicked()), this, TQT_SLOT(slotCheckButtonClicked()));
+ TQObject::connect(m_checkButton, TQ_SIGNAL(clicked()), this, TQ_SLOT(slotCheckButtonClicked()));
m_checkButton->setDefault(true); // is the default button of the dialog
// that the user can start choosing the prime factors
diff --git a/kbruch/src/exercisefactorize.h b/kbruch/src/exercisefactorize.h
index 716104fd..14c9ac8e 100644
--- a/kbruch/src/exercisefactorize.h
+++ b/kbruch/src/exercisefactorize.h
@@ -59,7 +59,7 @@ const uint possibleTasks[numberPossibleTasks] = {4, 6, 8, 9, 10, 12, 14, 15, 16,
* */
class ExerciseFactorize : public ExerciseBase
{
- Q_OBJECT
+ TQ_OBJECT
public:
diff --git a/kbruch/src/factorizedwidget.h b/kbruch/src/factorizedwidget.h
index 8311a38e..dc605ce5 100644
--- a/kbruch/src/factorizedwidget.h
+++ b/kbruch/src/factorizedwidget.h
@@ -34,7 +34,7 @@ typedef TQValueList<uint> uintList;
* \author Sebastian Stein */
class FactorizedWidget : public FractionBaseWidget
{
- Q_OBJECT
+ TQ_OBJECT
public:
diff --git a/kbruch/src/fractionbasewidget.h b/kbruch/src/fractionbasewidget.h
index 1d6a3976..3f042e4b 100644
--- a/kbruch/src/fractionbasewidget.h
+++ b/kbruch/src/fractionbasewidget.h
@@ -35,7 +35,7 @@
* \author Sebastian Stein */
class FractionBaseWidget : public TQWidget
{
- Q_OBJECT
+ TQ_OBJECT
public:
diff --git a/kbruch/src/kbruch.kcfg b/kbruch/src/kbruch.kcfg
index ae13463d..f767e2a1 100644
--- a/kbruch/src/kbruch.kcfg
+++ b/kbruch/src/kbruch.kcfg
@@ -53,17 +53,17 @@
<entry name="numberColor" type="Color">
<label>Color of the numbers in the task view</label>
<whatsthis>Color of the numbers in the task view</whatsthis>
- <default code="true">Qt::darkGreen</default>
+ <default code="true">TQt::darkGreen</default>
</entry>
<entry name="operationColor" type="Color">
<label>Color of the operation signs in the task view</label>
<whatsthis>Color of the operation signs in the task view</whatsthis>
- <default code="true">Qt::blue</default>
+ <default code="true">TQt::blue</default>
</entry>
<entry name="fractionBarColor" type="Color">
<label>Color of the fraction bars in the task view</label>
<whatsthis>Color of the fraction bars in the task view</whatsthis>
- <default code="true">Qt::red</default>
+ <default code="true">TQt::red</default>
</entry>
<entry type="Font" key="taskFont">
<label>Font used for the task view</label>
diff --git a/kbruch/src/mainqtwidget.cpp b/kbruch/src/mainqtwidget.cpp
index 1b54e990..3c44c4bf 100644
--- a/kbruch/src/mainqtwidget.cpp
+++ b/kbruch/src/mainqtwidget.cpp
@@ -62,7 +62,7 @@ MainQtWidget::MainQtWidget()
// we split the main view into 2 parts, one for the tasks, one for the
// statistics
- TQSplitter* splitter = new TQSplitter(Qt::Horizontal, this,TQSPLITTER_OBJECT_NAME_STRING);
+ TQSplitter* splitter = new TQSplitter(TQt::Horizontal, this,"TQSplitter");
setCentralWidget(splitter);
// the iconlist, where the user can choose the different exercises
@@ -94,18 +94,18 @@ MainQtWidget::MainQtWidget()
splitter->setResizeMode(m_statview, TQSplitter::FollowSizeHint);
// we must change the status of the menubar before another page is shown
- TQObject::connect(m_exercises, TQT_SIGNAL(aboutToShowPage(TQWidget *)), this, TQT_SLOT(slotAboutToShowPage(TQWidget *)));
+ TQObject::connect(m_exercises, TQ_SIGNAL(aboutToShowPage(TQWidget *)), this, TQ_SLOT(slotAboutToShowPage(TQWidget *)));
// connect signals of the exercises and StatisticView, so that StatisticView
// gets informed about how the user solved a given task (wrong or correct)
- TQObject::connect(m_taskview, TQT_SIGNAL(signalTaskSolvedCorrect()), m_statview, TQT_SLOT(addCorrect()));
- TQObject::connect(m_taskview, TQT_SIGNAL(signalTaskSolvedWrong()), m_statview, TQT_SLOT(addWrong()));
- TQObject::connect(m_exerciseCompare, TQT_SIGNAL(signalExerciseSolvedCorrect()), m_statview, TQT_SLOT(addCorrect()));
- TQObject::connect(m_exerciseCompare, TQT_SIGNAL(signalExerciseSolvedWrong()), m_statview, TQT_SLOT(addWrong()));
- TQObject::connect(m_exerciseConvert, TQT_SIGNAL(signalExerciseSolvedCorrect()), m_statview, TQT_SLOT(addCorrect()));
- TQObject::connect(m_exerciseConvert, TQT_SIGNAL(signalExerciseSolvedWrong()), m_statview, TQT_SLOT(addWrong()));
- TQObject::connect(m_exerciseFactorize, TQT_SIGNAL(signalExerciseSolvedCorrect()), m_statview, TQT_SLOT(addCorrect()));
- TQObject::connect(m_exerciseFactorize, TQT_SIGNAL(signalExerciseSolvedWrong()), m_statview, TQT_SLOT(addWrong()));
+ TQObject::connect(m_taskview, TQ_SIGNAL(signalTaskSolvedCorrect()), m_statview, TQ_SLOT(addCorrect()));
+ TQObject::connect(m_taskview, TQ_SIGNAL(signalTaskSolvedWrong()), m_statview, TQ_SLOT(addWrong()));
+ TQObject::connect(m_exerciseCompare, TQ_SIGNAL(signalExerciseSolvedCorrect()), m_statview, TQ_SLOT(addCorrect()));
+ TQObject::connect(m_exerciseCompare, TQ_SIGNAL(signalExerciseSolvedWrong()), m_statview, TQ_SLOT(addWrong()));
+ TQObject::connect(m_exerciseConvert, TQ_SIGNAL(signalExerciseSolvedCorrect()), m_statview, TQ_SLOT(addCorrect()));
+ TQObject::connect(m_exerciseConvert, TQ_SIGNAL(signalExerciseSolvedWrong()), m_statview, TQ_SLOT(addWrong()));
+ TQObject::connect(m_exerciseFactorize, TQ_SIGNAL(signalExerciseSolvedCorrect()), m_statview, TQ_SLOT(addCorrect()));
+ TQObject::connect(m_exerciseFactorize, TQ_SIGNAL(signalExerciseSolvedWrong()), m_statview, TQ_SLOT(addWrong()));
#if (TDE_VERSION_MINOR>=3) && (TDE_VERSION_MAJOR>=3)
#else
@@ -155,19 +155,19 @@ void MainQtWidget::setupActions()
{
// new task action
m_NewTaskAction = new TDEAction(i18n("&New"), "document-new", TDEStdAccel::shortcut(TDEStdAccel::New),
- TQT_TQOBJECT(this), TQT_SLOT(NewTask()),
+ this, TQ_SLOT(NewTask()),
actionCollection(), "NewTask");
// quit action
- KStdAction::quit(TQT_TQOBJECT(kapp), TQT_SLOT(quit()), actionCollection());
+ KStdAction::quit(tdeApp, TQ_SLOT(quit()), actionCollection());
//
- KStdAction::preferences(TQT_TQOBJECT(this), TQT_SLOT( slotPrefs() ), actionCollection());
+ KStdAction::preferences(this, TQ_SLOT( slotPrefs() ), actionCollection());
// a label just describing the Number of terms ComboBox
m_NrOfTermsLabel = new TQLabel(i18n("Terms:"), 0, "tde toolbar widget");
m_NrOfTermsLabelAction = new KWidgetAction(m_NrOfTermsLabel, i18n("Terms:"), ALT+Key_E,
- TQT_TQOBJECT(this), TQT_SLOT(NrOfTermsBoxSlot()),
+ this, TQ_SLOT(NrOfTermsBoxSlot()),
actionCollection(), "NrOfTermsLabelAction");
// the ComboBox holding possible values for term number
@@ -179,15 +179,15 @@ void MainQtWidget::setupActions()
m_NrOfTermsBox->setCurrentItem(m_nrRatios - 2);
TQToolTip::add( m_NrOfTermsBox, i18n( "The number of terms you want" ) );
TQWhatsThis::add( m_NrOfTermsBox, i18n( "Choose the number of terms (2, 3, 4 or 5) you want for calculating fractions." ) );
- m_NrOfTermsBoxAction = new KWidgetAction(m_NrOfTermsBox, i18n("Number of Terms"), ALT+Key_E, TQT_TQOBJECT(this), TQT_SLOT(NrOfTermsBoxSlot()), actionCollection(), "NrOfTermsBoxAction");
+ m_NrOfTermsBoxAction = new KWidgetAction(m_NrOfTermsBox, i18n("Number of Terms"), ALT+Key_E, this, TQ_SLOT(NrOfTermsBoxSlot()), actionCollection(), "NrOfTermsBoxAction");
// now connect the ComboBox's signal textChanged() to the slot function
- TQObject::connect(m_NrOfTermsBox, TQT_SIGNAL(activated(int)), TQT_TQOBJECT(this), TQT_SLOT(NrOfTermsBoxSlot()));
+ TQObject::connect(m_NrOfTermsBox, TQ_SIGNAL(activated(int)), this, TQ_SLOT(NrOfTermsBoxSlot()));
// a label just describing the max. main denominator ComboBox
m_MaxMainDenominatorLabel = new TQLabel(i18n("Max. main denominator:"), 0, "tde toolbar widget");
m_MaxMainDenominatorLabelAction = new KWidgetAction(m_MaxMainDenominatorLabel, i18n("Max. main denominator:"), ALT+Key_D,
- TQT_TQOBJECT(this), TQT_SLOT(MaxMainDenominatorBoxSlot()),
+ this, TQ_SLOT(MaxMainDenominatorBoxSlot()),
actionCollection(), "MaxMainDenominatorLabelAction");
// the ComboBox holding possible values for the max. main denominator
@@ -209,16 +209,16 @@ void MainQtWidget::setupActions()
case 50 : m_MaxMainDenominatorBox->setCurrentItem(3);
break;
}
- m_MaxMainDenominatorBoxAction = new KWidgetAction(m_MaxMainDenominatorBox, i18n("Maximal Main Denominator"), ALT+Key_D, TQT_TQOBJECT(this), TQT_SLOT(MaxMainDenominatorBoxSlot()), actionCollection(), "MaxMainDenominatorBoxAction");
+ m_MaxMainDenominatorBoxAction = new KWidgetAction(m_MaxMainDenominatorBox, i18n("Maximal Main Denominator"), ALT+Key_D, this, TQ_SLOT(MaxMainDenominatorBoxSlot()), actionCollection(), "MaxMainDenominatorBoxAction");
// now connect the ComboBox's signal textChanged() to the slot function
- TQObject::connect(m_MaxMainDenominatorBox, TQT_SIGNAL(activated(int)),
- this, TQT_SLOT(MaxMainDenominatorBoxSlot()));
+ TQObject::connect(m_MaxMainDenominatorBox, TQ_SIGNAL(activated(int)),
+ this, TQ_SLOT(MaxMainDenominatorBoxSlot()));
// a label just describing the operation ComboBox
m_OperationLabel = new TQLabel(i18n("Operations:"), 0, "tde toolbar widget");
m_OperationLabelAction = new KWidgetAction(m_OperationLabel, i18n("Operations:"), ALT+Key_O,
- TQT_TQOBJECT(this), TQT_SLOT(OperationBoxSlot()),
+ this, TQ_SLOT(OperationBoxSlot()),
actionCollection(), "OperationLabelAction");
// the ComboBox holding possible combinations for operations
@@ -236,10 +236,10 @@ void MainQtWidget::setupActions()
}
TQToolTip::add( m_OperationBox, i18n( "The operations you want" ) );
TQWhatsThis::add( m_OperationBox, i18n( "Choose the type of operations you want for calculating fractions: Addition/Substraction, Multiplication/Division or All Operations Mixed. If you choose All Operations Mixed, the program will randomly choose addition, substraction, multiplication and/or division." ) );
- m_OperationBoxAction = new KWidgetAction(m_OperationBox, i18n("Operations:"), ALT+Key_O, TQT_TQOBJECT(this), TQT_SLOT(OperationBoxSlot()), actionCollection(), "OperationBoxAction");
+ m_OperationBoxAction = new KWidgetAction(m_OperationBox, i18n("Operations:"), ALT+Key_O, this, TQ_SLOT(OperationBoxSlot()), actionCollection(), "OperationBoxAction");
// now connect the ComboBox's signal textChanged() to the slot function
- TQObject::connect(m_OperationBox, TQT_SIGNAL(activated(int)), this, TQT_SLOT(OperationBoxSlot()));
+ TQObject::connect(m_OperationBox, TQ_SIGNAL(activated(int)), this, TQ_SLOT(OperationBoxSlot()));
#if (TDE_VERSION_MINOR>=3) && (TDE_VERSION_MAJOR>=3)
if (!initialGeometrySet())
@@ -428,12 +428,12 @@ void MainQtWidget::slotPrefs()
// User edited the configuration - update your local copies of the
// configuration data
- connect(configDialog, TQT_SIGNAL(settingsChanged()), this, TQT_SLOT(slotApplySettings()) );
+ connect(configDialog, TQ_SIGNAL(settingsChanged()), this, TQ_SLOT(slotApplySettings()) );
configDialog->show();
/*
SettingsDialog * dlg = new SettingsDialog(this);
- connect(dlg, TQT_SIGNAL(configChanged()), this, TQT_SLOT(slotApplySettings()));
+ connect(dlg, TQ_SIGNAL(configChanged()), this, TQ_SLOT(slotApplySettings()));
dlg->exec();
diff --git a/kbruch/src/mainqtwidget.h b/kbruch/src/mainqtwidget.h
index 4b58000c..4ddab9fa 100644
--- a/kbruch/src/mainqtwidget.h
+++ b/kbruch/src/mainqtwidget.h
@@ -39,7 +39,7 @@ class TaskView;
**/
class MainQtWidget : public TDEMainWindow
{
- Q_OBJECT
+ TQ_OBJECT
public:
diff --git a/kbruch/src/ratio.cpp b/kbruch/src/ratio.cpp
index 0ba1e1c4..48827288 100644
--- a/kbruch/src/ratio.cpp
+++ b/kbruch/src/ratio.cpp
@@ -186,7 +186,7 @@ ratio ratio::operator=(int dummy)
return *this;
}
-/* check, if the ratios are equivalent; -1/2 == 1/-2 -> TRUE */
+/* check, if the ratios are equivalent; -1/2 == 1/-2 -> true */
bool ratio::operator==(ratio right)
{
signed short orig_sign = 1, right_sign = 1;
diff --git a/kbruch/src/rationalwidget.h b/kbruch/src/rationalwidget.h
index 46f85221..9cdccefd 100644
--- a/kbruch/src/rationalwidget.h
+++ b/kbruch/src/rationalwidget.h
@@ -33,7 +33,7 @@ class TQString;
* \author Sebastian Stein */
class RationalWidget : public FractionBaseWidget
{
- Q_OBJECT
+ TQ_OBJECT
public:
diff --git a/kbruch/src/ratiowidget.h b/kbruch/src/ratiowidget.h
index 7ac10017..5319e47b 100644
--- a/kbruch/src/ratiowidget.h
+++ b/kbruch/src/ratiowidget.h
@@ -32,7 +32,7 @@
* \author Sebastian Stein */
class RatioWidget : public FractionBaseWidget
{
- Q_OBJECT
+ TQ_OBJECT
public:
diff --git a/kbruch/src/resultwidget.h b/kbruch/src/resultwidget.h
index 609f6bc2..e321da97 100644
--- a/kbruch/src/resultwidget.h
+++ b/kbruch/src/resultwidget.h
@@ -32,7 +32,7 @@
* \author Sebastian Stein */
class ResultWidget : public FractionBaseWidget
{
- Q_OBJECT
+ TQ_OBJECT
public:
diff --git a/kbruch/src/statisticsview.cpp b/kbruch/src/statisticsview.cpp
index f60b0787..6ac23ca5 100644
--- a/kbruch/src/statisticsview.cpp
+++ b/kbruch/src/statisticsview.cpp
@@ -117,7 +117,7 @@ StatisticsView::StatisticsView(TQWidget * parent, const char * name):
/* the Reset button */
buttonLayout = new TQHBoxLayout(layout1);
resetBtn = new TQPushButton(i18n("&Reset"), this);
- TQObject::connect(resetBtn, TQT_SIGNAL(clicked()), this, TQT_SLOT(resetStatistics()));
+ TQObject::connect(resetBtn, TQ_SIGNAL(clicked()), this, TQ_SLOT(resetStatistics()));
buttonLayout->addWidget(resetBtn);
TQToolTip::add(resetBtn, i18n("Press the button to reset the statistics."));
TQSpacerItem* spacer = new TQSpacerItem(0,0);
diff --git a/kbruch/src/statisticsview.h b/kbruch/src/statisticsview.h
index b334e6d7..7156496b 100644
--- a/kbruch/src/statisticsview.h
+++ b/kbruch/src/statisticsview.h
@@ -36,7 +36,7 @@ class TQGridLayout;
class StatisticsView : public TQWidget
{
- Q_OBJECT
+ TQ_OBJECT
public:
diff --git a/kbruch/src/task.cpp b/kbruch/src/task.cpp
index 50cd2f28..1ebd13e9 100644
--- a/kbruch/src/task.cpp
+++ b/kbruch/src/task.cpp
@@ -45,18 +45,18 @@ task::~task()
* can be customized by the given parameters:
* pmax_md: maximum main denominator
* pnr_ratios: number of ratios -> pnr_ratios - 1 operations
- * padd_sub: if TRUE + and - are allowed operations
- * pmul_div: if TRUE * and / are allowed operations */
+ * padd_sub: if true + and - are allowed operations
+ * pmul_div: if true * and / are allowed operations */
void task::create_task(unsigned int pmax_md, short pnr_ratios,
- short padd_sub, short pmul_div)
+ bool padd_sub, bool pmul_div)
{
unsigned short max_product_length = 0;
int main_denominator = 1;
/* we say that if add/sub and mul/div are not allowed we want a task
* for add/sub only */
- if (padd_sub == NO && pmul_div == NO)
- padd_sub = YES;
+ if (!padd_sub && !pmul_div)
+ padd_sub = true;
do
{
@@ -395,9 +395,9 @@ unsigned short task::make_operation(short padd_sub, short pmul_div,
ShortArray::iterator op_pointer;
/* we need this to generate the fitting operations */
- if (padd_sub == YES)
+ if (padd_sub)
operations += 2;
- if (pmul_div == YES)
+ if (pmul_div)
operations += 2;
/* clear the old operations */
@@ -409,7 +409,7 @@ unsigned short task::make_operation(short padd_sub, short pmul_div,
/* if we only wanted mul/div, operations was 2; but we want values
* for the operations with 2 and 3 so we have to add 2 */
- if (padd_sub == NO && pmul_div == YES)
+ if (!padd_sub && pmul_div)
{
/* loop through all operations and add 2, so that the operations
* are interpreted as mul/div and not add/sub */
@@ -418,7 +418,7 @@ unsigned short task::make_operation(short padd_sub, short pmul_div,
*op_pointer += 2;
}
- if (pmul_div == YES)
+ if (pmul_div)
{
short flag_counter = 0;
@@ -453,13 +453,13 @@ unsigned short task::make_operation(short padd_sub, short pmul_div,
max_product_length++;
}
else
- { /* if (pmul_div == YES) */
+ { /* if (pmul_div) */
/* a task is given only with add/sub ops; so we want a max.
* of pnr_ratios / 2 + 1 prime factors, but at least */
max_product_length = (unsigned short) (float(pnr_ratios) / 2) + 1;
if (max_product_length < 2)
max_product_length = 2;
- } /* if (pmul_div == YES) */
+ } /* if (pmul_div) */
return max_product_length;
}
@@ -580,7 +580,7 @@ void task::make_denominators(int main_denominator, short pmax_md,
/* if the ratio is connected to a mul or div operation, we have to do some
* extra work and regenerate the denominators */
- if (pmul_div == YES)
+ if (pmul_div)
{
/* lets loop through all ratios and check, if there is a mul/div
* after the ratio */
@@ -697,7 +697,7 @@ void task::make_denominators(int main_denominator, short pmax_md,
}
ratio_pointer++;
}
- } /* if (pmul_div == YES) */
+ } /* if (pmul_div) */
return;
}
diff --git a/kbruch/src/task.h b/kbruch/src/task.h
index 57c80b86..806e11b9 100644
--- a/kbruch/src/task.h
+++ b/kbruch/src/task.h
@@ -23,10 +23,6 @@
#include <vector>
-/** important for add_sub and mul_div */
-#define YES 1
-#define NO 0
-
/** important for op_vector */
#define ADD 0
#define SUB 1
@@ -73,7 +69,7 @@ public:
/** automatically generate a new task with the given parameters */
void create_task(unsigned int pmax_md = 10, short pnr_ratios = 2,
- short padd_sub = YES, short pmul_div = NO);
+ bool padd_sub = true, bool pmul_div = false);
/** set ratio n */
void set_ratio_n(unsigned short number = 0, int numerator = 0,
diff --git a/kbruch/src/taskview.cpp b/kbruch/src/taskview.cpp
index 1c0b1a25..d1b05b01 100644
--- a/kbruch/src/taskview.cpp
+++ b/kbruch/src/taskview.cpp
@@ -153,7 +153,7 @@ TaskView::TaskView(TQWidget * parent, const char * name, bool padd_sub,
m_checkButton->setDefault(true); // is the default button of the dialog
TQToolTip::add(m_checkButton, i18n("Click on this button to check your result. The button will not work if you have not entered a result yet."));
lowerHBox->addWidget(m_checkButton, 1, TQt::AlignRight);
- TQObject::connect(m_checkButton, TQT_SIGNAL(clicked()), this, TQT_SLOT(slotCheckButtonClicked()));
+ TQObject::connect(m_checkButton, TQ_SIGNAL(clicked()), this, TQ_SLOT(slotCheckButtonClicked()));
// that the user can start typing without moving the focus
numer_edit->setFocus();
diff --git a/kbruch/src/taskview.h b/kbruch/src/taskview.h
index d0a4c61c..882eb61f 100644
--- a/kbruch/src/taskview.h
+++ b/kbruch/src/taskview.h
@@ -50,7 +50,7 @@ class TQFrame;
* */
class TaskView : public ExerciseBase
{
- Q_OBJECT
+ TQ_OBJECT
public:
diff --git a/kbruch/src/taskwidget.h b/kbruch/src/taskwidget.h
index 117acff3..1644ca87 100644
--- a/kbruch/src/taskwidget.h
+++ b/kbruch/src/taskwidget.h
@@ -27,10 +27,6 @@
#include <tqwidget.h>
-/** important for add_sub and mul_div */
-#define YES 1
-#define NO 0
-
/** important for op_vector */
#define ADD 0
#define SUB 1
@@ -42,7 +38,7 @@
* \author Sebastian Stein */
class TaskWidget : public FractionBaseWidget
{
- Q_OBJECT
+ TQ_OBJECT
public:
diff --git a/kbruch/testcases/Makefile.am b/kbruch/testcases/Makefile.am
index b2389856..5f4f8094 100644
--- a/kbruch/testcases/Makefile.am
+++ b/kbruch/testcases/Makefile.am
@@ -5,7 +5,7 @@ kbruch_test_SOURCES = task.cpp ratio.cpp ratio_test.cpp primenumber.cpp primenum
kbruch_test_LDADD = -lboost_unit_test_framework-gcc $(LIB_TDEUI)
# the library search path.
-kbruch_test_LDFLAGS = $(all_libraries) $(KDE_RPATH) $(LIB_QT) -lDCOP $(LIB_TDECORE) $(LIB_TDEUI) -ltdefx $(LIB_TDEIO) -ltdetexteditor
+kbruch_test_LDFLAGS = $(all_libraries) $(KDE_RPATH) $(LIB_TQT) -lDCOP $(LIB_TDECORE) $(LIB_TDEUI) -ltdefx $(LIB_TDEIO) -ltdetexteditor
EXTRA_DIST = primenumber.cpp primenumber.h ratio.cpp ratio.h task.cpp task.h primenumber_test.cpp ratio_test.cpp kbruch_test.cpp