diff options
Diffstat (limited to 'kvoctrain')
-rw-r--r-- | kvoctrain/kvoctrain/kva_config.cpp | 6 | ||||
-rw-r--r-- | kvoctrain/kvoctrain/kva_init.cpp | 72 | ||||
-rw-r--r-- | kvoctrain/kvoctrain/kva_io.cpp | 14 |
3 files changed, 46 insertions, 46 deletions
diff --git a/kvoctrain/kvoctrain/kva_config.cpp b/kvoctrain/kvoctrain/kva_config.cpp index 3df5d285..09f0f402 100644 --- a/kvoctrain/kvoctrain/kva_config.cpp +++ b/kvoctrain/kvoctrain/kva_config.cpp @@ -128,7 +128,7 @@ void kvoctrainApp::saveProperties(TDEConfig *config ) TQString filename=doc->URL().path(); TQString tempname = kapp->tempSaveName(filename); saveDocProps(doc); - doc->saveAs(TQT_TQOBJECT(this), KURL(tempname), doc->getTitle(), kvoctrainDoc::automatic); + doc->saveAs(this, KURL(tempname), doc->getTitle(), kvoctrainDoc::automatic); } } @@ -147,7 +147,7 @@ void kvoctrainApp::readProperties(TDEConfig *config) if(b_canRecover){ pdlg = new ProgressDlg(TQString(), TQString(), kapp->makeStdCaption("")); pdlg->show(); - doc = new kvoctrainDoc(TQT_TQOBJECT(this), KURL(tempname)); + doc = new kvoctrainDoc(this, KURL(tempname)); removeProgressBar(); doc->setModified(); doc->setTitle(title); @@ -160,7 +160,7 @@ void kvoctrainApp::readProperties(TDEConfig *config) pdlg = new ProgressDlg (TQString(), TQString(), kapp->makeStdCaption("")); pdlg->show(); - doc = new kvoctrainDoc(TQT_TQOBJECT(this), KURL(filename)); + doc = new kvoctrainDoc(this, KURL(filename)); removeProgressBar(); setCaption(kapp->makeStdCaption(doc->getTitle(), false, doc->isModified())); } diff --git a/kvoctrain/kvoctrain/kva_init.cpp b/kvoctrain/kvoctrain/kva_init.cpp index e31bfff7..6a4d92eb 100644 --- a/kvoctrain/kvoctrain/kva_init.cpp +++ b/kvoctrain/kvoctrain/kva_init.cpp @@ -98,110 +98,110 @@ kvoctrainApp::kvoctrainApp(TQWidget *parent, const char *name) void kvoctrainApp::initActions() { - fileNew = KStdAction::openNew(TQT_TQOBJECT(this), TQT_SLOT(slotFileNew()), actionCollection()); + fileNew = KStdAction::openNew(this, TQT_SLOT(slotFileNew()), actionCollection()); fileNew->setWhatsThis(i18n("Creates a new blank vocabulary document")); fileNew->setToolTip(fileNew->whatsThis()); - fileOpen = KStdAction::open(TQT_TQOBJECT(this), TQT_SLOT(slotFileOpen()), actionCollection()); + fileOpen = KStdAction::open(this, TQT_SLOT(slotFileOpen()), actionCollection()); fileOpen->setWhatsThis(i18n("Opens an existing vocabulary document")); fileOpen->setToolTip(fileOpen->whatsThis()); - fileOpenExample = new TDEAction(i18n("Open &Example..."), "document-open", 0, TQT_TQOBJECT(this), TQT_SLOT(slotFileOpenExample()), actionCollection(), "file_open_example"); + fileOpenExample = new TDEAction(i18n("Open &Example..."), "document-open", 0, this, TQT_SLOT(slotFileOpenExample()), actionCollection(), "file_open_example"); fileOpen->setWhatsThis(i18n("Open a vocabulary document")); fileOpen->setToolTip(fileOpen->whatsThis()); - fileGHNS = new TDEAction(i18n("&Get New Vocabularies..."), "knewstuff", CTRL+Key_G, TQT_TQOBJECT(this), TQT_SLOT(slotGHNS()), actionCollection(), "file_ghns"); + fileGHNS = new TDEAction(i18n("&Get New Vocabularies..."), "knewstuff", CTRL+Key_G, this, TQT_SLOT(slotGHNS()), actionCollection(), "file_ghns"); fileGHNS->setWhatsThis(i18n("Downloads new vocabularies")); fileGHNS->setToolTip(fileGHNS->whatsThis()); - fileOpenRecent = KStdAction::openRecent(TQT_TQOBJECT(this), TQT_SLOT(slotFileOpenRecent(const KURL&)), actionCollection()); + fileOpenRecent = KStdAction::openRecent(this, TQT_SLOT(slotFileOpenRecent(const KURL&)), actionCollection()); - fileMerge = new TDEAction(i18n("&Merge..."), 0, 0, TQT_TQOBJECT(this), TQT_SLOT(slotFileMerge()), actionCollection(), "file_merge"); + fileMerge = new TDEAction(i18n("&Merge..."), 0, 0, this, TQT_SLOT(slotFileMerge()), actionCollection(), "file_merge"); fileMerge->setWhatsThis(i18n("Merge an existing vocabulary document with the current one")); fileMerge->setToolTip(fileOpen->whatsThis()); - fileSave = KStdAction::save(TQT_TQOBJECT(this), TQT_SLOT(slotFileSave()), actionCollection()); + fileSave = KStdAction::save(this, TQT_SLOT(slotFileSave()), actionCollection()); fileSave->setWhatsThis(i18n("Save the active vocabulary document")); fileSave->setToolTip(fileSave->whatsThis()); - fileSaveAs = KStdAction::saveAs(TQT_TQOBJECT(this), TQT_SLOT(slotFileSaveAs()), actionCollection()); + fileSaveAs = KStdAction::saveAs(this, TQT_SLOT(slotFileSaveAs()), actionCollection()); fileSaveAs->setWhatsThis(i18n("Save the active vocabulary document with a different name")); fileSaveAs->setToolTip(fileSaveAs->whatsThis()); - filePrint = KStdAction::print(TQT_TQOBJECT(this), TQT_SLOT(slotFilePrint()), actionCollection()); + filePrint = KStdAction::print(this, TQT_SLOT(slotFilePrint()), actionCollection()); filePrint->setWhatsThis(i18n("Print the active vocabulary document")); filePrint->setToolTip(filePrint->whatsThis()); - fileQuit = KStdAction::quit(TQT_TQOBJECT(this), TQT_SLOT(slotFileQuit()), actionCollection()); + fileQuit = KStdAction::quit(this, TQT_SLOT(slotFileQuit()), actionCollection()); fileQuit->setWhatsThis(i18n("Quit KVocTrain")); fileQuit->setToolTip(fileQuit->whatsThis()); - editCopy = KStdAction::copy(TQT_TQOBJECT(this), TQT_SLOT(slotEditCopy()), actionCollection()); + editCopy = KStdAction::copy(this, TQT_SLOT(slotEditCopy()), actionCollection()); editCopy->setWhatsThis(i18n("Copy")); editCopy->setToolTip(editCopy->whatsThis()); - editPaste = KStdAction::paste(TQT_TQOBJECT(this), TQT_SLOT(slotEditPaste()), actionCollection()); + editPaste = KStdAction::paste(this, TQT_SLOT(slotEditPaste()), actionCollection()); editPaste->setWhatsThis(i18n("Paste")); editPaste->setToolTip(editPaste->whatsThis()); - editSelectAll = KStdAction::selectAll(TQT_TQOBJECT(this), TQT_SLOT(slotSelectAll()), actionCollection()); + editSelectAll = KStdAction::selectAll(this, TQT_SLOT(slotSelectAll()), actionCollection()); editSelectAll->setWhatsThis(i18n("Select all rows")); editSelectAll->setToolTip(editSelectAll->whatsThis()); - editClearSelection = KStdAction::deselect(TQT_TQOBJECT(this), TQT_SLOT(slotCancelSelection()), actionCollection()); + editClearSelection = KStdAction::deselect(this, TQT_SLOT(slotCancelSelection()), actionCollection()); editClearSelection->setWhatsThis(i18n("Deselect all rows")); editClearSelection->setToolTip(editClearSelection->whatsThis()); - editSearchFromClipboard = KStdAction::find(TQT_TQOBJECT(this), TQT_SLOT(slotSmartSearchClip()), actionCollection()); + editSearchFromClipboard = KStdAction::find(this, TQT_SLOT(slotSmartSearchClip()), actionCollection()); editSearchFromClipboard->setWhatsThis(i18n("Search for the clipboard contents in the vocabulary")); editSearchFromClipboard->setToolTip(editSearchFromClipboard->whatsThis()); - editAppend = new TDEAction(i18n("&Append New Entry"), "insert_table_row", "Insert", TQT_TQOBJECT(this), TQT_SLOT(slotAppendRow()), actionCollection(),"edit_append"); + editAppend = new TDEAction(i18n("&Append New Entry"), "insert_table_row", "Insert", this, TQT_SLOT(slotAppendRow()), actionCollection(),"edit_append"); editAppend->setWhatsThis(i18n("Append a new row to the vocabulary")); editAppend->setToolTip(editAppend->whatsThis()); - editEditSelectedArea = new TDEAction(i18n("&Edit Selected Area..."), "edit_table_row", "Ctrl+Return", TQT_TQOBJECT(this), TQT_SLOT(slotEditRow()), actionCollection(),"edit_edit_selected_area"); + editEditSelectedArea = new TDEAction(i18n("&Edit Selected Area..."), "edit_table_row", "Ctrl+Return", this, TQT_SLOT(slotEditRow()), actionCollection(),"edit_edit_selected_area"); editEditSelectedArea->setWhatsThis(i18n("Edit the entries in the selected rows")); editEditSelectedArea->setToolTip(editEditSelectedArea->whatsThis()); - editRemoveSelectedArea = new TDEAction(i18n("&Remove Selected Area"), "delete_table_row", "Delete", TQT_TQOBJECT(this), TQT_SLOT(slotRemoveRow()), actionCollection(),"edit_remove_selected_area"); + editRemoveSelectedArea = new TDEAction(i18n("&Remove Selected Area"), "delete_table_row", "Delete", this, TQT_SLOT(slotRemoveRow()), actionCollection(),"edit_remove_selected_area"); editRemoveSelectedArea->setWhatsThis(i18n("Delete the selected rows")); editRemoveSelectedArea->setToolTip(editRemoveSelectedArea->whatsThis()); - editSaveSelectedArea = new TDEAction(i18n("Save E&ntries in Query As..."), TDEGlobal::iconLoader()->loadIcon("document-save-as", TDEIcon::Small), 0, TQT_TQOBJECT(this), TQT_SLOT(slotSaveSelection()), actionCollection(),"edit_save_selected_area"); + editSaveSelectedArea = new TDEAction(i18n("Save E&ntries in Query As..."), TDEGlobal::iconLoader()->loadIcon("document-save-as", TDEIcon::Small), 0, this, TQT_SLOT(slotSaveSelection()), actionCollection(),"edit_save_selected_area"); editSaveSelectedArea->setWhatsThis(i18n("Save the entries in the query as a new vocabulary")); editSaveSelectedArea->setToolTip(editSaveSelectedArea->whatsThis()); - vocabShowStatistics = new TDEAction(i18n("Show &Statistics"), "statistics", 0, TQT_TQOBJECT(this), TQT_SLOT(slotShowStatist()), actionCollection(),"vocab_show_statistics"); + vocabShowStatistics = new TDEAction(i18n("Show &Statistics"), "statistics", 0, this, TQT_SLOT(slotShowStatist()), actionCollection(),"vocab_show_statistics"); vocabShowStatistics->setWhatsThis(i18n("Show statistics for the current vocabulary")); vocabShowStatistics->setToolTip(vocabShowStatistics->whatsThis()); - vocabAssignLessons = new TDEAction(i18n("Assign L&essons..."), "rand_less", 0, TQT_TQOBJECT(this), TQT_SLOT(slotCreateRandom()), actionCollection(),"vocab_assign_lessons"); + vocabAssignLessons = new TDEAction(i18n("Assign L&essons..."), "rand_less", 0, this, TQT_SLOT(slotCreateRandom()), actionCollection(),"vocab_assign_lessons"); vocabAssignLessons->setWhatsThis(i18n("Create random lessons with unassigned entries")); vocabAssignLessons->setToolTip(vocabAssignLessons->whatsThis()); - vocabCleanUp = new TDEAction(i18n("&Clean Up"), "cleanup", 0, TQT_TQOBJECT(this), TQT_SLOT(slotCleanVocabulary()), actionCollection(),"vocab_clean_up"); + vocabCleanUp = new TDEAction(i18n("&Clean Up"), "cleanup", 0, this, TQT_SLOT(slotCleanVocabulary()), actionCollection(),"vocab_clean_up"); vocabCleanUp->setWhatsThis(i18n("Remove entries with same content from vocabulary")); vocabCleanUp->setToolTip(vocabCleanUp->whatsThis()); vocabAppendLanguage = new TDESelectAction(i18n("&Append Language"), "insert_table_col", 0, actionCollection(), "vocab_append_language"); - connect(vocabAppendLanguage->popupMenu(), TQT_SIGNAL(aboutToShow()), TQT_TQOBJECT(this), TQT_SLOT(aboutToShowVocabAppendLanguage())); - connect (vocabAppendLanguage->popupMenu(), TQT_SIGNAL(activated(int)), TQT_TQOBJECT(this), TQT_SLOT(slotAppendLang(int))); - connect (vocabAppendLanguage->popupMenu(), TQT_SIGNAL(highlighted(int)), TQT_TQOBJECT(this), TQT_SLOT(slotHeaderStatus(int))); + connect(vocabAppendLanguage->popupMenu(), TQT_SIGNAL(aboutToShow()), this, TQT_SLOT(aboutToShowVocabAppendLanguage())); + connect (vocabAppendLanguage->popupMenu(), TQT_SIGNAL(activated(int)), this, TQT_SLOT(slotAppendLang(int))); + connect (vocabAppendLanguage->popupMenu(), TQT_SIGNAL(highlighted(int)), this, TQT_SLOT(slotHeaderStatus(int))); vocabSetLanguage = new TDESelectAction(i18n("Set &Language"), "set_language", 0, actionCollection(), "vocab_set_language"); - connect(vocabSetLanguage->popupMenu(), TQT_SIGNAL(aboutToShow()), TQT_TQOBJECT(this), TQT_SLOT(aboutToShowVocabSetLanguage())); + connect(vocabSetLanguage->popupMenu(), TQT_SIGNAL(aboutToShow()), this, TQT_SLOT(aboutToShowVocabSetLanguage())); vocabRemoveLanguage = new TDESelectAction(i18n("&Remove Language"), "delete_table_col", 0, actionCollection(), "vocab_remove_language"); - connect(vocabRemoveLanguage->popupMenu(), TQT_SIGNAL(aboutToShow()), TQT_TQOBJECT(this), TQT_SLOT(aboutToShowVocabRemoveLanguage())); - connect(vocabRemoveLanguage->popupMenu(), TQT_SIGNAL(activated(int)), TQT_TQOBJECT(this), TQT_SLOT(slotHeaderCallBack(int))); - connect(vocabRemoveLanguage->popupMenu(), TQT_SIGNAL(highlighted(int)), TQT_TQOBJECT(this), TQT_SLOT(slotHeaderStatus(int))); + connect(vocabRemoveLanguage->popupMenu(), TQT_SIGNAL(aboutToShow()), this, TQT_SLOT(aboutToShowVocabRemoveLanguage())); + connect(vocabRemoveLanguage->popupMenu(), TQT_SIGNAL(activated(int)), this, TQT_SLOT(slotHeaderCallBack(int))); + connect(vocabRemoveLanguage->popupMenu(), TQT_SIGNAL(highlighted(int)), this, TQT_SLOT(slotHeaderStatus(int))); - vocabDocumentProperties = new TDEAction(i18n("Document &Properties"), 0, 0, TQT_TQOBJECT(this), TQT_SLOT(slotDocProps()), actionCollection(), "vocab_document_properties"); + vocabDocumentProperties = new TDEAction(i18n("Document &Properties"), 0, 0, this, TQT_SLOT(slotDocProps()), actionCollection(), "vocab_document_properties"); vocabDocumentProperties->setWhatsThis(i18n("Edit document properties")); vocabDocumentProperties->setToolTip(vocabAppendLanguage->whatsThis()); - vocabLanguageProperties = new TDEAction(i18n("Lan&guage Properties"), 0, 0, TQT_TQOBJECT(this), TQT_SLOT(slotDocPropsLang()), actionCollection(), "vocab_language_properties"); + vocabLanguageProperties = new TDEAction(i18n("Lan&guage Properties"), 0, 0, this, TQT_SLOT(slotDocPropsLang()), actionCollection(), "vocab_language_properties"); vocabLanguageProperties->setWhatsThis(i18n("Edit language properties in current document")); vocabLanguageProperties->setToolTip(vocabSetLanguage->whatsThis()); @@ -210,7 +210,7 @@ void kvoctrainApp::initActions() connect(lessons, TQT_SIGNAL(highlighted(int)), this, TQT_SLOT(slotChooseLesson(int))); lessons->setFocusPolicy(TQWidget::NoFocus); - vocabLessons = new KWidgetAction(lessons, i18n("Lessons"), 0, TQT_TQOBJECT(this), 0, actionCollection(), "vocab_lessons"); + vocabLessons = new KWidgetAction(lessons, i18n("Lessons"), 0, this, 0, actionCollection(), "vocab_lessons"); vocabLessons->setWhatsThis(i18n("Choose current lesson")); vocabLessons->setToolTip(vocabLessons->whatsThis()); @@ -219,7 +219,7 @@ void kvoctrainApp::initActions() connect (searchLine, TQT_SIGNAL(returnPressed()), this, TQT_SLOT(slotSearchNext())); connect (searchLine, TQT_SIGNAL(textChanged(const TQString&)), this, TQT_SLOT(slotResumeSearch(const TQString&))); - vocabSearch = new KWidgetAction(searchLine, i18n("Smart Search"), 0, TQT_TQOBJECT(this), 0, actionCollection(), "vocab_search"); + vocabSearch = new KWidgetAction(searchLine, i18n("Smart Search"), 0, this, 0, actionCollection(), "vocab_search"); vocabSearch->setAutoSized(true); vocabSearch->setWhatsThis(i18n("Search vocabulary for specified text ")); vocabSearch->setToolTip(vocabSearch->whatsThis()); @@ -232,7 +232,7 @@ void kvoctrainApp::initActions() //learningResumeMultipleChoice->setWhatsThis(i18n("")); learningResumeMultipleChoice->setToolTip(learningResumeMultipleChoice->whatsThis()); */ - configApp = KStdAction::preferences(TQT_TQOBJECT(this), TQT_SLOT( slotGeneralOptions()), actionCollection()); + configApp = KStdAction::preferences(this, TQT_SLOT( slotGeneralOptions()), actionCollection()); configApp->setWhatsThis(i18n("Show the configuration dialog")); configApp->setToolTip(configApp->whatsThis()); @@ -280,9 +280,9 @@ void kvoctrainApp::initStatusBar() void kvoctrainApp::initDoc( ) { if (fileOpenRecent->items().count() > 0) - doc = new kvoctrainDoc(TQT_TQOBJECT(this), fileOpenRecent->items()[0]); + doc = new kvoctrainDoc(this, fileOpenRecent->items()[0]); else - doc = new kvoctrainDoc(TQT_TQOBJECT(this), KURL("")); + doc = new kvoctrainDoc(this, KURL("")); loadDocProps(doc); if (doc->numLangs() == 0) diff --git a/kvoctrain/kvoctrain/kva_io.cpp b/kvoctrain/kvoctrain/kva_io.cpp index f227b4ac..fbe94dc1 100644 --- a/kvoctrain/kvoctrain/kva_io.cpp +++ b/kvoctrain/kvoctrain/kva_io.cpp @@ -160,7 +160,7 @@ void kvoctrainApp::slotFileNew() view->setView (0, langset); delete doc; TQString name = ""; - doc = new kvoctrainDoc (TQT_TQOBJECT(this), 0 /*KURL(name)*/); + doc = new kvoctrainDoc (this, 0 /*KURL(name)*/); loadDocProps(doc); if (doc->numLangs() == 0) { TQString l = "en"; @@ -202,7 +202,7 @@ void kvoctrainApp::loadfileFromPath(const KURL & url, bool addRecent) slotStatusMsg(msg); prepareProgressBar(); - doc = new kvoctrainDoc (TQT_TQOBJECT(this), url); + doc = new kvoctrainDoc (this, url); removeProgressBar(); loadDocProps(doc); view->setView(doc, langset); @@ -253,7 +253,7 @@ void kvoctrainApp::slotFileMerge() slotStatusMsg(msg); prepareProgressBar(); - kvoctrainDoc *new_doc = new kvoctrainDoc (TQT_TQOBJECT(this), url); + kvoctrainDoc *new_doc = new kvoctrainDoc (this, url); connect (new_doc, TQT_SIGNAL (docModified(bool)), this, TQT_SLOT(slotModifiedDoc(bool))); doc->setModified(false); removeProgressBar(); @@ -510,7 +510,7 @@ void kvoctrainApp::slotFileSave() prepareProgressBar(); saveDocProps(doc); - doc->saveAs(TQT_TQOBJECT(this), doc->URL(), doc->getTitle(), kvoctrainDoc::automatic); + doc->saveAs(this, doc->URL(), doc->getTitle(), kvoctrainDoc::automatic); fileOpenRecent->addURL(doc->URL()); removeProgressBar(); @@ -614,7 +614,7 @@ void kvoctrainApp::slotFileSaveAs() saveDocProps(doc); prepareProgressBar(); - doc->saveAs(TQT_TQOBJECT(this), url, doc->getTitle(), kvoctrainDoc::automatic); + doc->saveAs(this, url, doc->getTitle(), kvoctrainDoc::automatic); fileOpenRecent->addURL(doc->URL()); removeProgressBar(); } @@ -631,7 +631,7 @@ void kvoctrainApp::slotSaveSelection () slotStatusMsg(i18n("Saving selected area under new filename...")); TQString save_separator = Prefs::separator(); Prefs::setSeparator("\t"); - kvoctrainDoc seldoc(TQT_TQOBJECT(this), ""); + kvoctrainDoc seldoc(this, ""); // transfer most important parts seldoc.appendLang(doc->getOriginalIdent()); for (int i = 1; i < doc->numLangs(); i++) @@ -667,7 +667,7 @@ void kvoctrainApp::slotSaveSelection () saveDocProps(&seldoc); prepareProgressBar(); - seldoc.saveAs(TQT_TQOBJECT(this), url, i18n ("Part of: ") + doc->getTitle(), kvoctrainDoc::automatic); + seldoc.saveAs(this, url, i18n ("Part of: ") + doc->getTitle(), kvoctrainDoc::automatic); removeProgressBar(); } } |