diff options
author | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2010-07-31 19:39:55 +0000 |
---|---|---|
committer | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2010-07-31 19:39:55 +0000 |
commit | 0a6e0958c03e41c87b15557b6f407874f20c2f8d (patch) | |
tree | 2cdd58c4013b1be09cfcbb4ddae2b05712b9aeee /keduca/keducabuilder/kcontroladdedit.cpp | |
parent | 83f9dfafc157ff7823804b3ff457b43d021a5b4b (diff) | |
download | tdeedu-0a6e0958c03e41c87b15557b6f407874f20c2f8d.tar.gz tdeedu-0a6e0958c03e41c87b15557b6f407874f20c2f8d.zip |
Trinity Qt initial conversion
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdeedu@1157642 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 76715e27..f8b60562 100644 --- a/keduca/keducabuilder/kcontroladdedit.cpp +++ b/keduca/keducabuilder/kcontroladdedit.cpp @@ -28,10 +28,10 @@ //#include <.h> // Qt includes -#include <qlabel.h> -#include <qtextedit.h> +#include <tqlabel.h> +#include <tqtextedit.h> -KControlAddEdit::KControlAddEdit(QWidget *parent, const char *name, bool modal, WFlags f) +KControlAddEdit::KControlAddEdit(TQWidget *parent, const char *name, bool modal, WFlags f) : KControlAddEditBase(parent, name, modal, f), _currentAnswerItem(0) { @@ -90,16 +90,16 @@ void KControlAddEdit::fillPage() _keducaFile->recordAnswerFirst(); while( !_keducaFile->recordAnswerEOF() ) { - QListViewItem *newItem = new QListViewItem(_listAnswers); + TQListViewItem *newItem = new TQListViewItem(_listAnswers); newItem->setText(0,_keducaFile->getAnswer( FileRead::AF_TEXT )); newItem->setText(1,_keducaFile->getAnswerValue()?i18n("True"):i18n("False")); - newItem->setText(2,QString::number(_keducaFile->getAnswerPoints())); + newItem->setText(2,TQString::number(_keducaFile->getAnswerPoints())); _keducaFile->recordAnswerNext(); }; } -void KControlAddEdit::setCurrentAnswerItem(QListViewItem *item) +void KControlAddEdit::setCurrentAnswerItem(TQListViewItem *item) { _currentAnswerItem = item; if (item) @@ -114,12 +114,12 @@ void KControlAddEdit::slotAddAnswer() if( !_answerText->text().isEmpty() ) { // add new listview item - QListViewItem *newItem = _currentAnswerItem + TQListViewItem *newItem = _currentAnswerItem ? _currentAnswerItem - : new QListViewItem(_listAnswers,_listAnswers->lastItem()); + : new TQListViewItem(_listAnswers,_listAnswers->lastItem()); newItem->setText(0,_answerText->text()); newItem->setText(1,_answerValue->currentItem() == 1 ?i18n("True"):i18n("False")); - newItem->setText(2,QString::number(_answerPoints->value())); + newItem->setText(2,TQString::number(_answerPoints->value())); // reset values newItem->setSelected(false); @@ -150,7 +150,7 @@ void KControlAddEdit::slotRemoveAnswer() /** Button Up */ void KControlAddEdit::slotMoveUpAnswer() { - QListViewItem *item = _listAnswers->currentItem(); + TQListViewItem *item = _listAnswers->currentItem(); if (item && item->itemAbove()) item->itemAbove()->moveItem(item); @@ -162,7 +162,7 @@ void KControlAddEdit::slotMoveUpAnswer() /** Button Down */ void KControlAddEdit::slotMoveDownAnswer() { - QListViewItem *item = _listAnswers->currentItem(); + TQListViewItem *item = _listAnswers->currentItem(); if (item) item->moveItem(item->itemBelow()); @@ -171,7 +171,7 @@ void KControlAddEdit::slotMoveDownAnswer() _buttonDown->setEnabled(item->itemBelow()!=0); } -void KControlAddEdit::slotAnswerSelected(QListViewItem *item) +void KControlAddEdit::slotAnswerSelected(TQListViewItem *item) { if (!item) return; @@ -198,7 +198,7 @@ void KControlAddEdit::accept() addQuestion(); configWrite(); - done( QDialog::Accepted ); + done( TQDialog::Accepted ); } /** Add question with form data */ @@ -213,7 +213,7 @@ void KControlAddEdit::addQuestion() _keducaFile->setQuestion( FileRead::QF_EXPLAIN, _questionExplain->text() ); _keducaFile->clearAnswers(); - QListViewItem *item = _listAnswers->firstChild(); + TQListViewItem *item = _listAnswers->firstChild(); while (item) { _keducaFile->setAnswer( item->text(0), // The Answer text @@ -227,7 +227,7 @@ void KControlAddEdit::configRead() { KConfig *config = KGlobal::config(); config->setGroup("AddModify Window"); - QSize defaultSize(500,400); + TQSize defaultSize(500,400); resize( config->readSizeEntry("Geometry", &defaultSize ) ); } @@ -255,18 +255,18 @@ void KControlAddEdit::slotDataChanged() /** Preview image */ -void KControlAddEdit::slotPreviewImage( const QString &text) +void KControlAddEdit::slotPreviewImage( const TQString &text) { if( text.isEmpty() ) { _questionPreview->setText(""); _answerPreview->setText(""); return; } - _questionPreview->setPixmap( QPixmap( text ) ); - _answerPreview->setPixmap( QPixmap( text ) ); + _questionPreview->setPixmap( TQPixmap( text ) ); + _answerPreview->setPixmap( TQPixmap( text ) ); } /** show current Page */ -void KControlAddEdit::showPage(QWidget *page) +void KControlAddEdit::showPage(TQWidget *page) { - QWizard::showPage(page); + TQWizard::showPage(page); slotDataChanged(); if ( page == _pageQuestion ) { |