diff options
author | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2010-07-31 19:51:49 +0000 |
---|---|---|
committer | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2010-07-31 19:51:49 +0000 |
commit | 4ae0c208b66e0f7954e194384464fe2d0a2c56dd (patch) | |
tree | b0a7cd1c184f0003c0292eb416ed27f674f9cc43 /umbrello/umbrello/dialogs/codegenerationwizard.cpp | |
parent | 1964ea0fb4ab57493ca2ebb709c8d3b5395fd653 (diff) | |
download | tdesdk-4ae0c208b66e0f7954e194384464fe2d0a2c56dd.tar.gz tdesdk-4ae0c208b66e0f7954e194384464fe2d0a2c56dd.zip |
Trinity Qt initial conversion
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdesdk@1157652 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'umbrello/umbrello/dialogs/codegenerationwizard.cpp')
-rw-r--r-- | umbrello/umbrello/dialogs/codegenerationwizard.cpp | 62 |
1 files changed, 31 insertions, 31 deletions
diff --git a/umbrello/umbrello/dialogs/codegenerationwizard.cpp b/umbrello/umbrello/dialogs/codegenerationwizard.cpp index ca726398..b64e30dc 100644 --- a/umbrello/umbrello/dialogs/codegenerationwizard.cpp +++ b/umbrello/umbrello/dialogs/codegenerationwizard.cpp @@ -21,10 +21,10 @@ #include "codegenerationwizard.h" // qt/kde includes -#include <qdir.h> -#include <qlistview.h> -#include <qfileinfo.h> -#include <qapplication.h> +#include <tqdir.h> +#include <tqlistview.h> +#include <tqfileinfo.h> +#include <tqapplication.h> #include <kdebug.h> #include <klocale.h> #include <kmessagebox.h> @@ -38,18 +38,18 @@ CodeGenerationWizard::CodeGenerationWizard(UMLClassifierList *classList) - : CodeGenerationWizardBase((QWidget*)UMLApp::app()) { + : CodeGenerationWizardBase((TQWidget*)UMLApp::app()) { m_doc = UMLApp::app()->getDocument(); m_app = UMLApp::app(); m_availableList -> setAllColumnsShowFocus(true); - m_availableList -> setResizeMode(QListView::AllColumns); + m_availableList -> setResizeMode(TQListView::AllColumns); m_selectedList -> setAllColumnsShowFocus(true); - m_selectedList -> setResizeMode(QListView::AllColumns); + m_selectedList -> setResizeMode(TQListView::AllColumns); m_statusList -> setAllColumnsShowFocus(true); - m_statusList -> setResizeMode(QListView::AllColumns); + m_statusList -> setResizeMode(TQListView::AllColumns); m_CodeGenerationOptionsPage = new CodeGenerationOptionsPage(this); - connect( m_CodeGenerationOptionsPage, SIGNAL(languageChanged()), this, SLOT(changeLanguage()) ); + connect( m_CodeGenerationOptionsPage, TQT_SIGNAL(languageChanged()), this, TQT_SLOT(changeLanguage()) ); insertPage(m_CodeGenerationOptionsPage, i18n("Code Generation Options"), 1); @@ -60,7 +60,7 @@ CodeGenerationWizard::CodeGenerationWizard(UMLClassifierList *classList) classList = &cList; } for (UMLClassifier *c = classList->first(); c ; c = classList->next()) { - new QListViewItem( m_selectedList, c->getFullyQualifiedName()); + new TQListViewItem( m_selectedList, c->getFullyQualifiedName()); } setNextEnabled(page(0),m_selectedList->childCount() > 0); @@ -68,10 +68,10 @@ CodeGenerationWizard::CodeGenerationWizard(UMLClassifierList *classList) setFinishEnabled(page(2),true); finishButton()->disconnect(); finishButton()->setText(i18n("&Generate")); - connect(finishButton(),SIGNAL(clicked()),this,SLOT(generateCode())); - if ( QApplication::reverseLayout() ) + connect(finishButton(),TQT_SIGNAL(clicked()),this,TQT_SLOT(generateCode())); + if ( TQApplication::reverseLayout() ) { - QPixmap tmpPixmap( *m_addButton->pixmap() ); + TQPixmap tmpPixmap( *m_addButton->pixmap() ); m_addButton->setPixmap(*m_removeButton->pixmap()); m_removeButton->setPixmap(tmpPixmap); } @@ -105,13 +105,13 @@ void CodeGenerationWizard::generateCode() { cancelButton()->setEnabled(false); - connect( codeGenerator, SIGNAL(codeGenerated(UMLClassifier*, bool)), - this, SLOT(classGenerated(UMLClassifier*, bool)) ); + connect( codeGenerator, TQT_SIGNAL(codeGenerated(UMLClassifier*, bool)), + this, TQT_SLOT(classGenerated(UMLClassifier*, bool)) ); UMLClassifierList cList; cList.setAutoDelete(false); - for(QListViewItem *item = m_statusList->firstChild(); item; + for(TQListViewItem *item = m_statusList->firstChild(); item; item = item-> nextSibling()) { UMLClassifier *concept = m_doc->findUMLClassifier(item->text(0)); cList.append(concept); @@ -119,13 +119,13 @@ void CodeGenerationWizard::generateCode() { codeGenerator->writeCodeToFile(cList); finishButton()->setText(i18n("Finish")); finishButton()->disconnect(); - connect(finishButton(),SIGNAL(clicked()),this,SLOT(accept())); + connect(finishButton(),TQT_SIGNAL(clicked()),this,TQT_SLOT(accept())); } } void CodeGenerationWizard::classGenerated(UMLClassifier* concept, bool generated) { - QListViewItem* item = m_statusList->findItem( concept->getFullyQualifiedName(), 0 ); + TQListViewItem* item = m_statusList->findItem( concept->getFullyQualifiedName(), 0 ); if( !item ) { kError()<<"GenerationStatusPage::Error finding class in list view"<<endl; } else if (generated) { @@ -137,16 +137,16 @@ void CodeGenerationWizard::classGenerated(UMLClassifier* concept, bool generated void CodeGenerationWizard::populateStatusList() { m_statusList->clear(); - for(QListViewItem* item = m_selectedList->firstChild(); item; item = item->nextSibling()) { - new QListViewItem(m_statusList,item->text(0),i18n("Not Yet Generated")); + for(TQListViewItem* item = m_selectedList->firstChild(); item; item = item->nextSibling()) { + new TQListViewItem(m_statusList,item->text(0),i18n("Not Yet Generated")); } } -void CodeGenerationWizard::showPage(QWidget *page) { +void CodeGenerationWizard::showPage(TQWidget *page) { if (indexOf(page) == 2) { // first save the settings to the selected generator policy - ((CodeGenerationOptionsPage*)QWizard::page(1))->apply(); + ((CodeGenerationOptionsPage*)TQWizard::page(1))->apply(); // before going on to the final page, check that the output directory exists and is // writable @@ -155,14 +155,14 @@ void CodeGenerationWizard::showPage(QWidget *page) { CodeGenerationPolicy *policy = UMLApp::app()->getCommonPolicy(); // get the output directory path - QFileInfo info(policy->getOutputDirectory().absPath()); + TQFileInfo info(policy->getOutputDirectory().absPath()); if(!info.exists()) { if (KMessageBox::questionYesNo(this, i18n("The folder %1 does not exist. Do you want to create it now?").arg(info.filePath()), i18n("Output Folder Does Not Exist"), i18n("Create Folder"), i18n("Do Not Create")) == KMessageBox::Yes) { - QDir dir; + TQDir dir; if(!dir.mkdir(info.filePath())) { KMessageBox::sorry(this,i18n("The folder could not be created.\nPlease make sure you have write access to its parent folder or select another, valid, folder."), @@ -195,7 +195,7 @@ void CodeGenerationWizard::showPage(QWidget *page) { } } populateStatusList(); - QWizard::showPage(page); + TQWizard::showPage(page); } CodeGenerator* CodeGenerationWizard::generator() { @@ -213,7 +213,7 @@ CodeGenerator* CodeGenerationWizard::generator() { return 0; } - QObject* o=fact->create(m_doc, 0, info->object.latin1()); + TQObject* o=fact->create(m_doc, 0, info->object.latin1()); if(!o) { kDebug()<<"could not create object"<<endl; return 0; @@ -226,14 +226,14 @@ CodeGenerator* CodeGenerationWizard::generator() { return (CodeGenerator*) NULL; } -void CodeGenerationWizard::moveSelectedItems(QListView* fromList, QListView* toList) { - QListViewItemIterator it(fromList, QListViewItemIterator::Selected); +void CodeGenerationWizard::moveSelectedItems(TQListView* fromList, TQListView* toList) { + TQListViewItemIterator it(fromList, TQListViewItemIterator::Selected); while (it.current()) { - QListViewItem* selectedItem = it.current(); + TQListViewItem* selectedItem = it.current(); - QString name = selectedItem->text(0); + TQString name = selectedItem->text(0); if (!toList->findItem(name, 0)) { - new QListViewItem(toList, name); + new TQListViewItem(toList, name); } ++it; |