summaryrefslogtreecommitdiffstats
path: root/kwordquiz/src/kwordquiz.cpp
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-06-11 04:44:41 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-06-11 04:44:41 +0000
commita374efce3a207b39514be3c52264091400ce297e (patch)
tree77bdf654b55826d4f59b53a5621310206bcaead1 /kwordquiz/src/kwordquiz.cpp
parentf81a494f3957d5cf38c787973415597941934727 (diff)
downloadtdeedu-a374efce3a207b39514be3c52264091400ce297e.tar.gz
tdeedu-a374efce3a207b39514be3c52264091400ce297e.zip
TQt4 port kdeedu
This enables compilation under both Qt3 and Qt4 git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdeedu@1236073 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'kwordquiz/src/kwordquiz.cpp')
-rw-r--r--kwordquiz/src/kwordquiz.cpp248
1 files changed, 124 insertions, 124 deletions
diff --git a/kwordquiz/src/kwordquiz.cpp b/kwordquiz/src/kwordquiz.cpp
index 9dde6a0c..a13b0aa0 100644
--- a/kwordquiz/src/kwordquiz.cpp
+++ b/kwordquiz/src/kwordquiz.cpp
@@ -52,7 +52,7 @@
#define ID_MODE_1 1
-#define ID_MENU_QUIZ 1001
+#define ID_MENU_TQUIZ 1001
KWordQuizApp::KWordQuizApp(TQWidget* , const char* name):KMainWindow(0, name)
{
@@ -68,7 +68,7 @@ KWordQuizApp::KWordQuizApp(TQWidget* , const char* name):KMainWindow(0, name)
initView();
m_dirWatch = KDirWatch::self();
- m_quizType = WQQuiz::qtEditor;
+ m_quizType = WTQQuiz::qtEditor;
m_quiz = 0;
m_flashView = 0;
m_multipleView = 0;
@@ -105,117 +105,117 @@ void KWordQuizApp::initActions()
KAction* configNotifications;
KAction* configApp;
- fileNew = KStdAction::openNew(this, TQT_SLOT(slotFileNew()), actionCollection());
+ fileNew = KStdAction::openNew(TQT_TQOBJECT(this), TQT_SLOT(slotFileNew()), actionCollection());
fileNew->setWhatsThis(i18n("Creates a new blank vocabulary document"));
fileNew->setToolTip(fileNew->whatsThis());
- fileOpen = KStdAction::open(this, TQT_SLOT(slotFileOpen()), actionCollection());
+ fileOpen = KStdAction::open(TQT_TQOBJECT(this), TQT_SLOT(slotFileOpen()), actionCollection());
fileOpen->setWhatsThis(i18n("Opens an existing vocabulary document"));
fileOpen->setToolTip(fileOpen->whatsThis());
- fileOpenRecent = KStdAction::openRecent(this, TQT_SLOT(slotFileOpenRecent(const KURL&)), actionCollection());
+ fileOpenRecent = KStdAction::openRecent(TQT_TQOBJECT(this), TQT_SLOT(slotFileOpenRecent(const KURL&)), actionCollection());
- fileGHNS = new KAction(i18n("&Get New Vocabularies..."), "knewstuff", "CTRL+G", this, TQT_SLOT(slotFileGHNS()), actionCollection(), "file_ghns");
+ fileGHNS = new KAction(i18n("&Get New Vocabularies..."), "knewstuff", "CTRL+G", TQT_TQOBJECT(this), TQT_SLOT(slotFileGHNS()), actionCollection(), "file_ghns");
fileGHNS->setWhatsThis(i18n("Downloads new vocabularies"));
fileGHNS->setToolTip(fileGHNS->whatsThis());
- fileSave = KStdAction::save(this, TQT_SLOT(slotFileSave()), actionCollection());
+ fileSave = KStdAction::save(TQT_TQOBJECT(this), TQT_SLOT(slotFileSave()), actionCollection());
fileSave->setWhatsThis(i18n("Saves the active vocabulary document"));
fileSave->setToolTip(fileSave->whatsThis());
- fileSaveAs = KStdAction::saveAs(this, TQT_SLOT(slotFileSaveAs()), actionCollection());
+ fileSaveAs = KStdAction::saveAs(TQT_TQOBJECT(this), TQT_SLOT(slotFileSaveAs()), actionCollection());
fileSaveAs->setWhatsThis(i18n("Saves the active vocabulary document with a different name"));
fileSaveAs->setToolTip(fileSaveAs->whatsThis());
- fileClose = KStdAction::close(this, TQT_SLOT(slotFileClose()), actionCollection());
+ fileClose = KStdAction::close(TQT_TQOBJECT(this), TQT_SLOT(slotFileClose()), actionCollection());
fileClose->setWhatsThis(i18n("Closes the active vocabulary document"));
fileClose->setToolTip(fileClose->whatsThis());
- filePrint = KStdAction::print(this, TQT_SLOT(slotFilePrint()), actionCollection());
+ filePrint = KStdAction::print(TQT_TQOBJECT(this), TQT_SLOT(slotFilePrint()), actionCollection());
filePrint->setWhatsThis(i18n("Prints the active vocabulary document"));
filePrint->setToolTip(filePrint->whatsThis());
- fileQuit = KStdAction::quit(this, TQT_SLOT(slotFileQuit()), actionCollection());
+ fileQuit = KStdAction::quit(TQT_TQOBJECT(this), TQT_SLOT(slotFileQuit()), actionCollection());
fileQuit->setWhatsThis(i18n("Quits KWordQuiz"));
fileQuit->setToolTip(fileQuit->whatsThis());
- editUndo = KStdAction::undo(this, TQT_SLOT(slotEditUndo()), actionCollection());
+ editUndo = KStdAction::undo(TQT_TQOBJECT(this), TQT_SLOT(slotEditUndo()), actionCollection());
editUndo->setWhatsThis(i18n("Undoes the last command"));
editUndo->setToolTip(editUndo->whatsThis());
- editCut = KStdAction::cut(this, TQT_SLOT(slotEditCut()), actionCollection());
+ editCut = KStdAction::cut(TQT_TQOBJECT(this), TQT_SLOT(slotEditCut()), actionCollection());
editCut->setWhatsThis(i18n("Cuts the text from the selected cells and places it on the clipboard"));
editCut->setToolTip(editCut->whatsThis());
- editCopy = KStdAction::copy(this, TQT_SLOT(slotEditCopy()), actionCollection());
+ editCopy = KStdAction::copy(TQT_TQOBJECT(this), TQT_SLOT(slotEditCopy()), actionCollection());
editCopy->setWhatsThis(i18n("Copies the text from the selected cells and places it on the clipboard"));
editCopy->setToolTip(editCopy->whatsThis());
- editPaste = KStdAction::paste(this, TQT_SLOT(slotEditPaste()), actionCollection());
+ editPaste = KStdAction::paste(TQT_TQOBJECT(this), TQT_SLOT(slotEditPaste()), actionCollection());
editPaste->setWhatsThis(i18n("Pastes previously cut or copied text from the clipboard into the selected cells"));
editPaste->setToolTip(editPaste->whatsThis());
- editClear = KStdAction::clear(this, TQT_SLOT(slotEditClear()), actionCollection());
+ editClear = KStdAction::clear(TQT_TQOBJECT(this), TQT_SLOT(slotEditClear()), actionCollection());
editClear->setWhatsThis(i18n("Clears the content of the selected cells"));
editClear->setToolTip(editClear->whatsThis());
- editInsert = new KAction(i18n("&Insert Row"), "insert_table_row", "CTRL+I", this, TQT_SLOT(slotEditInsert()), actionCollection(),"edit_insert");
+ editInsert = new KAction(i18n("&Insert Row"), "insert_table_row", "CTRL+I", TQT_TQOBJECT(this), TQT_SLOT(slotEditInsert()), actionCollection(),"edit_insert");
editInsert->setWhatsThis(i18n("Inserts a new row above the current row"));
editInsert->setToolTip(editInsert->whatsThis());
- editDelete = new KAction(i18n("&Delete Row"), "delete_table_row", "CTRL+K", this, TQT_SLOT(slotEditDelete()), actionCollection(),"edit_delete");
+ editDelete = new KAction(i18n("&Delete Row"), "delete_table_row", "CTRL+K", TQT_TQOBJECT(this), TQT_SLOT(slotEditDelete()), actionCollection(),"edit_delete");
editDelete->setWhatsThis(i18n("Deletes the selected row(s)"));
editDelete->setToolTip(editDelete->whatsThis());
- editMarkBlank = new KAction(i18n("&Mark as Blank"), "markasblank", "CTRL+M", this, TQT_SLOT(slotEditMarkBlank()), actionCollection(),"edit_mark_blank");
+ editMarkBlank = new KAction(i18n("&Mark as Blank"), "markasblank", "CTRL+M", TQT_TQOBJECT(this), TQT_SLOT(slotEditMarkBlank()), actionCollection(),"edit_mark_blank");
editMarkBlank->setWhatsThis(i18n("Marks the current or selected word as a blank for Fill-in-the-blank"));
editMarkBlank->setToolTip(editMarkBlank->whatsThis());
- editUnmarkBlank = new KAction(i18n("&Unmark Blanks"), "unmarkasblank", 0, this, TQT_SLOT(slotEditUnmarkBlank()), actionCollection(),"edit_unmark_blank");
+ editUnmarkBlank = new KAction(i18n("&Unmark Blanks"), "unmarkasblank", 0, TQT_TQOBJECT(this), TQT_SLOT(slotEditUnmarkBlank()), actionCollection(),"edit_unmark_blank");
editUnmarkBlank->setWhatsThis(i18n("Removes blanks from the current or selected word"));
editUnmarkBlank->setToolTip(editUnmarkBlank->whatsThis());
- //@todo implement editFind = KStdAction::find(this, TQT_SLOT(slotEditFind()), actionCollection());
+ //@todo implement editFind = KStdAction::tqfind(this, TQT_SLOT(slotEditFind()), actionCollection());
- vocabLanguages = new KAction(i18n("&Column Titles..."), "languages", "CTRL+L", this, TQT_SLOT(slotVocabLanguages()), actionCollection(),"vocab_languages");
+ vocabLanguages = new KAction(i18n("&Column Titles..."), "languages", "CTRL+L", TQT_TQOBJECT(this), TQT_SLOT(slotVocabLanguages()), actionCollection(),"vocab_languages");
vocabLanguages->setWhatsThis(i18n("Defines the column titles for the active vocabulary"));
vocabLanguages->setToolTip(vocabLanguages->whatsThis());
- vocabFont = new KAction(i18n("&Font..."), "fonts", 0, this, TQT_SLOT(slotVocabFont()), actionCollection(),"vocab_font");
+ vocabFont = new KAction(i18n("&Font..."), "fonts", 0, TQT_TQOBJECT(this), TQT_SLOT(slotVocabFont()), actionCollection(),"vocab_font");
vocabFont->setWhatsThis(i18n("Defines the font used by the editor"));
vocabFont->setToolTip(vocabFont->whatsThis());
- //@todo implement vocabKeyboard = new KAction(i18n("&Keyboard..."), "kxkb", 0, this, TQT_SLOT(slotVocabKeyboard()), actionCollection(),"vocab_keyboard");
+ //@todo implement vocabKeyboard = new KAction(i18n("&Keyboard..."), "kxkb", 0, TQT_TQOBJECT(this), TQT_SLOT(slotVocabKeyboard()), actionCollection(),"vocab_keyboard");
- vocabRC = new KAction(i18n("&Rows/Columns..."), "rowcol", 0, this, TQT_SLOT(slotVocabRC()), actionCollection(),"vocab_rc");
+ vocabRC = new KAction(i18n("&Rows/Columns..."), "rowcol", 0, TQT_TQOBJECT(this), TQT_SLOT(slotVocabRC()), actionCollection(),"vocab_rc");
vocabRC->setWhatsThis(i18n("Defines the number of rows, row heights, and column widths for the active vocabulary"));
vocabRC->setToolTip(vocabRC->whatsThis());
- vocabSort = new KAction(i18n("&Sort..."), "sort_incr", 0, this, TQT_SLOT(slotVocabSort()), actionCollection(),"vocab_sort");
+ vocabSort = new KAction(i18n("&Sort..."), "sort_incr", 0, TQT_TQOBJECT(this), TQT_SLOT(slotVocabSort()), actionCollection(),"vocab_sort");
vocabSort->setWhatsThis(i18n("Sorts the vocabulary in ascending or descending order based on the left or right column"));
vocabSort->setToolTip(vocabSort->whatsThis());
- vocabShuffle = new KAction(i18n("Sh&uffle"), "shuffle", 0, this, TQT_SLOT(slotVocabShuffle()), actionCollection(),"vocab_shuffle");
+ vocabShuffle = new KAction(i18n("Sh&uffle"), "shuffle", 0, TQT_TQOBJECT(this), TQT_SLOT(slotVocabShuffle()), actionCollection(),"vocab_shuffle");
vocabShuffle->setWhatsThis(i18n("Shuffles the entries of the active vocabulary"));
vocabShuffle->setToolTip(vocabShuffle->whatsThis());
- mode = new KToolBarPopupAction(i18n("Change Mode"), "mode1", 0, this, TQT_SLOT(slotMode0()), actionCollection(),"mode_0");
+ mode = new KToolBarPopupAction(i18n("Change Mode"), "mode1", 0, TQT_TQOBJECT(this), TQT_SLOT(slotMode0()), actionCollection(),"mode_0");
mode->setWhatsThis(i18n("Changes the mode used in quiz sessions"));
mode->setToolTip(mode->whatsThis());
KPopupMenu *popup = mode->popupMenu();
popup->clear();
- popup->insertItem(KGlobal::iconLoader()->loadIconSet("mode1", KIcon::Toolbar), "", this, TQT_SLOT(slotMode1()), 0, 0);
- popup->insertItem(KGlobal::iconLoader()->loadIconSet("mode2", KIcon::Toolbar), "", this, TQT_SLOT(slotMode2()), 0, 1);
- popup->insertItem(KGlobal::iconLoader()->loadIconSet("mode3", KIcon::Toolbar), "", this, TQT_SLOT(slotMode3()), 0, 2);
- popup->insertItem(KGlobal::iconLoader()->loadIconSet("mode4", KIcon::Toolbar), "", this, TQT_SLOT(slotMode4()), 0, 3);
- popup->insertItem(KGlobal::iconLoader()->loadIconSet("mode5", KIcon::Toolbar), "", this, TQT_SLOT(slotMode5()), 0, 4);
-
- mode1 = new KToggleAction("", "mode1", 0, this, TQT_SLOT(slotMode1()), actionCollection(),"mode_1");
- mode2 = new KToggleAction("", "mode2", 0, this, TQT_SLOT(slotMode2()), actionCollection(),"mode_2");
- mode3 = new KToggleAction("", "mode3", 0, this, TQT_SLOT(slotMode3()), actionCollection(),"mode_3");
- mode4 = new KToggleAction("", "mode4", 0, this, TQT_SLOT(slotMode4()), actionCollection(),"mode_4");
- mode5 = new KToggleAction("", "mode5", 0, this, TQT_SLOT(slotMode5()), actionCollection(),"mode_5");
+ popup->insertItem(KGlobal::iconLoader()->loadIconSet("mode1", KIcon::Toolbar), "", TQT_TQOBJECT(this), TQT_SLOT(slotMode1()), 0, 0);
+ popup->insertItem(KGlobal::iconLoader()->loadIconSet("mode2", KIcon::Toolbar), "", TQT_TQOBJECT(this), TQT_SLOT(slotMode2()), 0, 1);
+ popup->insertItem(KGlobal::iconLoader()->loadIconSet("mode3", KIcon::Toolbar), "", TQT_TQOBJECT(this), TQT_SLOT(slotMode3()), 0, 2);
+ popup->insertItem(KGlobal::iconLoader()->loadIconSet("mode4", KIcon::Toolbar), "", TQT_TQOBJECT(this), TQT_SLOT(slotMode4()), 0, 3);
+ popup->insertItem(KGlobal::iconLoader()->loadIconSet("mode5", KIcon::Toolbar), "", TQT_TQOBJECT(this), TQT_SLOT(slotMode5()), 0, 4);
+
+ mode1 = new KToggleAction("", "mode1", 0, TQT_TQOBJECT(this), TQT_SLOT(slotMode1()), actionCollection(),"mode_1");
+ mode2 = new KToggleAction("", "mode2", 0, TQT_TQOBJECT(this), TQT_SLOT(slotMode2()), actionCollection(),"mode_2");
+ mode3 = new KToggleAction("", "mode3", 0, TQT_TQOBJECT(this), TQT_SLOT(slotMode3()), actionCollection(),"mode_3");
+ mode4 = new KToggleAction("", "mode4", 0, TQT_TQOBJECT(this), TQT_SLOT(slotMode4()), actionCollection(),"mode_4");
+ mode5 = new KToggleAction("", "mode5", 0, TQT_TQOBJECT(this), TQT_SLOT(slotMode5()), actionCollection(),"mode_5");
mode1->setWhatsThis(i18n("Selects this mode"));
mode2->setWhatsThis(i18n("Selects this mode"));
mode3->setWhatsThis(i18n("Selects this mode"));
@@ -227,56 +227,56 @@ void KWordQuizApp::initActions()
mode4->setToolTip(mode4->whatsThis());
mode5->setToolTip(mode5->whatsThis());
- quizEditor = new KAction(i18n("&Editor"), "editor", "F6", this, TQT_SLOT(slotQuizEditor()), actionCollection(),"quiz_editor");
+ quizEditor = new KAction(i18n("&Editor"), "editor", "F6", TQT_TQOBJECT(this), TQT_SLOT(slotQuizEditor()), actionCollection(),"quiz_editor");
quizEditor->setWhatsThis(i18n("Activates the vocabulary editor"));
quizEditor->setToolTip(quizEditor->whatsThis());
- quizFlash = new KAction(i18n("&Flashcard"), "flash", "F7", this, TQT_SLOT(slotQuizFlash()), actionCollection(),"quiz_flash");
+ quizFlash = new KAction(i18n("&Flashcard"), "flash", "F7", TQT_TQOBJECT(this), TQT_SLOT(slotQuizFlash()), actionCollection(),"quiz_flash");
quizFlash->setWhatsThis(i18n("Starts a flashcard session using the active vocabulary"));
quizFlash->setToolTip(quizFlash->whatsThis());
- quizMultiple = new KAction(i18n("&Multiple Choice"), "multiple", "F8", this, TQT_SLOT(slotQuizMultiple()), actionCollection(),"quiz_multiple");
+ quizMultiple = new KAction(i18n("&Multiple Choice"), "multiple", "F8", TQT_TQOBJECT(this), TQT_SLOT(slotQuizMultiple()), actionCollection(),"quiz_multiple");
quizMultiple->setWhatsThis(i18n("Starts a multiple choice session using the active vocabulary"));
quizMultiple->setToolTip(quizMultiple->whatsThis());
- quizQA = new KAction(i18n("&Question && Answer"), "qa", "F9", this, TQT_SLOT(slotQuizQA()), actionCollection(),"quiz_qa");
+ quizQA = new KAction(i18n("&Question && Answer"), "qa", "F9", TQT_TQOBJECT(this), TQT_SLOT(slotQuizQA()), actionCollection(),"quiz_qa");
quizQA->setWhatsThis(i18n("Starts a question and answer session using the active vocabulary"));
quizQA->setToolTip(quizQA->whatsThis());
- quizCheck = new KAction(i18n("&Check"), "check", "Return", this, 0, actionCollection(),"quiz_check");
+ quizCheck = new KAction(i18n("&Check"), "check", "Return", TQT_TQOBJECT(this), 0, actionCollection(),"quiz_check");
quizCheck->setWhatsThis(i18n("Checks your answer to this question"));
quizCheck->setToolTip(quizCheck->whatsThis());
- flashKnow = new KAction(i18n("I &Know"), "know", "K", this, 0, actionCollection(),"flash_know");
+ flashKnow = new KAction(i18n("I &Know"), "know", "K", TQT_TQOBJECT(this), 0, actionCollection(),"flash_know");
flashKnow->setWhatsThis(i18n("Counts this card as correct and shows the next card"));
flashKnow->setToolTip(flashKnow->whatsThis());
- flashDontKnow = new KAction(i18n("I &Do Not Know"), "dontknow", "D", this, 0, actionCollection(),"flash_dont_know");
+ flashDontKnow = new KAction(i18n("I &Do Not Know"), "dontknow", "D", TQT_TQOBJECT(this), 0, actionCollection(),"flash_dont_know");
flashDontKnow->setWhatsThis(i18n("Counts this card as incorrect and shows the next card"));
flashDontKnow->setToolTip(flashDontKnow->whatsThis());
- qaHint = new KAction(i18n("&Hint"), "hint", "CTRL+H", this, 0, actionCollection(),"qa_hint");
+ qaHint = new KAction(i18n("&Hint"), "hint", "CTRL+H", TQT_TQOBJECT(this), 0, actionCollection(),"qa_hint");
qaHint->setWhatsThis(i18n("Gets the next correct letter of the answer"));
qaHint->setToolTip(qaHint->whatsThis());
- quizRestart = new KAction(i18n("&Restart"), "restart.png", "CTRL+R", this, 0, actionCollection(), "quiz_restart");
+ quizRestart = new KAction(i18n("&Restart"), "restart.png", "CTRL+R", TQT_TQOBJECT(this), 0, actionCollection(), "quiz_restart");
quizRestart->setWhatsThis(i18n("Restarts the quiz session from the beginning"));
quizRestart->setToolTip(quizRestart->whatsThis());
- quizRepeatErrors = new KAction(i18n("Repeat &Errors"), "repeat", "CTRL+E", this, 0, actionCollection(),"quiz_repeat_errors");
+ quizRepeatErrors = new KAction(i18n("Repeat &Errors"), "repeat", "CTRL+E", TQT_TQOBJECT(this), 0, actionCollection(),"quiz_repeat_errors");
quizRepeatErrors->setWhatsThis(i18n("Repeats all incorrectly answered questions"));
quizRepeatErrors->setToolTip(quizRepeatErrors->whatsThis());
- configNotifications = KStdAction::configureNotifications(this, TQT_SLOT(slotConfigureNotifications()), actionCollection());
+ configNotifications = KStdAction::configureNotifications(TQT_TQOBJECT(this), TQT_SLOT(slotConfigureNotifications()), actionCollection());
configNotifications->setWhatsThis(i18n("Configures sound and other notifications for certain events"));
configNotifications->setToolTip(configNotifications->whatsThis());
- configApp = KStdAction::preferences(this, TQT_SLOT( slotConfigure()), actionCollection());
+ configApp = KStdAction::preferences(TQT_TQOBJECT(this), TQT_SLOT( slotConfigure()), actionCollection());
configApp->setWhatsThis(i18n("Specifies preferences for the vocabulary editor and quiz sessions"));
configApp->setToolTip(configApp->whatsThis());
- charMapper = new TQSignalMapper(this);
- connect(charMapper, TQT_SIGNAL(mapped(int)), this, TQT_SLOT(slotInsertChar(int)));
+ charMapper = new TQSignalMapper(TQT_TQOBJECT(this));
+ connect(charMapper, TQT_SIGNAL(mapped(int)), TQT_TQOBJECT(this), TQT_SLOT(slotInsertChar(int)));
specialChar1 = new KAction(i18n("Special Character 1"), "", "CTRL+1", charMapper, TQT_SLOT(map()), actionCollection(), "char_1") ;
specialChar2 = new KAction(i18n("Special Character 2"), 0, "CTRL+2", charMapper, TQT_SLOT(map()), actionCollection(), "char_2") ;
@@ -299,12 +299,12 @@ void KWordQuizApp::initActions()
charMapper->setMapping(specialChar9, 9);
actionCollection()->setHighlightingEnabled(true);
- connect(actionCollection(), TQT_SIGNAL(actionStatusText(const TQString &)), this, TQT_SLOT(slotStatusMsg(const TQString &)));
- connect(actionCollection(), TQT_SIGNAL(actionHighlighted(KAction *, bool)), this, TQT_SLOT(slotActionHighlighted(KAction *, bool)));
+ connect(actionCollection(), TQT_SIGNAL(actionStatusText(const TQString &)), TQT_TQOBJECT(this), TQT_SLOT(slotStatusMsg(const TQString &)));
+ connect(actionCollection(), TQT_SIGNAL(actionHighlighted(KAction *, bool)), TQT_TQOBJECT(this), TQT_SLOT(slotActionHighlighted(KAction *, bool)));
updateSpecialCharIcons();
if (!initialGeometrySet())
- resize( TQSize(650, 500).expandedTo(minimumSizeHint()));
+ resize( TQSize(650, 500).expandedTo(tqminimumSizeHint()));
setupGUI(ToolBar | Keys | StatusBar | Create);
setAutoSaveSettings();
@@ -333,8 +333,8 @@ void KWordQuizApp::initView()
setCentralWidget(m_editView);
setCaption(doc->URL().fileName(),false);
m_editView->setFont(Prefs::editorFont());
- connect(m_editView, TQT_SIGNAL(undoChange(const TQString&, bool )), this, TQT_SLOT(slotUndoChange(const TQString&, bool)));
- connect(m_editView, TQT_SIGNAL(contextMenuRequested(int, int, const TQPoint &)), this, TQT_SLOT(slotContextMenuRequested(int, int, const TQPoint& )));
+ connect(m_editView, TQT_SIGNAL(undoChange(const TQString&, bool )), TQT_TQOBJECT(this), TQT_SLOT(slotUndoChange(const TQString&, bool)));
+ connect(m_editView, TQT_SIGNAL(contextMenuRequested(int, int, const TQPoint &)), TQT_TQOBJECT(this), TQT_SLOT(slotContextMenuRequested(int, int, const TQPoint& )));
}
void KWordQuizApp::openURL(const KURL& url)
@@ -497,7 +497,7 @@ void KWordQuizApp::slotFileOpen()
cb -> setChecked(false);
TQString filter = i18n("*.kvtml *.wql *.xml.gz *.csv|All Supported Documents\n*.kvtml|KDE Vocabulary Document\n*.wql|KWordQuiz Document\n*.xml.gz|Pauker Lesson\n*.csv|Comma-Separated Values");
- KFileDialog *fd = new KFileDialog(TQString::null, filter, this, 0, true, cb);
+ KFileDialog *fd = new KFileDialog(TQString(), filter, this, 0, true, cb);
fd -> setOperationMode(KFileDialog::Opening);
fd -> setMode(KFile::Files | KFile::ExistingOnly);
fd -> setCaption(i18n("Open Vocabulary Document"));
@@ -568,7 +568,7 @@ void KWordQuizApp::slotFileSave()
void KWordQuizApp::slotFileGHNS()
{
if (!m_newStuff)
- m_newStuff = new KWQNewStuff(this);
+ m_newStuff = new KWTQNewStuff(this);
m_newStuff->download();
}
@@ -585,7 +585,7 @@ bool KWordQuizApp::saveAsFileName( )
bool success = false;
TQString filter = i18n("*.kvtml|KDE Vocabulary Document\n*.wql|KWordQuiz Document\n*.csv|Comma-Separated Values\n*.html|Hypertext Markup Language");
- KFileDialog *fd = new KFileDialog(TQString::null, filter, this, 0, true);
+ KFileDialog *fd = new KFileDialog(TQString(), filter, this, 0, true);
fd -> setOperationMode(KFileDialog::Saving);
fd -> setCaption(i18n("Save Vocabulary Document As"));
@@ -595,7 +595,7 @@ bool KWordQuizApp::saveAsFileName( )
if(!url.isEmpty()){
//@todo check that a valid extension was really given
- if (!url.fileName().contains('.'))
+ if (!url.fileName().tqcontains('.'))
{
if (fd->currentFilter() == "*.wql")
url = KURL(url.path() + ".wql");
@@ -610,7 +610,7 @@ bool KWordQuizApp::saveAsFileName( )
TQFileInfo fileinfo(url.path());
if (fileinfo.exists() && KMessageBox::warningContinueCancel(0,
i18n("<qt>The file<br><b>%1</b><br>already exists. Do you want to overwrite it?</qt>")
- .arg(url.path()),TQString::null,i18n("Overwrite")) == KMessageBox::Cancel)
+ .tqarg(url.path()),TQString(),i18n("Overwrite")) == KMessageBox::Cancel)
{
// do nothing
}
@@ -660,7 +660,7 @@ void KWordQuizApp::slotFileClose()
void KWordQuizApp::slotFilePrint()
{
slotStatusMsg(i18n("Printing..."));
- WQPrintDialogPage * p = new WQPrintDialogPage(this);
+ WTQPrintDialogPage * p = new WTQPrintDialogPage(this);
KPrinter printer;
printer.addDialogPage(p);
printer.setFullPage(true);
@@ -801,7 +801,7 @@ void KWordQuizApp::slotVocabFont()
void KWordQuizApp::slotVocabKeyboard()
{
- slotStatusMsg(i18n("Changing the keyboard layout..."));
+ slotStatusMsg(i18n("Changing the keyboard tqlayout..."));
KMessageBox::sorry(0, i18n("Not implemented yet"));
slotStatusMsg(i18n("Ready"));
}
@@ -885,32 +885,32 @@ void KWordQuizApp::slotMode5()
void KWordQuizApp::slotQuizEditor()
{
slotStatusMsg(i18n("Starting editor session..."));
- updateSession(WQQuiz::qtEditor);
+ updateSession(WTQQuiz::qtEditor);
slotStatusMsg(i18n("Ready"));
}
void KWordQuizApp::slotQuizFlash()
{
slotStatusMsg(i18n("Starting flashcard session..."));
- updateSession(WQQuiz::qtFlash);
+ updateSession(WTQQuiz::qtFlash);
slotStatusMsg(i18n("Ready"));
}
void KWordQuizApp::slotQuizMultiple()
{
slotStatusMsg(i18n("Starting multiple choice session..."));
- updateSession(WQQuiz::qtMultiple);
+ updateSession(WTQQuiz::qtMultiple);
slotStatusMsg(i18n("Ready"));
}
void KWordQuizApp::slotQuizQA()
{
slotStatusMsg(i18n("Starting question & answer session..."));
- updateSession(WQQuiz::qtQA);
+ updateSession(WTQQuiz::qtQA);
slotStatusMsg(i18n("Ready"));
}
-void KWordQuizApp::updateSession(WQQuiz::QuizType qt)
+void KWordQuizApp::updateSession(WTQQuiz::QuizType qt)
{
if (m_quiz != 0)
{
@@ -919,24 +919,24 @@ void KWordQuizApp::updateSession(WQQuiz::QuizType qt)
}
switch( m_quizType ){
- case WQQuiz::qtEditor:
+ case WTQQuiz::qtEditor:
//
break;
- case WQQuiz::qtFlash:
+ case WTQQuiz::qtFlash:
if (m_flashView != 0)
{
delete(m_flashView);
m_flashView = 0;
}
break;
- case WQQuiz::qtMultiple:
+ case WTQQuiz::qtMultiple:
if (m_multipleView != 0)
{
delete(m_multipleView);
m_multipleView = 0;
}
break;
- case WQQuiz::qtQA:
+ case WTQQuiz::qtQA:
if (m_qaView != 0)
{
delete(m_qaView);
@@ -949,15 +949,15 @@ void KWordQuizApp::updateSession(WQQuiz::QuizType qt)
updateActions(qt);
switch( m_quizType ){
- case WQQuiz::qtEditor:
+ case WTQQuiz::qtEditor:
m_editView->show();
setCentralWidget(m_editView);
m_editView -> setFocus();
break;
- case WQQuiz::qtFlash:
- m_quiz = new WQQuiz(m_editView);
+ case WTQQuiz::qtFlash:
+ m_quiz = new WTQQuiz(m_editView);
connect(m_quiz, TQT_SIGNAL(checkingAnswer(int )), m_editView, TQT_SLOT(slotCheckedAnswer(int )));
- m_quiz ->setQuizType(WQQuiz::qtFlash);
+ m_quiz ->setQuizType(WTQQuiz::qtFlash);
m_quiz->setQuizMode(Prefs::mode());
if (m_quiz -> init())
{
@@ -982,10 +982,10 @@ void KWordQuizApp::updateSession(WQQuiz::QuizType qt)
m_quiz = 0;
}
break;
- case WQQuiz::qtMultiple:
- m_quiz = new WQQuiz(m_editView);
+ case WTQQuiz::qtMultiple:
+ m_quiz = new WTQQuiz(m_editView);
connect(m_quiz, TQT_SIGNAL(checkingAnswer(int )), m_editView, TQT_SLOT(slotCheckedAnswer(int )));
- m_quiz ->setQuizType(WQQuiz::qtMultiple);
+ m_quiz ->setQuizType(WTQQuiz::qtMultiple);
m_quiz->setQuizMode(Prefs::mode());
if (m_quiz -> init())
{
@@ -1009,16 +1009,16 @@ void KWordQuizApp::updateSession(WQQuiz::QuizType qt)
m_quiz = 0;
}
break;
- case WQQuiz::qtQA:
- m_quiz = new WQQuiz(m_editView);
+ case WTQQuiz::qtQA:
+ m_quiz = new WTQQuiz(m_editView);
connect(m_quiz, TQT_SIGNAL(checkingAnswer(int )), m_editView, TQT_SLOT(slotCheckedAnswer(int )));
- m_quiz ->setQuizType(WQQuiz::qtQA);
+ m_quiz ->setQuizType(WTQQuiz::qtQA);
m_quiz->setQuizMode(Prefs::mode());
if (m_quiz -> init())
{
m_editView->saveCurrentSelection(true);
m_editView->hide();
- m_qaView = new QAView(this);
+ m_qaView = new TQAView(this);
connect(quizCheck, TQT_SIGNAL(activated()), m_qaView, TQT_SLOT(slotCheck()));
connect(qaHint, TQT_SIGNAL(activated()), m_qaView, TQT_SLOT(slotHint()));
connect(quizRestart, TQT_SIGNAL(activated()), m_qaView, TQT_SLOT(slotRestart()));
@@ -1055,7 +1055,7 @@ void KWordQuizApp::slotConfigure()
//KConfigDialog didn't find an instance of this dialog, so lets create it :
KWordQuizPrefs* dialog = new KWordQuizPrefs( this, "settings", Prefs::self() );
- connect(dialog, TQT_SIGNAL(settingsChanged()), this, TQT_SLOT(slotApplyPreferences()));
+ connect(dialog, TQT_SIGNAL(settingsChanged()), TQT_TQOBJECT(this), TQT_SLOT(slotApplyPreferences()));
dialog->show();
}
@@ -1064,7 +1064,7 @@ void KWordQuizApp::slotApplyPreferences()
kdDebug() << "Prefs Update" << endl;
editMarkBlank->setEnabled(Prefs::enableBlanks());
editUnmarkBlank->setEnabled(Prefs::enableBlanks());
- m_editView->viewport()->repaint(true);
+ m_editView->viewport()->tqrepaint(true);
updateSpecialCharIcons();
emit settingsChanged();
}
@@ -1074,14 +1074,14 @@ void KWordQuizApp::updateSpecialCharIcons( )
for (int i = 0; i < 9; i++){
KAction * act = actionCollection()->action(TQString("char_" + TQString::number(i + 1)).latin1());
act->setIcon(charIcon(Prefs::specialCharacters()[i]));
- act->setToolTip(i18n("Inserts the character %1").arg(Prefs::specialCharacters()[i]));
+ act->setToolTip(i18n("Inserts the character %1").tqarg(Prefs::specialCharacters()[i]));
}
}
TQString KWordQuizApp::charIcon(const TQChar & c)
{
///Create a name and path for the icon
- TQString s = locateLocal("icon", "char" + TQString::number(c.unicode()) + ".png");
+ TQString s = locateLocal("icon", "char" + TQString::number(c.tqunicode()) + ".png");
///No need to redraw if it already exists
if (KStandardDirs::exists(s))
@@ -1096,19 +1096,19 @@ TQString KWordQuizApp::charIcon(const TQChar & c)
///Create the pixmap
TQPixmap pm(128, 128);
- pm.fill(Qt::white);
+ pm.fill(TQt::white);
TQPainter p(&pm);
p.setFont(font);
- p.setPen(Qt::blue);
- p.drawText(r, Qt::AlignCenter, (TQString) c);
+ p.setPen(TQt::blue);
+ p.drawText(r, TQt::AlignCenter, (TQString) c);
- ///Create transparency mask
+ ///Create transparency tqmask
TQBitmap bm(128, 128);
- bm.fill(Qt::color0);
+ bm.fill(TQt::color0);
TQPainter b(&bm);
b.setFont(font);
- b.setPen(Qt::color1);
- b.drawText(r, Qt::AlignCenter, (TQString) c);
+ b.setPen(TQt::color1);
+ b.drawText(r, TQt::AlignCenter, (TQString) c);
///Mask the pixmap
pm.setMask(bm);
@@ -1131,7 +1131,7 @@ void KWordQuizApp::slotStatusMsg(const TQString &text)
void KWordQuizApp::updateMode(int m)
{
if (m_quiz != 0)
- if (KMessageBox::warningContinueCancel(this, i18n("This will restart your quiz. Do you wish to continue?"), TQString::null, KStdGuiItem::cont(), "askModeQuiz") != KMessageBox::Continue)
+ if (KMessageBox::warningContinueCancel(this, i18n("This will restart your quiz. Do you wish to continue?"), TQString(), KStdGuiItem::cont(), "askModeQuiz") != KMessageBox::Continue)
{
mode1->setChecked(Prefs::mode() == 1);
mode2->setChecked(Prefs::mode() == 2);
@@ -1145,11 +1145,11 @@ void KWordQuizApp::updateMode(int m)
TQString s1 = m_editView -> horizontalHeader()->label(0);
TQString s2 = m_editView -> horizontalHeader()->label(1);
- mode1->setText(i18n("&1 %1 -> %2 In Order").arg(s1).arg(s2));
- mode2->setText(i18n("&2 %1 -> %2 In Order").arg(s2).arg(s1));
- mode3->setText(i18n("&3 %1 -> %2 Randomly").arg(s1).arg(s2));
- mode4->setText(i18n("&4 %1 -> %2 Randomly").arg(s2).arg(s1));
- mode5->setText(i18n("&5 %1 <-> %2 Randomly").arg(s1).arg(s2));
+ mode1->setText(i18n("&1 %1 -> %2 In Order").tqarg(s1).tqarg(s2));
+ mode2->setText(i18n("&2 %1 -> %2 In Order").tqarg(s2).tqarg(s1));
+ mode3->setText(i18n("&3 %1 -> %2 Randomly").tqarg(s1).tqarg(s2));
+ mode4->setText(i18n("&4 %1 -> %2 Randomly").tqarg(s2).tqarg(s1));
+ mode5->setText(i18n("&5 %1 <-> %2 Randomly").tqarg(s1).tqarg(s2));
mode1->setChecked(Prefs::mode() == 1);
mode2->setChecked(Prefs::mode() == 2);
@@ -1164,30 +1164,30 @@ void KWordQuizApp::updateMode(int m)
popup->setItemChecked(3, Prefs::mode() == 4);
popup->setItemChecked(4, Prefs::mode() == 5);
- popup->changeItem(0, i18n("&1 %1 -> %2 In Order").arg(s1).arg(s2));
- popup->changeItem(1, i18n("&2 %1 -> %2 In Order").arg(s2).arg(s1));
- popup->changeItem(2, i18n("&3 %1 -> %2 Randomly").arg(s1).arg(s2));
- popup->changeItem(3, i18n("&4 %1 -> %2 Randomly").arg(s2).arg(s1));
- popup->changeItem(4, i18n("&5 %1 <-> %2 Randomly").arg(s1).arg(s2));
+ popup->changeItem(0, i18n("&1 %1 -> %2 In Order").tqarg(s1).tqarg(s2));
+ popup->changeItem(1, i18n("&2 %1 -> %2 In Order").tqarg(s2).tqarg(s1));
+ popup->changeItem(2, i18n("&3 %1 -> %2 Randomly").tqarg(s1).tqarg(s2));
+ popup->changeItem(3, i18n("&4 %1 -> %2 Randomly").tqarg(s2).tqarg(s1));
+ popup->changeItem(4, i18n("&5 %1 <-> %2 Randomly").tqarg(s1).tqarg(s2));
TQString s;
mode->setIcon("mode" + s.setNum(Prefs::mode()));
switch( Prefs::mode() ){
case 1:
- statusBar()->changeItem(i18n("%1 -> %2 In Order").arg(s1).arg(s2), ID_STATUS_MSG_MODE);
+ statusBar()->changeItem(i18n("%1 -> %2 In Order").tqarg(s1).tqarg(s2), ID_STATUS_MSG_MODE);
break;
case 2:
- statusBar()->changeItem(i18n("%1 -> %2 In Order").arg(s2).arg(s1), ID_STATUS_MSG_MODE);
+ statusBar()->changeItem(i18n("%1 -> %2 In Order").tqarg(s2).tqarg(s1), ID_STATUS_MSG_MODE);
break;
case 3:
- statusBar()->changeItem(i18n("%1 -> %2 Randomly").arg(s1).arg(s2), ID_STATUS_MSG_MODE);
+ statusBar()->changeItem(i18n("%1 -> %2 Randomly").tqarg(s1).tqarg(s2), ID_STATUS_MSG_MODE);
break;
case 4:
- statusBar()->changeItem(i18n("%1 -> %2 Randomly").arg(s2).arg(s1), ID_STATUS_MSG_MODE);
+ statusBar()->changeItem(i18n("%1 -> %2 Randomly").tqarg(s2).tqarg(s1), ID_STATUS_MSG_MODE);
break;
case 5:
- statusBar()->changeItem(i18n("%1 <-> %2 Randomly").arg(s1).arg(s2), ID_STATUS_MSG_MODE);
+ statusBar()->changeItem(i18n("%1 <-> %2 Randomly").tqarg(s1).tqarg(s2), ID_STATUS_MSG_MODE);
break;
}
@@ -1217,9 +1217,9 @@ void KWordQuizApp::slotContextMenuRequested(int row, int col, const TQPoint & po
popup->exec(pos);
}
-void KWordQuizApp::updateActions( WQQuiz::QuizType qt )
+void KWordQuizApp::updateActions( WTQQuiz::QuizType qt )
{
- bool fEdit = (qt == WQQuiz::qtEditor);
+ bool fEdit = (qt == WTQQuiz::qtEditor);
fileSave->setEnabled(fEdit);
fileSaveAs->setEnabled(fEdit);
@@ -1237,21 +1237,21 @@ void KWordQuizApp::updateActions( WQQuiz::QuizType qt )
vocabSort->setEnabled(fEdit);
vocabShuffle->setEnabled(fEdit);
- quizEditor->setEnabled(qt != WQQuiz::qtEditor);
- quizFlash->setEnabled(qt != WQQuiz::qtFlash);
- quizMultiple->setEnabled(qt != WQQuiz::qtMultiple);
- quizQA->setEnabled(qt != WQQuiz::qtQA);
+ quizEditor->setEnabled(qt != WTQQuiz::qtEditor);
+ quizFlash->setEnabled(qt != WTQQuiz::qtFlash);
+ quizMultiple->setEnabled(qt != WTQQuiz::qtMultiple);
+ quizQA->setEnabled(qt != WTQQuiz::qtQA);
- quizCheck->setEnabled(qt != WQQuiz::qtEditor);
- quizRestart->setEnabled(qt != WQQuiz::qtEditor);
+ quizCheck->setEnabled(qt != WTQQuiz::qtEditor);
+ quizRestart->setEnabled(qt != WTQQuiz::qtEditor);
quizRepeatErrors->setEnabled(false);
- flashKnow->setEnabled(qt == WQQuiz::qtFlash);
- flashDontKnow->setEnabled(qt == WQQuiz::qtFlash);
+ flashKnow->setEnabled(qt == WTQQuiz::qtFlash);
+ flashDontKnow->setEnabled(qt == WTQQuiz::qtFlash);
- qaHint->setEnabled(qt == WQQuiz::qtQA);
+ qaHint->setEnabled(qt == WTQQuiz::qtQA);
- toolBar("quizToolBar")->setHidden(qt == WQQuiz::qtEditor);
+ toolBar("quizToolBar")->setHidden(qt == WTQQuiz::qtEditor);
}