From f138d74fe16092003b06f5bde9663841929cde7f Mon Sep 17 00:00:00 2001 From: tpearson Date: Fri, 17 Jun 2011 22:17:08 +0000 Subject: TQt4 port kdeaccessibility This enables compilation under both Qt3 and Qt4 git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdeaccessibility@1237325 283d02a7-25f6-0310-bc7c-ecb5cbfe19da --- kmouth/phrasebook/buttonboxui.ui | 16 ++-- kmouth/phrasebook/phrasebook.cpp | 80 ++++++++--------- kmouth/phrasebook/phrasebook.h | 10 ++- kmouth/phrasebook/phrasebookdialog.cpp | 134 ++++++++++++++-------------- kmouth/phrasebook/phrasebookdialog.h | 19 ++-- kmouth/phrasebook/phrasebookparser.h | 2 +- kmouth/phrasebook/phrasetree.cpp | 156 ++++++++++++++++----------------- kmouth/phrasebook/phrasetree.h | 19 ++-- 8 files changed, 221 insertions(+), 215 deletions(-) (limited to 'kmouth/phrasebook') diff --git a/kmouth/phrasebook/buttonboxui.ui b/kmouth/phrasebook/buttonboxui.ui index abc999b..d2b5d00 100644 --- a/kmouth/phrasebook/buttonboxui.ui +++ b/kmouth/phrasebook/buttonboxui.ui @@ -1,6 +1,6 @@ ButtonBoxUI - + ButtonBoxUI @@ -25,7 +25,7 @@ 6 - + phrasebox @@ -42,7 +42,7 @@ 6 - + keyButtonPlace @@ -55,7 +55,7 @@ With this line edit you define the name of a sub-phrasebook or the contents of a phrase. - + noKey @@ -66,7 +66,7 @@ If you select this option then the selected phrase will not be reachable by a keyboard shortcut. - + customKey @@ -77,7 +77,7 @@ If you select this option then the selected phrase will be reachable by a keyboard shortcut. You can change the shortcut with the button next to this option. - + shortcutLabel @@ -85,7 +85,7 @@ Shortcut for the phrase: - + textLabel @@ -103,5 +103,5 @@ - + diff --git a/kmouth/phrasebook/phrasebook.cpp b/kmouth/phrasebook/phrasebook.cpp index cc5d900..2efc2e6 100644 --- a/kmouth/phrasebook/phrasebook.cpp +++ b/kmouth/phrasebook/phrasebook.cpp @@ -109,7 +109,7 @@ void PhraseBook::print(KPrinter *pPrinter) { for (it = begin(); it != end(); ++it) { TQRect rect = metrics.boundingRect (x+16*(*it).getLevel(), y, w-16*(*it).getLevel(), 0, - Qt::AlignJustify | Qt::WordBreak, + TQt::AlignJustify | TQt::WordBreak, (*it).getPhrase().getPhrase()); if (y+rect.height() > size.height()) { @@ -118,7 +118,7 @@ void PhraseBook::print(KPrinter *pPrinter) { } printpainter.drawText (x+16*(*it).getLevel(),y, w-16*(*it).getLevel(),rect.height(), - Qt::AlignJustify | Qt::WordBreak, + TQt::AlignJustify | TQt::WordBreak, (*it).getPhrase().getPhrase()); y += rect.height(); } @@ -151,7 +151,7 @@ TQCString encodeString (const TQString str) { TQCString res = ""; for (int i = 0; i < (int)str.length(); i++) { TQChar ch = str.at(i); - ushort uc = ch.unicode(); + ushort uc = ch.tqunicode(); TQCString number; number.setNum(uc); if ((uc>127) || (uc<32) || (ch=='<') || (ch=='>') || (ch=='&') || (ch==';')) res = res + "&#" + number + ";"; @@ -249,7 +249,7 @@ bool PhraseBook::save (const KURL &url, bool asPhrasebook) { } } -int PhraseBook::save (TQWidget *parent, const TQString &title, KURL &url, bool phrasebookFirst) { +int PhraseBook::save (TQWidget *tqparent, 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 *parent, const TQString &title, KURL &url, bool p else filters = i18n("*.txt|Plain Text Files (*.txt)\n*.phrasebook|Phrase Books (*.phrasebook)\n*|All Files"); - KFileDialog fdlg(TQString::null,filters, parent, "filedialog", true); + KFileDialog fdlg(TQString(),filters, tqparent, "filedialog", true); fdlg.setCaption(title); fdlg.setOperationMode( KFileDialog::Saving ); @@ -274,20 +274,20 @@ int PhraseBook::save (TQWidget *parent, const TQString &title, KURL &url, bool p } if (KIO::NetAccess::exists(url)) { - if (KMessageBox::warningContinueCancel(0,TQString("%1").arg(i18n("The file %1 already exists. " - "Do you want to overwrite it?").arg(url.url())),i18n("File Exists"),i18n("&Overwrite"))==KMessageBox::Cancel) { + if (KMessageBox::warningContinueCancel(0,TQString("%1").tqarg(i18n("The file %1 already exists. " + "Do you want to overwrite it?").tqarg(url.url())),i18n("File Exists"),i18n("&Overwrite"))==KMessageBox::Cancel) { return 0; } } bool result; if (fdlg.currentFilter() == "*.phrasebook") { - if (url.fileName (false).contains('.') == 0) { + if (url.fileName (false).tqcontains('.') == 0) { url.setFileName (url.fileName(false) + ".phrasebook"); } - else if (url.fileName (false).right (11).contains (".phrasebook", false) == 0) { - int filetype = KMessageBox::questionYesNoCancel (0,TQString("%1").arg(i18n("Your chosen filename %1 has a different extension than .phrasebook. " - "Do you wish to add .phrasebook to the filename?").arg(url.filename())),i18n("File Extension"),i18n("Add"),i18n("Do Not Add")); + else if (url.fileName (false).right (11).tqcontains (".phrasebook", false) == 0) { + int filetype = KMessageBox::questionYesNoCancel (0,TQString("%1").tqarg(i18n("Your chosen filename %1 has a different extension than .phrasebook. " + "Do you wish to add .phrasebook to the filename?").tqarg(url.filename())),i18n("File Extension"),i18n("Add"),i18n("Do Not Add")); if (filetype == KMessageBox::Cancel) { return 0; } @@ -298,12 +298,12 @@ int PhraseBook::save (TQWidget *parent, const TQString &title, KURL &url, bool p result = save (url, true); } else if (fdlg.currentFilter() == "*.txt") { - if (url.fileName (false).right (11).contains (".phrasebook", false) == 0) { + if (url.fileName (false).right (11).tqcontains (".phrasebook", false) == 0) { result = save (url, false); } else { - int filetype = KMessageBox::questionYesNoCancel (0,TQString("%1").arg(i18n("Your chosen filename %1 has the extension .phrasebook. " - "Do you wish to save in phrasebook format?").arg(url.filename())),i18n("File Extension"),i18n("As Phrasebook"),i18n("As Plain Text")); + int filetype = KMessageBox::questionYesNoCancel (0,TQString("%1").tqarg(i18n("Your chosen filename %1 has the extension .phrasebook. " + "Do you wish to save in phrasebook format?").tqarg(url.filename())),i18n("File Extension"),i18n("As Phrasebook"),i18n("As Plain Text")); if (filetype == KMessageBox::Cancel) { return 0; } @@ -339,7 +339,7 @@ bool PhraseBook::open (const KURL &url) { // First: try to load it as a normal phrase book TQFile file(tempFile); - TQXmlInputSource source (&file); + TQXmlInputSource source (TQT_TQIODEVICE(&file)); bool error = !decode (source); // Second: if the file does not contain a phrase book, load it as @@ -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 *parent = popup; + TQWidget *tqparent = 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 (parent); - if (parent == popup) + menu->plug (tqparent); + if (tqparent == popup) menu->plug (toolbar); - if (parent != 0) - stack.push (parent); - parent = menu->popupMenu(); + if (tqparent != 0) + stack.push (tqparent); + tqparent = menu->popupMenu(); level++; } - while (newLevel < level && (parent != popup)) { - parent = stack.pop(); + while (newLevel < level && (tqparent != popup)) { + tqparent = stack.pop(); level--; } if ((*it).isPhrase()) { Phrase phrase = (*it).getPhrase(); KAction *action = new PhraseAction (phrase.getPhrase(), phrase.getShortcut(), receiver, slot, phrases); - if (parent == popup) + if (tqparent == popup) action->plug (toolbar); - if (parent != 0) - action->plug(parent); + if (tqparent != 0) + action->plug(tqparent); } else { Phrase phrase = (*it).getPhrase(); KActionMenu *menu = new KActionMenu(phrase.getPhrase(), "phrasebook"); menu->setDelayed(false); phrases->insert(menu); - if (parent == popup) + if (tqparent == popup) menu->plug (toolbar); - if (parent != 0) - menu->plug (parent); - stack.push (parent); - parent = menu->popupMenu(); + if (tqparent != 0) + menu->plug (tqparent); + stack.push (tqparent); + tqparent = menu->popupMenu(); level++; } } @@ -451,9 +451,9 @@ PhraseBookDrag::~PhraseBookDrag () { void PhraseBookDrag::setBook (PhraseBook *book) { if (book == 0) { isEmpty = true; - xmlphrasebook.setText(TQString::null); - xml.setText(TQString::null); - plain.setText(TQString::null); + xmlphrasebook.setText(TQString()); + xml.setText(TQString()); + plain.setText(TQString()); } else { isEmpty = false; @@ -477,15 +477,15 @@ const char *PhraseBookDrag::format (int i) const { return xmlphrasebook.format(i/3); } -TQByteArray PhraseBookDrag::encodedData (const char* mime) const { +TQByteArray PhraseBookDrag::tqencodedData (const char* mime) const { TQCString m(mime); m = m.lower(); - if (m.contains("xml-phrasebook")) - return xmlphrasebook.encodedData(mime); - else if (m.contains("xml")) - return xml.encodedData(mime); + if (m.tqcontains("xml-phrasebook")) + return xmlphrasebook.tqencodedData(mime); + else if (m.tqcontains("xml")) + return xml.tqencodedData(mime); else - return plain.encodedData(mime); + return plain.tqencodedData(mime); } bool PhraseBookDrag::canDecode (const TQMimeSource* e) { diff --git a/kmouth/phrasebook/phrasebook.h b/kmouth/phrasebook/phrasebook.h index b0133b1..eb19ea2 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 *parent, const TQString &title, KURL &url, bool phrasebookFirst = true); + int save (TQWidget *tqparent, const TQString &title, KURL &url, bool phrasebookFirst = true); /** encodes the phrase book. Returns the encoded xml code. */ TQString encode (); @@ -148,6 +148,7 @@ public: */ class PhraseBookDrag: public TQDragObject { Q_OBJECT + TQ_OBJECT public: PhraseBookDrag (PhraseBook *book, TQWidget *dragSource = 0, const char *name = 0); PhraseBookDrag (TQWidget *dragSource = 0, const char *name = 0); @@ -156,7 +157,7 @@ public: virtual void setBook (PhraseBook *book); const char *format (int i) const; - virtual TQByteArray encodedData (const char *) const; + virtual TQByteArray tqencodedData (const char *) const; static bool canDecode (const TQMimeSource *e); static bool decode (const TQMimeSource *e, PhraseBook *book); @@ -170,9 +171,10 @@ private: class PhraseAction : public KAction { Q_OBJECT + TQ_OBJECT public: - 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()) { + 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()) { 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 2abe3d0..6e4deda 100644 --- a/kmouth/phrasebook/phrasebookdialog.cpp +++ b/kmouth/phrasebook/phrasebookdialog.cpp @@ -53,9 +53,9 @@ namespace PhraseBookPrivate { }; } -CheckBookItem::CheckBookItem (TQListViewItem *parent, TQListViewItem *last, +CheckBookItem::CheckBookItem (TQListViewItem *tqparent, TQListViewItem *last, const TQString &text, const TQString &name, const TQString &filename) - : TQCheckListItem (parent, text, TQCheckListItem::CheckBox) + : TQCheckListItem (tqparent, text, TQCheckListItem::CheckBox) { moveItem (last); setText(PhraseBookPrivate::name, name); @@ -67,12 +67,12 @@ CheckBookItem::CheckBookItem (TQListViewItem *parent, TQListViewItem *last, else numberOfBooks = 1; selectedBooks = 0; - ((CheckBookItem*)parent)->childChange (numberOfBooks, selectedBooks); + ((CheckBookItem*)tqparent)->childChange (numberOfBooks, selectedBooks); } -CheckBookItem::CheckBookItem (TQListView *parent, TQListViewItem *last, +CheckBookItem::CheckBookItem (TQListView *tqparent, TQListViewItem *last, const TQString &text, const TQString &name, const TQString &filename) - : TQCheckListItem (parent, text, TQCheckListItem::CheckBox) + : TQCheckListItem (tqparent, 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 *parent = this->parent(); - if (parent != 0) { + TQListViewItem *tqparent = this->tqparent(); + if (tqparent != 0) { if (on) - ((CheckBookItem*)parent)->childChange (0, 1); + ((CheckBookItem*)tqparent)->childChange (0, 1); else - ((CheckBookItem*)parent)->childChange (0, -1); + ((CheckBookItem*)tqparent)->childChange (0, -1); } } else propagateStateChange(); @@ -127,19 +127,19 @@ void CheckBookItem::propagateStateChange () { void CheckBookItem::childChange (int numberDiff, int selDiff) { numberOfBooks += numberDiff; selectedBooks += selDiff; - TQListViewItem *parent = this->parent(); - if (parent != 0) - ((CheckBookItem*)parent)->childChange (numberDiff, selDiff); + TQListViewItem *tqparent = this->tqparent(); + if (tqparent != 0) + ((CheckBookItem*)tqparent)->childChange (numberDiff, selDiff); TQString text = i18n(" (%1 of %2 books selected)"); - text = text.arg(selectedBooks).arg(numberOfBooks); + text = text.tqarg(selectedBooks).tqarg(numberOfBooks); setText(0, this->text(PhraseBookPrivate::name)+text); } /***************************************************************************/ -InitialPhraseBookWidget::InitialPhraseBookWidget (TQWidget *parent, const char *name) - : TQWidget(parent, name) +InitialPhraseBookWidget::InitialPhraseBookWidget (TQWidget *tqparent, const char *name) + : TQWidget(tqparent, 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 *parent = 0; + TQListViewItem *tqparent = 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 = parent; - parent = stack.pop(); + last = tqparent; + tqparent = stack.pop(); } for (; it2 != dirs.end(); ++it2) { - stack.push (parent); + stack.push (tqparent); TQListViewItem *newParent; - if (parent == 0) - newParent = new CheckBookItem (books, last, *it2, *it2, TQString::null); + if (tqparent == 0) + newParent = new CheckBookItem (books, last, *it2, *it2, TQString()); else - newParent = new CheckBookItem (parent, last, *it2, *it2, TQString::null); - parent = newParent; + newParent = new CheckBookItem (tqparent, last, *it2, *it2, TQString()); + tqparent = newParent; last = 0; } currentNamePath = dirs; TQListViewItem *book; - if (parent == 0) + if (tqparent == 0) book = new CheckBookItem (books, last, (*it).name, (*it).name, (*it).filename); else - book = new CheckBookItem (parent, last, (*it).name, (*it).name, (*it).filename); + book = new CheckBookItem (tqparent, last, (*it).name, (*it).name, (*it).filename); last = book; } } @@ -218,7 +218,7 @@ void InitialPhraseBookWidget::createBook () { } while ((item != 0) && (item->nextSibling() == 0)) { - item = item->parent(); + item = item->tqparent(); } if (item != 0) item = item->nextSibling(); @@ -233,8 +233,8 @@ void InitialPhraseBookWidget::createBook () { /***************************************************************************/ -ButtonBoxWidget::ButtonBoxWidget (TQWidget *parent, const char *name) -: ButtonBoxUI (parent, name) { +ButtonBoxWidget::ButtonBoxWidget (TQWidget *tqparent, const char *name) +: ButtonBoxUI (tqparent, name) { keyButtonPlaceLayout = new TQGridLayout (keyButtonPlace, 1, 1, 0, 0, "keyButtonPlaceLayout"); keyButton = new KKeyButton (keyButtonPlace, "key"); @@ -303,10 +303,10 @@ void PhraseBookDialog::initGUI () { treeView->setAllColumnsShowFocus (true); treeView->setSelectionMode (TQListView::Extended); TQWhatsThis::add (treeView, i18n("This list contains the current phrase book in a tree structure. You can select and modify individual phrases and sub phrase books")); - connect (treeView, TQT_SIGNAL(selectionChanged()), this, TQT_SLOT(selectionChanged())); - connect (treeView, TQT_SIGNAL(contextMenuRequested (TQListViewItem *, const TQPoint &, int)), this, TQT_SLOT(contextMenuRequested (TQListViewItem *, const TQPoint &, int))); - connect (treeView, TQT_SIGNAL(dropped (TQDropEvent *, TQListViewItem *, TQListViewItem *)), this, TQT_SLOT(slotDropped (TQDropEvent *, TQListViewItem *, TQListViewItem *))); - connect (treeView, TQT_SIGNAL(moved (TQListViewItem *, TQListViewItem *, TQListViewItem *)), this, TQT_SLOT(slotMoved (TQListViewItem *, TQListViewItem *, TQListViewItem *))); + connect (treeView, TQT_SIGNAL(selectionChanged()), TQT_TQOBJECT(this), TQT_SLOT(selectionChanged())); + connect (treeView, TQT_SIGNAL(contextMenuRequested (TQListViewItem *, const TQPoint &, int)), TQT_TQOBJECT(this), TQT_SLOT(contextMenuRequested (TQListViewItem *, const TQPoint &, int))); + connect (treeView, TQT_SIGNAL(dropped (TQDropEvent *, TQListViewItem *, TQListViewItem *)), TQT_TQOBJECT(this), TQT_SLOT(slotDropped (TQDropEvent *, TQListViewItem *, TQListViewItem *))); + connect (treeView, TQT_SIGNAL(moved (TQListViewItem *, TQListViewItem *, TQListViewItem *)), TQT_TQOBJECT(this), TQT_SLOT(slotMoved (TQListViewItem *, TQListViewItem *, TQListViewItem *))); mainLayout->addWidget (treeView); buttonBox = new ButtonBoxWidget (page, "buttonbox"); @@ -322,23 +322,23 @@ void PhraseBookDialog::initGUI () { void PhraseBookDialog::initActions() { // The file menu - fileNewPhrase = new KAction (i18n("&New Phrase"), "phrase_new", 0, this, TQT_SLOT(slotAddPhrase()), actionCollection(),"file_new_phrase"); + fileNewPhrase = new KAction (i18n("&New Phrase"), "phrase_new", 0, TQT_TQOBJECT(this), TQT_SLOT(slotAddPhrase()), actionCollection(),"file_new_phrase"); fileNewPhrase->setStatusText(i18n("Adds a new phrase")); fileNewPhrase->setWhatsThis (i18n("Adds a new phrase")); - fileNewBook = new KAction (i18n("New Phrase &Book"), "phrasebook_new", 0, this, TQT_SLOT(slotAddPhrasebook()), actionCollection(),"file_new_book"); + fileNewBook = new KAction (i18n("New Phrase &Book"), "phrasebook_new", 0, TQT_TQOBJECT(this), TQT_SLOT(slotAddPhrasebook()), actionCollection(),"file_new_book"); fileNewBook->setStatusText(i18n("Adds a new phrase book into which other books and phrases can be placed")); fileNewBook->setWhatsThis (i18n("Adds a new phrase book into which other books and phrases can be placed")); - fileSave = KStdAction::save(this, TQT_SLOT(slotSave()), actionCollection()); + fileSave = KStdAction::save(TQT_TQOBJECT(this), TQT_SLOT(slotSave()), actionCollection()); fileSave->setStatusText(i18n("Saves the phrase book onto the hard disk")); fileSave->setWhatsThis (i18n("Saves the phrase book onto the hard disk")); - fileImport = new KAction (i18n("&Import..."), "phrasebook_open", 0, this, TQT_SLOT(slotImportPhrasebook()), actionCollection(),"file_import"); + fileImport = new KAction (i18n("&Import..."), "phrasebook_open", 0, TQT_TQOBJECT(this), TQT_SLOT(slotImportPhrasebook()), actionCollection(),"file_import"); fileImport->setStatusText(i18n("Imports a file and adds its contents to the phrase book")); fileImport->setWhatsThis (i18n("Imports a file and adds its contents to the phrase book")); - toolbarImport = new KToolBarPopupAction (i18n("&Import..."), "phrasebook_open", 0, this, TQT_SLOT(slotImportPhrasebook()), actionCollection(),"toolbar_import"); + toolbarImport = new KToolBarPopupAction (i18n("&Import..."), "phrasebook_open", 0, TQT_TQOBJECT(this), TQT_SLOT(slotImportPhrasebook()), actionCollection(),"toolbar_import"); toolbarImport->setStatusText(i18n("Imports a file and adds its contents to the phrase book")); toolbarImport->setWhatsThis (i18n("Imports a file and adds its contents to the phrase book")); @@ -346,32 +346,32 @@ void PhraseBookDialog::initActions() { fileImportStandardBook->setStatusText(i18n("Imports a standard phrase book and adds its contents to the phrase book")); fileImportStandardBook->setWhatsThis (i18n("Imports a standard phrase book and adds its contents to the phrase book")); - fileExport = new KAction (i18n("&Export..."), "phrasebook_save", 0, this, TQT_SLOT(slotExportPhrasebook()), actionCollection(),"file_export"); + fileExport = new KAction (i18n("&Export..."), "phrasebook_save", 0, TQT_TQOBJECT(this), TQT_SLOT(slotExportPhrasebook()), actionCollection(),"file_export"); fileExport->setStatusText(i18n("Exports the currently selected phrase(s) or phrase book(s) into a file")); fileExport->setWhatsThis (i18n("Exports the currently selected phrase(s) or phrase book(s) into a file")); - filePrint = KStdAction::print(this, TQT_SLOT(slotPrint()), actionCollection()); + filePrint = KStdAction::print(TQT_TQOBJECT(this), TQT_SLOT(slotPrint()), actionCollection()); filePrint->setStatusText(i18n("Prints the currently selected phrase(s) or phrase book(s)")); filePrint->setWhatsThis (i18n("Prints the currently selected phrase(s) or phrase book(s)")); - fileClose = KStdAction::close(this, TQT_SLOT(close()), actionCollection()); + fileClose = KStdAction::close(TQT_TQOBJECT(this), TQT_SLOT(close()), actionCollection()); fileClose->setStatusText(i18n("Closes the window")); fileClose->setWhatsThis (i18n("Closes the window")); // The edit menu - editCut = KStdAction::cut(this, TQT_SLOT(slotCut()), actionCollection()); + editCut = KStdAction::cut(TQT_TQOBJECT(this), TQT_SLOT(slotCut()), actionCollection()); editCut->setStatusText(i18n("Cuts the currently selected entries from the phrase book and puts it to the clipboard")); editCut->setWhatsThis (i18n("Cuts the currently selected entries from the phrase book and puts it to the clipboard")); - editCopy = KStdAction::copy(this, TQT_SLOT(slotCopy()), actionCollection()); + editCopy = KStdAction::copy(TQT_TQOBJECT(this), TQT_SLOT(slotCopy()), actionCollection()); editCopy->setStatusText(i18n("Copies the currently selected entry from the phrase book to the clipboard")); editCopy->setWhatsThis (i18n("Copies the currently selected entry from the phrase book to the clipboard")); - editPaste = KStdAction::paste(this, TQT_SLOT(slotPaste()), actionCollection()); + editPaste = KStdAction::paste(TQT_TQOBJECT(this), TQT_SLOT(slotPaste()), actionCollection()); editPaste->setStatusText(i18n("Pastes the clipboard contents to actual position")); editPaste->setWhatsThis (i18n("Pastes the clipboard contents to actual position")); - editDelete = new KAction (i18n("&Delete"), "editdelete", 0, this, TQT_SLOT(slotRemove()), actionCollection(),"edit_delete"); + editDelete = new KAction (i18n("&Delete"), "editdelete", 0, TQT_TQOBJECT(this), TQT_SLOT(slotRemove()), actionCollection(),"edit_delete"); editDelete->setStatusText(i18n("Deletes the selected entries from the phrase book")); editDelete->setWhatsThis (i18n("Deletes the selected entries from the phrase book")); @@ -383,7 +383,7 @@ TQString PhraseBookDialog::displayPath (TQString filename) { TQFileInfo file(filename); TQString path = file.dirPath(); TQString dispPath = ""; - uint position = path.find("/kmouth/books/")+TQString("/kmouth/books/").length(); + uint position = path.tqfind("/kmouth/books/")+TQString("/kmouth/books/").length(); while (path.length() > position) { file.setFile(path); @@ -434,7 +434,7 @@ StandardBookList PhraseBookDialog::standardPhraseBooks() { void PhraseBookDialog::initStandardPhraseBooks () { StandardBookList bookPaths = standardPhraseBooks(); - KActionMenu *parent = fileImportStandardBook; + KActionMenu *tqparent = 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) - parent = stack.pop(); + tqparent = stack.pop(); for (; it2 != dirs.end(); ++it2) { - stack.push (parent); + stack.push (tqparent); KActionMenu *newParent = new KActionMenu (*it2); - parent->insert(newParent); - if (parent == fileImportStandardBook) + tqparent->insert(newParent); + if (tqparent == fileImportStandardBook) newParent->plug(toolbarImport->popupMenu()); - parent = newParent; + tqparent = newParent; } currentNamePath = dirs; KAction *book = new StandardPhraseBookInsertAction ( - url, (*it).name, this, TQT_SLOT(slotImportPhrasebook (const KURL &)), actionCollection()); - parent->insert(book); - if (parent == fileImportStandardBook) + url, (*it).name, TQT_TQOBJECT(this), TQT_SLOT(slotImportPhrasebook (const KURL &)), actionCollection()); + tqparent->insert(book); + if (tqparent == fileImportStandardBook) book->plug(toolbarImport->popupMenu()); } } @@ -567,7 +567,7 @@ void PhraseBookDialog::slotNoKey() { PhraseTreeItem *currentItem = selectedItem (treeView); if (currentItem != 0) { - currentItem->setCut (KShortcut(TQString::null)); + currentItem->setCut (KShortcut(TQString())); buttonBox->keyButton->setShortcut(currentItem->cut(), false); } phrasebookChanged = true; @@ -597,7 +597,7 @@ void PhraseBookDialog::setShortcut( const KShortcut& cut ) { { TQString s = i18n("In order to use the '%1' key as a shortcut, " "it must be combined with the " - "Win, Alt, Ctrl, and/or Shift keys.").arg(TQChar(key.sym())); + "Win, Alt, Ctrl, and/or Shift keys.").tqarg(TQChar(key.sym())); KMessageBox::sorry( this, s, i18n("Invalid Shortcut Key") ); return; } @@ -615,8 +615,8 @@ void PhraseBookDialog::setShortcut( const KShortcut& cut ) { } } -TQListViewItem *PhraseBookDialog::addBook (TQListViewItem *parent, TQListViewItem *after, PhraseBook *book) { - TQListViewItem *newItem = treeView->addBook(parent, after, book); +TQListViewItem *PhraseBookDialog::addBook (TQListViewItem *tqparent, TQListViewItem *after, PhraseBook *book) { + TQListViewItem *newItem = treeView->addBook(tqparent, 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->parent() != 0) - return addBook(item->parent(), item, book); + if (item->tqparent() != 0) + return addBook(item->tqparent(), item, book); else return addBook(0, item, book); else @@ -667,20 +667,20 @@ void PhraseBookDialog::slotCut () { void PhraseBookDialog::slotCopy () { PhraseBook book; treeView->fillBook (&book, true); - TQApplication::clipboard()->setData(new PhraseBookDrag(&book)); + TQApplication::tqclipboard()->setData(new PhraseBookDrag(&book)); } void PhraseBookDialog::slotPaste () { PhraseBook book; - if (PhraseBookDrag::decode(TQApplication::clipboard()->data(), &book)) { + if (PhraseBookDrag::decode(TQApplication::tqclipboard()->data(), &book)) { addBook (treeView->currentItem(), &book); } } -void PhraseBookDialog::slotDropped (TQDropEvent *e, TQListViewItem *parent, TQListViewItem *after) { +void PhraseBookDialog::slotDropped (TQDropEvent *e, TQListViewItem *tqparent, TQListViewItem *after) { PhraseBook book; if (PhraseBookDrag::decode(e, &book)) { - addBook(parent, after, &book); + addBook(tqparent, after, &book); } } @@ -719,7 +719,7 @@ void PhraseBookDialog::slotSave () { } void PhraseBookDialog::slotImportPhrasebook () { - KURL url=KFileDialog::getOpenURL(TQString::null, + KURL url=KFileDialog::getOpenURL(TQString(), i18n("*.phrasebook|Phrase Books (*.phrasebook)\n*.txt|Plain Text Files (*.txt)\n*|All Files"), this, i18n("Import Phrasebook")); slotImportPhrasebook (url); @@ -731,7 +731,7 @@ void PhraseBookDialog::slotImportPhrasebook (const KURL &url) { if (book.open (url)) addBook(treeView->currentItem(), &book); else - KMessageBox::sorry(this,i18n("There was an error loading file\n%1").arg( url.url() )); + KMessageBox::sorry(this,i18n("There was an error loading file\n%1").tqarg( url.url() )); } } @@ -741,7 +741,7 @@ void PhraseBookDialog::slotExportPhrasebook () { KURL url; if (book.save (this, i18n("Export Phrase Book"), url) == -1) - KMessageBox::sorry(this,i18n("There was an error saving file\n%1").arg( url.url() )); + KMessageBox::sorry(this,i18n("There was an error saving file\n%1").tqarg( url.url() )); } void PhraseBookDialog::slotPrint() diff --git a/kmouth/phrasebook/phrasebookdialog.h b/kmouth/phrasebook/phrasebookdialog.h index a3bc352..1a09a79 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 *parent, TQListViewItem *last, + CheckBookItem (TQListViewItem *tqparent, TQListViewItem *last, const TQString &text, const TQString &name, const TQString &filename); - CheckBookItem (TQListView *parent, TQListViewItem *last, + CheckBookItem (TQListView *tqparent, TQListViewItem *last, const TQString &text, const TQString &name, const TQString &filename); ~CheckBookItem(); @@ -74,8 +74,9 @@ private: class InitialPhraseBookWidget : public TQWidget { Q_OBJECT + TQ_OBJECT public: - InitialPhraseBookWidget(TQWidget *parent, const char *name); + InitialPhraseBookWidget(TQWidget *tqparent, const char *name); ~InitialPhraseBookWidget(); void createBook(); @@ -94,9 +95,10 @@ private: */ class StandardPhraseBookInsertAction : public KAction { Q_OBJECT + TQ_OBJECT public: - StandardPhraseBookInsertAction (const KURL &url, const TQString& name, const TQObject* receiver, const char* slot, KActionCollection* parent) - : KAction (name, "phrasebook", 0, 0, 0, parent, 0) { + StandardPhraseBookInsertAction (const KURL &url, const TQString& name, const TQObject* receiver, const char* slot, KActionCollection* tqparent) + : KAction (name, "phrasebook", 0, 0, 0, tqparent, 0) { this->url = url; connect (this, TQT_SIGNAL(slotActivated (const KURL &)), receiver, slot); }; @@ -123,7 +125,7 @@ private: */ class ButtonBoxWidget : public ButtonBoxUI { public: - ButtonBoxWidget (TQWidget *parent = 0, const char *name = 0); + ButtonBoxWidget (TQWidget *tqparent = 0, const char *name = 0); ~ButtonBoxWidget (); KKeyButton *keyButton; @@ -141,6 +143,7 @@ protected: class PhraseBookDialog : public KMainWindow { friend class InitialPhraseBookWidget; Q_OBJECT + TQ_OBJECT private: /** Constructor. It is private because this class implements the singleton * pattern. For creating the instance of the dialog, use the get() method. @@ -184,7 +187,7 @@ public slots: void slotExportPhrasebook (); void slotPrint (); - void slotDropped (TQDropEvent *e, TQListViewItem *parent, TQListViewItem *after); + void slotDropped (TQDropEvent *e, TQListViewItem *tqparent, TQListViewItem *after); void slotMoved (TQListViewItem *item, TQListViewItem *, TQListViewItem *); signals: @@ -199,7 +202,7 @@ private: /** initializes the list of standard phrase books */ void initStandardPhraseBooks (); - TQListViewItem *addBook (TQListViewItem *parent, TQListViewItem *after, PhraseBook *book); + TQListViewItem *addBook (TQListViewItem *tqparent, TQListViewItem *after, PhraseBook *book); TQListViewItem *addBook (TQListViewItem *item, PhraseBook *book); void setShortcut (const KShortcut &cut); diff --git a/kmouth/phrasebook/phrasebookparser.h b/kmouth/phrasebook/phrasebookparser.h index a858b4f..fe9db9f 100644 --- a/kmouth/phrasebook/phrasebookparser.h +++ b/kmouth/phrasebook/phrasebookparser.h @@ -24,7 +24,7 @@ /** * This class implements a parser for both the phrase list and for phrase - * books. It is intended to be used together with the Qt SAX2 framework. + * books. It is intended to be used together with the TQt SAX2 framework. * @author Gunnar Schmi Dt */ diff --git a/kmouth/phrasebook/phrasetree.cpp b/kmouth/phrasebook/phrasetree.cpp index 6ffbaee..dcd08c6 100644 --- a/kmouth/phrasebook/phrasetree.cpp +++ b/kmouth/phrasebook/phrasetree.cpp @@ -28,8 +28,8 @@ #include "phrasebookdialog.h" #include "phrasebook.h" -PhraseTreeItem::PhraseTreeItem (TQListView *parent, TQListViewItem *after, TQString phrase, KShortcut shortcut, TQPixmap icon) - : KListViewItem (parent, after, phrase) +PhraseTreeItem::PhraseTreeItem (TQListView *tqparent, TQListViewItem *after, TQString phrase, KShortcut shortcut, TQPixmap icon) + : KListViewItem (tqparent, after, phrase) { isPhraseValue = true; cutValue = shortcut; @@ -38,8 +38,8 @@ PhraseTreeItem::PhraseTreeItem (TQListView *parent, TQListViewItem *after, TQStr setExpandable (false); } -PhraseTreeItem::PhraseTreeItem (TQListViewItem *parent, TQListViewItem *after, TQString phrase, KShortcut shortcut, TQPixmap icon) - : KListViewItem (parent, after, phrase) +PhraseTreeItem::PhraseTreeItem (TQListViewItem *tqparent, TQListViewItem *after, TQString phrase, KShortcut shortcut, TQPixmap icon) + : KListViewItem (tqparent, after, phrase) { isPhraseValue = true; cutValue = shortcut; @@ -47,15 +47,15 @@ PhraseTreeItem::PhraseTreeItem (TQListViewItem *parent, TQListViewItem *after, T setPixmap(0, icon); setExpandable (false); } -PhraseTreeItem::PhraseTreeItem (TQListView *parent, TQListViewItem *after, TQString name, TQPixmap icon) - : KListViewItem (parent, after, name) +PhraseTreeItem::PhraseTreeItem (TQListView *tqparent, TQListViewItem *after, TQString name, TQPixmap icon) + : KListViewItem (tqparent, after, name) { isPhraseValue = false; setPixmap(0, icon); setExpandable (true); } -PhraseTreeItem::PhraseTreeItem (TQListViewItem *parent, TQListViewItem *after, TQString name, TQPixmap icon) - : KListViewItem (parent, after, name) +PhraseTreeItem::PhraseTreeItem (TQListViewItem *tqparent, TQListViewItem *after, TQString name, TQPixmap icon) + : KListViewItem (tqparent, after, name) { isPhraseValue = false; setPixmap(0, icon); @@ -74,8 +74,8 @@ void PhraseTreeItem::setCut (KShortcut cut) { // *************************************************************************** -PhraseTree::PhraseTree (TQWidget *parent, const char *name) - : KListView (parent, name) +PhraseTree::PhraseTree (TQWidget *tqparent, const char *name) + : KListView (tqparent, 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 *parent = item->parent(); + TQListViewItem *tqparent = item->tqparent(); TQListViewItem *above = item->itemAbove(); - if (above == parent) + if (above == tqparent) return 0; - while (above->parent() != parent) - above = above->parent(); + while (above->tqparent() != tqparent) + above = above->tqparent(); return above; } @@ -109,25 +109,25 @@ namespace PhraseTreePrivate { if (item == 0) return false; - TQListViewItem *parent = item->parent(); + TQListViewItem *tqparent = item->tqparent(); TQListViewItem *above = item->itemAbove(); if (above == 0) return false; - else if (above == parent) { - *newParent = parent->parent(); - *newAbove = prevSibling (parent); + else if (above == tqparent) { + *newParent = tqparent->tqparent(); + *newAbove = prevSibling (tqparent); return true; } - else if (above->parent() == parent) { - *newParent = parent; + else if (above->tqparent() == tqparent) { + *newParent = tqparent; *newAbove = prevSibling (above); return true; } else { - while (above->parent()->parent() != parent) - above = above->parent(); - *newParent = above->parent(); + while (above->tqparent()->tqparent() != tqparent) + above = above->tqparent(); + *newParent = above->tqparent(); *newAbove = above; return true; } @@ -140,14 +140,14 @@ namespace PhraseTreePrivate { if (item == 0) return false; - TQListViewItem *parent = item->parent(); + TQListViewItem *tqparent = item->tqparent(); TQListViewItem *below = item->nextSibling(); - if (parent == 0 && below == 0) + if (tqparent == 0 && below == 0) return false; - else if (parent != 0 && below == 0) { - *newParent = parent->parent(); - *newAbove = parent; + else if (tqparent != 0 && below == 0) { + *newParent = tqparent->tqparent(); + *newAbove = tqparent; return true; } else if (below->isOpen()) { @@ -156,7 +156,7 @@ namespace PhraseTreePrivate { return true; } else { - *newParent = parent; + *newParent = tqparent; *newAbove = below; return true; } @@ -195,32 +195,32 @@ namespace PhraseTreePrivate { if (item == 0) return false; - TQListViewItem *parent = item->parent(); + TQListViewItem *tqparent = item->tqparent(); - if (parent == 0) + if (tqparent == 0) return false; else { - *newParent = parent->parent(); - *newAbove = parent; + *newParent = tqparent->tqparent(); + *newAbove = tqparent; return true; } } } void PhraseTree::moveItem (TQListViewItem *item, - TQListViewItem *parent, + TQListViewItem *tqparent, TQListViewItem *above) { if (item != 0) { - if (item->parent() == 0) + if (item->tqparent() == 0) takeItem (item); else - item->parent()->takeItem (item); + item->tqparent()->takeItem (item); - if (parent == 0) + if (tqparent == 0) insertItem (item); else - parent->insertItem (item); + tqparent->insertItem (item); item->moveItem(above); } @@ -241,7 +241,7 @@ bool PhraseTree::hasSelectedItems() { } else { while ((i != 0) && (i->nextSibling() == 0)) { - i = i->parent(); + i = i->tqparent(); level--; } if (i != 0) @@ -267,7 +267,7 @@ void PhraseTree::deleteSelectedItems() { } else { while ((i != 0) && (i->nextSibling() == 0)) { - i = i->parent(); + i = i->tqparent(); } if (i != 0) i = i->nextSibling(); @@ -281,15 +281,15 @@ void PhraseTree::deleteSelectedItems() { } void PhraseTree::keyPressEvent (TQKeyEvent *e) { - if ((e->state() & Qt::KeyButtonMask) == Qt::AltButton) { - if (e->key() == Qt::Key_Up) { + if ((e->state() & TQt::KeyButtonMask) == TQt::AltButton) { + if (e->key() == TQt::Key_Up) { TQListViewItem *item = currentItem(); if ((item != 0) && (item->isSelected())) { - TQListViewItem *parent; + TQListViewItem *tqparent; TQListViewItem *above; - if (PhraseTreePrivate::findAbovePosition (item, &parent, &above)) { - moveItem(item, parent, above); + if (PhraseTreePrivate::findAbovePosition (item, &tqparent, &above)) { + moveItem(item, tqparent, above); setCurrentItem (item); item->setSelected(true); } @@ -297,14 +297,14 @@ void PhraseTree::keyPressEvent (TQKeyEvent *e) { e->accept(); return; } - else if (e->key() == Qt::Key_Down) { + else if (e->key() == TQt::Key_Down) { TQListViewItem *item = currentItem(); if ((item != 0) && (item->isSelected())) { - TQListViewItem *parent; + TQListViewItem *tqparent; TQListViewItem *above; - if (PhraseTreePrivate::findBelowPosition (item, &parent, &above)) { - moveItem(item, parent, above); + if (PhraseTreePrivate::findBelowPosition (item, &tqparent, &above)) { + moveItem(item, tqparent, above); setCurrentItem (item); item->setSelected(true); } @@ -312,14 +312,14 @@ void PhraseTree::keyPressEvent (TQKeyEvent *e) { e->accept(); return; } - else if (e->key() == Qt::Key_Left) { + else if (e->key() == TQt::Key_Left) { TQListViewItem *item = currentItem(); if ((item != 0) && (item->isSelected())) { - TQListViewItem *parent; + TQListViewItem *tqparent; TQListViewItem *above; - if (PhraseTreePrivate::findLeftPosition (item, &parent, &above)) { - moveItem(item, parent, above); + if (PhraseTreePrivate::findLeftPosition (item, &tqparent, &above)) { + moveItem(item, tqparent, above); setCurrentItem (item); item->setSelected(true); } @@ -327,14 +327,14 @@ void PhraseTree::keyPressEvent (TQKeyEvent *e) { e->accept(); return; } - else if (e->key() == Qt::Key_Right) { + else if (e->key() == TQt::Key_Right) { TQListViewItem *item = currentItem(); if ((item != 0) && (item->isSelected())) { - TQListViewItem *parent; + TQListViewItem *tqparent; TQListViewItem *above; - if (PhraseTreePrivate::findRightPosition (item, &parent, &above)) { - moveItem(item, parent, above); + if (PhraseTreePrivate::findRightPosition (item, &tqparent, &above)) { + moveItem(item, tqparent, above); setCurrentItem (item); item->setSelected(true); } @@ -346,57 +346,57 @@ void PhraseTree::keyPressEvent (TQKeyEvent *e) { KListView::keyPressEvent(e); } -PhraseTreeItem *PhraseTree::insertPhrase (TQListViewItem *parent, TQListViewItem *after, TQString phrase, TQString shortcut) { +PhraseTreeItem *PhraseTree::insertPhrase (TQListViewItem *tqparent, TQListViewItem *after, TQString phrase, TQString shortcut) { KShortcut cut = KShortcut(shortcut); if (isKeyPresent (cut, 0, false)) - cut = KShortcut(TQString::null); + cut = KShortcut(TQString()); - if (parent == 0) + if (tqparent == 0) return new PhraseTreeItem (this, after, phrase, cut, this->phrase); else - return new PhraseTreeItem (parent, after, phrase, cut, this->phrase); + return new PhraseTreeItem (tqparent, after, phrase, cut, this->phrase); } -PhraseTreeItem *PhraseTree::insertBook (TQListViewItem *parent, TQListViewItem *after, TQString name) { - if (parent == 0) +PhraseTreeItem *PhraseTree::insertBook (TQListViewItem *tqparent, TQListViewItem *after, TQString name) { + if (tqparent == 0) return new PhraseTreeItem (this, after, name, phrasebook_closed); else - return new PhraseTreeItem (parent, after, name, phrasebook_closed); + return new PhraseTreeItem (tqparent, after, name, phrasebook_closed); } -TQListViewItem *PhraseTree::addBook (TQListViewItem *parent, TQListViewItem *after, PhraseBook *book) { +TQListViewItem *PhraseTree::addBook (TQListViewItem *tqparent, 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) { - parent = insertBook(parent, last, ""); + tqparent = insertBook(tqparent, last, ""); last = 0; level++; } while (level > newLevel) { - last = parent; - if (parent != 0) - parent = parent->parent(); + last = tqparent; + if (tqparent != 0) + tqparent = tqparent->tqparent(); level--; } if ((*it).isPhrase()) { Phrase phrase = (*it).getPhrase(); - last = insertPhrase (parent, last, phrase.getPhrase(), phrase.getShortcut()); + last = insertPhrase (tqparent, last, phrase.getPhrase(), phrase.getShortcut()); } else { Phrase phrase = (*it).getPhrase(); - parent = insertBook(parent, last, phrase.getPhrase()); + tqparent = insertBook(tqparent, last, phrase.getPhrase()); last = 0; level++; } } while (level > 0) { - last = parent; - if (parent != 0) - parent = parent->parent(); + last = tqparent; + if (tqparent != 0) + tqparent = tqparent->tqparent(); level--; } return last; @@ -421,7 +421,7 @@ void PhraseTree::fillBook (PhraseBook *book, bool respectSelection) { } else { while ((i != 0) && (i->nextSibling() == 0)) { - i = i->parent(); + i = i->tqparent(); if (level > 0) level--; } @@ -470,7 +470,7 @@ void PhraseTree::_warning (const KKeySequence& cut, TQString sAction, TQString s i18n("The '%1' key combination has already been allocated " "to %2.\n" "Please choose a unique key combination."). - arg(cut.toString()).arg(sAction); + tqarg(cut.toString()).tqarg(sAction); KMessageBox::sorry( this, s, sTitle ); } @@ -485,7 +485,7 @@ bool PhraseTree::isStdAccelPresent (const KShortcut& cut, bool warnUser) { { if (warnUser) _warning (cut.seq(iSeq), - i18n("the standard \"%1\" action").arg(KStdAccel::label(id)), + i18n("the standard \"%1\" action").tqarg(KStdAccel::label(id)), i18n("Conflict with Standard Application Shortcut")); return true; } @@ -501,7 +501,7 @@ bool PhraseTree::isGlobalKeyPresent (const KShortcut& cut, bool warnUser) { if (iSeq > -1) { if (warnUser) _warning (cut.seq(iSeq), - i18n("the global \"%1\" action").arg(it.key()), + i18n("the global \"%1\" action").tqarg(it.key()), i18n("Conflict with Global Shortcuts")); return true; } diff --git a/kmouth/phrasebook/phrasetree.h b/kmouth/phrasebook/phrasetree.h index 45ae26c..26af68c 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 *parent, TQListViewItem *after, TQString phrase, KShortcut shortcut, TQPixmap icon); + PhraseTreeItem (TQListView *tqparent, TQListViewItem *after, TQString phrase, KShortcut shortcut, TQPixmap icon); /** Creates a phrase item at the top level */ - PhraseTreeItem (TQListViewItem *parent, TQListViewItem *after, TQString phrase, KShortcut shortcut, TQPixmap icon); + PhraseTreeItem (TQListViewItem *tqparent, TQListViewItem *after, TQString phrase, KShortcut shortcut, TQPixmap icon); /** Creates a phrase book item within a sub phrase book */ - PhraseTreeItem (TQListView *parent, TQListViewItem *after, TQString name, TQPixmap icon); + PhraseTreeItem (TQListView *tqparent, TQListViewItem *after, TQString name, TQPixmap icon); /** Creates a phrase book item at the top level */ - PhraseTreeItem (TQListViewItem *parent, TQListViewItem *after, TQString name, TQPixmap icon); + PhraseTreeItem (TQListViewItem *tqparent, TQListViewItem *after, TQString name, TQPixmap icon); public: bool isPhrase(); @@ -60,22 +60,23 @@ private: class PhraseTree : public KListView { friend class PhraseTreeItem; Q_OBJECT + TQ_OBJECT public: - PhraseTree (TQWidget *parent = 0, const char *name = 0); + PhraseTree (TQWidget *tqparent = 0, const char *name = 0); ~PhraseTree (); void keyPressEvent (TQKeyEvent *e); - PhraseTreeItem *insertPhrase (TQListViewItem *parent, TQListViewItem *after, TQString phrase, TQString shortcut); - PhraseTreeItem *insertBook (TQListViewItem *parent, TQListViewItem *after, TQString name); + PhraseTreeItem *insertPhrase (TQListViewItem *tqparent, TQListViewItem *after, TQString phrase, TQString shortcut); + PhraseTreeItem *insertBook (TQListViewItem *tqparent, TQListViewItem *after, TQString name); - TQListViewItem *addBook (TQListViewItem *parent, TQListViewItem *after, PhraseBook *book); + TQListViewItem *addBook (TQListViewItem *tqparent, TQListViewItem *after, PhraseBook *book); void fillBook (PhraseBook *book, bool respectSelection); TQDragObject *dragObject (); TQDragObject *dragObject (bool isDependent); - void moveItem (TQListViewItem *item, TQListViewItem *parent, TQListViewItem *above); + void moveItem (TQListViewItem *item, TQListViewItem *tqparent, TQListViewItem *above); bool hasSelectedItems(); void deleteSelectedItems(); -- cgit v1.2.3