Fix kwordquiz FTBFS

git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdeedu@1236955 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
v3.5.13-sru
tpearson 14 years ago
parent 03763f5a00
commit 56a9ebb65c

@ -39,7 +39,7 @@ FlashView::~FlashView()
} }
void FlashView::setQuiz(WTQQuiz *quiz) void FlashView::setQuiz(WQQuiz *quiz)
{ {
m_quiz = quiz; m_quiz = quiz;
} }

@ -23,7 +23,7 @@
#include "wqscore.h" #include "wqscore.h"
class WTQQuiz; class WQQuiz;
/** /**
@author Peter Hedlund @author Peter Hedlund
@ -37,7 +37,7 @@ public:
~FlashView(); ~FlashView();
void setQuiz(WTQQuiz *quiz); void setQuiz(WQQuiz *quiz);
void init(); void init();
private slots: private slots:
@ -52,7 +52,7 @@ public slots:
void slotApplySettings(); void slotApplySettings();
private: private:
WTQQuiz *m_quiz; WQQuiz *m_quiz;
WTQScore *m_score; WTQScore *m_score;
KAction* actFlip; KAction* actFlip;

@ -68,7 +68,7 @@ KWordQuizApp::KWordQuizApp(TQWidget* , const char* name):KMainWindow(0, name)
initView(); initView();
m_dirWatch = KDirWatch::self(); m_dirWatch = KDirWatch::self();
m_quizType = WTQQuiz::qtEditor; m_quizType = WQQuiz::qtEditor;
m_quiz = 0; m_quiz = 0;
m_flashView = 0; m_flashView = 0;
m_multipleView = 0; m_multipleView = 0;
@ -568,7 +568,7 @@ void KWordQuizApp::slotFileSave()
void KWordQuizApp::slotFileGHNS() void KWordQuizApp::slotFileGHNS()
{ {
if (!m_newStuff) if (!m_newStuff)
m_newStuff = new KWTQNewStuff(this); m_newStuff = new KWQNewStuff(this);
m_newStuff->download(); m_newStuff->download();
} }
@ -660,7 +660,7 @@ void KWordQuizApp::slotFileClose()
void KWordQuizApp::slotFilePrint() void KWordQuizApp::slotFilePrint()
{ {
slotStatusMsg(i18n("Printing...")); slotStatusMsg(i18n("Printing..."));
WTQPrintDialogPage * p = new WTQPrintDialogPage(this); WQPrintDialogPage * p = new WQPrintDialogPage(this);
KPrinter printer; KPrinter printer;
printer.addDialogPage(p); printer.addDialogPage(p);
printer.setFullPage(true); printer.setFullPage(true);
@ -885,32 +885,32 @@ void KWordQuizApp::slotMode5()
void KWordQuizApp::slotQuizEditor() void KWordQuizApp::slotQuizEditor()
{ {
slotStatusMsg(i18n("Starting editor session...")); slotStatusMsg(i18n("Starting editor session..."));
updateSession(WTQQuiz::qtEditor); updateSession(WQQuiz::qtEditor);
slotStatusMsg(i18n("Ready")); slotStatusMsg(i18n("Ready"));
} }
void KWordQuizApp::slotQuizFlash() void KWordQuizApp::slotQuizFlash()
{ {
slotStatusMsg(i18n("Starting flashcard session...")); slotStatusMsg(i18n("Starting flashcard session..."));
updateSession(WTQQuiz::qtFlash); updateSession(WQQuiz::qtFlash);
slotStatusMsg(i18n("Ready")); slotStatusMsg(i18n("Ready"));
} }
void KWordQuizApp::slotQuizMultiple() void KWordQuizApp::slotQuizMultiple()
{ {
slotStatusMsg(i18n("Starting multiple choice session...")); slotStatusMsg(i18n("Starting multiple choice session..."));
updateSession(WTQQuiz::qtMultiple); updateSession(WQQuiz::qtMultiple);
slotStatusMsg(i18n("Ready")); slotStatusMsg(i18n("Ready"));
} }
void KWordQuizApp::slotQuizQA() void KWordQuizApp::slotQuizQA()
{ {
slotStatusMsg(i18n("Starting question & answer session...")); slotStatusMsg(i18n("Starting question & answer session..."));
updateSession(WTQQuiz::qtQA); updateSession(WQQuiz::qtQA);
slotStatusMsg(i18n("Ready")); slotStatusMsg(i18n("Ready"));
} }
void KWordQuizApp::updateSession(WTQQuiz::QuizType qt) void KWordQuizApp::updateSession(WQQuiz::QuizType qt)
{ {
if (m_quiz != 0) if (m_quiz != 0)
{ {
@ -919,24 +919,24 @@ void KWordQuizApp::updateSession(WTQQuiz::QuizType qt)
} }
switch( m_quizType ){ switch( m_quizType ){
case WTQQuiz::qtEditor: case WQQuiz::qtEditor:
// //
break; break;
case WTQQuiz::qtFlash: case WQQuiz::qtFlash:
if (m_flashView != 0) if (m_flashView != 0)
{ {
delete(m_flashView); delete(m_flashView);
m_flashView = 0; m_flashView = 0;
} }
break; break;
case WTQQuiz::qtMultiple: case WQQuiz::qtMultiple:
if (m_multipleView != 0) if (m_multipleView != 0)
{ {
delete(m_multipleView); delete(m_multipleView);
m_multipleView = 0; m_multipleView = 0;
} }
break; break;
case WTQQuiz::qtQA: case WQQuiz::qtQA:
if (m_qaView != 0) if (m_qaView != 0)
{ {
delete(m_qaView); delete(m_qaView);
@ -949,15 +949,15 @@ void KWordQuizApp::updateSession(WTQQuiz::QuizType qt)
updateActions(qt); updateActions(qt);
switch( m_quizType ){ switch( m_quizType ){
case WTQQuiz::qtEditor: case WQQuiz::qtEditor:
m_editView->show(); m_editView->show();
setCentralWidget(m_editView); setCentralWidget(m_editView);
m_editView -> setFocus(); m_editView -> setFocus();
break; break;
case WTQQuiz::qtFlash: case WQQuiz::qtFlash:
m_quiz = new WTQQuiz(m_editView); m_quiz = new WQQuiz(m_editView);
connect(m_quiz, TQT_SIGNAL(checkingAnswer(int )), m_editView, TQT_SLOT(slotCheckedAnswer(int ))); connect(m_quiz, TQT_SIGNAL(checkingAnswer(int )), m_editView, TQT_SLOT(slotCheckedAnswer(int )));
m_quiz ->setQuizType(WTQQuiz::qtFlash); m_quiz ->setQuizType(WQQuiz::qtFlash);
m_quiz->setQuizMode(Prefs::mode()); m_quiz->setQuizMode(Prefs::mode());
if (m_quiz -> init()) if (m_quiz -> init())
{ {
@ -982,10 +982,10 @@ void KWordQuizApp::updateSession(WTQQuiz::QuizType qt)
m_quiz = 0; m_quiz = 0;
} }
break; break;
case WTQQuiz::qtMultiple: case WQQuiz::qtMultiple:
m_quiz = new WTQQuiz(m_editView); m_quiz = new WQQuiz(m_editView);
connect(m_quiz, TQT_SIGNAL(checkingAnswer(int )), m_editView, TQT_SLOT(slotCheckedAnswer(int ))); connect(m_quiz, TQT_SIGNAL(checkingAnswer(int )), m_editView, TQT_SLOT(slotCheckedAnswer(int )));
m_quiz ->setQuizType(WTQQuiz::qtMultiple); m_quiz ->setQuizType(WQQuiz::qtMultiple);
m_quiz->setQuizMode(Prefs::mode()); m_quiz->setQuizMode(Prefs::mode());
if (m_quiz -> init()) if (m_quiz -> init())
{ {
@ -1009,10 +1009,10 @@ void KWordQuizApp::updateSession(WTQQuiz::QuizType qt)
m_quiz = 0; m_quiz = 0;
} }
break; break;
case WTQQuiz::qtQA: case WQQuiz::qtQA:
m_quiz = new WTQQuiz(m_editView); m_quiz = new WQQuiz(m_editView);
connect(m_quiz, TQT_SIGNAL(checkingAnswer(int )), m_editView, TQT_SLOT(slotCheckedAnswer(int ))); connect(m_quiz, TQT_SIGNAL(checkingAnswer(int )), m_editView, TQT_SLOT(slotCheckedAnswer(int )));
m_quiz ->setQuizType(WTQQuiz::qtQA); m_quiz ->setQuizType(WQQuiz::qtQA);
m_quiz->setQuizMode(Prefs::mode()); m_quiz->setQuizMode(Prefs::mode());
if (m_quiz -> init()) if (m_quiz -> init())
{ {
@ -1217,9 +1217,9 @@ void KWordQuizApp::slotContextMenuRequested(int row, int col, const TQPoint & po
popup->exec(pos); popup->exec(pos);
} }
void KWordQuizApp::updateActions( WTQQuiz::QuizType qt ) void KWordQuizApp::updateActions( WQQuiz::QuizType qt )
{ {
bool fEdit = (qt == WTQQuiz::qtEditor); bool fEdit = (qt == WQQuiz::qtEditor);
fileSave->setEnabled(fEdit); fileSave->setEnabled(fEdit);
fileSaveAs->setEnabled(fEdit); fileSaveAs->setEnabled(fEdit);
@ -1237,21 +1237,21 @@ void KWordQuizApp::updateActions( WTQQuiz::QuizType qt )
vocabSort->setEnabled(fEdit); vocabSort->setEnabled(fEdit);
vocabShuffle->setEnabled(fEdit); vocabShuffle->setEnabled(fEdit);
quizEditor->setEnabled(qt != WTQQuiz::qtEditor); quizEditor->setEnabled(qt != WQQuiz::qtEditor);
quizFlash->setEnabled(qt != WTQQuiz::qtFlash); quizFlash->setEnabled(qt != WQQuiz::qtFlash);
quizMultiple->setEnabled(qt != WTQQuiz::qtMultiple); quizMultiple->setEnabled(qt != WQQuiz::qtMultiple);
quizQA->setEnabled(qt != WTQQuiz::qtQA); quizQA->setEnabled(qt != WQQuiz::qtQA);
quizCheck->setEnabled(qt != WTQQuiz::qtEditor); quizCheck->setEnabled(qt != WQQuiz::qtEditor);
quizRestart->setEnabled(qt != WTQQuiz::qtEditor); quizRestart->setEnabled(qt != WQQuiz::qtEditor);
quizRepeatErrors->setEnabled(false); quizRepeatErrors->setEnabled(false);
flashKnow->setEnabled(qt == WTQQuiz::qtFlash); flashKnow->setEnabled(qt == WQQuiz::qtFlash);
flashDontKnow->setEnabled(qt == WTQQuiz::qtFlash); flashDontKnow->setEnabled(qt == WQQuiz::qtFlash);
qaHint->setEnabled(qt == WTQQuiz::qtQA); qaHint->setEnabled(qt == WQQuiz::qtQA);
toolBar("quizToolBar")->setHidden(qt == WTQQuiz::qtEditor); toolBar("quizToolBar")->setHidden(qt == WQQuiz::qtEditor);
} }

@ -41,7 +41,7 @@ class KWordQuizPrefs;
class TQAView; class TQAView;
class MultipleView; class MultipleView;
class FlashView; class FlashView;
class KWTQNewStuff; class KWQNewStuff;
/** /**
* The base class for KWordQuiz application windows. It sets up the main * The base class for KWordQuiz application windows. It sets up the main
@ -227,9 +227,9 @@ class KWordQuizApp : public KMainWindow
void slotContextMenuRequested(int, int, const TQPoint &); void slotContextMenuRequested(int, int, const TQPoint &);
private: private:
WTQQuiz::QuizType m_quizType; WQQuiz::QuizType m_quizType;
WTQQuiz *m_quiz; WQQuiz *m_quiz;
/** view is the main widget which represents your working area. The View /** view is the main widget which represents your working area. The View
* class should handle all events of the view widget. It is kept empty so * class should handle all events of the view widget. It is kept empty so
@ -310,11 +310,11 @@ class KWordQuizApp : public KMainWindow
KAction* specialChar9; KAction* specialChar9;
KDirWatch * m_dirWatch; KDirWatch * m_dirWatch;
KWTQNewStuff * m_newStuff; KWQNewStuff * m_newStuff;
void updateMode(int m); void updateMode(int m);
void updateSession(WTQQuiz::QuizType qt); void updateSession(WQQuiz::QuizType qt);
void updateActions(WTQQuiz::QuizType qt); void updateActions(WQQuiz::QuizType qt);
void updateSpecialCharIcons(); void updateSpecialCharIcons();
TQString charIcon(const TQChar &); TQString charIcon(const TQChar &);
void openURL(const KURL& url); void openURL(const KURL& url);

@ -27,26 +27,26 @@
#include "kwqnewstuff.h" #include "kwqnewstuff.h"
#include "prefs.h" #include "prefs.h"
KWTQNewStuff::KWTQNewStuff(TQWidget *tqparent, const char *name) : TQObject(), KNewStuff("kdeedu/vocabulary", tqparent) KWQNewStuff::KWQNewStuff(TQWidget *tqparent, const char *name) : TQObject(), KNewStuff("kdeedu/vocabulary", tqparent)
{ {
m_app = (KWordQuizApp *) tqparent; m_app = (KWordQuizApp *) tqparent;
} }
bool KWTQNewStuff::install(const TQString & fileName) bool KWQNewStuff::install(const TQString & fileName)
{ {
m_app->slotFileOpenRecent(KURL(fileName)); m_app->slotFileOpenRecent(KURL(fileName));
return true; return true;
} }
bool KWTQNewStuff::createUploadFile(const TQString & fileName) bool KWQNewStuff::createUploadFile(const TQString & fileName)
{ {
return true; return true;
} }
TQString KWTQNewStuff::destinationPath(KNS::Entry * entry) TQString KWQNewStuff::destinationPath(KNS::Entry * entry)
{ {
if (entry) if (entry)
{ {
@ -71,7 +71,7 @@ TQString KWTQNewStuff::destinationPath(KNS::Entry * entry)
} }
TQString KWTQNewStuff::downloadDestination(KNS::Entry * entry) TQString KWQNewStuff::downloadDestination(KNS::Entry * entry)
{ {
TQString file = destinationPath(entry); TQString file = destinationPath(entry);

@ -25,12 +25,12 @@ class KWordQuizApp;
/** /**
@author Peter Hedlund @author Peter Hedlund
*/ */
class KWTQNewStuff : public TQObject, public KNewStuff class KWQNewStuff : public TQObject, public KNewStuff
{ {
Q_OBJECT Q_OBJECT
TQ_OBJECT TQ_OBJECT
public: public:
KWTQNewStuff(TQWidget *tqparent = 0, const char *name = 0); KWQNewStuff(TQWidget *tqparent = 0, const char *name = 0);
/** /**
Installs a downloaded file according to the application's configuration. Installs a downloaded file according to the application's configuration.

@ -37,7 +37,7 @@ MultipleView::MultipleView(TQWidget *tqparent, const char *name, WFlags f)
MultipleView::~MultipleView() MultipleView::~MultipleView()
{} {}
void MultipleView::setQuiz(WTQQuiz *quiz) void MultipleView::setQuiz(WQQuiz *quiz)
{ {
m_quiz = quiz; m_quiz = quiz;
} }
@ -253,7 +253,7 @@ void MultipleView::showQuestion(int i)
lblQuestion -> setText(m_quiz ->question(i)); lblQuestion -> setText(m_quiz ->question(i));
//lblQuestion -> setFont(m_quiz->fontQuestion(i)); //lblQuestion -> setFont(m_quiz->fontQuestion(i));
picQuestion->setPixmap(KGlobal::iconLoader()->loadIcon(m_quiz->quizIcon(i, WTQQuiz::qiLeftCol), KIcon::Panel)); picQuestion->setPixmap(KGlobal::iconLoader()->loadIcon(m_quiz->quizIcon(i, WQQuiz::qiLeftCol), KIcon::Panel));
lblAnswerLanguage -> setText(m_quiz ->langAnswer(i)); lblAnswerLanguage -> setText(m_quiz ->langAnswer(i));
@ -278,7 +278,7 @@ void MultipleView::showQuestion(int i)
opt2->setChecked(false); opt2->setChecked(false);
opt3->setChecked(false); opt3->setChecked(false);
picAnswer->setPixmap(KGlobal::iconLoader()->loadIcon(m_quiz->quizIcon(i, WTQQuiz::qiRightCol), KIcon::Panel)); picAnswer->setPixmap(KGlobal::iconLoader()->loadIcon(m_quiz->quizIcon(i, WQQuiz::qiRightCol), KIcon::Panel));
} }
void MultipleView::slotApplySettings( ) void MultipleView::slotApplySettings( )

@ -35,7 +35,7 @@ public:
~MultipleView(); ~MultipleView();
void setQuiz(WTQQuiz *quiz); void setQuiz(WQQuiz *quiz);
void init(); void init();
public slots: public slots:
@ -48,7 +48,7 @@ public slots:
void slotApplySettings(); void slotApplySettings();
private: private:
WTQQuiz *m_quiz; WQQuiz *m_quiz;
WTQScore *m_score; WTQScore *m_score;
int m_question; int m_question;

@ -74,7 +74,7 @@ TQAView::~TQAView()
delete txtAnswer; //Fixes #122110 on PCLOS and Ubuntu delete txtAnswer; //Fixes #122110 on PCLOS and Ubuntu
} }
void TQAView::setQuiz(WTQQuiz *quiz) void TQAView::setQuiz(WQQuiz *quiz)
{ {
m_quiz = quiz; m_quiz = quiz;
} }
@ -274,7 +274,7 @@ void TQAView::showQuestion(int i)
lblQuestion -> setText(m_quiz ->question(i)); lblQuestion -> setText(m_quiz ->question(i));
//lblQuestion -> setFont(m_quiz->fontQuestion(i)); //lblQuestion -> setFont(m_quiz->fontQuestion(i));
picQuestion->setPixmap(KGlobal::iconLoader()->loadIcon(m_quiz->quizIcon(i, WTQQuiz::qiLeftCol), KIcon::Panel)); picQuestion->setPixmap(KGlobal::iconLoader()->loadIcon(m_quiz->quizIcon(i, WQQuiz::qiLeftCol), KIcon::Panel));
lblAnswerLanguage -> setText(m_quiz ->langAnswer(i)); lblAnswerLanguage -> setText(m_quiz ->langAnswer(i));
@ -290,7 +290,7 @@ void TQAView::showQuestion(int i)
//txtAnswer->setFont(m_quiz->fontAnswer(i)); //txtAnswer->setFont(m_quiz->fontAnswer(i));
txtAnswer -> setText(""); txtAnswer -> setText("");
picAnswer->setPixmap(KGlobal::iconLoader()->loadIcon(m_quiz->quizIcon(i, WTQQuiz::qiRightCol), KIcon::Panel)); picAnswer->setPixmap(KGlobal::iconLoader()->loadIcon(m_quiz->quizIcon(i, WQQuiz::qiRightCol), KIcon::Panel));
//@todo handle keyboard tqlayouts //@todo handle keyboard tqlayouts
} }

@ -38,7 +38,7 @@ public:
~TQAView(); ~TQAView();
void setQuiz(WTQQuiz *quiz); void setQuiz(WQQuiz *quiz);
void init(); void init();
public slots: public slots:
@ -50,7 +50,7 @@ public slots:
void slotSpecChar(const TQChar &); void slotSpecChar(const TQChar &);
private: private:
WTQQuiz *m_quiz; WQQuiz *m_quiz;
WTQScore *m_score; WTQScore *m_score;
KAction* actCheck; KAction* actCheck;

@ -25,7 +25,7 @@
#include "wqprintdialogpage.h" #include "wqprintdialogpage.h"
WTQPrintDialogPage::WTQPrintDialogPage(TQWidget *tqparent, const char *name ) WQPrintDialogPage::WQPrintDialogPage(TQWidget *tqparent, const char *name )
: KPrintDialogPage( tqparent, name ) : KPrintDialogPage( tqparent, name )
{ {
setTitle(i18n("Vocabulary Options")); setTitle(i18n("Vocabulary Options"));
@ -54,16 +54,16 @@ WTQPrintDialogPage::WTQPrintDialogPage(TQWidget *tqparent, const char *name )
} }
WTQPrintDialogPage::~WTQPrintDialogPage() WQPrintDialogPage::~WQPrintDialogPage()
{ {
} }
void WTQPrintDialogPage::getOptions(TQMap< TQString, TQString > & opts, bool incldef) void WQPrintDialogPage::getOptions(TQMap< TQString, TQString > & opts, bool incldef)
{ {
opts[ "kde-kwordquiz-type" ] = TQString::number(g->selectedId()); opts[ "kde-kwordquiz-type" ] = TQString::number(g->selectedId());
} }
void WTQPrintDialogPage::setOptions(const TQMap< TQString, TQString > & opts ) void WQPrintDialogPage::setOptions(const TQMap< TQString, TQString > & opts )
{ {
TQString type = opts[ "kde-kwordquiz-type" ]; TQString type = opts[ "kde-kwordquiz-type" ];
switch (type.toInt()) switch (type.toInt())
@ -74,7 +74,7 @@ void WTQPrintDialogPage::setOptions(const TQMap< TQString, TQString > & opts )
} }
} }
bool WTQPrintDialogPage::isValid(const TQString & msg ) bool WQPrintDialogPage::isValid(const TQString & msg )
{ {
return true; return true;
} }

@ -27,14 +27,14 @@ Print dialog page to provide specific print options for KWordQuiz
@author Peter Hedlund @author Peter Hedlund
*/ */
class WTQPrintDialogPage : public KPrintDialogPage class WQPrintDialogPage : public KPrintDialogPage
{ {
Q_OBJECT Q_OBJECT
TQ_OBJECT TQ_OBJECT
public: public:
WTQPrintDialogPage( TQWidget *tqparent = 0, const char *name = 0 ); WQPrintDialogPage( TQWidget *tqparent = 0, const char *name = 0 );
~WTQPrintDialogPage(); ~WQPrintDialogPage();
//reimplement virtual functions //reimplement virtual functions
void getOptions(TQMap<TQString,TQString>& opts, bool incldef = false); void getOptions(TQMap<TQString,TQString>& opts, bool incldef = false);
void setOptions(const TQMap<TQString,TQString>& opts); void setOptions(const TQMap<TQString,TQString>& opts);

@ -23,7 +23,7 @@
#include "wqquiz.h" #include "wqquiz.h"
#include "prefs.h" #include "prefs.h"
WTQQuiz::WTQQuiz(KWordQuizView * tqparent, const char *name) : TQObject(tqparent, name) WQQuiz::WQQuiz(KWordQuizView * tqparent, const char *name) : TQObject(tqparent, name)
{ {
m_table = tqparent; m_table = tqparent;
@ -32,7 +32,7 @@ WTQQuiz::WTQQuiz(KWordQuizView * tqparent, const char *name) : TQObject(tqparent
m_quizList.clear(); m_quizList.clear();
} }
void WTQQuiz::activateErrorList() void WQQuiz::activateErrorList()
{ {
m_list.clear(); m_list.clear();
@ -47,7 +47,7 @@ void WTQQuiz::activateErrorList()
} }
void WTQQuiz::activateBaseList() void WQQuiz::activateBaseList()
{ {
m_list.clear(); m_list.clear();
@ -64,7 +64,7 @@ void WTQQuiz::activateBaseList()
} }
void WTQQuiz::addToList(int aCol, int bCol) void WQQuiz::addToList(int aCol, int bCol)
{ {
//build a list of row numbers containing text in both columns //build a list of row numbers containing text in both columns
@ -114,7 +114,7 @@ void WTQQuiz::addToList(int aCol, int bCol)
} }
bool WTQQuiz::init() bool WQQuiz::init()
{ {
bool result = false; bool result = false;
@ -196,7 +196,7 @@ bool WTQQuiz::init()
return true; return true;
} }
void WTQQuiz::listRandom() void WQQuiz::listRandom()
{ {
TQPtrList<void> list; TQPtrList<void> list;
@ -216,7 +216,7 @@ void WTQQuiz::listRandom()
m_quizList.append(items[i]); m_quizList.append(items[i]);
} }
bool WTQQuiz::checkAnswer(int i, const TQString & a) bool WQQuiz::checkAnswer(int i, const TQString & a)
{ {
bool result = false; bool result = false;
WTQListItem li = m_list[i]; WTQListItem li = m_list[i];
@ -292,7 +292,7 @@ bool WTQQuiz::checkAnswer(int i, const TQString & a)
return result; return result;
} }
TQStringList WTQQuiz::multiOptions(int i) TQStringList WQQuiz::multiOptions(int i)
{ {
TQString *s; TQString *s;
TQStringList Result; TQStringList Result;
@ -347,7 +347,7 @@ TQStringList WTQQuiz::multiOptions(int i)
return Result; return Result;
} }
TQString WTQQuiz::quizIcon(int i, QuizIcon ico) TQString WQQuiz::quizIcon(int i, QuizIcon ico)
{ {
TQString s; TQString s;
WTQListItem li = m_list[i]; WTQListItem li = m_list[i];
@ -369,7 +369,7 @@ TQString WTQQuiz::quizIcon(int i, QuizIcon ico)
return s; return s;
} }
TQString WTQQuiz::yourAnswer(int i, const TQString & s) TQString WQQuiz::yourAnswer(int i, const TQString & s)
{ {
TQString result =""; TQString result ="";
@ -405,7 +405,7 @@ TQString WTQQuiz::yourAnswer(int i, const TQString & s)
return result; return result;
} }
TQString WTQQuiz::hint(int i) TQString WQQuiz::hint(int i)
{ {
if (TQString(m_correctBlank).length() > 0) if (TQString(m_correctBlank).length() > 0)
{ {
@ -417,18 +417,18 @@ TQString WTQQuiz::hint(int i)
} }
} }
void WTQQuiz::setQuizType(QuizType qt) void WQQuiz::setQuizType(QuizType qt)
{ {
m_quizType = qt; m_quizType = qt;
} }
void WTQQuiz::setQuizMode(int qm) void WQQuiz::setQuizMode(int qm)
{ {
m_quizMode = qm; m_quizMode = qm;
} }
TQString WTQQuiz::question(int i) TQString WQQuiz::question(int i)
{ {
WTQListItem li = m_list[i]; WTQListItem li = m_list[i];
TQString s = m_table->text(li.oneOp(), li.question()); TQString s = m_table->text(li.oneOp(), li.question());
@ -448,7 +448,7 @@ TQString WTQQuiz::question(int i)
return s; return s;
} }
TQString WTQQuiz::blankAnswer(int i) TQString WQQuiz::blankAnswer(int i)
{ {
TQString r = ""; TQString r = "";
@ -497,7 +497,7 @@ TQString WTQQuiz::blankAnswer(int i)
return m_answerBlank; return m_answerBlank;
} }
TQString WTQQuiz::answer(int i) TQString WQQuiz::answer(int i)
{ {
TQString s; TQString s;
WTQListItem li = m_list[i]; WTQListItem li = m_list[i];
@ -535,13 +535,13 @@ TQString WTQQuiz::answer(int i)
return s; return s;
} }
TQString WTQQuiz::langQuestion(int i) TQString WQQuiz::langQuestion(int i)
{ {
WTQListItem li = m_list[i]; WTQListItem li = m_list[i];
return m_table->horizontalHeader()->label(li.question()); return m_table->horizontalHeader()->label(li.question());
} }
TQString WTQQuiz::langAnswer(int i) TQString WQQuiz::langAnswer(int i)
{ {
WTQListItem li = m_list[i]; WTQListItem li = m_list[i];
@ -559,7 +559,7 @@ TQString WTQQuiz::langAnswer(int i)
return m_table->horizontalHeader()->label(j); return m_table->horizontalHeader()->label(j);
} }
int WTQQuiz::kbAnswer(int i) int WQQuiz::kbAnswer(int i)
{ {
/* WTQListItem *li = m_list->at(i); /* WTQListItem *li = m_list->at(i);
if (li->question() == 0) if (li->question() == 0)
@ -573,12 +573,12 @@ int WTQQuiz::kbAnswer(int i)
return 0; return 0;
} }
int WTQQuiz::questionCount() int WQQuiz::questionCount()
{ {
return m_questionCount; return m_questionCount;
} }
void WTQQuiz::finish() void WQQuiz::finish()
{ {
emit checkingAnswer(-1); emit checkingAnswer(-1);
} }

@ -30,7 +30,7 @@
typedef TQValueList<WTQListItem> QuizList; typedef TQValueList<WTQListItem> QuizList;
class WTQQuiz : public TQObject class WQQuiz : public TQObject
{ {
Q_OBJECT Q_OBJECT
TQ_OBJECT TQ_OBJECT
@ -38,7 +38,7 @@ class WTQQuiz : public TQObject
enum QuizType {qtEditor, qtFlash, qtMultiple, qtQA}; enum QuizType {qtEditor, qtFlash, qtMultiple, qtQA};
enum QuizIcon {qiLeftCol, qiRightCol, qiQuestion, qiCorrect, qiError}; enum QuizIcon {qiLeftCol, qiRightCol, qiQuestion, qiCorrect, qiError};
WTQQuiz(KWordQuizView * tqparent, const char * name=0); WQQuiz(KWordQuizView * tqparent, const char * name=0);
void activateErrorList(); void activateErrorList();
void activateBaseList(); void activateBaseList();

Loading…
Cancel
Save