diff options
Diffstat (limited to 'kverbos/kverbos/kverbos.cpp')
-rw-r--r-- | kverbos/kverbos/kverbos.cpp | 100 |
1 files changed, 50 insertions, 50 deletions
diff --git a/kverbos/kverbos/kverbos.cpp b/kverbos/kverbos/kverbos.cpp index 2a5198cf..96d6930a 100644 --- a/kverbos/kverbos/kverbos.cpp +++ b/kverbos/kverbos/kverbos.cpp @@ -16,9 +16,9 @@ ***************************************************************************/ // include files for QT -#include <qprinter.h> -#include <qcheckbox.h> -#include <qradiobutton.h> +#include <tqprinter.h> +#include <tqcheckbox.h> +#include <tqradiobutton.h> // include files for KDE #include <kfiledialog.h> @@ -48,7 +48,7 @@ int KVerbosApp::kverbosCounter = 0; -KVerbosApp::KVerbosApp(QWidget* , const char* name):KMainWindow (0, name) +KVerbosApp::KVerbosApp(TQWidget* , const char* name):KMainWindow (0, name) { // als erstes das Logo starten KStartupLogo* start_logo = new KStartupLogo(0); @@ -108,7 +108,7 @@ KVerbosApp::~KVerbosApp() kverbosCounter--; if (kfeederControl) { - disconnect(view, SIGNAL(informKFeeder(int)), this, SLOT(slotFeedIt(int))); + disconnect(view, TQT_SIGNAL(informKFeeder(int)), this, TQT_SLOT(slotFeedIt(int))); delete kfeederControl; kfeederControl = 0; }; @@ -116,25 +116,25 @@ KVerbosApp::~KVerbosApp() void KVerbosApp::initActions() { - fileNewWindow = new KAction(i18n("New &Window"), "window_new.png", 0, this, SLOT(slotFileNewWindow()), actionCollection(),"file_new_window"); - fileNew = KStdAction::openNew(this, SLOT(slotFileNew()), actionCollection()); - fileOpen = KStdAction::open(this, SLOT(slotFileOpen()), actionCollection()); - fileOpenRecent = KStdAction::openRecent(this, SLOT(slotFileOpenRecent(const KURL&)), actionCollection()); - fileOpenStandard = new KAction(i18n("Open &Standard Verb File"), "fileopen.png", 0, this, SLOT(slotFileOpenStandard()), actionCollection(),"file_open_standard"); - fileSave = KStdAction::save(this, SLOT(slotFileSave()), actionCollection()); - fileSaveAs = KStdAction::saveAs(this, SLOT(slotFileSaveAs()), actionCollection()); - fileClose = KStdAction::close(this, SLOT(slotFileClose()), actionCollection()); - filePrint = KStdAction::print(this, SLOT(slotFilePrint()), actionCollection()); - fileQuit = KStdAction::quit(this, SLOT(slotFileQuit()), actionCollection()); - editCut = KStdAction::cut(this, SLOT(slotEditCut()), actionCollection()); - editCopy = KStdAction::copy(this, SLOT(slotEditCopy()), actionCollection()); - editPaste = KStdAction::paste(this, SLOT(slotEditPaste()), actionCollection()); - editErfassen = new KAction(i18n("E&nter New Verb..."), 0, 0, this, SLOT(slotEditErfassen()), actionCollection(),"edit_erfassen"); - editBearbeiten = new KAction(i18n("&Edit Verb List..."), 0, 0, this, SLOT(slotEditBearbeiten()), actionCollection(), "edit_bearbeiten"); - - settingOptions = new KAction(i18n("&Configure KVerbos..."), 0, 0, this, SLOT(slotSettingsOptions()), actionCollection(), "settings_options"); - userUsername = new KAction(i18n("&Username..."), 0, 0, this, SLOT(slotSettingsUsername()), actionCollection(), "user_username"); - userResults = new KAction(i18n("&Results"), 0, 0, this, SLOT(slotUserResults()), actionCollection(), "user_results"); + fileNewWindow = new KAction(i18n("New &Window"), "window_new.png", 0, this, TQT_SLOT(slotFileNewWindow()), actionCollection(),"file_new_window"); + fileNew = KStdAction::openNew(this, TQT_SLOT(slotFileNew()), actionCollection()); + fileOpen = KStdAction::open(this, TQT_SLOT(slotFileOpen()), actionCollection()); + fileOpenRecent = KStdAction::openRecent(this, TQT_SLOT(slotFileOpenRecent(const KURL&)), actionCollection()); + fileOpenStandard = new KAction(i18n("Open &Standard Verb File"), "fileopen.png", 0, this, TQT_SLOT(slotFileOpenStandard()), actionCollection(),"file_open_standard"); + fileSave = KStdAction::save(this, TQT_SLOT(slotFileSave()), actionCollection()); + fileSaveAs = KStdAction::saveAs(this, TQT_SLOT(slotFileSaveAs()), actionCollection()); + fileClose = KStdAction::close(this, TQT_SLOT(slotFileClose()), actionCollection()); + filePrint = KStdAction::print(this, TQT_SLOT(slotFilePrint()), actionCollection()); + fileQuit = KStdAction::quit(this, TQT_SLOT(slotFileQuit()), actionCollection()); + editCut = KStdAction::cut(this, TQT_SLOT(slotEditCut()), actionCollection()); + editCopy = KStdAction::copy(this, TQT_SLOT(slotEditCopy()), actionCollection()); + editPaste = KStdAction::paste(this, TQT_SLOT(slotEditPaste()), actionCollection()); + editErfassen = new KAction(i18n("E&nter New Verb..."), 0, 0, this, TQT_SLOT(slotEditErfassen()), actionCollection(),"edit_erfassen"); + editBearbeiten = new KAction(i18n("&Edit Verb List..."), 0, 0, this, TQT_SLOT(slotEditBearbeiten()), actionCollection(), "edit_bearbeiten"); + + settingOptions = new KAction(i18n("&Configure KVerbos..."), 0, 0, this, TQT_SLOT(slotSettingsOptions()), actionCollection(), "settings_options"); + userUsername = new KAction(i18n("&Username..."), 0, 0, this, TQT_SLOT(slotSettingsUsername()), actionCollection(), "user_username"); + userResults = new KAction(i18n("&Results"), 0, 0, this, TQT_SLOT(slotUserResults()), actionCollection(), "user_results"); fileNewWindow->setToolTip(i18n("Opens a new application window")); fileOpenStandard->setToolTip(i18n("Opens the standard KVerbos verb file")); @@ -182,8 +182,8 @@ void KVerbosApp::initDocument() { doc = new KVerbosDoc(this); doc->newDocument(); - connect(doc, SIGNAL(anzahlVerbenGeaendert(int)), this, SLOT(slotStatusVerbMsg(int))); - connect(this, SIGNAL(testAnzahl(int)), this, SLOT(slotStatusVerbMsg(int))); + connect(doc, TQT_SIGNAL(anzahlVerbenGeaendert(int)), this, TQT_SLOT(slotStatusVerbMsg(int))); + connect(this, TQT_SIGNAL(testAnzahl(int)), this, TQT_SLOT(slotStatusVerbMsg(int))); } void KVerbosApp::initView() @@ -197,9 +197,9 @@ void KVerbosApp::initView() setCentralWidget(view); setCaption(doc->URL().fileName(),false); // - connect(view, SIGNAL(numberTrainedChanged(int)), this, SLOT(slotStatusTrainedMsg(int))); - connect(view, SIGNAL(numberCorrectChanged(int)), this, SLOT(slotStatusCorrectMsg(int))); - connect(view, SIGNAL(informKFeeder(int)), this, SLOT(slotFeedIt(int))); + connect(view, TQT_SIGNAL(numberTrainedChanged(int)), this, TQT_SLOT(slotStatusTrainedMsg(int))); + connect(view, TQT_SIGNAL(numberCorrectChanged(int)), this, TQT_SLOT(slotStatusCorrectMsg(int))); + connect(view, TQT_SIGNAL(informKFeeder(int)), this, TQT_SLOT(slotFeedIt(int))); } void KVerbosApp::openDocumentFile(const KURL& url) @@ -224,11 +224,11 @@ void KVerbosApp::saveOptions() // Meine eigenen Optionen // Die zum Lernen ausgewählten Zeiten config->setGroup("tiempos"); - QString key; + TQString key; for (int i = presente; i<MAX_TIEMPOS; i++) { key.setNum(i); - QString options = timeOptions[i][0] ? "true " : "false "; + TQString options = timeOptions[i][0] ? "true " : "false "; options = timeOptions[i][1] ? options + "true " : options + "false "; options = timeOptions[i][2] ? options + "true" : options + "false"; config->writeEntry(key, options); @@ -252,11 +252,11 @@ void KVerbosApp::readOptions() // Meine eigenen Optionen // Die zum Lernen ausgewählten Zeiten config->setGroup("tiempos"); - QString key; + TQString key; for (int i = presente; i<MAX_TIEMPOS; i++) { key.setNum(i); - QString options = config->readEntry ( key, "true false false"); + TQString options = config->readEntry ( key, "true false false"); int pos1 = 0; int pos2 = options.find (' ', pos1, false); timeOptions[i][0] = (options.left(pos2) == "true") ? true : false; @@ -295,8 +295,8 @@ void KVerbosApp::saveProperties(KConfig *_cfg) KURL url=doc->URL(); _cfg->writePathEntry("filename", url.url()); _cfg->writeEntry("modified", doc->isModified()); - QString tempname = kapp->tempSaveName(url.url()); - QString tempurl= KURL::encode_string(tempname); + TQString tempname = kapp->tempSaveName(url.url()); + TQString tempurl= KURL::encode_string(tempname); KURL _url(tempurl); doc->saveDocument(_url); } @@ -305,20 +305,20 @@ void KVerbosApp::saveProperties(KConfig *_cfg) void KVerbosApp::readProperties(KConfig* _cfg) { - QString filename = _cfg->readPathEntry("filename"); + TQString filename = _cfg->readPathEntry("filename"); KURL url(filename); bool modified = _cfg->readBoolEntry("modified", false); if(modified) { bool canRecover; - QString tempname = kapp->checkRecoverFile(filename, canRecover); + TQString tempname = kapp->checkRecoverFile(filename, canRecover); KURL _url(tempname); if(canRecover) { doc->openDocument(_url); doc->setModified(); setCaption(_url.fileName(),true); - QFile::remove(tempname); + TQFile::remove(tempname); } } else @@ -343,7 +343,7 @@ bool KVerbosApp::queryExit() } ///////////////////////////////////////////////////////////////////// -// SLOT IMPLEMENTATION +// TQT_SLOT IMPLEMENTATION ///////////////////////////////////////////////////////////////////// void KVerbosApp::slotFileNewWindow() @@ -385,7 +385,7 @@ void KVerbosApp::slotFileOpen() } else { - KURL url=KFileDialog::getOpenURL(QString::null, + KURL url=KFileDialog::getOpenURL(TQString::null, i18n("*|All Files"), this, i18n("Open File")); if(!url.isEmpty()) { @@ -420,7 +420,7 @@ void KVerbosApp::slotFileOpenRecent(const KURL& url) void KVerbosApp::slotFileOpenStandard() { slotStatusMsg(i18n("Opening file...")); - QString userLanguage = Prefs::userLanguage(); + TQString userLanguage = Prefs::userLanguage(); if(!doc->saveModified()) { // here saving wasn't successful @@ -460,7 +460,7 @@ void KVerbosApp::slotFileSaveAs() { slotStatusMsg(i18n("Saving file with a new filename...")); - KURL url=KFileDialog::getSaveURL(QDir::currentDirPath(), + KURL url=KFileDialog::getSaveURL(TQDir::currentDirPath(), i18n("*|All Files"), this, i18n("Save As")); if(!url.isEmpty()) { @@ -485,7 +485,7 @@ void KVerbosApp::slotFilePrint() { slotStatusMsg(i18n("Printing...")); - QPrinter printer; + TQPrinter printer; if (printer.setup(this)) { view->print(&printer); @@ -536,7 +536,7 @@ void KVerbosApp::slotEditPaste() slotStatusMsg(i18n("Ready.")); } -void KVerbosApp::slotStatusMsg(const QString &text) +void KVerbosApp::slotStatusMsg(const TQString &text) { /////////////////////////////////////////////////////////////////// // change status message permanently @@ -547,7 +547,7 @@ void KVerbosApp::slotStatusMsg(const QString &text) // Gibt die Anzahl der Verben in der Statuszeile aus void KVerbosApp::slotStatusVerbMsg(int n) { - QString s; + TQString s; s.setNum(n,10); s = i18n("Number of verbs: ") + s; statusBar()->changeItem(s, ID_VERBS_MSG); @@ -556,7 +556,7 @@ void KVerbosApp::slotStatusVerbMsg(int n) // Gibt die Anzahl der geübten Verben in der Statuszeile aus. void KVerbosApp::slotStatusTrainedMsg(int n) { - QString s; + TQString s; s.setNum(n,10); s = i18n("Trained: ") + s; statusBar()->changeItem(s, ID_TRAINED_MSG); @@ -565,7 +565,7 @@ void KVerbosApp::slotStatusTrainedMsg(int n) // Gibt die Anzahl der richtig geübten Verben aus. void KVerbosApp::slotStatusCorrectMsg(int n) { - QString s; + TQString s; s.setNum(n,10); s = i18n("Correct: ") + s; statusBar()->changeItem(s, ID_CORRECT_MSG); @@ -710,7 +710,7 @@ void KVerbosApp::slotSettingsOptions() if ((pDlgEdit->CheckBoxKFeeder->isChecked() == false) && (useKFeeder)) { // kfeeder anhalten - disconnect(view, SIGNAL(informKFeeder(int)), this, SLOT(slotFeedIt(int))); + disconnect(view, TQT_SIGNAL(informKFeeder(int)), this, TQT_SLOT(slotFeedIt(int))); delete kfeederControl; kfeederControl = 0; }; @@ -730,8 +730,8 @@ void KVerbosApp::getTimeOptions(bool op[][3]) void KVerbosApp::slotSettingsUsername() { bool ok; - QString n = KInputDialog::getText(i18n("Enter User Name"), i18n("Please enter your name:"), - QString::null , &ok, this).simplifyWhiteSpace(); + TQString n = KInputDialog::getText(i18n("Enter User Name"), i18n("Please enter your name:"), + TQString::null , &ok, this).simplifyWhiteSpace(); if (ok) { statusBar()->changeItem(i18n("user: ") + n, ID_USERNAME_MSG); |