summaryrefslogtreecommitdiffstats
path: root/kmouth/kmouth.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'kmouth/kmouth.cpp')
-rw-r--r--kmouth/kmouth.cpp80
1 files changed, 40 insertions, 40 deletions
diff --git a/kmouth/kmouth.cpp b/kmouth/kmouth.cpp
index c78a010..76c715f 100644
--- a/kmouth/kmouth.cpp
+++ b/kmouth/kmouth.cpp
@@ -16,8 +16,8 @@
***************************************************************************/
// include files for QT
-#include <qdir.h>
-#include <qpainter.h>
+#include <tqdir.h>
+#include <tqpainter.h>
// include files for KDE
#include <kiconloader.h>
@@ -40,7 +40,7 @@
#define ID_STATUS_MSG 1
-KMouthApp::KMouthApp(QWidget* , const char* name):KMainWindow(0, name)
+KMouthApp::KMouthApp(TQWidget* , const char* name):KMainWindow(0, name)
{
isConfigured = false;
config=kapp->config();
@@ -51,10 +51,10 @@ KMouthApp::KMouthApp(QWidget* , const char* name):KMainWindow(0, name)
initPhraseList();
initActions();
optionsDialog = new OptionsDialog(this);
- connect (optionsDialog, SIGNAL(configurationChanged ()),
- this, SLOT(slotConfigurationChanged ()));
- connect (optionsDialog, SIGNAL(configurationChanged ()),
- phraseList, SLOT(configureCompletion ()));
+ connect (optionsDialog, TQT_SIGNAL(configurationChanged ()),
+ this, TQT_SLOT(slotConfigurationChanged ()));
+ connect (optionsDialog, TQT_SIGNAL(configurationChanged ()),
+ phraseList, TQT_SLOT(configureCompletion ()));
phrases = new KActionCollection (this);
@@ -95,57 +95,57 @@ bool KMouthApp::configured() {
void KMouthApp::initActions() {
// The "File" menu
- fileOpen = new KAction(i18n("&Open as History..."), "phrasehistory_open", KStdAccel::open(), this, SLOT(slotFileOpen()), actionCollection(),"file_open");
+ fileOpen = new KAction(i18n("&Open as History..."), "phrasehistory_open", KStdAccel::open(), 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(), this, SLOT(slotFileSaveAs()), actionCollection(),"file_save_as");
+ fileSaveAs = new KAction(i18n("Save &History As..."), "phrasehistory_save", KStdAccel::save(), 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(), this, SLOT(slotFilePrint()), actionCollection(),"file_print");
+ filePrint = new KAction(i18n("&Print History..."), "phrasehistory_print", KStdAccel::print(), this, TQT_SLOT(slotFilePrint()), actionCollection(),"file_print");
filePrint->setStatusText(i18n("Prints out the actual history"));
filePrint->setWhatsThis (i18n("Prints out the actual history"));
- fileQuit = KStdAction::quit(this, SLOT(slotFileQuit()), actionCollection());
+ fileQuit = KStdAction::quit(this, TQT_SLOT(slotFileQuit()), actionCollection());
fileQuit->setStatusText(i18n("Quits the application"));
fileQuit->setWhatsThis (i18n("Quits the application"));
// The "Edit" menu
- editCut = KStdAction::cut(phraseList, SLOT(cut()), actionCollection());
+ editCut = KStdAction::cut(phraseList, TQT_SLOT(cut()), actionCollection());
editCut->setStatusText(i18n("Cuts the selected section and puts it to the clipboard"));
editCut->setWhatsThis (i18n("Cuts the selected section and puts it to the clipboard. If there is some text selected in the edit field it is placed it on the clipboard. Otherwise the selected sentences in the history (if any) are placed on the clipboard."));
- editCopy = KStdAction::copy(phraseList, SLOT(copy()), actionCollection());
+ editCopy = KStdAction::copy(phraseList, TQT_SLOT(copy()), actionCollection());
editCopy->setStatusText(i18n("Copies the selected section to the clipboard"));
editCopy->setWhatsThis (i18n("Copies the selected section to the clipboard. If there is some text selected in the edit field it is copied to the clipboard. Otherwise the selected sentences in the history (if any) are copied to the clipboard."));
- editPaste = KStdAction::paste(phraseList, SLOT(paste()), actionCollection());
+ editPaste = KStdAction::paste(phraseList, TQT_SLOT(paste()), actionCollection());
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, phraseList, SLOT(speak()), actionCollection(),"edit_speak");
+ editSpeak = new KAction (i18n("&Speak"), "speak", 0, 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, this, SLOT(slotEditPhrasebook()), actionCollection(),"phrasebook_edit");
+ phrasebookEdit = new KAction(i18n("&Edit..."), 0, 0, this, TQT_SLOT(slotEditPhrasebook()), actionCollection(),"phrasebook_edit");
// The "Options" menu
- viewMenuBar = KStdAction::showMenubar(this, SLOT(slotViewMenuBar()), actionCollection());
- viewToolBar = KStdAction::showToolbar(this, SLOT(slotViewToolBar()), actionCollection());
+ viewMenuBar = KStdAction::showMenubar(this, TQT_SLOT(slotViewMenuBar()), actionCollection());
+ viewToolBar = KStdAction::showToolbar(this, TQT_SLOT(slotViewToolBar()), actionCollection());
viewToolBar->setStatusText(i18n("Enables/disables the toolbar"));
viewToolBar->setWhatsThis (i18n("Enables/disables the toolbar"));
- viewPhrasebookBar = new KToggleAction (i18n("Show P&hrasebook Bar"), 0, 0, this, SLOT(slotViewPhrasebookBar()), actionCollection(), "showPhrasebookBar");
+ viewPhrasebookBar = new KToggleAction (i18n("Show P&hrasebook Bar"), 0, 0, this, TQT_SLOT(slotViewPhrasebookBar()), actionCollection(), "showPhrasebookBar");
viewPhrasebookBar->setStatusText(i18n("Enables/disables the phrasebook bar"));
viewPhrasebookBar->setWhatsThis (i18n("Enables/disables the phrasebook bar"));
- viewStatusBar = KStdAction::showStatusbar(this, SLOT(slotViewStatusBar()), actionCollection());
+ viewStatusBar = KStdAction::showStatusbar(this, TQT_SLOT(slotViewStatusBar()), actionCollection());
viewStatusBar->setStatusText(i18n("Enables/disables the statusbar"));
viewStatusBar->setWhatsThis (i18n("Enables/disables the statusbar"));
- configureTTS = new KAction (i18n("&Configure KMouth..."), "configure", 0, this, SLOT(slotConfigureTTS()), actionCollection(), "configureTTS");
+ configureTTS = new KAction (i18n("&Configure KMouth..."), "configure", 0, 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, phraseList, SLOT(speakListSelection()), actionCollection(), "phraselist_speak");
+ phraseListSpeak = new KAction (i18n("&Speak"), "speak", 0, 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, phraseList, SLOT(removeListSelection()), actionCollection(), "phraselist_remove");
+ phraseListRemove = new KAction (i18n("&Delete"), "editdelete", 0, 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, phraseList, SLOT(cutListSelection()), actionCollection(), "phraselist_cut");
+ phraseListCut = new KAction (i18n("Cu&t"), "editcut", 0, 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, phraseList, SLOT(copyListSelection()), actionCollection(), "phraselist_copy");
+ phraseListCopy = new KAction (i18n("&Copy"), "editcopy", 0, 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, phraseList, SLOT(selectAllEntries()), actionCollection(),"phraselist_select_all");
+ phraselistSelectAll = new KAction (i18n("Select &All Entries"), 0, 0, 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, phraseList, SLOT(deselectAllEntries()), actionCollection(),"phraselist_deselect_all");
+ phraselistDeselectAll = new KAction (i18n("D&eselect All Entries"), 0, 0, 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"));
@@ -255,7 +255,7 @@ void KMouthApp::readOptions()
toolBarPos=(KToolBar::BarPosition) config->readNumEntry("ToolBarPos", KToolBar::Top);
toolBar("mainToolBar")->setBarPos(toolBarPos);
- QSize size=config->readSizeEntry("Geometry");
+ TQSize size=config->readSizeEntry("Geometry");
if(!size.isEmpty())
{
resize(size);
@@ -266,7 +266,7 @@ void KMouthApp::readOptions()
toolBar("mainToolBar")->applySettings (config, "mainToolBar");
toolBar("phrasebookBar")->applySettings (config, "phrasebookBar");
- QString standardBook = KApplication::kApplication()->dirs()->findResource("appdata", "standard.phrasebook");
+ TQString standardBook = KApplication::kApplication()->dirs()->findResource("appdata", "standard.phrasebook");
if (!standardBook.isEmpty()) {
PhraseBook book;
book.open(KURL::fromPathOrURL( standardBook ));
@@ -302,7 +302,7 @@ void KMouthApp::enableMenuEntries(bool existSelectedEntries, bool existDeselecte
}
/////////////////////////////////////////////////////////////////////
-// SLOT IMPLEMENTATION
+// TQT_SLOT IMPLEMENTATION
/////////////////////////////////////////////////////////////////////
void KMouthApp::slotFileOpen() {
@@ -358,10 +358,10 @@ void KMouthApp::slotEditPhrasebook () {
PhraseBookDialog *phraseBookDialog = PhraseBookDialog::get();
// As we do not know whether the we are already connected to the slot,
// we first disconnect and then connect again.
- disconnect (phraseBookDialog, SIGNAL(phrasebookConfirmed (PhraseBook &)),
- this, SLOT(slotPhrasebookConfirmed (PhraseBook &)));
- connect (phraseBookDialog, SIGNAL(phrasebookConfirmed (PhraseBook &)),
- this, SLOT(slotPhrasebookConfirmed (PhraseBook &)));
+ disconnect (phraseBookDialog, TQT_SIGNAL(phrasebookConfirmed (PhraseBook &)),
+ this, TQT_SLOT(slotPhrasebookConfirmed (PhraseBook &)));
+ connect (phraseBookDialog, TQT_SIGNAL(phrasebookConfirmed (PhraseBook &)),
+ this, TQT_SLOT(slotPhrasebookConfirmed (PhraseBook &)));
// As we do not know whether the phrase book edit window is already open,
// we first open and then raise it, so that it is surely the top window.
@@ -437,7 +437,7 @@ void KMouthApp::slotConfigureTTS() {
}
-void KMouthApp::slotStatusMsg(const QString &text)
+void KMouthApp::slotStatusMsg(const TQString &text)
{
///////////////////////////////////////////////////////////////////
// change status message permanently
@@ -446,8 +446,8 @@ void KMouthApp::slotStatusMsg(const QString &text)
}
void KMouthApp::slotPhrasebookConfirmed (PhraseBook &book) {
- QString name = "phrasebooks";
- QPopupMenu *popup = (QPopupMenu *)factory()->container(name, this);
+ TQString name = "phrasebooks";
+ TQPopupMenu *popup = (TQPopupMenu *)factory()->container(name, this);
KToolBar *toolbar = toolBar ("phrasebookBar");
KActionPtrList actions = phrases->actions ();
@@ -458,9 +458,9 @@ void KMouthApp::slotPhrasebookConfirmed (PhraseBook &book) {
delete phrases;
phrases = new KActionCollection (this, actionCollection());
- book.addToGUI (popup, toolbar, phrases, this, SLOT(slotPhraseSelected (const QString &)));
+ book.addToGUI (popup, toolbar, phrases, this, TQT_SLOT(slotPhraseSelected (const TQString &)));
- QString bookLocation = KApplication::kApplication()->dirs()->saveLocation ("appdata", "/");
+ TQString bookLocation = KApplication::kApplication()->dirs()->saveLocation ("appdata", "/");
if (!bookLocation.isNull() && !bookLocation.isEmpty()) {
book.save (KURL::fromPathOrURL( bookLocation + "standard.phrasebook" ));
}
@@ -471,7 +471,7 @@ void KMouthApp::slotConfigurationChanged()
optionsDialog->saveOptions (config);
}
-void KMouthApp::slotPhraseSelected (const QString &phrase) {
+void KMouthApp::slotPhraseSelected (const TQString &phrase) {
phraseList->insert (phrase);
if (optionsDialog->isSpeakImmediately())
phraseList->speak ();