diff options
author | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-06-11 04:44:41 +0000 |
---|---|---|
committer | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-06-11 04:44:41 +0000 |
commit | a374efce3a207b39514be3c52264091400ce297e (patch) | |
tree | 77bdf654b55826d4f59b53a5621310206bcaead1 /keduca/keducabuilder/kcontroladdedit.cpp | |
parent | f81a494f3957d5cf38c787973415597941934727 (diff) | |
download | tdeedu-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 'keduca/keducabuilder/kcontroladdedit.cpp')
-rw-r--r-- | keduca/keducabuilder/kcontroladdedit.cpp | 40 |
1 files changed, 20 insertions, 20 deletions
diff --git a/keduca/keducabuilder/kcontroladdedit.cpp b/keduca/keducabuilder/kcontroladdedit.cpp index f8b60562..c6182e8d 100644 --- a/keduca/keducabuilder/kcontroladdedit.cpp +++ b/keduca/keducabuilder/kcontroladdedit.cpp @@ -27,12 +27,12 @@ #include <klistview.h> //#include <.h> -// Qt includes +// TQt includes #include <tqlabel.h> #include <tqtextedit.h> -KControlAddEdit::KControlAddEdit(TQWidget *parent, const char *name, bool modal, WFlags f) - : KControlAddEditBase(parent, name, modal, f), +KControlAddEdit::KControlAddEdit(TQWidget *tqparent, const char *name, bool modal, WFlags f) + : KControlAddEditBase(tqparent, name, modal, f), _currentAnswerItem(0) { configRead(); @@ -72,19 +72,19 @@ void KControlAddEdit::init(FileRead *keducaFile, bool edit) /** Fill page of current record */ void KControlAddEdit::fillPage() { - _questionText->setText( _keducaFile->getQuestion( FileRead::QF_TEXT ) ); - if( !_keducaFile->getQuestion( FileRead::QF_PICTURE ).isEmpty() ) + _questionText->setText( _keducaFile->getQuestion( FileRead::TQF_TEXT ) ); + if( !_keducaFile->getQuestion( FileRead::TQF_PICTURE ).isEmpty() ) { - _questionPreview->setPixmap(_keducaFile->getQuestion(FileRead::QF_PICTURE)); - _answerPreview->setPixmap(_keducaFile->getQuestion(FileRead::QF_PICTURE)); - _questionPicture->setURL( _keducaFile->getQuestion( FileRead::QF_PICTURE ) ); + _questionPreview->setPixmap(_keducaFile->getQuestion(FileRead::TQF_PICTURE)); + _answerPreview->setPixmap(_keducaFile->getQuestion(FileRead::TQF_PICTURE)); + _questionPicture->setURL( _keducaFile->getQuestion( FileRead::TQF_PICTURE ) ); } - _questionType->setCurrentItem( _keducaFile->getQuestionInt( FileRead::QF_TYPE )-1 ); + _questionType->setCurrentItem( _keducaFile->getQuestionInt( FileRead::TQF_TYPE )-1 ); slotQuestionTypeChanged( _questionType->currentItem() ); - _questionPoint->setValue( _keducaFile->getQuestionInt( FileRead::QF_POINTS ) ); - _questionTip->setText( _keducaFile->getQuestion( FileRead::QF_TIP ) ); - _questionExplain->setText( _keducaFile->getQuestion( FileRead::QF_EXPLAIN ) ); - _questionTime->setValue( _keducaFile->getQuestionInt( FileRead::QF_TIME ) ); + _questionPoint->setValue( _keducaFile->getQuestionInt( FileRead::TQF_POINTS ) ); + _questionTip->setText( _keducaFile->getQuestion( FileRead::TQF_TIP ) ); + _questionExplain->setText( _keducaFile->getQuestion( FileRead::TQF_EXPLAIN ) ); + _questionTime->setValue( _keducaFile->getQuestionInt( FileRead::TQF_TIME ) ); _listAnswers->clear(); _keducaFile->recordAnswerFirst(); @@ -204,13 +204,13 @@ void KControlAddEdit::accept() /** Add question with form data */ void KControlAddEdit::addQuestion() { - _keducaFile->setQuestion( FileRead::QF_TEXT, _questionText->text() ); - _keducaFile->setQuestion( FileRead::QF_TYPE, _questionType->currentItem()+1 ); - _keducaFile->setQuestion( FileRead::QF_PICTURE, _questionPicture->url() ); - _keducaFile->setQuestion( FileRead::QF_POINTS, _questionPoint->value() ); - _keducaFile->setQuestion( FileRead::QF_TIME, _questionTime->value() ); - _keducaFile->setQuestion( FileRead::QF_TIP, _questionTip->text() ); - _keducaFile->setQuestion( FileRead::QF_EXPLAIN, _questionExplain->text() ); + _keducaFile->setQuestion( FileRead::TQF_TEXT, _questionText->text() ); + _keducaFile->setQuestion( FileRead::TQF_TYPE, _questionType->currentItem()+1 ); + _keducaFile->setQuestion( FileRead::TQF_PICTURE, _questionPicture->url() ); + _keducaFile->setQuestion( FileRead::TQF_POINTS, _questionPoint->value() ); + _keducaFile->setQuestion( FileRead::TQF_TIME, _questionTime->value() ); + _keducaFile->setQuestion( FileRead::TQF_TIP, _questionTip->text() ); + _keducaFile->setQuestion( FileRead::TQF_EXPLAIN, _questionExplain->text() ); _keducaFile->clearAnswers(); TQListViewItem *item = _listAnswers->firstChild(); |