summaryrefslogtreecommitdiffstats
path: root/kcalc
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-08-10 06:08:18 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-08-10 06:08:18 +0000
commit6335dc55802871b5a43492f217b6edbb420204c4 (patch)
tree50c6c8672a52687568edea475614dfe3d98e62e5 /kcalc
parent9b8c9f1f9e974ff0176108cfbd8852cd99ea68c8 (diff)
downloadtdeutils-6335dc55802871b5a43492f217b6edbb420204c4.tar.gz
tdeutils-6335dc55802871b5a43492f217b6edbb420204c4.zip
rename the following methods:
tqfind find tqreplace replace tqcontains contains git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdeutils@1246075 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'kcalc')
-rw-r--r--kcalc/kcalc.cpp66
-rw-r--r--kcalc/kcalc.h2
-rw-r--r--kcalc/kcalc_button.cpp10
-rw-r--r--kcalc/knumber/knumber.cpp4
4 files changed, 41 insertions, 41 deletions
diff --git a/kcalc/kcalc.cpp b/kcalc/kcalc.cpp
index a10b98d..0a68046 100644
--- a/kcalc/kcalc.cpp
+++ b/kcalc/kcalc.cpp
@@ -258,42 +258,42 @@ KCalculator::KCalculator(TQWidget *tqparent, const char *name)
smallBtnLayout->addWidget(pbScientific["HypMode"], 0, 1);
smallBtnLayout->addWidget(pbLogic["AND"], 0, 2);
smallBtnLayout->addWidget(pbMod, 0, 3);
- smallBtnLayout->addWidget(NumButtonGroup->tqfind(0xA), 0, 4);
+ smallBtnLayout->addWidget(NumButtonGroup->find(0xA), 0, 4);
smallBtnLayout->addWidget(pbConstant[0], 0, 5);
smallBtnLayout->addWidget(pbStat["Mean"], 1, 0);
smallBtnLayout->addWidget(pbScientific["Sine"], 1, 1);
smallBtnLayout->addWidget(pbLogic["OR"], 1, 2);
smallBtnLayout->addWidget(pbReci, 1, 3);
- smallBtnLayout->addWidget(NumButtonGroup->tqfind(0xB), 1, 4);
+ smallBtnLayout->addWidget(NumButtonGroup->find(0xB), 1, 4);
smallBtnLayout->addWidget(pbConstant[1], 1, 5);
smallBtnLayout->addWidget(pbStat["StandardDeviation"], 2, 0);
smallBtnLayout->addWidget(pbScientific["Cosine"], 2, 1);
smallBtnLayout->addWidget(pbLogic["XOR"], 2, 2);
smallBtnLayout->addWidget(pbFactorial, 2, 3);
- smallBtnLayout->addWidget(NumButtonGroup->tqfind(0xC), 2, 4);
+ smallBtnLayout->addWidget(NumButtonGroup->find(0xC), 2, 4);
smallBtnLayout->addWidget(pbConstant[2], 2, 5);
smallBtnLayout->addWidget(pbStat["Median"], 3, 0);
smallBtnLayout->addWidget(pbScientific["Tangent"], 3, 1);
smallBtnLayout->addWidget(pbLogic["LeftShift"], 3, 2);
smallBtnLayout->addWidget(pbSquare, 3, 3);
- smallBtnLayout->addWidget(NumButtonGroup->tqfind(0xD), 3, 4);
+ smallBtnLayout->addWidget(NumButtonGroup->find(0xD), 3, 4);
smallBtnLayout->addWidget(pbConstant[3], 3, 5);
smallBtnLayout->addWidget(pbStat["InputData"], 4, 0);
smallBtnLayout->addWidget(pbScientific["Log10"], 4, 1);
smallBtnLayout->addWidget(pbLogic["RightShift"], 4, 2);
smallBtnLayout->addWidget(pbRoot, 4, 3);
- smallBtnLayout->addWidget(NumButtonGroup->tqfind(0xE), 4, 4);
+ smallBtnLayout->addWidget(NumButtonGroup->find(0xE), 4, 4);
smallBtnLayout->addWidget(pbConstant[4], 4, 5);
smallBtnLayout->addWidget(pbStat["ClearData"], 5, 0);
smallBtnLayout->addWidget(pbScientific["LogNatural"], 5, 1);
smallBtnLayout->addWidget(pbLogic["One-Complement"], 5, 2);
smallBtnLayout->addWidget(pbPower, 5, 3);
- smallBtnLayout->addWidget(NumButtonGroup->tqfind(0xF), 5, 4);
+ smallBtnLayout->addWidget(NumButtonGroup->find(0xF), 5, 4);
smallBtnLayout->addWidget(pbConstant[5], 5, 5);
smallBtnLayout->setRowStretch(0, 0);
@@ -614,22 +614,22 @@ TQWidget* KCalculator::setupNumericKeys(TQWidget *tqparent)
thisLayout->addWidget(pbX, 0, 2);
thisLayout->addWidget(pbMinus, 0, 3);
- thisLayout->addWidget(NumButtonGroup->tqfind(7), 1, 0);
- thisLayout->addWidget(NumButtonGroup->tqfind(8), 1, 1);
- thisLayout->addWidget(NumButtonGroup->tqfind(9), 1, 2);
+ thisLayout->addWidget(NumButtonGroup->find(7), 1, 0);
+ thisLayout->addWidget(NumButtonGroup->find(8), 1, 1);
+ thisLayout->addWidget(NumButtonGroup->find(9), 1, 2);
thisLayout->addMultiCellWidget(pbPlus, 1, 2, 3, 3);
- thisLayout->addWidget(NumButtonGroup->tqfind(4), 2, 0);
- thisLayout->addWidget(NumButtonGroup->tqfind(5), 2, 1);
- thisLayout->addWidget(NumButtonGroup->tqfind(6), 2, 2);
+ thisLayout->addWidget(NumButtonGroup->find(4), 2, 0);
+ thisLayout->addWidget(NumButtonGroup->find(5), 2, 1);
+ thisLayout->addWidget(NumButtonGroup->find(6), 2, 2);
//thisLayout->addMultiCellWidget(pbPlus, 1, 2, 3, 3);
- thisLayout->addWidget(NumButtonGroup->tqfind(1), 3, 0);
- thisLayout->addWidget(NumButtonGroup->tqfind(2), 3, 1);
- thisLayout->addWidget(NumButtonGroup->tqfind(3), 3, 2);
+ thisLayout->addWidget(NumButtonGroup->find(1), 3, 0);
+ thisLayout->addWidget(NumButtonGroup->find(2), 3, 1);
+ thisLayout->addWidget(NumButtonGroup->find(3), 3, 2);
thisLayout->addMultiCellWidget(pbEqual, 3, 4, 3, 3);
- thisLayout->addMultiCellWidget(NumButtonGroup->tqfind(0), 4, 4, 0, 1);
+ thisLayout->addMultiCellWidget(NumButtonGroup->find(0), 4, 4, 0, 1);
thisLayout->addWidget(pbPeriod, 4, 2);
//thisLayout->addMultiCellWidget(pbEqual, 3, 4, 3, 3);
@@ -1060,11 +1060,11 @@ void KCalculator::updateGeometry(void)
l = mLargePage->childrenListObject();
- int h1 = (NumButtonGroup->tqfind(0x0F))->tqminimumSize().height();
+ int h1 = (NumButtonGroup->find(0x0F))->tqminimumSize().height();
int h2 = static_cast<int>( (static_cast<float>(h1) + 4.0) / 5.0 );
s.setWidth(mLargePage->fontMetrics().width("MMM") +
TQApplication::tqstyle().
- tqpixelMetric(TQStyle::PM_ButtonMargin, NumButtonGroup->tqfind(0x0F))*2);
+ tqpixelMetric(TQStyle::PM_ButtonMargin, NumButtonGroup->find(0x0F))*2);
s.setHeight(h1 + h2);
for(uint i = 0; i < l.count(); i++)
@@ -1087,11 +1087,11 @@ void KCalculator::updateGeometry(void)
l = mNumericPage->childrenListObject(); // silence please
- h1 = (NumButtonGroup->tqfind(0x0F))->tqminimumSize().height();
+ h1 = (NumButtonGroup->find(0x0F))->tqminimumSize().height();
h2 = (int)((((float)h1 + 4.0) / 5.0));
s.setWidth(mLargePage->fontMetrics().width("MMM") +
TQApplication::tqstyle().
- tqpixelMetric(TQStyle::PM_ButtonMargin, NumButtonGroup->tqfind(0x0F))*2);
+ tqpixelMetric(TQStyle::PM_ButtonMargin, NumButtonGroup->find(0x0F))*2);
s.setHeight(h1 + h2);
for(uint i = 0; i < l.count(); i++)
@@ -1109,7 +1109,7 @@ void KCalculator::updateGeometry(void)
// Set Buttons of double size
TQSize t(s);
t.setWidth(2*s.width());
- NumButtonGroup->tqfind(0x00)->setFixedSize(t);
+ NumButtonGroup->find(0x00)->setFixedSize(t);
t = s;
t.setHeight(2*s.height());
pbEqual->setFixedSize(t);
@@ -1151,11 +1151,11 @@ void KCalculator::slotBaseSelected(int base)
// Enable the buttons not available in this base
for (int i=0; i<current_base; i++)
- NumButtonGroup->tqfind(i)->setEnabled (true);
+ NumButtonGroup->find(i)->setEnabled (true);
// Disable the buttons not available in this base
for (int i=current_base; i<16; i++)
- NumButtonGroup->tqfind(i)->setEnabled (false);
+ NumButtonGroup->find(i)->setEnabled (false);
// Only enable the decimal point in decimal
pbPeriod->setEnabled(current_base == NB_DECIMAL);
@@ -2006,7 +2006,7 @@ void KCalculator::slotLogicshow(bool toggled)
resetBase();
BaseChooseGroup->show();
for (int i=10; i<16; i++)
- (NumButtonGroup->tqfind(i))->show();
+ (NumButtonGroup->find(i))->show();
}
else
{
@@ -2023,7 +2023,7 @@ void KCalculator::slotLogicshow(bool toggled)
statusBar()->removeItem(1);
calc_display->setStatusText(1, TQString());
for (int i=10; i<16; i++)
- (NumButtonGroup->tqfind(i))->hide();
+ (NumButtonGroup->find(i))->hide();
}
adjustSize();
setFixedSize(tqsizeHint());
@@ -2144,7 +2144,7 @@ void KCalculator::set_colors()
TQPalette numPal(KCalcSettings::numberButtonsColor(), bg);
for(int i=0; i<10; i++)
{
- (NumButtonGroup->tqfind(i))->setPalette(numPal);
+ (NumButtonGroup->find(i))->setPalette(numPal);
}
TQPalette funcPal(KCalcSettings::functionButtonsColor(), bg);
@@ -2163,7 +2163,7 @@ void KCalculator::set_colors()
TQPalette hexPal(KCalcSettings::hexButtonsColor(), bg);
for(int i=10; i<16; i++)
{
- (NumButtonGroup->tqfind(i))->setPalette(hexPal);
+ (NumButtonGroup->find(i))->setPalette(hexPal);
}
TQPalette memPal(KCalcSettings::memoryButtonsColor(), bg);
@@ -2217,26 +2217,26 @@ bool KCalculator::eventFilter(TQObject *o, TQEvent *e)
// Was it hex-button or normal digit??
if (num_but <10)
for(int i=0; i<10; i++)
- (NumButtonGroup->tqfind(i))->setPalette(pal);
+ (NumButtonGroup->find(i))->setPalette(pal);
else
for(int i=10; i<16; i++)
- (NumButtonGroup->tqfind(i))->setPalette(pal);
+ (NumButtonGroup->find(i))->setPalette(pal);
return true;
}
- else if( mFunctionButtonList.tqfindRef((KCalcButton*)o) != -1)
+ else if( mFunctionButtonList.findRef((KCalcButton*)o) != -1)
{
list = &mFunctionButtonList;
}
- else if( mStatButtonList.tqfindRef((KCalcButton*)o) != -1)
+ else if( mStatButtonList.findRef((KCalcButton*)o) != -1)
{
list = &mStatButtonList;
}
- else if( mMemButtonList.tqfindRef((KCalcButton*)o) != -1)
+ else if( mMemButtonList.findRef((KCalcButton*)o) != -1)
{
list = &mMemButtonList;
}
- else if( mOperationButtonList.tqfindRef((KCalcButton*)o) != -1)
+ else if( mOperationButtonList.findRef((KCalcButton*)o) != -1)
{
list = &mOperationButtonList;
}
diff --git a/kcalc/kcalc.h b/kcalc/kcalc.h
index f135a3c..4cb058d 100644
--- a/kcalc/kcalc.h
+++ b/kcalc/kcalc.h
@@ -86,7 +86,7 @@ private:
void keyReleaseEvent(TQKeyEvent *e);
void set_precision();
void set_style();
- void resetBase(void) { (BaseChooseGroup->tqfind(1))->animateClick();};
+ void resetBase(void) { (BaseChooseGroup->find(1))->animateClick();};
void UpdateDisplay(bool get_amount_from_core = false,
bool store_result_in_history = false);
diff --git a/kcalc/kcalc_button.cpp b/kcalc/kcalc_button.cpp
index f9ddabc..8e69f6d 100644
--- a/kcalc/kcalc_button.cpp
+++ b/kcalc/kcalc_button.cpp
@@ -47,7 +47,7 @@ KCalcButton::KCalcButton(const TQString &label, TQWidget * tqparent,
void KCalcButton::addMode(ButtonModeFlags mode, TQString label, TQString tooltip, bool is_label_richtext)
{
- if (_mode.tqcontains(mode)) _mode.remove(mode);
+ if (_mode.contains(mode)) _mode.remove(mode);
_mode[mode] = ButtonMode(label, tooltip, is_label_richtext);
@@ -67,7 +67,7 @@ void KCalcButton::slotSetMode(ButtonModeFlags mode, bool flag)
return; // nothing to do
}
- if (_mode.tqcontains(new_mode)) {
+ if (_mode.contains(new_mode)) {
// save accel, because setting label erases accel
TQKeySequence _accel = accel();
@@ -92,7 +92,7 @@ void KCalcButton::slotSetMode(ButtonModeFlags mode, bool flag)
static TQString escape(TQString str)
{
- str.tqreplace('&', "&&");
+ str.replace('&', "&&");
return str;
}
@@ -128,7 +128,7 @@ void KCalcButton::drawButtonLabel(TQPainter *paint)
{
if (_show_accel_mode) {
KPushButton::drawButtonLabel(paint);
- } else if (_mode.tqcontains(_mode_flags)) {
+ } else if (_mode.contains(_mode_flags)) {
paintLabel(paint);
}
}
@@ -159,7 +159,7 @@ void KSquareButton::drawButtonLabel(TQPainter *paint)
{
if (_show_accel_mode) {
KPushButton::drawButtonLabel(paint);
- } else if (_mode.tqcontains(_mode_flags)) {
+ } else if (_mode.contains(_mode_flags)) {
paintLabel(paint);
}
}
diff --git a/kcalc/knumber/knumber.cpp b/kcalc/knumber/knumber.cpp
index 123fee7..a0fcaec 100644
--- a/kcalc/knumber/knumber.cpp
+++ b/kcalc/knumber/knumber.cpp
@@ -276,7 +276,7 @@ static void _inc_by_one(TQString &str, int position)
// Cut off if more digits in fractional part than 'precision'
static void _round(TQString &str, int precision)
{
- int decimalSymbolPos = str.tqfind('.');
+ int decimalSymbolPos = str.find('.');
if (decimalSymbolPos == -1)
if (precision == 0) return;
@@ -312,7 +312,7 @@ static void _round(TQString &str, int precision)
break;
}
- decimalSymbolPos = str.tqfind('.');
+ decimalSymbolPos = str.find('.');
str.truncate(decimalSymbolPos + precision + 1);
// if precision == 0 delete also '.'