diff options
Diffstat (limited to 'kwordquiz/src/kwordquizview.cpp')
-rw-r--r-- | kwordquiz/src/kwordquizview.cpp | 58 |
1 files changed, 29 insertions, 29 deletions
diff --git a/kwordquiz/src/kwordquizview.cpp b/kwordquiz/src/kwordquizview.cpp index 0096f591..6db0f3a9 100644 --- a/kwordquiz/src/kwordquizview.cpp +++ b/kwordquiz/src/kwordquizview.cpp @@ -15,7 +15,7 @@ * * ***************************************************************************/ -// include files for Qt +// include files for TQt #include <tqpainter.h> #include <tqtable.h> #include <tqclipboard.h> @@ -37,12 +37,12 @@ #include "dlgrc.h" #include "dlgspecchar.h" -TQValueList<WQUndo> *KWordQuizView::m_undoList = 0L; +TQValueList<WTQUndo> *KWordQuizView::m_undoList = 0L; -KWQTableItem::KWQTableItem(TQTable* table, EditType et, const TQString & text) : TQTableItem(table, et, text) +KWTQTableItem::KWTQTableItem(TQTable* table, EditType et, const TQString & text) : TQTableItem(table, et, text) {} -int KWQTableItem::alignment() const +int KWTQTableItem::tqalignment() const { bool num; bool ok1 = false; @@ -52,13 +52,13 @@ int KWQTableItem::alignment() const (void)text().toDouble(&ok2); num = ok1 || ok2; - return (num ? Qt::AlignRight : Qt::AlignAuto) | Qt::AlignVCenter; + return (num ? TQt::AlignRight : TQt::AlignAuto) | TQt::AlignVCenter; } -KWordQuizView::KWordQuizView(TQWidget *parent, const char *name) : TQTable(parent, name) +KWordQuizView::KWordQuizView(TQWidget *tqparent, const char *name) : TQTable(tqparent, name) { if(!m_undoList) - m_undoList = new TQValueList<WQUndo>(); + m_undoList = new TQValueList<WTQUndo>(); setNumCols(2); setNumRows(50); @@ -77,7 +77,7 @@ KWordQuizView::~KWordQuizView() KWordQuizDoc *KWordQuizView::getDocument() const { - KWordQuizApp *theApp=(KWordQuizApp *) parentWidget(); + KWordQuizApp *theApp=(KWordQuizApp *) tqparentWidget(); return theApp->getDocument(); } @@ -211,12 +211,12 @@ void KWordQuizView::doNewPage( TQPainter & painter, int res, int type ) if (type == 2) { - painter.drawText(card_marg, card_marg - 20, i18n("KWordQuiz - %1").arg(getDocument()->URL().fileName())); + painter.drawText(card_marg, card_marg - 20, i18n("KWordQuiz - %1").tqarg(getDocument()->URL().fileName())); return; } painter.drawLine(marg, marg, marg + cw0 + cw1 + cw2 + cw3, marg); - painter.drawText(marg, marg - 20, i18n("KWordQuiz - %1").arg(getDocument()->URL().fileName())); + painter.drawText(marg, marg - 20, i18n("KWordQuiz - %1").tqarg(getDocument()->URL().fileName())); if (type == 1) { @@ -284,16 +284,16 @@ bool KWordQuizView::gridIsEmpty() return true; } -TQWidget * KWordQuizView::beginEdit( int row, int col, bool replace ) +TQWidget * KWordQuizView::beginEdit( int row, int col, bool tqreplace ) { m_currentText = text(row, col); - cellEditor = TQTable::beginEdit(row, col, replace); + cellEditor = TQTable::beginEdit(row, col, tqreplace); if (cellEditor) cellEditor->installEventFilter(this); return cellEditor; } -void KWordQuizView::endEdit( int row, int col, bool accept, bool replace ) +void KWordQuizView::endEdit( int row, int col, bool accept, bool tqreplace ) { // this code gets called after enter and arrow keys, now we // only process if editing really has been done @@ -302,7 +302,7 @@ void KWordQuizView::endEdit( int row, int col, bool accept, bool replace ) { if (((TQLineEdit *) cellWidget(row, col))->text() != m_currentText) addUndo(i18n("&Undo Entry")); - TQTable::endEdit(row, col, accept, replace); //this will destroy the cellWidget + TQTable::endEdit(row, col, accept, tqreplace); //this will destroy the cellWidget if (!text(row, col).isEmpty()) { TQTableItem* itm; @@ -356,7 +356,7 @@ void KWordQuizView::doEditUndo( ) } else { - WQUndo undo; + WTQUndo undo; if (m_undoList->count() > 0) { setUpdatesEnabled(false); @@ -472,7 +472,7 @@ void KWordQuizView::doEditPaste( ) br= br + sl.count() - 1; if (lc == 0) //left col? - if (sl[0].find("\t") < ((int) sl[0].length() - 1)) + if (sl[0].tqfind("\t") < ((int) sl[0].length() - 1)) rc = 1; //expand to second column; uint i = 0; @@ -555,7 +555,7 @@ void KWordQuizView::doEditInsert( ) addSelection(TQTableSelection(m_currentSel.topRow(), m_currentSel.leftCol(), m_currentSel.bottomRow(), m_currentSel.rightCol())); setCurrentCell(m_currentRow, m_currentCol); setUpdatesEnabled(true); - repaintContents(); + tqrepaintContents(); getDocument()->setModified(true); } @@ -666,7 +666,7 @@ void KWordQuizView::doEditMarkBlank( ) st = st.prepend(delim_start); st = st.append(delim_end); int ss = l->selectionStart(); - s = s.replace(ss, len, st); + s = s.tqreplace(ss, len, st); l->setText(s); l->setSelection(ss, st.length()); } @@ -691,7 +691,7 @@ void KWordQuizView::doEditUnmarkBlank( ) s.remove(delim_start); s.remove(delim_end); int ss = l->selectionStart(); - ls = ls.replace(ss, len, s); + ls = ls.tqreplace(ss, len, s); l->setText(ls); l->setSelection(ss, s.length()); } @@ -702,15 +702,15 @@ void KWordQuizView::doEditUnmarkBlank( ) s = l->text(); int cs = l->cursorPosition(); - int fr = s.findRev(delim_start, cs); + int fr = s.tqfindRev(delim_start, cs); if (fr > 0) { - s = s.replace(fr, 1, ""); + s = s.tqreplace(fr, 1, ""); cs--; } - int ff = s.find(delim_end, cs); + int ff = s.tqfind(delim_end, cs); if (ff > 0) - s = s.replace(ff, 1, ""); + s = s.tqreplace(ff, 1, ""); l->setText(s); l->setCursorPosition(cs); @@ -805,7 +805,7 @@ void KWordQuizView::doVocabShuffle( ) addSelection(TQTableSelection(m_currentSel.topRow(), m_currentSel.leftCol(), m_currentSel.bottomRow(), m_currentSel.rightCol())); setCurrentCell(m_currentRow, m_currentCol); setUpdatesEnabled(true); - repaintContents(); + tqrepaintContents(); getDocument()->setModified(true); } @@ -870,7 +870,7 @@ void KWordQuizView::slotSpecChar(const TQChar & c) TQString s = l->selectedText(); int len = s.length(); int ss = l->selectionStart(); - ls = ls.replace(ss, len, c); + ls = ls.tqreplace(ss, len, c); l->setText(ls); l->setSelection(ss, 1); } @@ -966,7 +966,7 @@ void KWordQuizView::addUndo( const TQString & caption ) m_undoList->remove(m_undoList->begin()); } - WQUndo* undo = new WQUndo(); + WTQUndo* undo = new WTQUndo(); undo->setText(caption); undo->setFont(font()); undo->setColWidth0(verticalHeader()->width()); @@ -1008,7 +1008,7 @@ void KWordQuizView::paintCell( TQPainter * p, int row, int col, const TQRect & c if (Prefs::enableBlanks()) if (!checkForBlank(text(row, col), true)) - g.setColor(TQColorGroup::Text, Qt::red); + g.setColor(TQColorGroup::Text, TQt::red); TQTable::paintCell (p, row, col, cr, selected, g ); } @@ -1051,7 +1051,7 @@ void KWordQuizView::slotCheckedAnswer( int i ) bool KWordQuizView::eventFilter( TQObject * o, TQEvent * e ) { - if (o == cellEditor) + if (TQT_BASE_OBJECT(o) == TQT_BASE_OBJECT(cellEditor)) { if ( e->type() == TQEvent::KeyPress ) { @@ -1075,7 +1075,7 @@ void KWordQuizView::setText(int row, int col, const TQString & text) itm->updateEditor(row, col); updateCell(row, col); } else { - KWQTableItem *i = new KWQTableItem(this, TQTableItem::OnTyping, text); + KWTQTableItem *i = new KWTQTableItem(this, TQTableItem::OnTyping, text); setItem(row, col, i); } } |