summaryrefslogtreecommitdiffstats
path: root/umbrello/umbrello/dialogs/activitypage.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'umbrello/umbrello/dialogs/activitypage.cpp')
-rw-r--r--umbrello/umbrello/dialogs/activitypage.cpp94
1 files changed, 47 insertions, 47 deletions
diff --git a/umbrello/umbrello/dialogs/activitypage.cpp b/umbrello/umbrello/dialogs/activitypage.cpp
index 8d3f5931..5a728576 100644
--- a/umbrello/umbrello/dialogs/activitypage.cpp
+++ b/umbrello/umbrello/dialogs/activitypage.cpp
@@ -18,10 +18,10 @@
#include <klocale.h>
#include <kbuttonbox.h>
#include <kdebug.h>
-#include <qlayout.h>
-#include <qstringlist.h>
+#include <tqlayout.h>
+#include <tqstringlist.h>
-ActivityPage::ActivityPage( QWidget * pParent, StateWidget * pWidget ) : QWidget( pParent ) {
+ActivityPage::ActivityPage( TQWidget * pParent, StateWidget * pWidget ) : TQWidget( pParent ) {
m_pStateWidget = pWidget;
m_pMenu = 0;
setupPage();
@@ -32,24 +32,24 @@ ActivityPage::~ActivityPage() {}
void ActivityPage::setupPage() {
int margin = fontMetrics().height();
- QVBoxLayout * mainLayout = new QVBoxLayout( this );
+ TQVBoxLayout * mainLayout = new TQVBoxLayout( this );
mainLayout -> setSpacing(10);
- m_pActivityGB = new QGroupBox(i18n("Activities"), this );
+ m_pActivityGB = new TQGroupBox(i18n("Activities"), this );
// vertical box layout for the activity lists, arrow buttons and the button box
- QVBoxLayout* listVBoxLayout = new QVBoxLayout( m_pActivityGB );
+ TQVBoxLayout* listVBoxLayout = new TQVBoxLayout( m_pActivityGB );
listVBoxLayout -> setMargin(margin);
listVBoxLayout -> setSpacing ( 10 );
//horizontal box contains the list box and the move up/down buttons
- QHBoxLayout* listHBoxLayout = new QHBoxLayout( listVBoxLayout );
+ TQHBoxLayout* listHBoxLayout = new TQHBoxLayout( listVBoxLayout );
- m_pActivityLB = new QListBox(m_pActivityGB );
+ m_pActivityLB = new TQListBox(m_pActivityGB );
listHBoxLayout -> addWidget(m_pActivityLB);
- QVBoxLayout * buttonLayout = new QVBoxLayout( listHBoxLayout );
+ TQVBoxLayout * buttonLayout = new TQVBoxLayout( listHBoxLayout );
m_pTopArrowB = new KArrowButton( m_pActivityGB );
m_pTopArrowB -> setEnabled( false );
@@ -69,42 +69,42 @@ void ActivityPage::setupPage() {
KButtonBox* buttonBox = new KButtonBox(m_pActivityGB);
- buttonBox->addButton( i18n("New Activity..."), this, SLOT(slotNewActivity()) );
+ buttonBox->addButton( i18n("New Activity..."), this, TQT_SLOT(slotNewActivity()) );
m_pDeleteActivityButton = buttonBox->addButton( i18n("Delete"),
- this, SLOT(slotDelete()) );
- m_pRenameButton = buttonBox->addButton( i18n("Rename"), this, SLOT(slotRename()) );
+ this, TQT_SLOT(slotDelete()) );
+ m_pRenameButton = buttonBox->addButton( i18n("Rename"), this, TQT_SLOT(slotRename()) );
listVBoxLayout->addWidget(buttonBox);
mainLayout -> addWidget( m_pActivityGB );
//now fill activity list box
- QStringList list = m_pStateWidget -> getActivityList();
- QStringList::Iterator end(list.end());
+ TQStringList list = m_pStateWidget -> getActivityList();
+ TQStringList::Iterator end(list.end());
- for( QStringList::Iterator it(list.begin()); it != end; ++it ) {
+ for( TQStringList::Iterator it(list.begin()); it != end; ++it ) {
m_pActivityLB -> insertItem( *it );
}
//now setup the signals
- connect(m_pActivityLB, SIGNAL(clicked(QListBoxItem *)), this, SLOT(slotClicked(QListBoxItem *)));
- connect(m_pActivityLB, SIGNAL(rightButtonPressed(QListBoxItem *, const QPoint &)),
- this, SLOT(slotRightButtonPressed(QListBoxItem *, const QPoint &)));
+ connect(m_pActivityLB, TQT_SIGNAL(clicked(TQListBoxItem *)), this, TQT_SLOT(slotClicked(TQListBoxItem *)));
+ connect(m_pActivityLB, TQT_SIGNAL(rightButtonPressed(TQListBoxItem *, const TQPoint &)),
+ this, TQT_SLOT(slotRightButtonPressed(TQListBoxItem *, const TQPoint &)));
- connect(m_pActivityLB, SIGNAL(rightButtonClicked(QListBoxItem *, const QPoint &)),
- this, SLOT(slotRightButtonClicked(QListBoxItem *, const QPoint &)));
+ connect(m_pActivityLB, TQT_SIGNAL(rightButtonClicked(TQListBoxItem *, const TQPoint &)),
+ this, TQT_SLOT(slotRightButtonClicked(TQListBoxItem *, const TQPoint &)));
- 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_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_pActivityLB, SIGNAL( doubleClicked( QListBoxItem* ) ), this, SLOT( slotDoubleClicked( QListBoxItem* ) ) );
+ connect( m_pActivityLB, TQT_SIGNAL( doubleClicked( TQListBoxItem* ) ), this, TQT_SLOT( slotDoubleClicked( TQListBoxItem* ) ) );
enableWidgets(false);
}
void ActivityPage::updateActivities() {
- QStringList list;
+ TQStringList list;
int count = m_pActivityLB -> count();
for( int i = 0; i < count; i++ ) {
list.append( m_pActivityLB -> text( i ) );
@@ -130,7 +130,7 @@ void ActivityPage::slotMenuSelection( int sel ) {
void ActivityPage::slotNewActivity() {
bool ok = false;
- QString name = m_pActivityLB->currentText();
+ TQString name = m_pActivityLB->currentText();
name = KInputDialog::getText( i18n("New Activity"), i18n("Enter the name of the new activity:"),
i18n("new activity"), &ok, UMLApp::app() );
if( ok && name.length() > 0 ) {
@@ -140,7 +140,7 @@ void ActivityPage::slotNewActivity() {
}
void ActivityPage::slotDelete() {
- QString name = m_pActivityLB->currentText();
+ TQString name = m_pActivityLB->currentText();
m_pStateWidget->removeActivity(name);
m_pActivityLB->removeItem( m_pActivityLB->currentItem() );
slotClicked(0);
@@ -148,8 +148,8 @@ void ActivityPage::slotDelete() {
void ActivityPage::slotRename() {
bool ok = false;
- QString name = m_pActivityLB -> currentText();
- QString oldName = name;
+ TQString name = m_pActivityLB -> currentText();
+ TQString oldName = name;
name = KInputDialog::getText( i18n("Rename Activity"), i18n("Enter the new name of the activity:"), name, &ok, UMLApp::app() );
if( ok && name.length() > 0 ) {
m_pActivityLB -> changeItem( name, m_pActivityLB -> currentItem());
@@ -157,16 +157,16 @@ void ActivityPage::slotRename() {
}
}
-void ActivityPage::slotRightButtonClicked(QListBoxItem * /*item*/, const QPoint &/* p*/) {
+void ActivityPage::slotRightButtonClicked(TQListBoxItem * /*item*/, const TQPoint &/* p*/) {
if(m_pMenu) {
m_pMenu->hide();
- disconnect(m_pMenu, SIGNAL(activated(int)), this, SLOT(slotMenuSelection(int)));
+ disconnect(m_pMenu, TQT_SIGNAL(activated(int)), this, TQT_SLOT(slotMenuSelection(int)));
delete m_pMenu;
m_pMenu = 0;
}
}
-void ActivityPage::slotRightButtonPressed(QListBoxItem * item, const QPoint & p)
+void ActivityPage::slotRightButtonPressed(TQListBoxItem * item, const TQPoint & p)
{
ListPopupMenu::Menu_Type type = ListPopupMenu::mt_Undefined;
if( item ) { //pressed on an item
@@ -177,13 +177,13 @@ void ActivityPage::slotRightButtonPressed(QListBoxItem * item, const QPoint & p)
if(m_pMenu) {
m_pMenu -> hide();
- disconnect(m_pMenu, SIGNAL(activated(int)), this, SLOT(slotMenuSelection(int)));
+ disconnect(m_pMenu, TQT_SIGNAL(activated(int)), this, TQT_SLOT(slotMenuSelection(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(slotMenuSelection(int)));
+ connect(m_pMenu, TQT_SIGNAL(activated(int)), this, TQT_SLOT(slotMenuSelection(int)));
}
@@ -195,11 +195,11 @@ void ActivityPage::slotTopClicked() {
return;
//swap the text around in the ListBox
- QString currentString = m_pActivityLB->text( index );
+ TQString currentString = m_pActivityLB->text( index );
m_pActivityLB->removeItem( index );
m_pActivityLB->insertItem( currentString, 0 );
//set the moved item selected
- QListBoxItem* item = m_pActivityLB->item( 0 );
+ TQListBoxItem* item = m_pActivityLB->item( 0 );
m_pActivityLB->setSelected( item, true );
slotClicked(item);
@@ -214,12 +214,12 @@ void ActivityPage::slotUpClicked() {
}
//swap the text around ( meaning attributes )
- QString aboveString = m_pActivityLB -> text( index - 1 );
- QString currentString = m_pActivityLB -> text( index );
+ TQString aboveString = m_pActivityLB -> text( index - 1 );
+ TQString currentString = m_pActivityLB -> text( index );
m_pActivityLB -> changeItem( currentString, index -1 );
m_pActivityLB -> changeItem( aboveString, index );
//set the moved atttribute selected
- QListBoxItem * item = m_pActivityLB -> item( index - 1 );
+ TQListBoxItem * item = m_pActivityLB -> item( index - 1 );
m_pActivityLB -> setSelected( item, true );
slotClicked(item);
}
@@ -233,12 +233,12 @@ void ActivityPage::slotDownClicked() {
}
//swap the text around ( meaning attributes )
- QString belowString = m_pActivityLB -> text( index + 1 );
- QString currentString = m_pActivityLB -> text( index );
+ TQString belowString = m_pActivityLB -> text( index + 1 );
+ TQString currentString = m_pActivityLB -> text( index );
m_pActivityLB -> changeItem( currentString, index + 1 );
m_pActivityLB -> changeItem( belowString, index );
//set the moved atttribute selected
- QListBoxItem * item = m_pActivityLB -> item( index + 1 );
+ TQListBoxItem * item = m_pActivityLB -> item( index + 1 );
m_pActivityLB -> setSelected( item, true );
slotClicked(item);
}
@@ -252,18 +252,18 @@ void ActivityPage::slotBottomClicked() {
return;
//swap the text around in the ListBox
- QString currentString = m_pActivityLB->text( index );
+ TQString currentString = m_pActivityLB->text( index );
m_pActivityLB->removeItem( index );
m_pActivityLB->insertItem( currentString, m_pActivityLB->count() );
//set the moved item selected
- QListBoxItem* item = m_pActivityLB->item( m_pActivityLB->count() - 1 );
+ TQListBoxItem* item = m_pActivityLB->item( m_pActivityLB->count() - 1 );
m_pActivityLB->setSelected( item, true );
slotClicked( item );
}
-void ActivityPage::slotClicked(QListBoxItem *item) {
+void ActivityPage::slotClicked(TQListBoxItem *item) {
//make sure clicked on an item
if(!item) {
enableWidgets(false);
@@ -273,7 +273,7 @@ void ActivityPage::slotClicked(QListBoxItem *item) {
}
}
-void ActivityPage::slotDoubleClicked(QListBoxItem* item) {
+void ActivityPage::slotDoubleClicked(TQListBoxItem* item) {
if (item) {
slotRename();
}