From 1b93777b6479886165554b763531d7bea5fe6c1f Mon Sep 17 00:00:00 2001 From: tpearson Date: Wed, 10 Aug 2011 22:19:39 +0000 Subject: rename the following methods: tqparent parent tqmask mask git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdeaccessibility@1246260 283d02a7-25f6-0310-bc7c-ecb5cbfe19da --- kmouth/phrasebook/phrasebook.cpp | 36 ++++----- kmouth/phrasebook/phrasebook.h | 6 +- kmouth/phrasebook/phrasebookdialog.cpp | 80 +++++++++---------- kmouth/phrasebook/phrasebookdialog.h | 16 ++-- kmouth/phrasebook/phrasetree.cpp | 138 ++++++++++++++++----------------- kmouth/phrasebook/phrasetree.h | 18 ++--- 6 files changed, 147 insertions(+), 147 deletions(-) (limited to 'kmouth/phrasebook') diff --git a/kmouth/phrasebook/phrasebook.cpp b/kmouth/phrasebook/phrasebook.cpp index 7ff932b..2332ee6 100644 --- a/kmouth/phrasebook/phrasebook.cpp +++ b/kmouth/phrasebook/phrasebook.cpp @@ -249,7 +249,7 @@ bool PhraseBook::save (const KURL &url, bool asPhrasebook) { } } -int PhraseBook::save (TQWidget *tqparent, const TQString &title, KURL &url, bool phrasebookFirst) { +int PhraseBook::save (TQWidget *parent, const TQString &title, KURL &url, bool phrasebookFirst) { // KFileDialog::getSaveURL(...) is not useful here as we need // to know the requested file type. @@ -259,7 +259,7 @@ int PhraseBook::save (TQWidget *tqparent, const TQString &title, KURL &url, bool else filters = i18n("*.txt|Plain Text Files (*.txt)\n*.phrasebook|Phrase Books (*.phrasebook)\n*|All Files"); - KFileDialog fdlg(TQString(),filters, tqparent, "filedialog", true); + KFileDialog fdlg(TQString(),filters, parent, "filedialog", true); fdlg.setCaption(title); fdlg.setOperationMode( KFileDialog::Saving ); @@ -374,7 +374,7 @@ void PhraseBook::addToGUI (TQPopupMenu *popup, KToolBar *toolbar, KActionCollect TQObject *receiver, const char *slot) const { if ((popup != 0) || (toolbar != 0)) { TQPtrStack stack; - TQWidget *tqparent = popup; + TQWidget *parent = popup; int level = 0; TQValueListConstIterator it; @@ -384,38 +384,38 @@ void PhraseBook::addToGUI (TQPopupMenu *popup, KToolBar *toolbar, KActionCollect KActionMenu *menu = new KActionMenu("", "phrasebook"); menu->setDelayed(false); phrases->insert(menu); - menu->plug (tqparent); - if (tqparent == popup) + menu->plug (parent); + if (parent == popup) menu->plug (toolbar); - if (tqparent != 0) - stack.push (tqparent); - tqparent = menu->popupMenu(); + if (parent != 0) + stack.push (parent); + parent = menu->popupMenu(); level++; } - while (newLevel < level && (tqparent != popup)) { - tqparent = stack.pop(); + while (newLevel < level && (parent != popup)) { + parent = stack.pop(); level--; } if ((*it).isPhrase()) { Phrase phrase = (*it).getPhrase(); KAction *action = new PhraseAction (phrase.getPhrase(), phrase.getShortcut(), receiver, slot, phrases); - if (tqparent == popup) + if (parent == popup) action->plug (toolbar); - if (tqparent != 0) - action->plug(tqparent); + if (parent != 0) + action->plug(parent); } else { Phrase phrase = (*it).getPhrase(); KActionMenu *menu = new KActionMenu(phrase.getPhrase(), "phrasebook"); menu->setDelayed(false); phrases->insert(menu); - if (tqparent == popup) + if (parent == popup) menu->plug (toolbar); - if (tqparent != 0) - menu->plug (tqparent); - stack.push (tqparent); - tqparent = menu->popupMenu(); + if (parent != 0) + menu->plug (parent); + stack.push (parent); + parent = menu->popupMenu(); level++; } } diff --git a/kmouth/phrasebook/phrasebook.h b/kmouth/phrasebook/phrasebook.h index eb19ea2..200bbae 100644 --- a/kmouth/phrasebook/phrasebook.h +++ b/kmouth/phrasebook/phrasebook.h @@ -118,7 +118,7 @@ public: * 0, if the user canceled the operation, * -1, if there was an error when saving the file. */ - int save (TQWidget *tqparent, const TQString &title, KURL &url, bool phrasebookFirst = true); + int save (TQWidget *parent, const TQString &title, KURL &url, bool phrasebookFirst = true); /** encodes the phrase book. Returns the encoded xml code. */ TQString encode (); @@ -173,8 +173,8 @@ class PhraseAction : public KAction { Q_OBJECT TQ_OBJECT public: - PhraseAction (const TQString& phrase, const TQString& cut, const TQObject* receiver, const char* slot, KActionCollection* tqparent) - : KAction (phrase, "phrase", KShortcut(cut), 0, 0, tqparent, phrase.latin1()) { + PhraseAction (const TQString& phrase, const TQString& cut, const TQObject* receiver, const char* slot, KActionCollection* parent) + : KAction (phrase, "phrase", KShortcut(cut), 0, 0, parent, phrase.latin1()) { this->phrase = phrase; connect (this, TQT_SIGNAL(slotActivated (const TQString &)), receiver, slot); }; diff --git a/kmouth/phrasebook/phrasebookdialog.cpp b/kmouth/phrasebook/phrasebookdialog.cpp index dff69e8..3cfe25b 100644 --- a/kmouth/phrasebook/phrasebookdialog.cpp +++ b/kmouth/phrasebook/phrasebookdialog.cpp @@ -53,9 +53,9 @@ namespace PhraseBookPrivate { }; } -CheckBookItem::CheckBookItem (TQListViewItem *tqparent, TQListViewItem *last, +CheckBookItem::CheckBookItem (TQListViewItem *parent, TQListViewItem *last, const TQString &text, const TQString &name, const TQString &filename) - : TQCheckListItem (tqparent, text, TQCheckListItem::CheckBox) + : TQCheckListItem (parent, text, TQCheckListItem::CheckBox) { moveItem (last); setText(PhraseBookPrivate::name, name); @@ -67,12 +67,12 @@ CheckBookItem::CheckBookItem (TQListViewItem *tqparent, TQListViewItem *last, else numberOfBooks = 1; selectedBooks = 0; - ((CheckBookItem*)tqparent)->childChange (numberOfBooks, selectedBooks); + ((CheckBookItem*)parent)->childChange (numberOfBooks, selectedBooks); } -CheckBookItem::CheckBookItem (TQListView *tqparent, TQListViewItem *last, +CheckBookItem::CheckBookItem (TQListView *parent, TQListViewItem *last, const TQString &text, const TQString &name, const TQString &filename) - : TQCheckListItem (tqparent, text, TQCheckListItem::CheckBox) + : TQCheckListItem (parent, text, TQCheckListItem::CheckBox) { moveItem (last); setText(PhraseBookPrivate::name, name); @@ -102,12 +102,12 @@ void CheckBookItem::activate() { void CheckBookItem::stateChange (bool on) { TQListViewItem *item = firstChild(); if (item == 0) { - TQListViewItem *tqparent = this->tqparent(); - if (tqparent != 0) { + TQListViewItem *parent = this->parent(); + if (parent != 0) { if (on) - ((CheckBookItem*)tqparent)->childChange (0, 1); + ((CheckBookItem*)parent)->childChange (0, 1); else - ((CheckBookItem*)tqparent)->childChange (0, -1); + ((CheckBookItem*)parent)->childChange (0, -1); } } else propagateStateChange(); @@ -127,9 +127,9 @@ void CheckBookItem::propagateStateChange () { void CheckBookItem::childChange (int numberDiff, int selDiff) { numberOfBooks += numberDiff; selectedBooks += selDiff; - TQListViewItem *tqparent = this->tqparent(); - if (tqparent != 0) - ((CheckBookItem*)tqparent)->childChange (numberDiff, selDiff); + TQListViewItem *parent = this->parent(); + if (parent != 0) + ((CheckBookItem*)parent)->childChange (numberDiff, selDiff); TQString text = i18n(" (%1 of %2 books selected)"); text = text.tqarg(selectedBooks).tqarg(numberOfBooks); @@ -138,8 +138,8 @@ void CheckBookItem::childChange (int numberDiff, int selDiff) { /***************************************************************************/ -InitialPhraseBookWidget::InitialPhraseBookWidget (TQWidget *tqparent, const char *name) - : TQWidget(tqparent, name) +InitialPhraseBookWidget::InitialPhraseBookWidget (TQWidget *parent, const char *name) + : TQWidget(parent, name) { TQVBoxLayout *mainLayout = new TQVBoxLayout (this, 0, KDialog::spacingHint()); TQLabel *label = new TQLabel (i18n("Please decide which phrase books you need:"), this, "booksTitle"); @@ -165,7 +165,7 @@ InitialPhraseBookWidget::~InitialPhraseBookWidget () { void InitialPhraseBookWidget::initStandardPhraseBooks() { StandardBookList bookPaths = PhraseBookDialog::standardPhraseBooks(); - TQListViewItem *tqparent = 0; + TQListViewItem *parent = 0; TQListViewItem *last = 0; TQStringList currentNamePath = ""; TQPtrStack stack; @@ -179,26 +179,26 @@ void InitialPhraseBookWidget::initStandardPhraseBooks() { for (; (it1 != currentNamePath.end()) && (it1 != dirs.end()) && (*it1 == *it2); ++it1, ++it2); for (; it1 != currentNamePath.end(); ++it1) { - last = tqparent; - tqparent = stack.pop(); + last = parent; + parent = stack.pop(); } for (; it2 != dirs.end(); ++it2) { - stack.push (tqparent); + stack.push (parent); TQListViewItem *newParent; - if (tqparent == 0) + if (parent == 0) newParent = new CheckBookItem (books, last, *it2, *it2, TQString()); else - newParent = new CheckBookItem (tqparent, last, *it2, *it2, TQString()); - tqparent = newParent; + newParent = new CheckBookItem (parent, last, *it2, *it2, TQString()); + parent = newParent; last = 0; } currentNamePath = dirs; TQListViewItem *book; - if (tqparent == 0) + if (parent == 0) book = new CheckBookItem (books, last, (*it).name, (*it).name, (*it).filename); else - book = new CheckBookItem (tqparent, last, (*it).name, (*it).name, (*it).filename); + book = new CheckBookItem (parent, last, (*it).name, (*it).name, (*it).filename); last = book; } } @@ -218,7 +218,7 @@ void InitialPhraseBookWidget::createBook () { } while ((item != 0) && (item->nextSibling() == 0)) { - item = item->tqparent(); + item = item->parent(); } if (item != 0) item = item->nextSibling(); @@ -233,8 +233,8 @@ void InitialPhraseBookWidget::createBook () { /***************************************************************************/ -ButtonBoxWidget::ButtonBoxWidget (TQWidget *tqparent, const char *name) -: ButtonBoxUI (tqparent, name) { +ButtonBoxWidget::ButtonBoxWidget (TQWidget *parent, const char *name) +: ButtonBoxUI (parent, name) { keyButtonPlaceLayout = new TQGridLayout (keyButtonPlace, 1, 1, 0, 0, "keyButtonPlaceLayout"); keyButton = new KKeyButton (keyButtonPlace, "key"); @@ -434,7 +434,7 @@ StandardBookList PhraseBookDialog::standardPhraseBooks() { void PhraseBookDialog::initStandardPhraseBooks () { StandardBookList bookPaths = standardPhraseBooks(); - KActionMenu *tqparent = fileImportStandardBook; + KActionMenu *parent = fileImportStandardBook; TQStringList currentNamePath = "x"; TQPtrStack stack; StandardBookList::iterator it; @@ -450,21 +450,21 @@ void PhraseBookDialog::initStandardPhraseBooks () { for (; (it1 != currentNamePath.end()) && (it1 != dirs.end()) && (*it1 == *it2); ++it1, ++it2); for (; it1 != currentNamePath.end(); ++it1) - tqparent = stack.pop(); + parent = stack.pop(); for (; it2 != dirs.end(); ++it2) { - stack.push (tqparent); + stack.push (parent); KActionMenu *newParent = new KActionMenu (*it2); - tqparent->insert(newParent); - if (tqparent == fileImportStandardBook) + parent->insert(newParent); + if (parent == fileImportStandardBook) newParent->plug(toolbarImport->popupMenu()); - tqparent = newParent; + parent = newParent; } currentNamePath = dirs; KAction *book = new StandardPhraseBookInsertAction ( url, (*it).name, TQT_TQOBJECT(this), TQT_SLOT(slotImportPhrasebook (const KURL &)), actionCollection()); - tqparent->insert(book); - if (tqparent == fileImportStandardBook) + parent->insert(book); + if (parent == fileImportStandardBook) book->plug(toolbarImport->popupMenu()); } } @@ -615,8 +615,8 @@ void PhraseBookDialog::setShortcut( const KShortcut& cut ) { } } -TQListViewItem *PhraseBookDialog::addBook (TQListViewItem *tqparent, TQListViewItem *after, PhraseBook *book) { - TQListViewItem *newItem = treeView->addBook(tqparent, after, book); +TQListViewItem *PhraseBookDialog::addBook (TQListViewItem *parent, TQListViewItem *after, PhraseBook *book) { + TQListViewItem *newItem = treeView->addBook(parent, after, book); if (newItem != 0) { treeView->clearSelection(); treeView->ensureItemVisible(newItem); @@ -631,8 +631,8 @@ TQListViewItem *PhraseBookDialog::addBook (TQListViewItem *item, PhraseBook *boo if (item == 0) return addBook(0, 0, book); else if (((PhraseTreeItem *)item)->isPhrase() || !item->isOpen()) - if (item->tqparent() != 0) - return addBook(item->tqparent(), item, book); + if (item->parent() != 0) + return addBook(item->parent(), item, book); else return addBook(0, item, book); else @@ -677,10 +677,10 @@ void PhraseBookDialog::slotPaste () { } } -void PhraseBookDialog::slotDropped (TQDropEvent *e, TQListViewItem *tqparent, TQListViewItem *after) { +void PhraseBookDialog::slotDropped (TQDropEvent *e, TQListViewItem *parent, TQListViewItem *after) { PhraseBook book; if (PhraseBookDrag::decode(e, &book)) { - addBook(tqparent, after, &book); + addBook(parent, after, &book); } } diff --git a/kmouth/phrasebook/phrasebookdialog.h b/kmouth/phrasebook/phrasebookdialog.h index 1a09a79..cdd2dbe 100644 --- a/kmouth/phrasebook/phrasebookdialog.h +++ b/kmouth/phrasebook/phrasebookdialog.h @@ -50,9 +50,9 @@ typedef TQValueList StandardBookList; class CheckBookItem : public TQCheckListItem { public: - CheckBookItem (TQListViewItem *tqparent, TQListViewItem *last, + CheckBookItem (TQListViewItem *parent, TQListViewItem *last, const TQString &text, const TQString &name, const TQString &filename); - CheckBookItem (TQListView *tqparent, TQListViewItem *last, + CheckBookItem (TQListView *parent, TQListViewItem *last, const TQString &text, const TQString &name, const TQString &filename); ~CheckBookItem(); @@ -76,7 +76,7 @@ class InitialPhraseBookWidget : public TQWidget { Q_OBJECT TQ_OBJECT public: - InitialPhraseBookWidget(TQWidget *tqparent, const char *name); + InitialPhraseBookWidget(TQWidget *parent, const char *name); ~InitialPhraseBookWidget(); void createBook(); @@ -97,8 +97,8 @@ class StandardPhraseBookInsertAction : public KAction { Q_OBJECT TQ_OBJECT public: - StandardPhraseBookInsertAction (const KURL &url, const TQString& name, const TQObject* receiver, const char* slot, KActionCollection* tqparent) - : KAction (name, "phrasebook", 0, 0, 0, tqparent, 0) { + StandardPhraseBookInsertAction (const KURL &url, const TQString& name, const TQObject* receiver, const char* slot, KActionCollection* parent) + : KAction (name, "phrasebook", 0, 0, 0, parent, 0) { this->url = url; connect (this, TQT_SIGNAL(slotActivated (const KURL &)), receiver, slot); }; @@ -125,7 +125,7 @@ private: */ class ButtonBoxWidget : public ButtonBoxUI { public: - ButtonBoxWidget (TQWidget *tqparent = 0, const char *name = 0); + ButtonBoxWidget (TQWidget *parent = 0, const char *name = 0); ~ButtonBoxWidget (); KKeyButton *keyButton; @@ -187,7 +187,7 @@ public slots: void slotExportPhrasebook (); void slotPrint (); - void slotDropped (TQDropEvent *e, TQListViewItem *tqparent, TQListViewItem *after); + void slotDropped (TQDropEvent *e, TQListViewItem *parent, TQListViewItem *after); void slotMoved (TQListViewItem *item, TQListViewItem *, TQListViewItem *); signals: @@ -202,7 +202,7 @@ private: /** initializes the list of standard phrase books */ void initStandardPhraseBooks (); - TQListViewItem *addBook (TQListViewItem *tqparent, TQListViewItem *after, PhraseBook *book); + TQListViewItem *addBook (TQListViewItem *parent, TQListViewItem *after, PhraseBook *book); TQListViewItem *addBook (TQListViewItem *item, PhraseBook *book); void setShortcut (const KShortcut &cut); diff --git a/kmouth/phrasebook/phrasetree.cpp b/kmouth/phrasebook/phrasetree.cpp index dcd08c6..e4adde1 100644 --- a/kmouth/phrasebook/phrasetree.cpp +++ b/kmouth/phrasebook/phrasetree.cpp @@ -28,8 +28,8 @@ #include "phrasebookdialog.h" #include "phrasebook.h" -PhraseTreeItem::PhraseTreeItem (TQListView *tqparent, TQListViewItem *after, TQString phrase, KShortcut shortcut, TQPixmap icon) - : KListViewItem (tqparent, after, phrase) +PhraseTreeItem::PhraseTreeItem (TQListView *parent, TQListViewItem *after, TQString phrase, KShortcut shortcut, TQPixmap icon) + : KListViewItem (parent, after, phrase) { isPhraseValue = true; cutValue = shortcut; @@ -38,8 +38,8 @@ PhraseTreeItem::PhraseTreeItem (TQListView *tqparent, TQListViewItem *after, TQS setExpandable (false); } -PhraseTreeItem::PhraseTreeItem (TQListViewItem *tqparent, TQListViewItem *after, TQString phrase, KShortcut shortcut, TQPixmap icon) - : KListViewItem (tqparent, after, phrase) +PhraseTreeItem::PhraseTreeItem (TQListViewItem *parent, TQListViewItem *after, TQString phrase, KShortcut shortcut, TQPixmap icon) + : KListViewItem (parent, after, phrase) { isPhraseValue = true; cutValue = shortcut; @@ -47,15 +47,15 @@ PhraseTreeItem::PhraseTreeItem (TQListViewItem *tqparent, TQListViewItem *after, setPixmap(0, icon); setExpandable (false); } -PhraseTreeItem::PhraseTreeItem (TQListView *tqparent, TQListViewItem *after, TQString name, TQPixmap icon) - : KListViewItem (tqparent, after, name) +PhraseTreeItem::PhraseTreeItem (TQListView *parent, TQListViewItem *after, TQString name, TQPixmap icon) + : KListViewItem (parent, after, name) { isPhraseValue = false; setPixmap(0, icon); setExpandable (true); } -PhraseTreeItem::PhraseTreeItem (TQListViewItem *tqparent, TQListViewItem *after, TQString name, TQPixmap icon) - : KListViewItem (tqparent, after, name) +PhraseTreeItem::PhraseTreeItem (TQListViewItem *parent, TQListViewItem *after, TQString name, TQPixmap icon) + : KListViewItem (parent, after, name) { isPhraseValue = false; setPixmap(0, icon); @@ -74,8 +74,8 @@ void PhraseTreeItem::setCut (KShortcut cut) { // *************************************************************************** -PhraseTree::PhraseTree (TQWidget *tqparent, const char *name) - : KListView (tqparent, name) +PhraseTree::PhraseTree (TQWidget *parent, const char *name) + : KListView (parent, name) { phrasebook_open = KGlobal::iconLoader()->loadIcon("phrasebook", KIcon::Small); phrasebook_closed = KGlobal::iconLoader()->loadIcon("phrasebook_closed", KIcon::Small); @@ -90,14 +90,14 @@ PhraseTree::~PhraseTree (){ namespace PhraseTreePrivate { TQListViewItem *prevSibling (TQListViewItem *item) { - TQListViewItem *tqparent = item->tqparent(); + TQListViewItem *parent = item->parent(); TQListViewItem *above = item->itemAbove(); - if (above == tqparent) + if (above == parent) return 0; - while (above->tqparent() != tqparent) - above = above->tqparent(); + while (above->parent() != parent) + above = above->parent(); return above; } @@ -109,25 +109,25 @@ namespace PhraseTreePrivate { if (item == 0) return false; - TQListViewItem *tqparent = item->tqparent(); + TQListViewItem *parent = item->parent(); TQListViewItem *above = item->itemAbove(); if (above == 0) return false; - else if (above == tqparent) { - *newParent = tqparent->tqparent(); - *newAbove = prevSibling (tqparent); + else if (above == parent) { + *newParent = parent->parent(); + *newAbove = prevSibling (parent); return true; } - else if (above->tqparent() == tqparent) { - *newParent = tqparent; + else if (above->parent() == parent) { + *newParent = parent; *newAbove = prevSibling (above); return true; } else { - while (above->tqparent()->tqparent() != tqparent) - above = above->tqparent(); - *newParent = above->tqparent(); + while (above->parent()->parent() != parent) + above = above->parent(); + *newParent = above->parent(); *newAbove = above; return true; } @@ -140,14 +140,14 @@ namespace PhraseTreePrivate { if (item == 0) return false; - TQListViewItem *tqparent = item->tqparent(); + TQListViewItem *parent = item->parent(); TQListViewItem *below = item->nextSibling(); - if (tqparent == 0 && below == 0) + if (parent == 0 && below == 0) return false; - else if (tqparent != 0 && below == 0) { - *newParent = tqparent->tqparent(); - *newAbove = tqparent; + else if (parent != 0 && below == 0) { + *newParent = parent->parent(); + *newAbove = parent; return true; } else if (below->isOpen()) { @@ -156,7 +156,7 @@ namespace PhraseTreePrivate { return true; } else { - *newParent = tqparent; + *newParent = parent; *newAbove = below; return true; } @@ -195,32 +195,32 @@ namespace PhraseTreePrivate { if (item == 0) return false; - TQListViewItem *tqparent = item->tqparent(); + TQListViewItem *parent = item->parent(); - if (tqparent == 0) + if (parent == 0) return false; else { - *newParent = tqparent->tqparent(); - *newAbove = tqparent; + *newParent = parent->parent(); + *newAbove = parent; return true; } } } void PhraseTree::moveItem (TQListViewItem *item, - TQListViewItem *tqparent, + TQListViewItem *parent, TQListViewItem *above) { if (item != 0) { - if (item->tqparent() == 0) + if (item->parent() == 0) takeItem (item); else - item->tqparent()->takeItem (item); + item->parent()->takeItem (item); - if (tqparent == 0) + if (parent == 0) insertItem (item); else - tqparent->insertItem (item); + parent->insertItem (item); item->moveItem(above); } @@ -241,7 +241,7 @@ bool PhraseTree::hasSelectedItems() { } else { while ((i != 0) && (i->nextSibling() == 0)) { - i = i->tqparent(); + i = i->parent(); level--; } if (i != 0) @@ -267,7 +267,7 @@ void PhraseTree::deleteSelectedItems() { } else { while ((i != 0) && (i->nextSibling() == 0)) { - i = i->tqparent(); + i = i->parent(); } if (i != 0) i = i->nextSibling(); @@ -285,11 +285,11 @@ void PhraseTree::keyPressEvent (TQKeyEvent *e) { if (e->key() == TQt::Key_Up) { TQListViewItem *item = currentItem(); if ((item != 0) && (item->isSelected())) { - TQListViewItem *tqparent; + TQListViewItem *parent; TQListViewItem *above; - if (PhraseTreePrivate::findAbovePosition (item, &tqparent, &above)) { - moveItem(item, tqparent, above); + if (PhraseTreePrivate::findAbovePosition (item, &parent, &above)) { + moveItem(item, parent, above); setCurrentItem (item); item->setSelected(true); } @@ -300,11 +300,11 @@ void PhraseTree::keyPressEvent (TQKeyEvent *e) { else if (e->key() == TQt::Key_Down) { TQListViewItem *item = currentItem(); if ((item != 0) && (item->isSelected())) { - TQListViewItem *tqparent; + TQListViewItem *parent; TQListViewItem *above; - if (PhraseTreePrivate::findBelowPosition (item, &tqparent, &above)) { - moveItem(item, tqparent, above); + if (PhraseTreePrivate::findBelowPosition (item, &parent, &above)) { + moveItem(item, parent, above); setCurrentItem (item); item->setSelected(true); } @@ -315,11 +315,11 @@ void PhraseTree::keyPressEvent (TQKeyEvent *e) { else if (e->key() == TQt::Key_Left) { TQListViewItem *item = currentItem(); if ((item != 0) && (item->isSelected())) { - TQListViewItem *tqparent; + TQListViewItem *parent; TQListViewItem *above; - if (PhraseTreePrivate::findLeftPosition (item, &tqparent, &above)) { - moveItem(item, tqparent, above); + if (PhraseTreePrivate::findLeftPosition (item, &parent, &above)) { + moveItem(item, parent, above); setCurrentItem (item); item->setSelected(true); } @@ -330,11 +330,11 @@ void PhraseTree::keyPressEvent (TQKeyEvent *e) { else if (e->key() == TQt::Key_Right) { TQListViewItem *item = currentItem(); if ((item != 0) && (item->isSelected())) { - TQListViewItem *tqparent; + TQListViewItem *parent; TQListViewItem *above; - if (PhraseTreePrivate::findRightPosition (item, &tqparent, &above)) { - moveItem(item, tqparent, above); + if (PhraseTreePrivate::findRightPosition (item, &parent, &above)) { + moveItem(item, parent, above); setCurrentItem (item); item->setSelected(true); } @@ -346,57 +346,57 @@ void PhraseTree::keyPressEvent (TQKeyEvent *e) { KListView::keyPressEvent(e); } -PhraseTreeItem *PhraseTree::insertPhrase (TQListViewItem *tqparent, TQListViewItem *after, TQString phrase, TQString shortcut) { +PhraseTreeItem *PhraseTree::insertPhrase (TQListViewItem *parent, TQListViewItem *after, TQString phrase, TQString shortcut) { KShortcut cut = KShortcut(shortcut); if (isKeyPresent (cut, 0, false)) cut = KShortcut(TQString()); - if (tqparent == 0) + if (parent == 0) return new PhraseTreeItem (this, after, phrase, cut, this->phrase); else - return new PhraseTreeItem (tqparent, after, phrase, cut, this->phrase); + return new PhraseTreeItem (parent, after, phrase, cut, this->phrase); } -PhraseTreeItem *PhraseTree::insertBook (TQListViewItem *tqparent, TQListViewItem *after, TQString name) { - if (tqparent == 0) +PhraseTreeItem *PhraseTree::insertBook (TQListViewItem *parent, TQListViewItem *after, TQString name) { + if (parent == 0) return new PhraseTreeItem (this, after, name, phrasebook_closed); else - return new PhraseTreeItem (tqparent, after, name, phrasebook_closed); + return new PhraseTreeItem (parent, after, name, phrasebook_closed); } -TQListViewItem *PhraseTree::addBook (TQListViewItem *tqparent, TQListViewItem *after, PhraseBook *book) { +TQListViewItem *PhraseTree::addBook (TQListViewItem *parent, TQListViewItem *after, PhraseBook *book) { TQListViewItem *last = after; int level = 0; PhraseBookEntryList::iterator it; for (it = book->begin(); it != book->end(); ++it) { int newLevel = (*it).getLevel(); while (level < newLevel) { - tqparent = insertBook(tqparent, last, ""); + parent = insertBook(parent, last, ""); last = 0; level++; } while (level > newLevel) { - last = tqparent; - if (tqparent != 0) - tqparent = tqparent->tqparent(); + last = parent; + if (parent != 0) + parent = parent->parent(); level--; } if ((*it).isPhrase()) { Phrase phrase = (*it).getPhrase(); - last = insertPhrase (tqparent, last, phrase.getPhrase(), phrase.getShortcut()); + last = insertPhrase (parent, last, phrase.getPhrase(), phrase.getShortcut()); } else { Phrase phrase = (*it).getPhrase(); - tqparent = insertBook(tqparent, last, phrase.getPhrase()); + parent = insertBook(parent, last, phrase.getPhrase()); last = 0; level++; } } while (level > 0) { - last = tqparent; - if (tqparent != 0) - tqparent = tqparent->tqparent(); + last = parent; + if (parent != 0) + parent = parent->parent(); level--; } return last; @@ -421,7 +421,7 @@ void PhraseTree::fillBook (PhraseBook *book, bool respectSelection) { } else { while ((i != 0) && (i->nextSibling() == 0)) { - i = i->tqparent(); + i = i->parent(); if (level > 0) level--; } diff --git a/kmouth/phrasebook/phrasetree.h b/kmouth/phrasebook/phrasetree.h index 26af68c..5633bc4 100644 --- a/kmouth/phrasebook/phrasetree.h +++ b/kmouth/phrasebook/phrasetree.h @@ -33,13 +33,13 @@ class PhraseTreeItem : public KListViewItem { friend class PhraseTree; private: /** Creates a phrase item within a sub phrase book */ - PhraseTreeItem (TQListView *tqparent, TQListViewItem *after, TQString phrase, KShortcut shortcut, TQPixmap icon); + PhraseTreeItem (TQListView *parent, TQListViewItem *after, TQString phrase, KShortcut shortcut, TQPixmap icon); /** Creates a phrase item at the top level */ - PhraseTreeItem (TQListViewItem *tqparent, TQListViewItem *after, TQString phrase, KShortcut shortcut, TQPixmap icon); + PhraseTreeItem (TQListViewItem *parent, TQListViewItem *after, TQString phrase, KShortcut shortcut, TQPixmap icon); /** Creates a phrase book item within a sub phrase book */ - PhraseTreeItem (TQListView *tqparent, TQListViewItem *after, TQString name, TQPixmap icon); + PhraseTreeItem (TQListView *parent, TQListViewItem *after, TQString name, TQPixmap icon); /** Creates a phrase book item at the top level */ - PhraseTreeItem (TQListViewItem *tqparent, TQListViewItem *after, TQString name, TQPixmap icon); + PhraseTreeItem (TQListViewItem *parent, TQListViewItem *after, TQString name, TQPixmap icon); public: bool isPhrase(); @@ -62,21 +62,21 @@ class PhraseTree : public KListView { Q_OBJECT TQ_OBJECT public: - PhraseTree (TQWidget *tqparent = 0, const char *name = 0); + PhraseTree (TQWidget *parent = 0, const char *name = 0); ~PhraseTree (); void keyPressEvent (TQKeyEvent *e); - PhraseTreeItem *insertPhrase (TQListViewItem *tqparent, TQListViewItem *after, TQString phrase, TQString shortcut); - PhraseTreeItem *insertBook (TQListViewItem *tqparent, TQListViewItem *after, TQString name); + PhraseTreeItem *insertPhrase (TQListViewItem *parent, TQListViewItem *after, TQString phrase, TQString shortcut); + PhraseTreeItem *insertBook (TQListViewItem *parent, TQListViewItem *after, TQString name); - TQListViewItem *addBook (TQListViewItem *tqparent, TQListViewItem *after, PhraseBook *book); + TQListViewItem *addBook (TQListViewItem *parent, TQListViewItem *after, PhraseBook *book); void fillBook (PhraseBook *book, bool respectSelection); TQDragObject *dragObject (); TQDragObject *dragObject (bool isDependent); - void moveItem (TQListViewItem *item, TQListViewItem *tqparent, TQListViewItem *above); + void moveItem (TQListViewItem *item, TQListViewItem *parent, TQListViewItem *above); bool hasSelectedItems(); void deleteSelectedItems(); -- cgit v1.2.1