diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/abakuslistview.cpp | 2 | ||||
-rw-r--r-- | src/dragsupport.cpp | 2 | ||||
-rw-r--r-- | src/editor.cpp | 22 | ||||
-rw-r--r-- | src/editor.h | 6 | ||||
-rw-r--r-- | src/evaluator.cpp | 2 | ||||
-rw-r--r-- | src/mainwindow.cpp | 36 | ||||
-rw-r--r-- | src/mainwindow.h | 2 | ||||
-rw-r--r-- | src/node.cpp | 14 | ||||
-rw-r--r-- | src/node.h | 4 | ||||
-rw-r--r-- | src/numerictypes.cpp | 4 | ||||
-rw-r--r-- | src/parser.yy | 30 | ||||
-rw-r--r-- | src/resultlistview.cpp | 4 | ||||
-rw-r--r-- | src/resultlistviewtext.cpp | 6 | ||||
-rw-r--r-- | src/rpnmuncher.cpp | 4 |
14 files changed, 69 insertions, 69 deletions
diff --git a/src/abakuslistview.cpp b/src/abakuslistview.cpp index 477623b..b6b933e 100644 --- a/src/abakuslistview.cpp +++ b/src/abakuslistview.cpp @@ -132,7 +132,7 @@ ValueListViewItem::ValueListViewItem(TQListView *listView, const TQString &name, void ValueListViewItem::valueChanged() { setText(1, m_value.toString()); - repaint(); + tqrepaint(); } void ValueListViewItem::valueChanged(const Abakus::number_t &newValue) diff --git a/src/dragsupport.cpp b/src/dragsupport.cpp index b506d2c..f597022 100644 --- a/src/dragsupport.cpp +++ b/src/dragsupport.cpp @@ -23,7 +23,7 @@ #include <tqpainter.h> #include <tqcolor.h> #include <tqfont.h> -#include <brush.h> +#include <tqbrush.h> #include <tqfontmetrics.h> #include "dragsupport.h" diff --git a/src/editor.cpp b/src/editor.cpp index 3fc3a00..470198b 100644 --- a/src/editor.cpp +++ b/src/editor.cpp @@ -147,7 +147,7 @@ void ChoiceItem::paint( TQPainter* painter ) //int xPos = fm.width( item ); int xPos = TQMAX(fm.width(item), minNameWidth); if( !isSelected() ) - painter->setPen( listBox()->palette().disabled().text().dark() ); + painter->setPen( listBox()->tqpalette().disabled().text().dark() ); painter->drawText( 10 + xPos, yPos, desc ); } @@ -161,7 +161,7 @@ int EditorHighlighter::highlightParagraph ( const TQString & text, int ) { if( !editor->isSyntaxHighlightEnabled() ) { - setFormat( 0, text.length(), editor->colorGroup().text() ); + setFormat( 0, text.length(), editor->tqcolorGroup().text() ); return 0; } @@ -224,7 +224,7 @@ Editor::Editor( TQWidget* parent, const char* name ): d->autoCalcTimer = new TQTimer( this ); d->matchingTimer = new TQTimer( this ); - setSizePolicy( TQSizePolicy::Expanding, TQSizePolicy::Fixed ); + tqsetSizePolicy( TQSizePolicy::Expanding, TQSizePolicy::Fixed ); setWordWrap( NoWrap ); setHScrollBarMode( AlwaysOff ); setVScrollBarMode( AlwaysOff ); @@ -261,7 +261,7 @@ Editor::~Editor() delete d; } -TQSize Editor::sizeHint() const +TQSize Editor::tqsizeHint() const { constPolish(); TQFontMetrics fm = fontMetrics(); @@ -503,7 +503,7 @@ void Editor::triggerAutoComplete() TQStringList choices; for( unsigned i=0; i<fnames.count(); i++ ) - if( fnames[i].startsWith( id, false ) ) + if( fnames[i].tqstartsWith( id, false ) ) { TQString str = fnames[i]; @@ -521,13 +521,13 @@ void Editor::triggerAutoComplete() TQStringList values = ValueManager::instance()->valueNames(); for(TQStringList::ConstIterator it = values.begin(); it != values.end(); ++it) - if( (*it).startsWith( id, false ) ) + if( (*it).tqstartsWith( id, false ) ) { TQString choice = ValueManager::description(*it); if(choice.isEmpty()) choice = ValueManager::instance()->value(*it).toString(); - vchoices.append( TQString("%1:%2").arg( *it, choice ) ); + vchoices.append( TQString("%1:%2").tqarg( *it, choice ) ); } vchoices.sort(); @@ -627,7 +627,7 @@ void Editor::autoCalc() Abakus::number_t result = parseString(str.latin1()); if( Result::lastResult()->type() == Result::Value ) { - TQString ss = TQString("Result: <b>%2</b>").arg(result.toString()); + TQString ss = TQString("Result: <b>%2</b>").tqarg(result.toString()); d->autoCalcLabel->setText( ss ); d->autoCalcLabel->adjustSize(); @@ -758,11 +758,11 @@ EditorCompletion::EditorCompletion( Editor* editor ): TQObject( editor ) d = new Private; d->editor = editor; - d->completionPopup = new TQVBox( editor->topLevelWidget(), 0, WType_Popup ); + d->completionPopup = new TQVBox( editor->tqtopLevelWidget(), 0, WType_Popup ); d->completionPopup->setFrameStyle( TQFrame::Box | TQFrame::Plain ); d->completionPopup->setLineWidth( 1 ); d->completionPopup->installEventFilter( this ); - d->completionPopup->setSizePolicy( TQSizePolicy::Expanding, TQSizePolicy::Minimum); + d->completionPopup->tqsetSizePolicy( TQSizePolicy::Expanding, TQSizePolicy::Minimum); d->completionListBox = new TQListBox( d->completionPopup ); d->completionPopup->setFocusProxy( d->completionListBox ); @@ -843,7 +843,7 @@ void EditorCompletion::showCompletion( const TQStringList &choices ) // size of the pop-up d->completionPopup->setMaximumHeight( 120 ); - d->completionPopup->resize( d->completionListBox->sizeHint() + + d->completionPopup->resize( d->completionListBox->tqsizeHint() + TQSize( d->completionListBox->verticalScrollBar()->width() + 4, d->completionListBox->horizontalScrollBar()->height() + 4 ) ); diff --git a/src/editor.h b/src/editor.h index 7984910..3f7035a 100644 --- a/src/editor.h +++ b/src/editor.h @@ -25,7 +25,7 @@ #include <tqobject.h> #include <tqstringlist.h> -#include <textedit.h> +#include <tqtextedit.h> #include "hmath.h" @@ -49,8 +49,8 @@ class Editor : public TQTextEdit Editor( TQWidget* parent = 0, const char* name = 0 ); ~Editor(); - TQSize sizeHint() const; - TQSize xminimumSizeHint() const; + TQSize tqsizeHint() const; + TQSize xtqminimumSizeHint() const; TQStringList history() const; void setHistory( const TQStringList& history ); diff --git a/src/evaluator.cpp b/src/evaluator.cpp index 92e64d4..0bea1f3 100644 --- a/src/evaluator.cpp +++ b/src/evaluator.cpp @@ -140,7 +140,7 @@ static Token::Op matchOperator( const TQString& text ) if( text.length() == 1 ) { TQChar p = text[0]; - switch( p.unicode() ) + switch( p.tqunicode() ) { case '+': result = Token::Plus; break; case '-': result = Token::Minus; break; diff --git a/src/mainwindow.cpp b/src/mainwindow.cpp index ca2f10f..613f513 100644 --- a/src/mainwindow.cpp +++ b/src/mainwindow.cpp @@ -31,7 +31,7 @@ #include <kactionclasses.h> #include <kinputdialog.h> -#include <layout.h> +#include <tqlayout.h> #include <tqvbox.h> #include <tqhbox.h> #include <tqradiobutton.h> @@ -54,20 +54,20 @@ MainWindow::MainWindow() : KMainWindow(0, "abakus-mainwindow"), m_popup(0), m_in { m_mainSplitter = new TQSplitter(this); TQWidget *box = new TQWidget(m_mainSplitter); - TQVBoxLayout *layout = new TQVBoxLayout(box); - m_layout = layout; - layout->setSpacing(6); - layout->setMargin(6); + TQVBoxLayout *tqlayout = new TQVBoxLayout(box); + m_layout = tqlayout; + tqlayout->setSpacing(6); + tqlayout->setMargin(6); TQWidget *configBox = new TQWidget(box); - layout->addWidget(configBox); + tqlayout->addWidget(configBox); TQHBoxLayout *configLayout = new TQHBoxLayout(configBox); configLayout->addWidget(new TQWidget(configBox)); TQLabel *label = new TQLabel(i18n("History: "), configBox); - label->setAlignment(AlignCenter); + label->tqsetAlignment(AlignCenter); configLayout->addWidget(label); TQButtonGroup *buttonGroup = new TQButtonGroup(0); @@ -90,7 +90,7 @@ MainWindow::MainWindow() : KMainWindow(0, "abakus-mainwindow"), m_popup(0), m_in connect(m_radians, TQT_SIGNAL(clicked()), TQT_SLOT(slotRadians())); m_history = new TQVBox(box); - layout->addWidget(m_history); + tqlayout->addWidget(m_history); m_history->setSpacing(6); m_history->setMargin(0); @@ -103,10 +103,10 @@ MainWindow::MainWindow() : KMainWindow(0, "abakus-mainwindow"), m_popup(0), m_in TQT_SLOT(slotResultSelected(const TQString &))); m_history->setStretchFactor(m_result, 1); - layout->setStretchFactor(m_history, 1); + tqlayout->setStretchFactor(m_history, 1); TQHBox *editBox = new TQHBox(box); - layout->addWidget(editBox); + tqlayout->addWidget(editBox); editBox->setSpacing(6); m_edit = new Editor(editBox); @@ -222,7 +222,7 @@ void MainWindow::slotReturnPressed() } else { m_insert = false; - resultVal = i18n("Error: %1").arg(RPNParser::errorString()); + resultVal = i18n("Error: %1").tqarg(RPNParser::errorString()); } // Skip creating list view items if in compact mode. @@ -318,7 +318,7 @@ void MainWindow::slotUpdateSize() if(m_newSize != TQSize(0, 0)) resize(m_newSize); else - resize(width(), minimumSize().height()); + resize(width(), tqminimumSize().height()); } void MainWindow::slotDegrees() @@ -454,8 +454,8 @@ void MainWindow::saveConfig() continue; list += TQString("%1=%2") - .arg(*it) - .arg(ValueManager::instance()->value(*it).toString()); + .tqarg(*it) + .tqarg(ValueManager::instance()->value(*it).toString()); } config.writeEntry("Saved Variables", list); @@ -492,7 +492,7 @@ void MainWindow::saveConfig() TQString var = manager->function(*it)->userFn->varName; TQString expr = fn->operand()->infixString(); - saveList += TQString("set %1(%2) = %3").arg(*it).arg(var).arg(expr); + saveList += TQString("set %1(%2) = %3").tqarg(*it).tqarg(var).tqarg(expr); } config.writeEntry("FunctionList", saveList); @@ -631,7 +631,7 @@ void MainWindow::slotNewFunction(const TQString &name) { UserFunction *userFn = FunctionManager::instance()->function(name)->userFn; UnaryFunction *fn = dynamic_cast<UnaryFunction *>(userFn->fn); - TQString fnName = TQString("%1(%2)").arg(name, userFn->varName); + TQString fnName = TQString("%1(%2)").tqarg(name, userFn->varName); TQString expr = fn->operand()->infixString(); new KListViewItem(m_fnList, fnName, expr); @@ -640,7 +640,7 @@ void MainWindow::slotNewFunction(const TQString &name) void MainWindow::slotRemoveFunction(const TQString &name) { UserFunction *userFn = FunctionManager::instance()->function(name)->userFn; - TQString fnName = TQString("%1(%2)").arg(name, userFn->varName); + TQString fnName = TQString("%1(%2)").tqarg(name, userFn->varName); TQListViewItem *item = 0; while((item = m_fnList->findItem(fnName, 0)) != 0) @@ -714,7 +714,7 @@ TQString MainWindow::interpolateExpression(const TQString &text, ResultListViewT unsigned numPos = stackStr.mid(1).toUInt(); if(!m_result->getStackValue(numPos, value)) { - new ResultListViewText(m_result, text, i18n("Marker %1 isn't set").arg(stackStr), after, true); + new ResultListViewText(m_result, text, i18n("Marker %1 isn't set").tqarg(stackStr), after, true); return TQString(); } diff --git a/src/mainwindow.h b/src/mainwindow.h index 1e0d977..5ff9c95 100644 --- a/src/mainwindow.h +++ b/src/mainwindow.h @@ -42,7 +42,7 @@ class ResultListViewText; class AbakusIface; -// Main window class, handles events and layout and stuff +// Main window class, handles events and tqlayout and stuff class MainWindow : public KMainWindow { Q_OBJECT diff --git a/src/node.cpp b/src/node.cpp index 99b544d..556bde3 100644 --- a/src/node.cpp +++ b/src/node.cpp @@ -64,7 +64,7 @@ void UnaryFunction::applyMap(NodeFunctor &fn) const TQString UnaryFunction::infixString() const { - return TQString("%1(%2)").arg(name(), operand()->infixString()); + return TQString("%1(%2)").tqarg(name(), operand()->infixString()); } BuiltinFunction::BuiltinFunction(const char *name, Node *operand) : @@ -210,7 +210,7 @@ void DerivativeFunction::applyMap(NodeFunctor &fn) const TQString DerivativeFunction::infixString() const { - return TQString("deriv(%1, %2)").arg(m_operand->infixString(), m_where->infixString()); + return TQString("deriv(%1, %2)").tqarg(m_operand->infixString(), m_where->infixString()); } UnaryOperator::UnaryOperator(Type type, Node *operand) @@ -233,9 +233,9 @@ void UnaryOperator::applyMap(NodeFunctor &fn) const TQString UnaryOperator::infixString() const { if(dynamic_cast<BinaryOperator *>(operand())) - return TQString("-(%1)").arg(operand()->infixString()); + return TQString("-(%1)").tqarg(operand()->infixString()); - return TQString("-%1").arg(operand()->infixString()); + return TQString("-%1").tqarg(operand()->infixString()); } Abakus::number_t UnaryOperator::derivative() const @@ -312,10 +312,10 @@ TQString BinaryOperator::infixString() const op = "Error"; } - TQString left = TQString(isSimpleNode(leftNode()) ? "%1" : "(%1)").arg(leftNode()->infixString()); - TQString right = TQString(isSimpleNode(rightNode()) ? "%1" : "(%1)").arg(rightNode()->infixString()); + TQString left = TQString(isSimpleNode(leftNode()) ? "%1" : "(%1)").tqarg(leftNode()->infixString()); + TQString right = TQString(isSimpleNode(rightNode()) ? "%1" : "(%1)").tqarg(rightNode()->infixString()); - return TQString("%1 %2 %3").arg(left, op, right); + return TQString("%1 %2 %3").tqarg(left, op, right); } Abakus::number_t BinaryOperator::derivative() const @@ -31,7 +31,7 @@ typedef SharedPtr<Node> NodePtr; /** * A class that operates on a Node. Called recursively on a node and all - * of its children. + * of its tqchildren. */ class NodeFunctor { @@ -50,7 +50,7 @@ class Node // typically read-only. virtual void deleteNode(Node *node); - // Calls functor() on all subchildren and this. + // Calls functor() on all subtqchildren and this. virtual void applyMap(NodeFunctor &fn) const = 0; // Returns an infix representation of the expression. diff --git a/src/numerictypes.cpp b/src/numerictypes.cpp index 706e554..b7d607d 100644 --- a/src/numerictypes.cpp +++ b/src/numerictypes.cpp @@ -78,7 +78,7 @@ TQString convertToString(const mpfr_ptr &number) if(r.isEmpty()) r = "0"; - r.append(TQString("e%1").arg(exp - 1)); + r.append(TQString("e%1").tqarg(exp - 1)); return sign + l + decimalSymbol + r; } @@ -190,7 +190,7 @@ TQString convertToString(const HNumber &num) str.truncate(str.length() - 1); // Remove trailing period. if(parts.count() > 1 && parts[1] != "0") - str += TQString("e%1").arg(parts[1]); + str += TQString("e%1").tqarg(parts[1]); return str; } diff --git a/src/parser.yy b/src/parser.yy index 6978cc1..b24dafb 100644 --- a/src/parser.yy +++ b/src/parser.yy @@ -100,7 +100,7 @@ S: error '=' { // Can't assign to a function. S: FUNC '=' { - TQString s(i18n("You can't assign to function %1").arg($1->name())); + TQString s(i18n("You can't assign to function %1").tqarg($1->name())); Result::setLastResult(s); YYABORT; @@ -116,14 +116,14 @@ ASSIGN: '(' { --gCheckIdents; } IDENT ')' '=' { // since normally functions and variables with the same name can coexist, but // I don't want to duplicate code all over the place. S: SET DERIV { - TQString s(i18n("Function %1 is built-in and cannot be overridden.").arg("deriv")); + TQString s(i18n("Function %1 is built-in and cannot be overridden.").tqarg("deriv")); Result::setLastResult(s); YYABORT; } S: DERIV '=' { - TQString s(i18n("Function %1 is built-in and cannot be overridden.").arg("deriv")); + TQString s(i18n("Function %1 is built-in and cannot be overridden.").tqarg("deriv")); Result::setLastResult(s); YYABORT; @@ -139,7 +139,7 @@ S: SET FUNC ASSIGN EXP { FunctionManager *manager = FunctionManager::instance(); if(manager->isFunction(funcName) && !manager->isFunctionUserDefined(funcName)) { - TQString s(i18n("Function %1 is built-in and cannot be overridden.").arg(funcName)); + TQString s(i18n("Function %1 is built-in and cannot be overridden.").tqarg(funcName)); Result::setLastResult(s); YYABORT; @@ -150,7 +150,7 @@ S: SET FUNC ASSIGN EXP { BaseFunction *newFn = new UserDefinedFunction(funcName.ascii(), $4); if(!manager->addFunction(newFn, ident)) { - TQString s(i18n("Unable to define function %1 because it is recursive.").arg(funcName)); + TQString s(i18n("Unable to define function %1 because it is recursive.").tqarg(funcName)); Result::setLastResult(s); YYABORT; @@ -188,14 +188,14 @@ S: REMOVE FUNC '(' ')' { // Can't remove an ident using remove-func syntax. S: REMOVE IDENT '(' ')' { // This is an error - Result::setLastResult(Result(i18n("Function %1 is not defined.").arg($2->name()))); + Result::setLastResult(Result(i18n("Function %1 is not defined.").tqarg($2->name()))); YYABORT; } // This happens when the user tries to remove a function that's not defined. S: REMOVE IDENT '(' IDENT ')' { // This is an error - Result::setLastResult(Result(i18n("Function %1 is not defined.").arg($2->name()))); + Result::setLastResult(Result(i18n("Function %1 is not defined.").tqarg($2->name()))); YYABORT; } @@ -211,9 +211,9 @@ S: REMOVE IDENT { else { TQString s; if(manager->isValueSet($2->name())) - s = i18n("Can't remove predefined variable %1.").arg($2->name()); + s = i18n("Can't remove predefined variable %1.").tqarg($2->name()); else - s = i18n("Can't remove undefined variable %1.").arg($2->name()); + s = i18n("Can't remove undefined variable %1.").tqarg($2->name()); Result::setLastResult(s); @@ -228,7 +228,7 @@ S: SET IDENT '=' EXP { if($2->name() == "pi" && $4->value() == Abakus::number_t("3.0")) Result::setLastResult(i18n("This isn't Indiana, you can't just change pi")); else - Result::setLastResult(i18n("%1 is a constant").arg($2->name())); + Result::setLastResult(i18n("%1 is a constant").tqarg($2->name())); YYABORT; } @@ -247,7 +247,7 @@ S: IDENT '=' EXP { if($1->name() == "pi" && $3->value() == Abakus::number_t("3.0")) Result::setLastResult(i18n("This isn't Indiana, you can't just change pi")); else - Result::setLastResult(i18n("%1 is a constant").arg($1->name())); + Result::setLastResult(i18n("%1 is a constant").tqarg($1->name())); YYABORT; } @@ -259,13 +259,13 @@ S: IDENT '=' EXP { } S: NUMBER '=' { - Result::setLastResult(i18n("Can't assign to %1").arg($1->value().toString())); + Result::setLastResult(i18n("Can't assign to %1").tqarg($1->value().toString())); YYABORT; } // Can't call this as a function. TERM: IDENT '(' { - Result::setLastResult(i18n("%1 isn't a function (or operator expected)").arg($1->name())); + Result::setLastResult(i18n("%1 isn't a function (or operator expected)").tqarg($1->name())); YYABORT; } @@ -351,7 +351,7 @@ TERM: NUMBER '(' EXP ')' { TERM: NUMBER IDENT { if(gCheckIdents > 0 && !ValueManager::instance()->isValueSet($2->name())) { - Result::setLastResult(i18n("Unknown variable %1").arg($2->name())); + Result::setLastResult(i18n("Unknown variable %1").tqarg($2->name())); YYABORT; } @@ -362,7 +362,7 @@ VALUE: IDENT { if(gCheckIdents <= 0 || ValueManager::instance()->isValueSet($1->name())) $$ = $1; else { - Result::setLastResult(i18n("Unknown variable %1").arg($1->name())); + Result::setLastResult(i18n("Unknown variable %1").tqarg($1->name())); YYABORT; } } diff --git a/src/resultlistview.cpp b/src/resultlistview.cpp index 881ea38..7ad48c7 100644 --- a/src/resultlistview.cpp +++ b/src/resultlistview.cpp @@ -20,7 +20,7 @@ #include <kpopupmenu.h> #include <klocale.h> -#include <clipboard.h> +#include <tqclipboard.h> #include <tqapplication.h> #include <tqevent.h> #include <tqcursor.h> @@ -129,7 +129,7 @@ void ResultListView::slotCopyResult() if(!m_itemRightClicked) return; - TQClipboard *clipboard = TQApplication::clipboard(); + TQClipboard *clipboard = TQApplication::tqclipboard(); clipboard->setText(m_itemRightClicked->resultText(), TQClipboard::Clipboard); } diff --git a/src/resultlistviewtext.cpp b/src/resultlistviewtext.cpp index 5f49edf..946dc82 100644 --- a/src/resultlistviewtext.cpp +++ b/src/resultlistviewtext.cpp @@ -22,7 +22,7 @@ #include <tqpainter.h> #include <tqfontmetrics.h> #include <tqfont.h> -#include <palette.h> +#include <tqpalette.h> #include "resultlistviewtext.h" @@ -54,7 +54,7 @@ ResultListViewText::ResultListViewText(KListView *listView, for (; item && item != this; item = static_cast<ResultListViewText *>(item->itemBelow())) { if(!item->wasError()) { item->setStackPosition(item->stackPosition() + 1); - item->repaint(); + item->tqrepaint(); } } } @@ -67,7 +67,7 @@ ResultListViewText::ResultListViewText(KListView *listView, void ResultListViewText::setStackPosition(unsigned pos) { - setText(ShortcutColumn, TQString("$%1").arg(pos)); + setText(ShortcutColumn, TQString("$%1").tqarg(pos)); m_stackPosition = pos; } diff --git a/src/rpnmuncher.cpp b/src/rpnmuncher.cpp index 6a64eea..94cbd92 100644 --- a/src/rpnmuncher.cpp +++ b/src/rpnmuncher.cpp @@ -115,7 +115,7 @@ Abakus::number_t RPNParser::rpnParseString(const TQString &text) case Func: if(m_stack.count() < 1) { m_error = true; - m_errorStr = i18n("Insufficient operands for function %1").arg(*it); + m_errorStr = i18n("Insufficient operands for function %1").tqarg(*it); return Abakus::number_t::nan(); } @@ -150,7 +150,7 @@ Abakus::number_t RPNParser::rpnParseString(const TQString &text) case Unknown: m_error = true; - m_errorStr = i18n("Unknown token %1").arg(*it); + m_errorStr = i18n("Unknown token %1").tqarg(*it); return Abakus::number_t::nan(); break; |