From 5ca50f0ef6000d132b45fc6a50cf3062245bd070 Mon Sep 17 00:00:00 2001 From: Timothy Pearson Date: Fri, 1 Feb 2013 15:09:56 -0600 Subject: Rename a number of classes to enhance compatibility with KDE4 --- kmouth/kmouth.cpp | 44 +++++++++--------- kmouth/kmouth.h | 62 +++++++++++++------------- kmouth/phrasebook/phrasebook.cpp | 8 ++-- kmouth/phrasebook/phrasebook.h | 12 ++--- kmouth/phrasebook/phrasebookdialog.cpp | 34 +++++++------- kmouth/phrasebook/phrasebookdialog.h | 52 ++++++++++----------- kmouth/phrasebook/phrasetree.cpp | 46 +++++++++---------- kmouth/phrasebook/phrasetree.h | 26 +++++------ kmouth/phraselist.cpp | 2 +- kmouth/phraselist.h | 2 +- kmouth/wordcompletion/wordcompletionui.ui | 2 +- kmouth/wordcompletion/wordcompletionwidget.cpp | 10 ++--- 12 files changed, 150 insertions(+), 150 deletions(-) (limited to 'kmouth') diff --git a/kmouth/kmouth.cpp b/kmouth/kmouth.cpp index b395ece..2596e58 100644 --- a/kmouth/kmouth.cpp +++ b/kmouth/kmouth.cpp @@ -40,7 +40,7 @@ #define ID_STATUS_MSG 1 -KMouthApp::KMouthApp(TQWidget* , const char* name):KMainWindow(0, name) +KMouthApp::KMouthApp(TQWidget* , const char* name):TDEMainWindow(0, name) { isConfigured = false; config=kapp->config(); @@ -56,7 +56,7 @@ KMouthApp::KMouthApp(TQWidget* , const char* name):KMainWindow(0, name) connect (optionsDialog, TQT_SIGNAL(configurationChanged ()), phraseList, TQT_SLOT(configureCompletion ())); - phrases = new KActionCollection (this); + phrases = new TDEActionCollection (this); readOptions(); ConfigWizard *wizard = new ConfigWizard (this, "ConfigWizard", config); @@ -95,15 +95,15 @@ bool KMouthApp::configured() { void KMouthApp::initActions() { // The "File" menu - fileOpen = new KAction(i18n("&Open as History..."), "phrasehistory_open", KStdAccel::open(), TQT_TQOBJECT(this), TQT_SLOT(slotFileOpen()), actionCollection(),"file_open"); + fileOpen = new TDEAction(i18n("&Open as History..."), "phrasehistory_open", TDEStdAccel::open(), TQT_TQOBJECT(this), TQT_SLOT(slotFileOpen()), actionCollection(),"file_open"); fileOpen->setStatusText(i18n("Opens an existing file as history")); fileOpen->setWhatsThis (i18n("Opens an existing file as history")); - fileSaveAs = new KAction(i18n("Save &History As..."), "phrasehistory_save", KStdAccel::save(), TQT_TQOBJECT(this), TQT_SLOT(slotFileSaveAs()), actionCollection(),"file_save_as"); + fileSaveAs = new TDEAction(i18n("Save &History As..."), "phrasehistory_save", TDEStdAccel::save(), TQT_TQOBJECT(this), TQT_SLOT(slotFileSaveAs()), actionCollection(),"file_save_as"); fileSaveAs->setStatusText(i18n("Saves the actual history as...")); fileSaveAs->setWhatsThis (i18n("Saves the actual history as...")); - filePrint = new KAction(i18n("&Print History..."), "phrasehistory_print", KStdAccel::print(), TQT_TQOBJECT(this), TQT_SLOT(slotFilePrint()), actionCollection(),"file_print"); + filePrint = new TDEAction(i18n("&Print History..."), "phrasehistory_print", TDEStdAccel::print(), TQT_TQOBJECT(this), TQT_SLOT(slotFilePrint()), actionCollection(),"file_print"); filePrint->setStatusText(i18n("Prints out the actual history")); filePrint->setWhatsThis (i18n("Prints out the actual history")); @@ -124,12 +124,12 @@ void KMouthApp::initActions() { editPaste->setStatusText(i18n("Pastes the clipboard contents to actual position")); editPaste->setWhatsThis (i18n("Pastes the clipboard contents at the current cursor position into the edit field.")); - editSpeak = new KAction (i18n("&Speak"), "speak", 0, TQT_TQOBJECT(phraseList), TQT_SLOT(speak()), actionCollection(),"edit_speak"); + editSpeak = new TDEAction (i18n("&Speak"), "speak", 0, TQT_TQOBJECT(phraseList), TQT_SLOT(speak()), actionCollection(),"edit_speak"); editSpeak->setStatusText(i18n("Speaks the currently active sentence(s)")); editSpeak->setWhatsThis (i18n("Speaks the currently active sentence(s). If there is some text in the edit field it is spoken. Otherwise the selected sentences in the history (if any) are spoken.")); // The "Phrase book" menu - phrasebookEdit = new KAction(i18n("&Edit..."), 0, 0, TQT_TQOBJECT(this), TQT_SLOT(slotEditPhrasebook()), actionCollection(),"phrasebook_edit"); + phrasebookEdit = new TDEAction(i18n("&Edit..."), 0, 0, TQT_TQOBJECT(this), TQT_SLOT(slotEditPhrasebook()), actionCollection(),"phrasebook_edit"); // The "Options" menu viewMenuBar = KStdAction::showMenubar(TQT_TQOBJECT(this), TQT_SLOT(slotViewMenuBar()), actionCollection()); @@ -137,7 +137,7 @@ void KMouthApp::initActions() { viewToolBar->setStatusText(i18n("Enables/disables the toolbar")); viewToolBar->setWhatsThis (i18n("Enables/disables the toolbar")); - viewPhrasebookBar = new KToggleAction (i18n("Show P&hrasebook Bar"), 0, 0, TQT_TQOBJECT(this), TQT_SLOT(slotViewPhrasebookBar()), actionCollection(), "showPhrasebookBar"); + viewPhrasebookBar = new TDEToggleAction (i18n("Show P&hrasebook Bar"), 0, 0, TQT_TQOBJECT(this), TQT_SLOT(slotViewPhrasebookBar()), actionCollection(), "showPhrasebookBar"); viewPhrasebookBar->setStatusText(i18n("Enables/disables the phrasebook bar")); viewPhrasebookBar->setWhatsThis (i18n("Enables/disables the phrasebook bar")); @@ -145,7 +145,7 @@ void KMouthApp::initActions() { viewStatusBar->setStatusText(i18n("Enables/disables the statusbar")); viewStatusBar->setWhatsThis (i18n("Enables/disables the statusbar")); - configureTTS = new KAction (i18n("&Configure KMouth..."), "configure", 0, TQT_TQOBJECT(this), TQT_SLOT(slotConfigureTTS()), actionCollection(), "configureTTS"); + configureTTS = new TDEAction (i18n("&Configure KMouth..."), "configure", 0, TQT_TQOBJECT(this), TQT_SLOT(slotConfigureTTS()), actionCollection(), "configureTTS"); configureTTS->setStatusText(i18n("Opens the configuration dialog")); configureTTS->setWhatsThis (i18n("Opens the configuration dialog")); @@ -153,27 +153,27 @@ void KMouthApp::initActions() { // The "Help" menu will automatically get created. // The popup menu of the list of spoken sentences - phraseListSpeak = new KAction (i18n("&Speak"), "speak", 0, TQT_TQOBJECT(phraseList), TQT_SLOT(speakListSelection()), actionCollection(), "phraselist_speak"); + phraseListSpeak = new TDEAction (i18n("&Speak"), "speak", 0, TQT_TQOBJECT(phraseList), TQT_SLOT(speakListSelection()), actionCollection(), "phraselist_speak"); phraseListSpeak->setStatusText(i18n("Speaks the currently selected phrases in the history")); phraseListSpeak->setWhatsThis (i18n("Speaks the currently selected phrases in the history")); - phraseListRemove = new KAction (i18n("&Delete"), "editdelete", 0, TQT_TQOBJECT(phraseList), TQT_SLOT(removeListSelection()), actionCollection(), "phraselist_remove"); + phraseListRemove = new TDEAction (i18n("&Delete"), "editdelete", 0, TQT_TQOBJECT(phraseList), TQT_SLOT(removeListSelection()), actionCollection(), "phraselist_remove"); phraseListRemove->setStatusText(i18n("Deletes the currently selected phrases from the history")); phraseListRemove->setWhatsThis (i18n("Deletes the currently selected phrases from the history")); - phraseListCut = new KAction (i18n("Cu&t"), "editcut", 0, TQT_TQOBJECT(phraseList), TQT_SLOT(cutListSelection()), actionCollection(), "phraselist_cut"); + phraseListCut = new TDEAction (i18n("Cu&t"), "editcut", 0, TQT_TQOBJECT(phraseList), TQT_SLOT(cutListSelection()), actionCollection(), "phraselist_cut"); phraseListCut->setStatusText(i18n("Cuts the currently selected phrases from the history and puts them to the clipboard")); phraseListCut->setWhatsThis (i18n("Cuts the currently selected phrases from the history and puts them to the clipboard")); - phraseListCopy = new KAction (i18n("&Copy"), "editcopy", 0, TQT_TQOBJECT(phraseList), TQT_SLOT(copyListSelection()), actionCollection(), "phraselist_copy"); + phraseListCopy = new TDEAction (i18n("&Copy"), "editcopy", 0, TQT_TQOBJECT(phraseList), TQT_SLOT(copyListSelection()), actionCollection(), "phraselist_copy"); phraseListCut->setStatusText(i18n("Copies the currently selected phrases from the history to the clipboard")); phraseListCut->setWhatsThis (i18n("Copies the currently selected phrases from the history to the clipboard")); - phraselistSelectAll = new KAction (i18n("Select &All Entries"), 0, 0, TQT_TQOBJECT(phraseList), TQT_SLOT(selectAllEntries()), actionCollection(),"phraselist_select_all"); + phraselistSelectAll = new TDEAction (i18n("Select &All Entries"), 0, 0, TQT_TQOBJECT(phraseList), TQT_SLOT(selectAllEntries()), actionCollection(),"phraselist_select_all"); phraselistSelectAll->setStatusText(i18n("Selects all phrases in the history")); phraselistSelectAll->setWhatsThis (i18n("Selects all phrases in the history")); - phraselistDeselectAll = new KAction (i18n("D&eselect All Entries"), 0, 0, TQT_TQOBJECT(phraseList), TQT_SLOT(deselectAllEntries()), actionCollection(),"phraselist_deselect_all"); + phraselistDeselectAll = new TDEAction (i18n("D&eselect All Entries"), 0, 0, TQT_TQOBJECT(phraseList), TQT_SLOT(deselectAllEntries()), actionCollection(),"phraselist_deselect_all"); phraselistDeselectAll->setStatusText(i18n("Deselects all phrases in the history")); phraselistDeselectAll->setWhatsThis (i18n("Deselects all phrases in the history")); @@ -251,8 +251,8 @@ void KMouthApp::readOptions() // bar position settings - KToolBar::BarPosition toolBarPos; - toolBarPos=(KToolBar::BarPosition) config->readNumEntry("ToolBarPos", KToolBar::Top); + TDEToolBar::BarPosition toolBarPos; + toolBarPos=(TDEToolBar::BarPosition) config->readNumEntry("ToolBarPos", TDEToolBar::Top); toolBar("mainToolBar")->setBarPos(toolBarPos); TQSize size=config->readSizeEntry("Geometry"); @@ -340,7 +340,7 @@ void KMouthApp::slotFileQuit() saveOptions(); // close the first window, the list makes the next one the first again. // This ensures that queryClose() is called on each window to ask for closing - KMainWindow* w; + TDEMainWindow* w; if (memberList) { for(w=memberList->first(); w!=0; w=memberList->first()) @@ -448,16 +448,16 @@ void KMouthApp::slotStatusMsg(const TQString &text) void KMouthApp::slotPhrasebookConfirmed (PhraseBook &book) { TQString name = "phrasebooks"; TQPopupMenu *popup = (TQPopupMenu *)factory()->container(name, this); - KToolBar *toolbar = toolBar ("phrasebookBar"); + TDEToolBar *toolbar = toolBar ("phrasebookBar"); - KActionPtrList actions = phrases->actions (); - KActionPtrList::iterator iter; + TDEActionPtrList actions = phrases->actions (); + TDEActionPtrList::iterator iter; for (iter = actions.begin(); iter != actions.end(); ++iter) { (*iter)->unplugAll(); } delete phrases; - phrases = new KActionCollection (this, actionCollection()); + phrases = new TDEActionCollection (this, actionCollection()); book.addToGUI (popup, toolbar, phrases, TQT_TQOBJECT(this), TQT_SLOT(slotPhraseSelected (const TQString &))); TQString bookLocation = TDEApplication::kApplication()->dirs()->saveLocation ("appdata", "/"); diff --git a/kmouth/kmouth.h b/kmouth/kmouth.h index 99d6bd5..0ba6557 100644 --- a/kmouth/kmouth.h +++ b/kmouth/kmouth.h @@ -44,16 +44,16 @@ class PhraseBook; * The base class for KMouth application windows. It sets up the main * window and reads the config file as well as providing a menubar, toolbar * and statusbar. - * KMouthApp reimplements the methods that KMainWindow provides for main window handling and supports - * full session management as well as using KActions. - * @see KMainWindow + * KMouthApp reimplements the methods that TDEMainWindow provides for main window handling and supports + * full session management as well as using TDEActions. + * @see TDEMainWindow * @see TDEApplication * @see TDEConfig * * @author Source Framework Automatically Generated by KDevelop, (c) The KDevelop Team. * @version KDevelop version 1.2 code generation */ -class KMouthApp : public KMainWindow +class KMouthApp : public TDEMainWindow { Q_OBJECT @@ -88,7 +88,7 @@ class KMouthApp : public KMainWindow void readOptions(); /** initializes the phrase list */ void initPhraseList(); - /** initializes the KActions of the application */ + /** initializes the TDEActions of the application */ void initActions(); /** sets up the statusbar for the main window by initialzing a statuslabel. */ @@ -157,32 +157,32 @@ class KMouthApp : public KMainWindow /** The configuration dialog */ OptionsDialog *optionsDialog; - // KAction pointers to enable/disable actions - KAction* fileOpen; - KAction* fileSaveAs; - KAction* filePrint; - KAction* fileQuit; - - KAction* editCut; - KAction* editCopy; - KAction* editPaste; - KAction* editSpeak; - - KActionCollection *phrases; - KAction* phrasebookEdit; - - KToggleAction* viewMenuBar; - KToggleAction* viewToolBar; - KToggleAction* viewPhrasebookBar; - KToggleAction* viewStatusBar; - KAction* configureTTS; - - KAction* phraseListSpeak; - KAction* phraseListRemove; - KAction* phraseListCut; - KAction* phraseListCopy; - KAction* phraselistSelectAll; - KAction* phraselistDeselectAll; + // TDEAction pointers to enable/disable actions + TDEAction* fileOpen; + TDEAction* fileSaveAs; + TDEAction* filePrint; + TDEAction* fileQuit; + + TDEAction* editCut; + TDEAction* editCopy; + TDEAction* editPaste; + TDEAction* editSpeak; + + TDEActionCollection *phrases; + TDEAction* phrasebookEdit; + + TDEToggleAction* viewMenuBar; + TDEToggleAction* viewToolBar; + TDEToggleAction* viewPhrasebookBar; + TDEToggleAction* viewStatusBar; + TDEAction* configureTTS; + + TDEAction* phraseListSpeak; + TDEAction* phraseListRemove; + TDEAction* phraseListCut; + TDEAction* phraseListCopy; + TDEAction* phraselistSelectAll; + TDEAction* phraselistDeselectAll; }; #endif // KMOUTH_H diff --git a/kmouth/phrasebook/phrasebook.cpp b/kmouth/phrasebook/phrasebook.cpp index 6494321..33dd5dc 100644 --- a/kmouth/phrasebook/phrasebook.cpp +++ b/kmouth/phrasebook/phrasebook.cpp @@ -370,7 +370,7 @@ bool PhraseBook::open (const KURL &url) { return false; } -void PhraseBook::addToGUI (TQPopupMenu *popup, KToolBar *toolbar, KActionCollection *phrases, +void PhraseBook::addToGUI (TQPopupMenu *popup, TDEToolBar *toolbar, TDEActionCollection *phrases, TQObject *receiver, const char *slot) const { if ((popup != 0) || (toolbar != 0)) { TQPtrStack stack; @@ -381,7 +381,7 @@ void PhraseBook::addToGUI (TQPopupMenu *popup, KToolBar *toolbar, KActionCollect for (it = begin(); it != end(); ++it) { int newLevel = (*it).getLevel(); while (newLevel > level) { - KActionMenu *menu = new KActionMenu("", "phrasebook"); + TDEActionMenu *menu = new TDEActionMenu("", "phrasebook"); menu->setDelayed(false); phrases->insert(menu); menu->plug (parent); @@ -398,7 +398,7 @@ void PhraseBook::addToGUI (TQPopupMenu *popup, KToolBar *toolbar, KActionCollect } if ((*it).isPhrase()) { Phrase phrase = (*it).getPhrase(); - KAction *action = new PhraseAction (phrase.getPhrase(), + TDEAction *action = new PhraseAction (phrase.getPhrase(), phrase.getShortcut(), receiver, slot, phrases); if (parent == popup) action->plug (toolbar); @@ -407,7 +407,7 @@ void PhraseBook::addToGUI (TQPopupMenu *popup, KToolBar *toolbar, KActionCollect } else { Phrase phrase = (*it).getPhrase(); - KActionMenu *menu = new KActionMenu(phrase.getPhrase(), "phrasebook"); + TDEActionMenu *menu = new TDEActionMenu(phrase.getPhrase(), "phrasebook"); menu->setDelayed(false); phrases->insert(menu); if (parent == popup) diff --git a/kmouth/phrasebook/phrasebook.h b/kmouth/phrasebook/phrasebook.h index 1e77c6d..d156be2 100644 --- a/kmouth/phrasebook/phrasebook.h +++ b/kmouth/phrasebook/phrasebook.h @@ -131,8 +131,8 @@ public: /** Adds the entries of the book to both the given popup menu and the given * toolbar. The corresponding actions will be inserted into phrases. */ - void addToGUI (TQPopupMenu *popup, KToolBar *toolbar, - KActionCollection *phrases, + void addToGUI (TQPopupMenu *popup, TDEToolBar *toolbar, + TDEActionCollection *phrases, TQObject *receiver, const char *slot) const; /** Inserts book into a new sub phrase book. @@ -169,12 +169,12 @@ private: TQTextDrag plain; }; -class PhraseAction : public KAction { +class PhraseAction : public TDEAction { Q_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, TDEActionCollection* parent) + : TDEAction (phrase, "phrase", TDEShortcut(cut), 0, 0, parent, phrase.latin1()) { this->phrase = phrase; connect (this, TQT_SIGNAL(slotActivated (const TQString &)), receiver, slot); }; @@ -183,7 +183,7 @@ public: public slots: void slotActivated () { - KAction::slotActivated(); + TDEAction::slotActivated(); emit slotActivated (phrase); } diff --git a/kmouth/phrasebook/phrasebookdialog.cpp b/kmouth/phrasebook/phrasebookdialog.cpp index 544bc86..26f1d2d 100644 --- a/kmouth/phrasebook/phrasebookdialog.cpp +++ b/kmouth/phrasebook/phrasebookdialog.cpp @@ -145,7 +145,7 @@ InitialPhraseBookWidget::InitialPhraseBookWidget (TQWidget *parent, const char * TQLabel *label = new TQLabel (i18n("Please decide which phrase books you need:"), this, "booksTitle"); mainLayout->add (label); - books = new KListView (this, "books"); + books = new TDEListView (this, "books"); books->setSorting (-1); books->setItemsMovable (false); books->setDragEnabled (false); @@ -258,7 +258,7 @@ namespace PhraseBookPrivate { } PhraseBookDialog::PhraseBookDialog () - : KMainWindow (0, "phraseEditDialog") + : TDEMainWindow (0, "phraseEditDialog") { setCaption (i18n("Phrase Book")); initGUI(); @@ -313,7 +313,7 @@ void PhraseBookDialog::initGUI () { connect (buttonBox->lineEdit, TQT_SIGNAL(textChanged(const TQString &)), TQT_SLOT(slotTextChanged(const TQString &))); connect (buttonBox->noKey, TQT_SIGNAL(clicked()), TQT_SLOT(slotNoKey())); connect (buttonBox->customKey, TQT_SIGNAL(clicked()), TQT_SLOT(slotCustomKey())); - connect (buttonBox->keyButton, TQT_SIGNAL(capturedShortcut(const KShortcut&)), TQT_SLOT(capturedShortcut(const KShortcut&))); + connect (buttonBox->keyButton, TQT_SIGNAL(capturedShortcut(const TDEShortcut&)), TQT_SLOT(capturedShortcut(const TDEShortcut&))); mainLayout->addWidget (buttonBox); treeView->setFocus(); @@ -322,11 +322,11 @@ void PhraseBookDialog::initGUI () { void PhraseBookDialog::initActions() { // The file menu - fileNewPhrase = new KAction (i18n("&New Phrase"), "phrase_new", 0, TQT_TQOBJECT(this), TQT_SLOT(slotAddPhrase()), actionCollection(),"file_new_phrase"); + fileNewPhrase = new TDEAction (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, TQT_TQOBJECT(this), TQT_SLOT(slotAddPhrasebook()), actionCollection(),"file_new_book"); + fileNewBook = new TDEAction (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")); @@ -334,19 +334,19 @@ void PhraseBookDialog::initActions() { 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, TQT_TQOBJECT(this), TQT_SLOT(slotImportPhrasebook()), actionCollection(),"file_import"); + fileImport = new TDEAction (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, TQT_TQOBJECT(this), TQT_SLOT(slotImportPhrasebook()), actionCollection(),"toolbar_import"); + toolbarImport = new TDEToolBarPopupAction (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")); - fileImportStandardBook = new KActionMenu (i18n("I&mport Standard Phrase Book"), "phrasebook_open", actionCollection(),"file_import_standard_book"); + fileImportStandardBook = new TDEActionMenu (i18n("I&mport Standard Phrase Book"), "phrasebook_open", actionCollection(),"file_import_standard_book"); 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, TQT_TQOBJECT(this), TQT_SLOT(slotExportPhrasebook()), actionCollection(),"file_export"); + fileExport = new TDEAction (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")); @@ -371,7 +371,7 @@ void PhraseBookDialog::initActions() { 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, TQT_TQOBJECT(this), TQT_SLOT(slotRemove()), actionCollection(),"edit_delete"); + editDelete = new TDEAction (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")); @@ -434,9 +434,9 @@ StandardBookList PhraseBookDialog::standardPhraseBooks() { void PhraseBookDialog::initStandardPhraseBooks () { StandardBookList bookPaths = standardPhraseBooks(); - KActionMenu *parent = fileImportStandardBook; + TDEActionMenu *parent = fileImportStandardBook; TQStringList currentNamePath = "x"; - TQPtrStack stack; + TQPtrStack stack; StandardBookList::iterator it; for (it = bookPaths.begin(); it != bookPaths.end(); ++it) { KURL url; @@ -453,7 +453,7 @@ void PhraseBookDialog::initStandardPhraseBooks () { parent = stack.pop(); for (; it2 != dirs.end(); ++it2) { stack.push (parent); - KActionMenu *newParent = new KActionMenu (*it2); + TDEActionMenu *newParent = new TDEActionMenu (*it2); parent->insert(newParent); if (parent == fileImportStandardBook) newParent->plug(toolbarImport->popupMenu()); @@ -461,7 +461,7 @@ void PhraseBookDialog::initStandardPhraseBooks () { } currentNamePath = dirs; - KAction *book = new StandardPhraseBookInsertAction ( + TDEAction *book = new StandardPhraseBookInsertAction ( url, (*it).name, TQT_TQOBJECT(this), TQT_SLOT(slotImportPhrasebook (const KURL &)), actionCollection()); parent->insert(book); if (parent == fileImportStandardBook) @@ -567,7 +567,7 @@ void PhraseBookDialog::slotNoKey() { PhraseTreeItem *currentItem = selectedItem (treeView); if (currentItem != 0) { - currentItem->setCut (KShortcut(TQString())); + currentItem->setCut (TDEShortcut(TQString())); buttonBox->keyButton->setShortcut(currentItem->cut(), false); } phrasebookChanged = true; @@ -577,7 +577,7 @@ void PhraseBookDialog::slotCustomKey() { buttonBox->keyButton->captureShortcut(); } -void PhraseBookDialog::capturedShortcut (const KShortcut& cut) { +void PhraseBookDialog::capturedShortcut (const TDEShortcut& cut) { if (cut.isNull()) { slotNoKey(); } @@ -586,7 +586,7 @@ void PhraseBookDialog::capturedShortcut (const KShortcut& cut) { phrasebookChanged = true; } -void PhraseBookDialog::setShortcut( const KShortcut& cut ) { +void PhraseBookDialog::setShortcut( const TDEShortcut& cut ) { // Check whether the shortcut is valid for (uint i = 0; i < cut.count(); i++) { const KKeySequence& seq = cut.seq(i); diff --git a/kmouth/phrasebook/phrasebookdialog.h b/kmouth/phrasebook/phrasebookdialog.h index fcc2cc2..bacd7a9 100644 --- a/kmouth/phrasebook/phrasebookdialog.h +++ b/kmouth/phrasebook/phrasebookdialog.h @@ -35,7 +35,7 @@ class PhraseTreeItem; class PhraseTree; class TQStringList; class TQString; -class KListView; +class TDEListView; struct StandardBook { TQString name; @@ -85,7 +85,7 @@ private: /** initializes the list of standard phrase books */ void initStandardPhraseBooks (); - KListView *books; + TDEListView *books; }; /** @@ -93,12 +93,12 @@ private: * inserting a standard phrase book. * @author Gunnar Schmi Dt */ -class StandardPhraseBookInsertAction : public KAction { +class StandardPhraseBookInsertAction : public TDEAction { Q_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, TDEActionCollection* parent) + : TDEAction (name, "phrasebook", 0, 0, 0, parent, 0) { this->url = url; connect (this, TQT_SIGNAL(slotActivated (const KURL &)), receiver, slot); }; @@ -107,7 +107,7 @@ public: public slots: void slotActivated () { - KAction::slotActivated(); + TDEAction::slotActivated(); emit slotActivated (url); }; @@ -140,7 +140,7 @@ protected: * @author Gunnar Schmi Dt */ -class PhraseBookDialog : public KMainWindow { +class PhraseBookDialog : public TDEMainWindow { friend class InitialPhraseBookWidget; Q_OBJECT @@ -168,7 +168,7 @@ public slots: void slotTextChanged (const TQString &s); void slotNoKey(); void slotCustomKey(); - void capturedShortcut (const KShortcut& cut); + void capturedShortcut (const TDEShortcut& cut); void selectionChanged (); void contextMenuRequested(TQListViewItem *, const TQPoint &pos, int); @@ -197,7 +197,7 @@ private: static StandardBookList standardPhraseBooks (); void initGUI(); - /** initializes the KActions of the window */ + /** initializes the TDEActions of the window */ void initActions(); /** initializes the list of standard phrase books */ void initStandardPhraseBooks (); @@ -205,13 +205,13 @@ private: TQListViewItem *addBook (TQListViewItem *parent, TQListViewItem *after, PhraseBook *book); TQListViewItem *addBook (TQListViewItem *item, PhraseBook *book); - void setShortcut (const KShortcut &cut); + void setShortcut (const TDEShortcut &cut); void _warning (const KKeySequence &cut, TQString sAction, TQString sTitle); - bool isGlobalKeyPresent (const KShortcut& cut, bool warnUser); - bool isPhraseKeyPresent (const KShortcut& cut, bool warnUser); - bool isKeyPresent (const KShortcut& cut, bool warnUser); + bool isGlobalKeyPresent (const TDEShortcut& cut, bool warnUser); + bool isPhraseKeyPresent (const TDEShortcut& cut, bool warnUser); + bool isKeyPresent (const TDEShortcut& cut, bool warnUser); PhraseBook book; bool phrasebookChanged; @@ -219,19 +219,19 @@ private: PhraseTree *treeView; ButtonBoxWidget *buttonBox; - KAction* fileNewPhrase; - KAction* fileNewBook; - KAction* fileSave; - KAction* fileImport; - KToolBarPopupAction* toolbarImport; - KActionMenu* fileImportStandardBook; - KAction* fileExport; - KAction* filePrint; - KAction* fileClose; - KAction* editCut; - KAction* editCopy; - KAction* editPaste; - KAction* editDelete; + TDEAction* fileNewPhrase; + TDEAction* fileNewBook; + TDEAction* fileSave; + TDEAction* fileImport; + TDEToolBarPopupAction* toolbarImport; + TDEActionMenu* fileImportStandardBook; + TDEAction* fileExport; + TDEAction* filePrint; + TDEAction* fileClose; + TDEAction* editCut; + TDEAction* editCopy; + TDEAction* editPaste; + TDEAction* editDelete; }; #endif diff --git a/kmouth/phrasebook/phrasetree.cpp b/kmouth/phrasebook/phrasetree.cpp index 5cb29b2..0439c5e 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 *parent, TQListViewItem *after, TQString phrase, TDEShortcut shortcut, TQPixmap icon) + : TDEListViewItem (parent, 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 *parent, TQListViewItem *after, TQString phrase, TDEShortcut shortcut, TQPixmap icon) + : TDEListViewItem (parent, after, phrase) { isPhraseValue = true; cutValue = shortcut; @@ -48,14 +48,14 @@ PhraseTreeItem::PhraseTreeItem (TQListViewItem *parent, TQListViewItem *after, T setExpandable (false); } PhraseTreeItem::PhraseTreeItem (TQListView *parent, TQListViewItem *after, TQString name, TQPixmap icon) - : KListViewItem (parent, after, name) + : TDEListViewItem (parent, after, name) { isPhraseValue = false; setPixmap(0, icon); setExpandable (true); } PhraseTreeItem::PhraseTreeItem (TQListViewItem *parent, TQListViewItem *after, TQString name, TQPixmap icon) - : KListViewItem (parent, after, name) + : TDEListViewItem (parent, after, name) { isPhraseValue = false; setPixmap(0, icon); @@ -64,10 +64,10 @@ PhraseTreeItem::PhraseTreeItem (TQListViewItem *parent, TQListViewItem *after, T bool PhraseTreeItem::isPhrase () { return isPhraseValue; } -KShortcut PhraseTreeItem::cut () { +TDEShortcut PhraseTreeItem::cut () { return cutValue; } -void PhraseTreeItem::setCut (KShortcut cut) { +void PhraseTreeItem::setCut (TDEShortcut cut) { cutValue = cut; setText(1, cut.toString()); } @@ -75,7 +75,7 @@ void PhraseTreeItem::setCut (KShortcut cut) { // *************************************************************************** PhraseTree::PhraseTree (TQWidget *parent, const char *name) - : KListView (parent, name) + : TDEListView (parent, name) { phrasebook_open = TDEGlobal::iconLoader()->loadIcon("phrasebook", KIcon::Small); phrasebook_closed = TDEGlobal::iconLoader()->loadIcon("phrasebook_closed", KIcon::Small); @@ -343,13 +343,13 @@ void PhraseTree::keyPressEvent (TQKeyEvent *e) { return; } } - KListView::keyPressEvent(e); + TDEListView::keyPressEvent(e); } PhraseTreeItem *PhraseTree::insertPhrase (TQListViewItem *parent, TQListViewItem *after, TQString phrase, TQString shortcut) { - KShortcut cut = KShortcut(shortcut); + TDEShortcut cut = TDEShortcut(shortcut); if (isKeyPresent (cut, 0, false)) - cut = KShortcut(TQString()); + cut = TDEShortcut(TQString()); if (parent == 0) return new PhraseTreeItem (this, after, phrase, cut, this->phrase); @@ -445,7 +445,7 @@ TQDragObject *PhraseTree::dragObject (bool isDependent) { } bool PhraseTree::acceptDrag (TQDropEvent* event) const { - if (KListView::acceptDrag (event)) + if (TDEListView::acceptDrag (event)) return true; else return PhraseBookDrag::canDecode(event); @@ -453,7 +453,7 @@ bool PhraseTree::acceptDrag (TQDropEvent* event) const { // Returns iSeq index if cut2 has a sequence of equal or higher priority // to a sequence in cut, else -1 -static int keyConflict (const KShortcut& cut, const KShortcut& cut2) { +static int keyConflict (const TDEShortcut& cut, const TDEShortcut& cut2) { for (uint iSeq = 0; iSeq < cut.count(); iSeq++) { for (uint iSeq2 = 0; iSeq2 <= iSeq && iSeq2 < cut2.count(); iSeq2++) { if (cut.seq(iSeq) == cut2.seq(iSeq2)) @@ -475,17 +475,17 @@ void PhraseTree::_warning (const KKeySequence& cut, TQString sAction, TQString s KMessageBox::sorry( this, s, sTitle ); } -bool PhraseTree::isStdAccelPresent (const KShortcut& cut, bool warnUser) { +bool PhraseTree::isStdAccelPresent (const TDEShortcut& cut, bool warnUser) { for (uint iSeq = 0; iSeq < cut.count(); iSeq++) { const KKeySequence& seq = cut.seq(iSeq); - KStdAccel::StdAccel id = KStdAccel::findStdAccel( seq ); - if( id != KStdAccel::AccelNone - && keyConflict (cut, KStdAccel::shortcut(id)) > -1) + TDEStdAccel::StdAccel id = TDEStdAccel::findStdAccel( seq ); + if( id != TDEStdAccel::AccelNone + && keyConflict (cut, TDEStdAccel::shortcut(id)) > -1) { if (warnUser) _warning (cut.seq(iSeq), - i18n("the standard \"%1\" action").arg(KStdAccel::label(id)), + i18n("the standard \"%1\" action").arg(TDEStdAccel::label(id)), i18n("Conflict with Standard Application Shortcut")); return true; } @@ -493,11 +493,11 @@ bool PhraseTree::isStdAccelPresent (const KShortcut& cut, bool warnUser) { return false; } -bool PhraseTree::isGlobalKeyPresent (const KShortcut& cut, bool warnUser) { +bool PhraseTree::isGlobalKeyPresent (const TDEShortcut& cut, bool warnUser) { TQMap mapEntry = TDEGlobal::config()->entryMap ("Global Shortcuts"); TQMap::Iterator it; for (it = mapEntry.begin(); it != mapEntry.end(); ++it) { - int iSeq = keyConflict (cut, KShortcut(*it)); + int iSeq = keyConflict (cut, TDEShortcut(*it)); if (iSeq > -1) { if (warnUser) _warning (cut.seq(iSeq), @@ -509,7 +509,7 @@ bool PhraseTree::isGlobalKeyPresent (const KShortcut& cut, bool warnUser) { return false; } -bool PhraseTree::isPhraseKeyPresent (const KShortcut& cut, PhraseTreeItem* cutItem, bool warnUser) { +bool PhraseTree::isPhraseKeyPresent (const TDEShortcut& cut, PhraseTreeItem* cutItem, bool warnUser) { for (TQListViewItemIterator it(this); it.current(); ++it) { PhraseTreeItem* item = dynamic_cast(it.current()); if ((item != 0) && (item != cutItem)) { @@ -526,7 +526,7 @@ bool PhraseTree::isPhraseKeyPresent (const KShortcut& cut, PhraseTreeItem* cutIt return false; } -bool PhraseTree::isKeyPresent (const KShortcut& cut, PhraseTreeItem* cutItem, bool warnUser) { +bool PhraseTree::isKeyPresent (const TDEShortcut& cut, PhraseTreeItem* cutItem, bool warnUser) { if (isStdAccelPresent (cut, warnUser)) return true; diff --git a/kmouth/phrasebook/phrasetree.h b/kmouth/phrasebook/phrasetree.h index b91ec03..4016b54 100644 --- a/kmouth/phrasebook/phrasetree.h +++ b/kmouth/phrasebook/phrasetree.h @@ -29,13 +29,13 @@ class PhraseShortcutRequest; *@author Gunnar Schmi Dt */ -class PhraseTreeItem : public KListViewItem { +class PhraseTreeItem : public TDEListViewItem { 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 *parent, TQListViewItem *after, TQString phrase, TDEShortcut shortcut, TQPixmap icon); /** Creates a phrase item at the top level */ - PhraseTreeItem (TQListViewItem *parent, TQListViewItem *after, TQString phrase, KShortcut shortcut, TQPixmap icon); + PhraseTreeItem (TQListViewItem *parent, TQListViewItem *after, TQString phrase, TDEShortcut shortcut, TQPixmap icon); /** Creates a phrase book item within a sub phrase book */ PhraseTreeItem (TQListView *parent, TQListViewItem *after, TQString name, TQPixmap icon); /** Creates a phrase book item at the top level */ @@ -43,21 +43,21 @@ private: public: bool isPhrase(); - KShortcut cut(); - void setCut(KShortcut cut); + TDEShortcut cut(); + void setCut(TDEShortcut cut); private: bool isPhraseValue; - KShortcut cutValue; + TDEShortcut cutValue; }; /** * The class PhraseTree represents the ListView of the phrase book edit - * dialog. It extends KListView for providing better drag-and-drop support. + * dialog. It extends TDEListView for providing better drag-and-drop support. * @author Gunnar Schmi Dt */ -class PhraseTree : public KListView { +class PhraseTree : public TDEListView { friend class PhraseTreeItem; Q_OBJECT @@ -86,12 +86,12 @@ protected: private: void _warning (const KKeySequence& cut, TQString sAction, TQString sTitle); - bool isStdAccelPresent (const KShortcut& cut, bool warnUser); - bool isGlobalKeyPresent (const KShortcut& cut, bool warnUser); - bool isApplicationKeyPresent (const KShortcut& cut, bool warnUser); - bool isPhraseKeyPresent (const KShortcut& cut, PhraseTreeItem* cutItem, bool warnUser); + bool isStdAccelPresent (const TDEShortcut& cut, bool warnUser); + bool isGlobalKeyPresent (const TDEShortcut& cut, bool warnUser); + bool isApplicationKeyPresent (const TDEShortcut& cut, bool warnUser); + bool isPhraseKeyPresent (const TDEShortcut& cut, PhraseTreeItem* cutItem, bool warnUser); public: - bool isKeyPresent (const KShortcut& cut, PhraseTreeItem* cutItem, bool warnUser); + bool isKeyPresent (const TDEShortcut& cut, PhraseTreeItem* cutItem, bool warnUser); public slots: void itemExpanded (TQListViewItem *item); diff --git a/kmouth/phraselist.cpp b/kmouth/phraselist.cpp index 762fd3e..945795b 100644 --- a/kmouth/phraselist.cpp +++ b/kmouth/phraselist.cpp @@ -50,7 +50,7 @@ PhraseList::PhraseList(TQWidget *parent, const char *name) : TQWidget(parent,nam setBackgroundMode(PaletteBase); TQVBoxLayout *layout = new TQVBoxLayout (this); - listBox = new KListBox (this); + listBox = new TDEListBox (this); listBox->setFocusPolicy(TQ_NoFocus); listBox->setSelectionMode (TQListBox::Extended); TQWhatsThis::add (listBox, i18n("This list contains the history of spoken sentences. You can select sentences and press the speak button for re-speaking.")); diff --git a/kmouth/phraselist.h b/kmouth/phraselist.h index ab62853..7c95908 100644 --- a/kmouth/phraselist.h +++ b/kmouth/phraselist.h @@ -92,7 +92,7 @@ protected slots: void configureCompletionCombo(const TQStringList &list); private: - KListBox *listBox; + TDEListBox *listBox; KComboBox *dictionaryCombo; KLineEdit *lineEdit; TQPushButton *speakButton; diff --git a/kmouth/wordcompletion/wordcompletionui.ui b/kmouth/wordcompletion/wordcompletionui.ui index 03bccf7..a41b3be 100644 --- a/kmouth/wordcompletion/wordcompletionui.ui +++ b/kmouth/wordcompletion/wordcompletionui.ui @@ -158,7 +158,7 @@ unnamed - + Dictionary diff --git a/kmouth/wordcompletion/wordcompletionwidget.cpp b/kmouth/wordcompletion/wordcompletionwidget.cpp index e35ce39..43179ac 100644 --- a/kmouth/wordcompletion/wordcompletionwidget.cpp +++ b/kmouth/wordcompletion/wordcompletionwidget.cpp @@ -37,20 +37,20 @@ #include "wordcompletion.h" #include "klanguagebutton.h" -class DictionaryListItem : public KListViewItem { +class DictionaryListItem : public TDEListViewItem { public: DictionaryListItem (TQListView *parent, TQString filename, TQString name, TQString language, TQString languageCode) - : KListViewItem (parent, name) { + : TDEListViewItem (parent, name) { setFilename (filename); setLanguage (language, languageCode); }; DictionaryListItem (TQListView *parent, TQString filename, TQString name, TQString languageCode) - : KListViewItem (parent, name) { + : TDEListViewItem (parent, name) { setFilename (filename); setLanguage (languageCode); }; DictionaryListItem (TQListView *parent, TQListViewItem *after, TQString filename, TQString name, TQString languageCode) - : KListViewItem (parent, after, name) { + : TDEListViewItem (parent, after, name) { setFilename (filename); setLanguage (languageCode); }; @@ -202,7 +202,7 @@ void WordCompletionWidget::addDictionary() { if (!languageButton->containsTag(languageTag)) { languageButton->insertLanguage(languageTag, i18n("without name"), TQString::fromLatin1("l10n/"), TQString()); } - KListViewItem *item = new DictionaryListItem (dictionaryList, + TDEListViewItem *item = new DictionaryListItem (dictionaryList, filename, wizard->name(), languageTag); dictionaryList->setSelected(item, true); } -- cgit v1.2.3