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/classifierlistpage.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/classifierlistpage.cpp')
-rw-r--r-- | umbrello/umbrello/dialogs/classifierlistpage.cpp | 112 |
1 files changed, 56 insertions, 56 deletions
diff --git a/umbrello/umbrello/dialogs/classifierlistpage.cpp b/umbrello/umbrello/dialogs/classifierlistpage.cpp index d7148660..e59956bc 100644 --- a/umbrello/umbrello/dialogs/classifierlistpage.cpp +++ b/umbrello/umbrello/dialogs/classifierlistpage.cpp @@ -25,15 +25,15 @@ #include <kbuttonbox.h> #include <kdebug.h> #include <klocale.h> -#include <qlayout.h> +#include <tqlayout.h> using namespace Uml; -ClassifierListPage::ClassifierListPage(QWidget* parent, UMLClassifier* classifier, - UMLDoc* doc, Uml::Object_Type type) : QWidget(parent) { +ClassifierListPage::ClassifierListPage(TQWidget* parent, UMLClassifier* classifier, + UMLDoc* doc, Uml::Object_Type type) : TQWidget(parent) { m_itemType = type; - QString typeName(""); - QString newItemType(""); + TQString typeName(""); + TQString newItemType(""); if (type == ot_Attribute) { typeName = i18n("Attributes"); newItemType = i18n("N&ew Attribute..."); @@ -61,22 +61,22 @@ ClassifierListPage::ClassifierListPage(QWidget* parent, UMLClassifier* classifie setMinimumSize(310,330); //main layout contains our two group boxes, the list and the documentation - QVBoxLayout* mainLayout = new QVBoxLayout( this ); + TQVBoxLayout* mainLayout = new TQVBoxLayout( this ); mainLayout->setSpacing(10); //top group box, contains a vertical layout with list box above and buttons below - m_pItemListGB = new QGroupBox(typeName, this ); - QVBoxLayout* listVBoxLayout = new QVBoxLayout( m_pItemListGB ); + m_pItemListGB = new TQGroupBox(typeName, this ); + TQVBoxLayout* listVBoxLayout = new TQVBoxLayout( m_pItemListGB ); listVBoxLayout->setMargin(margin); listVBoxLayout->setSpacing ( 10 ); //horizontal box contains the list box and the move up/down buttons - QHBoxLayout* listHBoxLayout = new QHBoxLayout( listVBoxLayout ); - m_pItemListLB = new QListBox(m_pItemListGB); + TQHBoxLayout* listHBoxLayout = new TQHBoxLayout( listVBoxLayout ); + m_pItemListLB = new TQListBox(m_pItemListGB); listHBoxLayout->addWidget(m_pItemListLB); //the move up/down buttons (another vertical box) - QVBoxLayout* buttonLayout = new QVBoxLayout( listHBoxLayout ); + TQVBoxLayout* buttonLayout = new TQVBoxLayout( listHBoxLayout ); m_pTopArrowB = new KArrowButton( m_pItemListGB ); m_pTopArrowB->setEnabled( false ); buttonLayout->addWidget( m_pTopArrowB ); @@ -95,17 +95,17 @@ ClassifierListPage::ClassifierListPage(QWidget* parent, UMLClassifier* classifie //the action buttons KButtonBox* buttonBox = new KButtonBox(m_pItemListGB); - buttonBox->addButton( newItemType, this, SLOT(slotNewListItem()) ); + buttonBox->addButton( newItemType, this, TQT_SLOT(slotNewListItem()) ); m_pDeleteListItemButton = buttonBox->addButton( i18n("&Delete"), - this, SLOT(slotDelete()) ); - m_pPropertiesButton = buttonBox->addButton( i18n("&Properties"), this, SLOT(slotProperties()) ); + this, TQT_SLOT(slotDelete()) ); + m_pPropertiesButton = buttonBox->addButton( i18n("&Properties"), this, TQT_SLOT(slotProperties()) ); listVBoxLayout->addWidget(buttonBox); mainLayout->addWidget(m_pItemListGB); - m_pDocGB = new QGroupBox(i18n("Documentation"), this); - QVBoxLayout* docLayout = new QVBoxLayout( m_pDocGB ); - m_pDocTE = new QTextEdit( m_pDocGB ); + m_pDocGB = new TQGroupBox(i18n("Documentation"), this); + TQVBoxLayout* docLayout = new TQVBoxLayout( m_pDocGB ); + m_pDocTE = new TQTextEdit( m_pDocGB ); docLayout->setMargin(margin); docLayout->setSpacing ( 10 ); docLayout->addWidget( m_pDocTE ); @@ -117,27 +117,27 @@ ClassifierListPage::ClassifierListPage(QWidget* parent, UMLClassifier* classifie // to the ListItemModified slot in this class for (UMLClassifierListItem* listItem = itemList.first(); listItem != 0; listItem = itemList.next() ) { m_pItemListLB->insertItem(listItem->toString(Uml::st_SigNoVis)); - connect( listItem, SIGNAL(modified()),this,SLOT(slotListItemModified()) ); + connect( listItem, TQT_SIGNAL(modified()),this,TQT_SLOT(slotListItemModified()) ); } enableWidgets(false);//disable widgets until an att is chosen m_pOldListItem = 0; - connect(m_pItemListLB, SIGNAL(clicked(QListBoxItem*)), this, SLOT(slotClicked(QListBoxItem*))); - connect(m_pItemListLB, SIGNAL(selectionChanged(QListBoxItem*)), this, SLOT(slotClicked(QListBoxItem*))); - - connect(m_pItemListLB, SIGNAL(rightButtonPressed(QListBoxItem*, const QPoint&)), - this, SLOT(slotRightButtonPressed(QListBoxItem*, const QPoint&))); - - connect(m_pItemListLB, SIGNAL(rightButtonClicked(QListBoxItem*, const QPoint&)), - this, SLOT(slotRightButtonClicked(QListBoxItem*, const QPoint&))); - connect(m_pDoc, SIGNAL(sigObjectCreated(UMLObject*)), this, SLOT(slotListItemCreated(UMLObject*))); - - connect( m_pTopArrowB, SIGNAL( clicked() ), this, SLOT( slotTopClicked() ) ); - connect( m_pUpArrowB, SIGNAL( clicked() ), this, SLOT( slotUpClicked() ) ); - connect( m_pDownArrowB, SIGNAL( clicked() ), this, SLOT( slotDownClicked() ) ); - connect( m_pBottomArrowB, SIGNAL( clicked() ), this, SLOT( slotBottomClicked() ) ); - connect( m_pItemListLB, SIGNAL( doubleClicked( QListBoxItem* ) ), - this, SLOT( slotDoubleClick( QListBoxItem* ) ) ); + connect(m_pItemListLB, TQT_SIGNAL(clicked(TQListBoxItem*)), this, TQT_SLOT(slotClicked(TQListBoxItem*))); + connect(m_pItemListLB, TQT_SIGNAL(selectionChanged(TQListBoxItem*)), this, TQT_SLOT(slotClicked(TQListBoxItem*))); + + connect(m_pItemListLB, TQT_SIGNAL(rightButtonPressed(TQListBoxItem*, const TQPoint&)), + this, TQT_SLOT(slotRightButtonPressed(TQListBoxItem*, const TQPoint&))); + + connect(m_pItemListLB, TQT_SIGNAL(rightButtonClicked(TQListBoxItem*, const TQPoint&)), + this, TQT_SLOT(slotRightButtonClicked(TQListBoxItem*, const TQPoint&))); + connect(m_pDoc, TQT_SIGNAL(sigObjectCreated(UMLObject*)), this, TQT_SLOT(slotListItemCreated(UMLObject*))); + + connect( m_pTopArrowB, TQT_SIGNAL( clicked() ), this, TQT_SLOT( slotTopClicked() ) ); + connect( m_pUpArrowB, TQT_SIGNAL( clicked() ), this, TQT_SLOT( slotUpClicked() ) ); + connect( m_pDownArrowB, TQT_SIGNAL( clicked() ), this, TQT_SLOT( slotDownClicked() ) ); + connect( m_pBottomArrowB, TQT_SIGNAL( clicked() ), this, TQT_SLOT( slotBottomClicked() ) ); + connect( m_pItemListLB, TQT_SIGNAL( doubleClicked( TQListBoxItem* ) ), + this, TQT_SLOT( slotDoubleClick( TQListBoxItem* ) ) ); } ClassifierListPage::~ClassifierListPage() { @@ -189,7 +189,7 @@ void ClassifierListPage::enableWidgets(bool state) { m_pPropertiesButton->setEnabled(true); } -void ClassifierListPage::slotClicked(QListBoxItem*item) { +void ClassifierListPage::slotClicked(TQListBoxItem*item) { //if not first time an item is highlighted //save old highlighted item first if(m_pOldListItem) { @@ -201,7 +201,7 @@ void ClassifierListPage::slotClicked(QListBoxItem*item) { // focus and so at least one item is always selected; this doesn't happen, if // there are no items of course; // - // for more information see Qt doc for void QListBox::clearSelection() + // for more information see Qt doc for void TQListBox::clearSelection() UMLClassifierListItem* listItem; if (item == NULL) { if (m_pItemListLB->count() == 0) { @@ -226,11 +226,11 @@ void ClassifierListPage::slotClicked(QListBoxItem*item) { void ClassifierListPage::updateObject() { saveCurrentItemDocumentation(); - QListBoxItem*i = m_pItemListLB->item(m_pItemListLB->currentItem()); + TQListBoxItem*i = m_pItemListLB->item(m_pItemListLB->currentItem()); slotClicked(i); // The rest of this function does nothing?! - QStringList stringList; + TQStringList stringList; int count = m_pItemListLB->count(); for( int j = 0; j < count ; j++ ) stringList.append( m_pItemListLB->text( j ) ); @@ -267,16 +267,16 @@ void ClassifierListPage::slotListItemModified() { m_bSigWaiting = false; } -void ClassifierListPage::slotRightButtonClicked(QListBoxItem* /*item*/, const QPoint& /* p*/) { +void ClassifierListPage::slotRightButtonClicked(TQListBoxItem* /*item*/, const TQPoint& /* p*/) { if (m_pMenu) { m_pMenu->hide(); - disconnect(m_pMenu, SIGNAL(activated(int)), this, SLOT(slotPopupMenuSel(int))); + disconnect(m_pMenu, TQT_SIGNAL(activated(int)), this, TQT_SLOT(slotPopupMenuSel(int))); delete m_pMenu; m_pMenu = 0; } } -void ClassifierListPage::slotRightButtonPressed(QListBoxItem* item, const QPoint& p) { +void ClassifierListPage::slotRightButtonPressed(TQListBoxItem* item, const TQPoint& p) { ListPopupMenu::Menu_Type type = ListPopupMenu::mt_Undefined; if (item) { //pressed on a list item if (m_itemType == ot_Attribute) { @@ -309,14 +309,14 @@ void ClassifierListPage::slotRightButtonPressed(QListBoxItem* item, const QPoint } if(m_pMenu) { m_pMenu->hide(); - disconnect(m_pMenu, SIGNAL(activated(int)), this, SLOT(slotPopupMenuSel(int))); + disconnect(m_pMenu, TQT_SIGNAL(activated(int)), this, TQT_SLOT(slotPopupMenuSel(int))); delete m_pMenu; m_pMenu = 0; } m_pMenu = new ListPopupMenu(this, type); m_pMenu->popup(p); - connect(m_pMenu, SIGNAL(activated(int)), this, SLOT(slotPopupMenuSel(int))); + connect(m_pMenu, TQT_SIGNAL(activated(int)), this, TQT_SLOT(slotPopupMenuSel(int))); } void ClassifierListPage::slotPopupMenuSel(int id) { @@ -349,10 +349,10 @@ void ClassifierListPage::slotPopupMenuSel(int id) { } } -void ClassifierListPage::printItemList(QString prologue) { +void ClassifierListPage::printItemList(TQString prologue) { #ifdef VERBOSE_DEBUGGING UMLClassifierListItem* item; - QString buf; + TQString buf; UMLClassifierListItemList itemList = getItemList(); for (UMLClassifierListItemListIt it(itemList); (item = it.current()) != NULL; ++it) buf.append(' ' + item->getName()); @@ -369,11 +369,11 @@ void ClassifierListPage::slotTopClicked() { m_pOldListItem = NULL; //swap the text around in the ListBox - QString currentString = m_pItemListLB->text( index ); + TQString currentString = m_pItemListLB->text( index ); m_pItemListLB->removeItem( index ); m_pItemListLB->insertItem( currentString, 0 ); //set the moved item selected - QListBoxItem* item = m_pItemListLB->item( 0 ); + TQListBoxItem* item = m_pItemListLB->item( 0 ); m_pItemListLB->setSelected( item, true ); //now change around in the list @@ -400,12 +400,12 @@ void ClassifierListPage::slotUpClicked() { m_pOldListItem = NULL; //swap the text around in the ListBox - QString aboveString = m_pItemListLB->text( index - 1 ); - QString currentString = m_pItemListLB->text( index ); + TQString aboveString = m_pItemListLB->text( index - 1 ); + TQString currentString = m_pItemListLB->text( index ); m_pItemListLB->changeItem( currentString, index -1 ); m_pItemListLB->changeItem( aboveString, index ); //set the moved item selected - QListBoxItem* item = m_pItemListLB->item( index - 1 ); + TQListBoxItem* item = m_pItemListLB->item( index - 1 ); m_pItemListLB->setSelected( item, true ); //now change around in the list @@ -434,12 +434,12 @@ void ClassifierListPage::slotDownClicked() { m_pOldListItem = NULL; //swap the text around in the ListBox - QString belowString = m_pItemListLB->text( index + 1 ); - QString currentString = m_pItemListLB->text( index ); + TQString belowString = m_pItemListLB->text( index + 1 ); + TQString currentString = m_pItemListLB->text( index ); m_pItemListLB->changeItem( currentString, index + 1 ); m_pItemListLB->changeItem( belowString, index ); //set the moved item selected - QListBoxItem* item = m_pItemListLB->item( index + 1 ); + TQListBoxItem* item = m_pItemListLB->item( index + 1 ); m_pItemListLB->setSelected( item, true ); //now change around in the list printItemList("itemList before change: "); @@ -467,11 +467,11 @@ void ClassifierListPage::slotBottomClicked() { m_pOldListItem = NULL; //swap the text around in the ListBox - QString currentString = m_pItemListLB->text( index ); + TQString currentString = m_pItemListLB->text( index ); m_pItemListLB->removeItem( index ); m_pItemListLB->insertItem( currentString, m_pItemListLB->count() ); //set the moved item selected - QListBoxItem* item = m_pItemListLB->item( m_pItemListLB->count() - 1 ); + TQListBoxItem* item = m_pItemListLB->item( m_pItemListLB->count() - 1 ); m_pItemListLB->setSelected( item, true ); //now change around in the list @@ -489,7 +489,7 @@ void ClassifierListPage::slotBottomClicked() { slotClicked( item ); } -void ClassifierListPage::slotDoubleClick( QListBoxItem* item ) { +void ClassifierListPage::slotDoubleClick( TQListBoxItem* item ) { if( !item ) return; |